Ejemplo n.º 1
0
from pyomo.opt import SolverFactory
from DiseaseEstimation import model

model.pprint()

instance = model.create('DiseaseEstimation.dat')
instance.pprint()

opt = SolverFactory("ipopt")
results = opt.solve(instance)

results.write()
from pyomo.core import DataPortal
from pyomo.opt import SolverFactory
from DiseaseEstimation import model

model.pprint()

# @modeldata:
modeldata = DataPortal(model=model)
modeldata.load(filename='DiseaseEstimation.dat')
modeldata.load(filename='DiseasePop.dat')
# @:modeldata

instance = model.create(modeldata)
instance.pprint()

opt = SolverFactory("ipopt")
results = opt.solve(instance)

results.write()
Ejemplo n.º 3
0
from pyomo.environ import SolverFactory, DataPortal
from DiseaseEstimation import model

model.pprint()

data = DataPortal(model=model)
data.load(filename='DiseaseEstimation.dat')
data.load(filename='DiseasePop.dat')

instance = model.create(data)
instance.pprint()

solver = SolverFactory("ipopt")
results = solver.solve(instance)

instance.display()
Ejemplo n.º 4
0
from pyomo.environ import SolverFactory, DataPortal
from DiseaseEstimation import model

model.pprint()

data = DataPortal(model=model)
data.load(filename='DiseaseEstimation.dat')
data.load(filename='DiseasePop.dat')

instance = model.create(data)
instance.pprint()

solver = SolverFactory("ipopt")
results = solver.solve(instance)

instance.display()
Ejemplo n.º 5
0
from pyomo.core import DataPortal
from pyomo.opt import SolverFactory
from DiseaseEstimation import model

model.pprint()

# @modeldata:
modeldata = DataPortal(model=model)
modeldata.load(filename='DiseaseEstimation.dat')
modeldata.load(filename='DiseasePop.dat')
# @:modeldata

instance = model.create(modeldata)
instance.pprint()

opt = SolverFactory("ipopt")
results = opt.solve(instance)

results.write()