2017-02-19 6 views

답변

2

웜 스타트를로드하는 것과 같은 고급 기능을 사용하려면 Pyomo 스크립트를 직접 작성하여 Pyomo를 사용하는 것이 좋습니다.

from pyomo.environ import * 

# import the module that contains your model 
import model 

# load the data 
instance = model.model.create_instance('data.dat') 

# create a solver 
cplex = SolverFactory("cplex") 

# solve the first time (tee=True prints the cplex output) 
status = cplex.solve(instance, tee=True) 
assert str(status.solver.termination_condition) == 'optimal' 

# solve the model a second time and create a warmstart file for cplex 
status = cplex.solve(instance, warmstart=True, tee=True) 

이에 대한 자세한 내용은 온라인 Pyomo 워드 프로세서의 scripting 섹션을 참조하십시오 : 귀하의 경우에는이처럼 보일 수 있습니다.