使用 pyFMI 进行模拟时出现 CVodeError

2024-03-17

我尝试在 Anaconda (Python 3.6.8) 上设置 pyFMI

安装 pyFMI 站点上列出的所有必需软件包。 fmu 加载没有问题,但当我尝试模拟 fmu 时,出现错误:

Could not find cannot import name 'radau5'
Could not find cannot import name 'dopri5'
Could not find cannot import name 'rodas'
Could not find cannot import name 'odassl'
Could not find ODEPACK functions.
Could not find RADAR5
Could not find GLIMDA.
Traceback (most recent call last):
File "assimulo\solvers\../lib/sundials_callbacks_ida_cvode.pxi", line 240, in   assimulo.solvers.sundials.cv_jac
File "C:\Users\d60378\AppData\Local\Continuum\anaconda3\lib\site-packages\pyfmi\simulation\assimulo_interface.py", line 733, in j
A = self._model._get_A(add_diag=True, output_matrix=self._A)
File "src\pyfmi\fmi.pyx", line 6041, in pyfmi.fmi.FMUModelBase2._get_A
File "src\pyfmi\fmi.pyx", line 7592, in pyfmi.fmi.FMUModelME2._get_directional_proxy
File "src\pyfmi\fmi.pyx", line 5989, in pyfmi.fmi.FMUModelBase2._get_directional_proxy
TypeError: Expected tuple, got dict_keys
Traceback (most recent call last):

 File "<ipython-input-1-6c340902ef15>", line 28, in <module>
 res = model.simulate(options=opts,start_time=tstart, final_time=tstart+172200)

  File "src\pyfmi\fmi.pyx", line 7522, in pyfmi.fmi.FMUModelME2.simulate

 File "src\pyfmi\fmi.pyx", line 304, in pyfmi.fmi.ModelBase._exec_simulate_algorithm

  File "src\pyfmi\fmi.pyx", line 300, in pyfmi.fmi.ModelBase._exec_simulate_algorithm

  File "C:\Users\d60378\AppData\Local\Continuum\anaconda3\lib\site-packages\pyfmi\fmi_algorithm_drivers.py", line 520, in solve
self.simulator.simulate(self.final_time, self.ncp)

  File "assimulo\ode.pyx", line 168, in assimulo.ode.ODE.simulate

  File "assimulo\ode.pyx", line 288, in assimulo.ode.ODE.simulate

  File "assimulo\explicit_ode.pyx", line 101, in assimulo.explicit_ode.Explicit_ODE._simulate

  File "assimulo\explicit_ode.pyx", line 187, in assimulo.explicit_ode.Explicit_ODE._simulate

  File "assimulo\solvers\sundials.pyx", line 1894, in assimulo.solvers.sundials.CVode.integrate

  File "assimulo\solvers\sundials.pyx", line 1926, in assimulo.solvers.sundials.CVode.integrate

 CVodeError: {-1: 'The solver took max internal steps but could not reach tout.', -2: 'The solver could not satisfy the accuracy demanded by the user for some internal step.', -3: 'Error test failures occurred too many times during one internal time step or minimum step size was reached.', -4: 'Convergence test failures occurred too many times during one internal time step or minimum step size was reached.', -5: 'The linear solvers initialization function failed.', -6: 'The linear solvers setup function failed in an unrecoverable manner.', -7: 'The linear solvers solve function failed in an unrecoverable manner.', -8: 'The user-provided rhs function failed in an unrecoverable manner.', -9: 'The right-hand side function failed at the first call.', -10: 'The right-hand side function had repeated recoverable errors.', -11: 'The right-hand side function had a recoverable error, but no recovery is possible.', -12: 'The rootfinding function failed in an unrecoverable manner.', -20: 'A memory allocation failed.', -21: 'The cvode_mem argument was NULL.', -22: 'One of the function inputs is illegal.', -23: 'The CVode memory block was not allocated by a call to CVodeMalloc.', -24: 'The derivative order k is larger than the order used.', -25: 'The time t is outside the last step taken.', -26: 'The output derivative vector is NULL.', -27: 'The output and initial times are too close to each other.', -41: 'The sensitivity right-hand side function failed unrecoverable.'}

如果有任何提示在哪里寻找可能的问题,我们将不胜感激。


Kelamahim,你是如何安装 PyFMI 包的?我用过conda install -c chria pyfmi它有效。 仅有的Could not find RADAR5 Could not find GLIMDA在执行中显示,但我的模型有效。希望这可以帮助。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

使用 pyFMI 进行模拟时出现 CVodeError 的相关文章

随机推荐

  • 正则表达式提取可选组

    我有一些格式为的日志字符串 T01 Warning Tag1 Message T23 Tag2 Message2 我正在尝试提取T数 检测是否存在Warning 然后将标签和消息的文本全部放在一个正则表达式中 不过 警告 的可选要求让我感到
  • 如何在cakephp中生成'a href="javascript:void(0)"'之类的链接?

    如何在 CakePHP 中生成类似 a href javascript void 0 的链接 我制作了一个应用程序 当用户单击图像列表时 内容将插入到编辑器文本区域中 我向这些图像添加一个类 并在 javascript 文件中编写一些代码
  • 为什么我要创建一个别名来创建函数?

    我偶尔会看到这种模式 尤其是在有关 Bash 提示定制的问题上 alias f useful code 我认为根本没有理由在这里创建别名 明显的重构 f useful code 它完全避免了声明别名 并且简单地一劳永逸地定义了函数 看起来更
  • .Net 使用 Lockbits 从位图中获取 RGB 值

    我使用下面的代码从图像中提取 RGB 值 有时这有效 但是在某些文件上 似乎步幅不能被位图宽度整除 它返回混合值 Dim rect As New Rectangle 0 0 bmp Width bmp Height Dim bmpData
  • 如何使用 Apache POI 插入换行符作为单元格的数据?

    我使用 Apache POI 3 16 创建 Excel 文件 我想将特定单元格内的数据设置为有换行符 rowConsommationEtRealisation createCell 0 setCellValue Consommation
  • VennDiagram 创建 vennCounts 列表

    我有一个这样的表 gt updownregtable PIM WDR MYC OBX ILMN 1651282 0 0 0 0 ILMN 1651354 0 0 0 0 ILMN 1651358 0 0 0 0
  • GData Youtube:获取缩略图

    我有一堆 youtube VideoID youtube com 网址的参数 watch v 中的字母数字字符串 我必须获取每个视频的缩略图 现在 我为每个 videoid 创建一个 HTTP GET 请求 如下所示 s VIDEOID 实
  • 我们如何在 MVC5 中启用 Bundles 缓存

    我在我的 mvc 项目中创建了 2 个包 如下所示 public static void RegisterBundles BundleCollection bundles bundles Add new ScriptBundle Scrip
  • 如何优雅地将所有枚举放入 std::set 中

    我有一个枚举 我想将它们全部放入集合中 然后使用 set intersection 算法删除一些 但这是题外话 除了我卡在第 1 步之外 一切都很好 如果我有 真实类具有基数更高的枚举 class MyClass enum Color re
  • 将 span 标签包裹在 div 内

    我有几个相互嵌套的 div 标签和一些嵌套的 span 标签 如下所示 div div span class mytags a href tag1 a span span class mytags a href tag2 a span di
  • 将 Matplotlib 中的多个 .png 图形输出到 Python 3.4 中的一个 zip 文件

    我编写了一个程序 使用 Python 中的 MatPlotLib 从 CSV 文件输出多个不同的饼图 超过 60 个 我认为我不需要共享所有代码 但我有一个draw 创建图形的函数 其结尾如下 def draw data make the
  • 在旋转界面方向时将 contentOffset 保留在 UICollectionView 中

    我正在尝试处理 UICollectionViewController 中的界面方向更改 我想要实现的是 我想要拥有same界面旋转后的 contentOffset 意思是 它应该根据边界变化的比率进行更改 从纵向开始 内容偏移量为 边界 尺
  • IEEE 754 实数能否“覆盖”其范围内的所有整数?

    原始问题经过编辑 缩短 以关注精度问题 而不是范围问题 单精度或双精度 实数的每种表示形式都限制为 range range 在此范围内有一些整数 1 2 3 4 等 负数也是如此 是否保证 IEEE 754 实数 浮点数 双精度数等 可以
  • MVC3 Values Ajax 文件上传

    我正在尝试使用 value ajax 上传器 http valums com ajax upload http valums com ajax upload 我的页面上有以下内容 var button fileUpload 0 var up
  • 监视目录的更改 - 潜在的高内存

    我目前正在使用nodeJS 中的脚本来监视目录 及其子目录 并在将文件放置在那里后执行一些功能 实际上 这将是一个 FTP 用户上传文件 对其进行处理 然后删除 显然 我已经看到脚本的 CPU 使用量很高 因为它遍历目录 等待文件可见 但令
  • 表视图的索引列表显示点 iOS 5+

    在我的应用程序中 我在带有索引列表的表视图中显示联系人 我显示索引列表如下 static NSString letters abcdefghijklmnopqrstuvwxyz void getAllUserInfoUsingBlock l
  • 在 Windows 上使用 Java 处理 MailDir 格式时出现问题

    这确实是两个问题 但它们密切相关 我正在开发一个 Java 应用程序 它将处理以 UNIX 风格 MailDir 格式存储的电子邮件 我正在使用 JavaMail API 发现Java邮件目录 http javamaildir source
  • 通过 refs 从父级中的无状态子组件访问输入值

    我正在创建一个程序来跟踪商店库存 我有一个项目名称 字符串 数组 通过它们映射来生成一个组件 该组件呈现每个项目的标题以及相应的输入字段 function Inventory props let items milk bread butte
  • 如何在 iPhone 上的锁定模式下播放声音

    每个人都知道在用户按下锁定按钮 无声 后保持应用程序运行的标准程序 如果我用 AVAudioPlayer 启动声音 在 iPhone 锁定之前 声音会一直播放到结束 锁定后 该应用程序仍在运行 如果我在 iPhone 锁定时尝试启动另一个声
  • 使用 pyFMI 进行模拟时出现 CVodeError

    我尝试在 Anaconda Python 3 6 8 上设置 pyFMI 安装 pyFMI 站点上列出的所有必需软件包 fmu 加载没有问题 但当我尝试模拟 fmu 时 出现错误 Could not find cannot import n