Why is the variable free shown in the ilp file even though I've already set the ub/lb or value in the model?
AnsweredHi,
My model is infeasible, so I computed IIS. In the ilp file's bounds section, some of the variables are shown to be free (or shown some range that is different from what I set) but in the model, I've already either set the upper/lower bound or directly assign the value to the variables.
intersection=[1,2,3,4,5] # intersection 1 is downstream 5 is the upstream
sub_intersection=[1,2,3,4]
movement=['TH','LT']
direction=['over','under']
THETA =m.addVars(intersection,ub=cyc,lb=0,vtype=GRB.CONTINUOUS, name='Offset')
theta =m.addVars(intersection,movement,direction,ub=cyc,lb=0,vtype=GRB.CONTINUOUS, name='Onset of green phase') # the starting time of the green phase for the departure movement
x =m.addVars(intersection, vtype=GRB.BINARY, name='Indicator for over_TH and under_LT ') # binary var 1: oversaturated_TH is before the undersaturated_LT
X =m.addVars(intersection, vtype=GRB.BINARY, name='Indicator for over_LT and under_TH ') # binary var 1: oversaturated_LT is before the undersaturated_TH
def the_most_upstream():
m.addConstr(THETA[5]==0,name='The most upstream intersection offset')
m.addConstr(x[5]==1, name='over_TH before under_LT')
m.addConstr(X[5]==1, name='over_LT before under_TH')
The following attachment is part of the screenshot of the IIS results
How should I interpret the results of IIS? Does it mean that I didn't set the bounds correctly?
Thank you so much.
-
Hi Yi,
If a variable appears as free in the IIS but you originally set it to have some bounds, this means that the bound of the variable does not participate in the IIS, in other words, the bound of the variable does not contribute to the infeasibility of the IIS that you obtained.
From the code you showed, it looks like you set the bounds correctly. You can check this by writing your model, for example as an LP file.
Elisabeth
0 -
Hi Elisabeth,
Thanks for your prompt reply.
If I understand you right, line 197 from the results of the IIS:
-infinity<=Onset_of_green_phase[5,LT,under] <=180
and from the model, I have an lb=0 for theta. Does this mean that the lower bound of this variable does not contribute to the infeasibility?
Thank you.
0 -
Hi Yi,
Your understanding is correct.
- Riley
0 -
Hi Riley,
Great! Thank you so much.
Yi-Ting
0
Please sign in to leave a comment.
Comments
4 comments