首页 > 解决方案 > Jmodelica 界面在模拟模型时自动关闭

问题描述

我使用 Jmodelica 成功编译了我的模型 fmu,并尝试在 Jmodelica 中模拟模型。但是,在加载并模拟fmu后,我得到一个指令“按任意键继续......”,如果我在这里输入任意键,Jmodelica界面会自动关闭。这可能是什么原因?

from pyfmi import load_fmu
model=load_fmu('OU44Emulator_Models_Validation_RealOccupancy.fmu')
res=model.simulate(final_time=86400)
Press any key to continue . . .

我期望的结果如下所示,这是我在 Jmodelica 中运行另一个模型时的结果

res=model.simulate(final_time=86400)
Final Run Statistics: ---

 Number of steps                                 : 44
 Number of function evaluations                  : 72
 Number of Jacobian evaluations                  : 1
 Number of function eval. due to Jacobian eval.  : 5
 Number of error test failures                   : 4
 Number of nonlinear iterations                  : 68
 Number of nonlinear convergence failures        : 0

Solver options:

 Solver                   : CVode
 Linear multistep method  : BDF
 Nonlinear solver         : Newton
 Linear solver type       : DENSE
 Maximal order            : 5
 Tolerances (absolute)    : [  3.00000000e-06   1.00000000e-08   1.00000000e-08   1.00000000e-08
   3.00000000e-06]
 Tolerances (relative)    : 1e-06

Simulation interval    : 0.0 - 86400.0 seconds.
Elapsed simulation time: 0.0079002 seconds.

标签: compilationmodelicajmodelicapyfmi

解决方案


推荐阅读