my script is:
from __future__ import division
import numpy
import scipy
from pyomo.environ import *
from pyomo.dae import *
from pyomo.opt import SolverFactory
m=ConcreteModel()
m.x3=Var(within=NonNegativeReals)
m.u=Var(within=NonNegativeReals)
def _con(m):
return m.x3 >=3
m.con=Constraint(rule=_con)
def _con2(m):
return 4 >= m.u >=1
m.con2=Constraint(rule=_con2)
m.obj=Objective(expr=m.x3*m.u)
opt = SolverFactory("Ipopt", executable = "/Ipopt-3.12.6/bin/ipopt")
results = opt.solve(m)
results.write()
Although this is a very simple problem and although the program states that it has found the optimal solution, the number of solutions is 0 and there is not any solution displayed.
Any ideas??
Thanks a lot.