python - 什么是错误:尚未生成应用程序文件?
问题描述
我想在 Spyder 中的工具箱 OMPython 的帮助下模拟 Openmodelica 的模型。
这是脚本:
import numpy as np
from numpy import linalg as la
import matplotlib.pyplot as plt
from OMPython import ModelicaSystem
from OMPython import OMCSessionZMQ
font = {'family': 'sans-serif',
'color': 'darkblue',
'weight': 'normal',
'size': 14}
h = 0.0001 # Simulationsschrittweite
STime = 0.1
omc = OMCSessionZMQ()
mod=ModelicaSystem("SystemZweiterOrdnungKausalTotal.mo","SystemZweiterOrdnungKausal")
mod.setSimulationOptions(["stopTime="+str(STime),"stepSize=" + str(h),"solver=euler"])
mod.simulate()
mod.getSolutions()
但是控制台中有一条错误消息:
2020-11-28 20:23:48,407 - OMPython - INFO - OMC Server is up and running at file:///C:/Users/zhout/AppData/Local/Temp/openmodelica.port.e2c1a098db6645b48dd844f1925af6c8 pid=6492
2020-11-28 20:23:48,690 - OMPython - INFO - OMC Server is up and running at file:///C:/Users/zhout/AppData/Local/Temp/openmodelica.port.e6fe4b6d6426461586a0ea54038b6559 pid=5424
'utf-8' codec can't decode byte 0xd7 in position 103: invalid continuation byte
None
stopTime !is not a simulation-option variable
Traceback (most recent call last):
File "C:\Users\zhout\OneDrive\desktop\Simulation und technische Diagnose\Aufgabe Phase 1-20201128\VorlageAuswertung——Muster.py", line 37, in <module>
mod.simulate()
File "C:\Users\zhout\anaconda3\lib\site-packages\OMPython\__init__.py", line 1108, in simulate
raise Exception("Error: application file not generated yet")
Exception: Error: application file not generated yet
我在 Internet 上没有找到有关此错误的任何信息。有人能帮我吗?多谢。
解决方案
推荐阅读
- helmet.js - 头盔js中的内容安全策略
- java - 我可以使用spring boot和MySQL设置过期时间吗?
- html - 如何检查html中的空字符串
- r - 在 R 中“分隔”一列的更简洁的选项(可能通过一些正则表达式)?
- asp.net - asp.net core 版本 5 样板正在生产中
- python - n维数组元素的Python组合
- logging - 如何在 Jupyterlab 中登录到日志控制台?
- php - 使用 Bash 并调用 php 命令遍历目录和子目录中的所有文件
- firebase - 当我以这种方式通过本机反应将日期存储在firebase中时,它不会保存,只有购物车项目和总金额仅保存在firebase中
- javascript - 如何在没有项目/坐标重复的情况下选择 2D 矩阵的 N 个随机元素的 col/row 或 x/y 坐标?