from gurobipy import *
m = Model ("operation")
x3 = m.addVar(vtype=GRB.CONTINUOUS,name="MT_qt_3")
x4 = m.addVar(vtype=GRB.CONTINUOUS,name="MT_qt_4")
m.setObjective( x3+x4 ,GRB.MINIMIZE)
m.addConstr( 2 <= x3 <= 4 )
m.addConstr( 2 <= x4 <= 4 )
m.optimize()
for v in m.getVars():
print('%s %g' % (v.varName, v.x))
print('Obj: %g' % m.objVal)
The feedback is "0", but obviously the answer is wrong.The answer should be "4". I wonder whether there is something wrong in my code.I would appreciate if someone could help me to solve this problem.