model_description = read_model_description(filename) # read the model description
for variable in model_description.modelVariables: # iterate over the variables
if variable.causality == 'parameter': # and print the names of all parameters
print('%-25s %s' % (variable.name, variable.start)) # and the respective start values
对于fmpy,您还可以检查这个jupyter笔记本:https://notebooks.azure.com/t-sommer/projects/CoupledClutches,其中包含行
在FMI中,顶级参数和其他参数之间没有区别。要使用PyFMI(FMI 2.0)列出模型中的所有可用参数:
使用fmpy,您可以在模型描述中的
modelVariables
上循环,如下所示:相关问题 更多 >
编程相关推荐