[英]Save Pyomo model Variable
I'm doing an optimization problem and after give the command: 我正在做一个优化问题,并给出命令后:
results = solver.solve(model,tee=True)
I will have all my variables solved inside the model object. 我将在模型对象内部解决所有变量。
There is a way to save and load this model object? 有没有一种方法可以保存和加载此模型对象?
The variables will be inside your "model" object, if you have a variable called "A": 如果您有一个名为“ A”的变量,则这些变量将在“模型”对象内:
model.A.value
will give you its value (or model.A[index].value if it is indexed) 将为您提供其值(如果已建立索引,则为model.A [index] .value)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.