首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用dymola (dymola.simulateModel)的JSON响应问题

使用dymola (dymola.simulateModel)的JSON响应问题
EN

Stack Overflow用户
提问于 2022-09-30 20:01:06
回答 2查看 122关注 0票数 0

我正在使用:

我不能运行dymola.simulateModel。如果我这样做,我会得到这个错误,这是相当长的:

代码语言:javascript
复制
/*
* 提示:该行代码过长,系统自动注释不进行高亮。一键复制会移除系统注释 
* dymola.dymola_exception.DymolaFunctionException: Failed to parse JSON response. Invalid \escape: line 1 column 3152 (char 3151) {"result": "Translation of <a href=\"Modelica://Modelica.Mechanics.Rotational.Examples.CoupledClutches\">Modelica.Mechanics.Rotational.Examples.CoupledClutches</a>:\nThe DAE has 106 scalar unknowns and 106 scalar equations.\n\nStatistics\n\nOriginal Model\n  Number of components: 14\n  Variables: 180\n  Constants: 21 (21 scalars)\n  Parameters: 53 (56 scalars)\n  Unknowns: 106 (106 scalars)\n  Differentiated variables: 14 scalars\n  Equations: 98\n  Nontrivial: 79\nTranslated Model\n  Constants: 36 scalars\n  Free parameters: 39 scalars\n  Parameter depending: 6 scalars\n  Continuous time states: 8 scalars\n  Time-varying variables: 51 scalars\n  Alias variables: 51 scalars\n  Number of mixed real/discrete systems of equations: 1\n  Sizes of linear systems of equations: {13}\n  Sizes after manipulation of the linear systems: {4}\n  Sizes of nonlinear systems of equations: { }\n  Sizes after manipulation of the nonlinear systems: { }\n  Number of numerical Jacobians: 0\n\nSelected continuous time states\nStatically selected continuous time states\n  clutch1.phi_rel\n  clutch1.w_rel\n  clutch2.phi_rel\n  clutch2.w_rel\n  clutch3.phi_rel\n  clutch3.w_rel\n  J1.phi\n  J1.w\n\nError: Compilation of <a href=\"Modelica://Modelica.Mechanics.Rotational.Examples.CoupledClutches\">Modelica.Mechanics.Rotational.Examples.CoupledClutches</a> failed.\n\nNote: There were translation errors that might explain the problem.\nCompiler message:\n \nCompiling and linking the model (Visual C++). \n \n**********************************************************************\n** Visual Studio 2017 Developer Command Prompt v15.9.50\n** Copyright (c) 2017 Microsoft Corporation\n**********************************************************************\n[vcvarsall.bat] Environment initialized for: &#39;x86&#39;\ndsmodel.c\n   Bibliothek &quot;dymosim.lib&quot; und Objekt &quot;dymosim.exp&quot; werden erstellt.\nlibds.lib(udsshare.obj) : warning LNK4049: Lokal definiertes Symbol &quot;_sprintf&quot; wurde importiert.\nlibds.lib(dymf2c.obj) : warning LNK4049: Lokal definiertes Symbol &quot;_sprintf&quot; wurde importiert.\nlibds.lib(usertab.obj) : warning LNK4049: Lokal definiertes Symbol &quot;_sprintf&quot; wurde importiert.\nlibds.lib(dsres.obj) : warning LNK4049: Lokal definiertes Symbol &quot;_sprintf&quot; wurde importiert.\nlibds.lib(mess.obj) : warning LNK4049: Lokal definiertes Symbol &quot;_sprintf&quot; wurde importiert.\nlibds.lib(dymtable.obj) : warning LNK4049: Lokal definiertes Symbol &quot;_sprintf&quot; wurde importiert.\nlibds.lib(dslin.obj) : warning LNK4049: Lokal definiertes Symbol &quot;_sprintf&quot; wurde importiert.\nlibds.lib(matrixop.obj) : warning LNK4217: Lokal definiertes Symbol &quot;_sprintf&quot; wurde in _Real2String-Funktion importiert.\nlibds.lib(delay.obj) : warning LNK4049: Lokal definiertes Symbol &quot;_sprintf&quot; wurde importiert.\nlibds.lib(dserr.obj) : warning LNK4049: Lokal definiertes Symbol &quot;_sprintf&quot; wurde importiert.\nlibds.lib(dsadd.obj) : warning LNK4049: Lokal definiertes Symbol &quot;_sprintf&quot; wurde importiert.\nlibds.lib(amat.obj) : error LNK2001: Nicht aufgel\366stes externes Symbol &quot;__imp____iob_func&quot;.\nlibds.lib(dymosim2.obj) : error LNK2001: Nicht aufgel\366stes externes Symbol &quot;__imp____iob_func&quot;.\nlibds.lib(aprint.obj) : error LNK2001: Nicht aufgel\366stes externes Symbol &quot;__imp____iob_func&quot;.\nlibds.lib(dsres.obj) : error LNK2001: Nicht aufgel\366stes externes Symbol &quot;__imp____iob_func&quot;.\nlibds.lib(rsyaux.obj) : error LNK2001: Nicht aufgel\366stes externes Symbol &quot;__imp____iob_func&quot;.\nlibds.lib(matrixop.obj) : error LNK2019: Verweis auf nicht aufgel\366stes externes Symbol &quot;__imp___vsnprintf&quot; in Funktion &quot;_ModelicaFormatError&quot;.\nlibds.lib(delay.obj) : error LNK2019: Verweis auf nicht aufgel\366stes externes Symbol &quot;__imp__printf&quot; in Funktion &quot;_delayget&quot;.\nlibds.lib(localeless.obj) : error LNK2019: Verweis auf nicht aufgel\366stes externes Symbol &quot;__imp___fscanf_l&quot; in Funktion &quot;_fscanfC_Bracket_255s&quot;.\nlibds.lib(localeless.obj) : error LNK2019: Verweis auf nicht aufgel\366stes externes Symbol &quot;__imp___sscanf_l&quot; in Funktion &quot;_sscanfCd&quot;.\nlibds.lib(localeless.obj) : error LNK2019: Verweis auf nicht aufgel\366stes externes Symbol &quot;__imp___vsprintf_l&quot; in Funktion &quot;_sprintfC&quot;.\nlibds.lib(localeless.obj) : error LNK2019: Verweis auf nicht aufgel\366stes externes Symbol &quot;__imp___vfprintf_l&quot; in Funktion &quot;_fprintfC&quot;.\nlibds.lib(localeless.obj) : error LNK2019: Verweis auf nicht aufgel\366stes externes Symbol &quot;__imp___vsnprintf_l&quot; in Funktion &quot;_vsnprintfC&quot;.\nlibds.lib(mess.obj) : error LNK2019: Verweis auf nicht aufgel\366stes externes Symbol &quot;__imp__sscanf&quot; in Funktion &quot;_MyHandleRequest&quot;.\nlibds.lib(rsyaux.obj) : error LNK2019: Verweis auf nicht aufgel\366stes externes Symbol &quot;__imp__fprintf&quot; in Funktion &quot;_rsyspg_&quot;.\nlibds.lib(amat.obj) : error LNK2001: Nicht aufgel\366stes externes Symbol &quot;__imp__fprintf&quot;.\nlibds.lib(l_prikey.obj) : error LNK2001: Nicht aufgel\366stes externes Symbol &quot;___iob_func&quot;.\nlibds.lib(lm_pconf.obj) : error LNK2001: Nicht aufgel\366stes externes Symbol &quot;___iob_func&quot;.\nlibds.lib(lm_free_job.obj) : error LNK2001: Nicht aufgel\366stes externes Symbol &quot;___iob_func&quot;.\nlibds.lib(l_check.obj) : error LNK2001: Nicht aufgel\366stes externes Symbol &quot;___iob_func&quot;.\nlibds.lib(lm_perror.obj) : error LNK2001: Nicht aufgel\366stes externes Symbol &quot;___iob_func&quot;.\nlibds.lib(lm_init.obj) : error LNK2001: Nicht aufgel\366stes externes Symbol &quot;___iob_func&quot;.\nlibds.lib(http_lib.obj) : error LNK2001: Nicht aufgel\366stes externes Symbol &quot;_sscanf&quot;.\nlibds.lib(l_validdate.obj) : error LNK2001: Nicht aufgel\366stes externes Symbol &quot;_sscanf&quot;.\nlibds.lib(lm_chk_conf.obj) : error LNK2001: Nicht aufgel\366stes externes Symbol &quot;_sscanf&quot;.\nlibds.lib(lm_crypt.obj) : error LNK2001: Nicht aufgel\366stes externes Symbol &quot;_sscanf&quot;.\nlibds.lib(l_msghello.obj) : error LNK2001: Nicht aufgel\366stes externes Symbol &quot;_sscanf&quot;.\nlibds.lib(l_master_lis.obj) : error LNK2001: Nicht aufgel\366stes externes Symbol &quot;_sscanf&quot;.\nlibds.lib(l_pack.obj) : error LNK2001: Nicht aufgel\366stes externes Symbol &quot;_sscanf&quot;.\nlibds.lib(l_wdec.obj) : error LNK2001: Nicht aufgel\366stes externes Symbol &quot;_sscanf&quot;.\nlibds.lib(l_package.obj) : error LNK2001: Nicht aufgel\366stes externes Symbol &quot;_sscanf&quot;.\nlibds.lib(lm_crstr.obj) : error LNK2001: Nicht aufgel\366stes externes Symbol &quot;_sscanf&quot;.\nlibds.lib(lm_feat_list.obj) : error LNK2001: Nicht aufgel\366stes externes Symbol &quot;_sscanf&quot;.\nlibds.lib(l_get_lfile.obj) : error LNK2001: Nicht aufgel\366stes externes Symbol &quot;_sscanf&quot;.\nlibds.lib(l_get_id.obj) : error LNK2001: Nicht aufgel\366stes externes Symbol &quot;_sscanf&quot;.\nlibds.lib(l_init_file.obj) : error LNK2001: Nicht aufgel\366stes externes Symbol &quot;_sscanf&quot;.\nlibds.lib(lm_get_redir.obj) : error LNK2001: Nicht aufgel\366stes externes Symbol &quot;_sscanf&quot;.\nlibds.lib(l_parse_attr.obj) : error LNK2001: Nicht aufgel\366stes externes Symbol &quot;_sscanf&quot;.\nlibds.lib(l_encode.obj) : error LNK2001: Nicht aufgel\366stes externes Symbol &quot;_sscanf&quot;.\nlibds.lib(l_borrow.obj) : error LNK2001: Nicht aufgel\366stes externes Symbol &quot;_sscanf&quot;.\nlibds.lib(l_allfeat.obj) : error LNK2001: Nicht aufgel\366stes externes Symbol &quot;_sscanf&quot;.\nlibds.lib(flex_version_sig.obj) : error LNK2001: Nicht aufgel\366stes externes Symbol &quot;_sscanf&quot;.\nlibds.lib(lm_ckout.obj) : error LNK2001: Nicht aufgel\366stes externes Symbol &quot;_sscanf&quot;.\nlibds.lib(l_check.obj) : error LNK2001: Nicht aufgel\366stes externes Symbol &quot;_sscanf&quot;.\nlibds.lib(l_date.obj) : error LNK2001: Nicht aufgel\366stes externes Symbol &quot;_sscanf&quot;.\nlibds.lib(lm_getid_typ.obj) : error LNK2001: Nicht aufgel\366stes externes Symbol &quot;_sscanf&quot;.\nlibds.lib(lm_pconf.obj) : error LNK2019: Verweis auf nicht aufgel\366stes externes Symbol &quot;_fprintf&quot; in Funktion &quot;_ofIvx7SqNtK1B5kO3s&quot;.\nlibds.lib(l_check.obj) : error LNK2001: Nicht aufgel\366stes externes Symbol &quot;_fprintf&quot;.\nlibds.lib(lm_perror.obj) : error LNK2001: Nicht aufgel\366stes externes Symbol &quot;_fprintf&quot;.\nlibds.lib(lm_init.obj) : error LNK2001: Nicht aufgel\366stes externes Symbol &quot;_fprintf&quot;.\nlibds.lib(l_prikey.obj) : error LNK2001: Nicht aufgel\366stes externes Symbol &quot;_fprintf&quot;.\nlibds.lib(lm_init.obj) : error LNK2019: Verweis auf nicht aufgel\366stes externes Symbol &quot;_vsprintf&quot; in Funktion &quot;_kPJ76ESxaBOx_mV&quot;.\ndymosim.exe : fatal error LNK1120: 14 nicht aufgel\366ste Externe\n \nError generating Dymosim. \n \nErrors were found\nError: Did not find finalNames element:  J1.w,\n J4.w in call to simulateExtendedModel.\n = false, {0.0, 0.0}\n", "error": null, "id": 6}
*/

谢谢你为帮助我付出的努力

EN

回答 2

Stack Overflow用户

发布于 2022-10-03 08:12:11

Dymola2017 FD01支持Visual 2015 (和早期版本),并且您使用了Visual 2017。

它可能在不受官方支持的情况下工作,但由于Visual 2015中引入的stdio库中的急剧变化(并确定未知的Visual版本需要它),这有点复杂。

首先,我想研究一下,如果不使用Python接口,就可以在Dymola中翻译模型。或者把Dymola升级到更晚的版本。

票数 2
EN

Stack Overflow用户

发布于 2022-11-03 06:38:57

Dymola2017 FD01支持2015,既包括速成版,也包括专业版。您所附的错误消息显示您使用了MSVS 2017。您可以使用MSVS 2015或更低版本的MSVS。Dymola FD01中不同的编译器选项。当我将编译器设置更改为MSVS 2017时,在编译过程中出现了一个错误。错误消息说,它无法将模型链接到C++编译器,因为它使用的是不支持的MSVS编译器。使用MSVS 2017时编译器错误消息。这可能是在您的情况下的问题,您可以尝试使用更低版本的MSVS来克服这个问题。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73913482

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档