Skip to main content

Using a for loop for a single or specific value in variable list in constraint formulation

Answered

Comments

210 comments

  • Margi Shah
    • Gurobi-versary
    • Thought Leader
    • Curious

    Hi Jaromil,

    This is quite stressful to see your algorithm running & not giving the correct output.

    I am quite stressed. I am trying to do a computeIIS method but it is taking a time.

    If the constraints are not violated, what could be the reason? 

    I am in panic.

    0
  • Jaromił Najman
    • Gurobi Staff

    If the constraints are not violated, what could be the reason? 

    An infeasible model means that the constraints as they currently are, cannot be fulfilled all at once.

    The only way to fix this now is to find the constraints which are causing the infeasibility. There is no workaround to this.

    If you are in time stress, you should definitely try to reduce the size of your model to make the testing go quicker.

    0
  • Margi Shah
    • Gurobi-versary
    • Thought Leader
    • Curious

    Hi Jaromil,

    I computed by.IIS method:

    But as you can see when I am doing m.write("mIIS.ilp"), It is just returning all constraints & not those that are violated.

    0
  • Jaromił Najman
    • Gurobi Staff

    But as you can see when I am doing m.write("mIIS.ilp"), It is just returning all constraints & not those that are violated.

    The computed IIS is not minimal, thus it is very big. In this case, it contains all of your constraints. That is unfortunate.

    You should try going through your model variable by variable, constraint by constraint. Check whether the bounds and types of your variables are set correctly. Check if every constraint is constructed correctly. Note that default variable lower bounds are 0. This means that your Resources variables cannot be negative.

    If this does not help, you could try to compute a feasibility relaxation. To allow for constraint relaxation you could go with

    cons = steel.getConstrs()
    rhspen = [1.0]*steel.numConstrs steel.feasRelax(1, False, None, None, None, cons, rhspen)
    steel.write("steel_feasrelax.lp")

    This will generate a model, which is feasible, but has additional variables to relax some constraints. You can then look in which constraints the new variables are added and try to find out why these particular constraints have to be relaxed.

     

    0
  • Margi Shah
    • Gurobi-versary
    • Thought Leader
    • Curious

    "You should try going through your model variable by variable, constraint by constraint. Check whether the bounds and types of your variables are set correctly"

    How do I check my model variable by variable & bounds?

    I know my writing steel.lp file, it returns me the constraint formulation,

    But How do I check Variables and bounds ?

     

    0
  • Margi Shah
    • Gurobi-versary
    • Thought Leader
    • Curious

    The feasibility  relaxation gives me the below output:

    I used this after my optimize function.

    How to check the new variables added in the constraints?

    0
  • Jaromił Najman
    • Gurobi Staff

    But How do I check Variables and bounds ?

    The LP file has a \(\texttt{Bounds}\) section. Note that the default value for lower bounds is 0.

    How to check the new variables added in the constraints?

    You have to optimize this model. It should be feasible. You can then write the solution point to file via

    steel.write("solution.sol")

    You can then check the values of \(\texttt{ArtP_*}\) and \(\texttt{ArtN_*}\) variables. If any of those is non-zero, this means that the corresponding constraints which is in the name of the variable has to be relaxed in order to make the model feasible. For example, if \(\texttt{ArtP_Taskexecution[0]}\) has a value of 1 in the generated \(\texttt{solution.sol}\) file, this means that you have to add 1 to the right hand side of constraint \(\texttt{Taskexecution[0]}\) to make the model feasible. 

    0
  • Margi Shah
    • Gurobi-versary
    • Thought Leader
    • Curious

    Hi Jaromil,

    As Gurobi is completely new to me.

    Lets do it step by step.

    1) To check the Bound section of variables. Let me do this by writing .lp file after defining my variables.

    This is done:

    Minimize
      0 Resources[1,0] + 0 Resources[1,1] + 0 Resources[1,2] + 0 Resources[1,3]
       + 0 Resources[1,4] + 0 Resources[1,5] + 0 Resources[1,6]
       + 0 Resources[1,7] + 0 Resources[1,8] + 0 Resources[1,9]
     + 0 Resources[1,10] + 0 Resources[1,11]............

    Bounds
    Binaries
     Tasks[1,0] Tasks[1,1] Tasks[1,2] Tasks[1,3] Tasks[1,4] Tasks[1,5]
     Tasks[1,6] Tasks[1,7] Tasks[1,8] Tasks[1,9] Tasks[1,10] Tasks[1,11]
     Tasks[1,12] Tasks[1,13] Tasks[1,14] Tasks[1,15] Tasks[1,16] Tasks[1,17]
     Tasks[1,18] Tasks[1,19] Tasks[1,20] Tasks[1,21] Tasks[1,22] Tasks[1,23]
     Tasks[1,24] Tasks[1,25] Tasks[1,26] Tasks[1,27] Tasks[1,28] Tasks[1,29]
    Tasks[1,30] Tasks[1,31]...........

    Generals
     Resources[1,0] Resources[1,1] Resources[1,2] Resources[1,3] Resources[1,4]
     Resources[1,5] Resources[1,6] Resources[1,7] Resources[1,8] Resources[1,9]
     Resources[1,10] Resources[1,11] Resources[1,12] Resources[1,13]
     Resources[1,14] Resources[1,15] Resources[1,16] Resources[1,17]
     Resources[1,18] Resources[1,19] Resources[1,20] Resources[1,21]
    Resources[1,22] Resources[1,23]..........

    I hope it is showing correct variables & bounds?
    0
  • Jaromił Najman
    • Gurobi Staff

    You can see the variables \(\texttt{Tasks}\) are all binary, i.e., they can only attain values in \(\{0,1\}\) and variables \(\texttt{Resources}\) are all non-negative integer variables, i.e., they can only attain values in \(\{0,1,2,\dots\}\).

    0
  • Margi Shah
    • Gurobi-versary
    • Thought Leader
    • Curious

    Yes thats right. That is what I have defined in my variables.

    Resources=steel.addVars(res_list,time,vtype=GRB.INTEGER,name="Resources")
    Tasks=steel.addVars(task_list,time,vtype= GRB.BINARY,name="Tasks")  

     

    0
  • Margi Shah
    • Gurobi-versary
    • Thought Leader
    • Curious

    I am checking my number of variables with

     print(steel.getAttr("NumVars"))

    It should be 31350

    Resources=174*95

    Tasks=156*95

    Instead it is showing: 31680, Is this causing some problem?

     

    0
  • Jaromił Najman
    • Gurobi Staff

    Do you print this number after you execute the feasRelax call or before? feasRelax adds new variables to the model so the number may change.

    If you check the number of variables before then it may be that you are adding too many variables somewhere. You should check whether all indices are needed and correct.

    0
  • Margi Shah
    • Gurobi-versary
    • Thought Leader
    • Curious

    I have used right after .optimize()

    " you are adding too many variables somewhere"

    Where is the possibility to check this as if am i adding too many variables or not?



    0
  • Jaromił Najman
    • Gurobi Staff

    Note that you also have a \(\texttt{time=0}\), so the number of variables is correct \(174\cdot 96 + 156\cdot 96 = 31680\). If you don't need a \(\texttt{time=0}\) index, then you have to remove 0 from your \(\texttt{time}\) list. Note that you also have to adjust constraints using \(\texttt{time=0}\).

    0
  • Margi Shah
    • Gurobi-versary
    • Thought Leader
    • Curious

    Yes Jaromil,

    That`s totally true.

    Now When I checked NumConstrs- they are also showing me a wrong value 

    I checked after formulating every constraint :

    len(constraintname)

    I dont know somehow the value is not matching:

    Does Gurobi has any way of cross verifying the number of constraints?

     

    0
  • Jaromił Najman
    • Gurobi Staff

    Which values exactly are wrong?

    0
  • Margi Shah
    • Gurobi-versary
    • Thought Leader
    • Curious

    Ok I am giving you a example:

    Tranfertime constraint:

    y={}
    for res_cat, resources in res_cat2idx.items():
            if 'H_A_S' not in res_cat or 'H_A_S4' in res_cat:
                continue

            y[res_cat]= list(resources)

    for key in y:
        y_list = y[key]
        Transfertime=steel.addConstrs((Resources[res,t]  == 0 for res in y_list for t in time),name ="Transfertime")

    The loop is running for 72(H_A_S-24each*3) over 96 values of t - which means it should be (2304*3 = 6912)
    But Gurobi returns the len as 2304
    0
  • Jaromił Najman
    • Gurobi Staff

    You are overriding the \(\texttt{Transfertime}\) object in every iteration of the \(\texttt{for key in y}\) loop, but the constraints are still added to Gurobi. You can convince yourself by doing

    Transfertime = {}
    for key in y:
        y_list = y[key]
      Transfertime[key]=steel.addConstrs((Resources[res,t]  == 0 for res in y_list for t in time),name ="Transfertime_%s"%(key))
        print(len(Transfertime[key]))

    You will see that \(\texttt{Transfertime}\) constraints are added 3 times with 2328 constraints each. You can now access them via, e.g., \(\texttt{Transfertime[H_A_S1][6,0]}\) or in a loop

    for key in y:
      y_list = y[key]
      for res in y_list:
        for t in time:
          print(Transfertime[key][res,t])

    If you think that it should be 2304 constraints each, then you are adding 24 constraints too many. Now, you just have to find out which ones are too many. Maybe you should skip \(\texttt{time=0}\) or \(\texttt{time=95}\)

    0
  • Margi Shah
    • Gurobi-versary
    • Thought Leader
    • Curious

    Ok Shall I do these for all the remaining constraints to make the model clear?

    1. Taskexecution=steel.addConstrs((gp.quicksum(Tasks[task,t] for t in time)==1 for task in heat2tasks),name="Taskexecution")#

    2. Endresources=steel.addConstrs((Resources[res,time[95]] ==1 for res in res_list3 ), name="Endresources_time[95]")

    3. for key in group2tasks:
        Taskexecution1=steel.addConstrs(
                     (gp.quicksum(Tasks[task,t] for t in time ) ==1 
                     for task in group2tasks[key]),name="Taskexecution1")

    4.

    x={}
    for res_cat, resources in res_cat2idx.items():
        if 'H_B_' not in res_cat:
                continue
        max_wait_time = trans_time_max['TR_S%d' % (int(res_cat[-1]) - 1)]
        min_tran_time = trans_time['TR_S%d' % (int(res_cat[-1]) - 1)]
       
        for res in resources:   # each heat a constraint
            x[res] = (math.ceil((max_wait_time-min_tran_time)/rtn_t0))

    Transfertime1= steel.addConstrs((gp.quicksum(Resources[res,t] for t in time )<=x[res] for res in x.keys()),name="Transfertime1")

    5.Resourcebalance = {}
    for res in res_list1:
        for t in time:
            if t == 0:
                if 1 <= res and res <= 5:
                    Resourcebalance[res,t] = steel.addConstr(Resources[res,t] == 2, name="Resourcebalane[%s,%d]"%(res,t))
                else:
                    Resourcebalance[res,t] = steel.addConstr(Resources[res,t] == 0, name="Resourcebalane[%s,%d]"%(res,t))
            else:
                sumexpression = gp.LinExpr(0)
                for task in task_list:
                    if task not in rtn_profile[res]:
                        continue
                    duration =  len(rtn_profile[res][task]) - 1
                    for theta in range(0, min(duration, t) + 1):
                        sumexpression.add(rtn_profile[res][task][theta]* Tasks[task,t-theta] )
                Resourcebalance[res,t] = steel.addConstr(Resources[res,t] == Resources[res,time[time.index(t)-1]] + sumexpression, name="Resourcebalane[%s,%d]"%(res,t))

    6. res = res_cat2idx['EN'][0]
    Energyusage = {}
    for ti in range(int(num_t)):
        
        sumexpression = gp.LinExpr(0)
        for task_cat, task_list1 in tasks.items():
            if 'TR' in task_cat:  # transportation has no energy consumption
                        continue
            for task in task_list1:
                duration = task_duration[task]
                for theta in range(0, min(duration, ti) + 1):
                    sumexpression.add(rtn_profile[res][task][theta]* Tasks[task,ti-theta] )
        Energyusage[res,ti] = steel.addConstr(Resources[res,ti] ==sumexpression,name="Energyusage[%s,%d]"%(res,ti)) 

    Next point, You asked me to do feasrelax & then model will become feasible.Then to do this:

    "

    You have to optimize this model. It should be feasible. You can then write the solution point to file via"

    steel.write("solution.sol")

    BUT..
    The model is still returning infeasible after feasrelax,
    How do I do further steps?

    0
  • Jaromił Najman
    • Gurobi Staff

    Ok Shall I do these for all the remaining constraints to make the model clear?

    This does not help. You could write the model you are currently using to an LP file and upload it somewhere accessible, e.g., a Googledrive.

    The model is still returning infeasible after feasrelax,
    How do I do further steps?

    This means that relaxing constraints is not enough to make your model feasible. You could try allowing for variable bound relaxation as well

    vars = steel.getVars()
    lbpen = [1.0]*steel.numVars
    ubpen = [1.0]*steel.numVars
    cons = steel.getConstrs()
    rhspen = [1.0]*steel.numConstrs
    steel.feasRelax(2, False, vars, lbpen, ubpen, cons, rhspen)
    steel.write("steel_feasrelax.lp")
    0
  • Margi Shah
    • Gurobi-versary
    • Thought Leader
    • Curious

    Hi Jaromil, I am trying the method you described :

    The process is still running.

    I am not sure what is happening here?

    0
  • Jaromił Najman
    • Gurobi Staff

    Gurobi constructed a model called steel_feasrelax which you have written to file \(\texttt{steel_feasrelax.lp}\), which should be feasible. Btw, you can use  \(\texttt{0}\) or \(\texttt{2}\) instead of  \(\texttt{1}\) as the first argument for \(\texttt{feasRelax}\). This should make the feasRelax model faster. Now Gurobi will try to solve this model to optimality by minimizing the violations in constraints and variable bounds. The solution point you will get out of this model will tell you which constraints have to be looked at. If the value of a \(\texttt{ArtP_constraintname}\) or \(\texttt{ArtN_constraintname}\) variable is non-zero, this means that this constraint might need some relaxation or rethinking. If the value of a \(\texttt{ArtLB_variablename}\) or \(\texttt{ArtUB_variablename}\) variable is non-zero, this means that this variable might need some relaxation or rethinking of the bounds.

    For more details see feasRelax documentation, How do I determine why my model is infeasible?, Diagnose and cope with infeasibility.

    0
  • Margi Shah
    • Gurobi-versary
    • Thought Leader
    • Curious

    Hi Jaromil,

    I have tried doing what was recommended by you,However I dont seem so what is there in steel_feasrelax.lp file.I will write some output here to make you aware.

    However I feel,I have tried each method to analyse the results, do you think I should post the code snippet here to see from scratch what must be causing problem, beacuse in terms of constraints & formulations I am confident . In terms of Gurobi, I am not sure if there is something minor going wrong. It will be clear after you will run it once.

    Here I am attaching some ouputs.

     ArtL_Resources[1,0] + ArtL_Resources[1,1] + ArtL_Resources[1,2]
       + ArtL_Resources[1,3] + ArtL_Resources[1,4] + ArtL_Resources[1,5]
       + ArtL_Resources[1,6] + ArtL_Resources[1,7] + ArtL_Resources[1,8]
       + ArtL_Resources[1,9]+........+ + ArtL_Resources[174,91] + ArtL_Resources[174,92]
       + ArtL_Resources[174,93] + ArtL_Resources[174,94]
       + ArtL_Resources[174,95] + ArtL_Tasks[1,0] + ArtU_Tasks[1,0]
       + ArtL_Tasks[1,1] + ArtU_Tasks[1,1] + ArtL_Tasks[1,2] + ArtU_Tasks[1,2]
       + ArtL_Tasks[1,3] + ArtU_Tasks[1,3] + ArtL_Tasks[1,4] + ArtU_Tasks[1,4]
       + ArtL_Tasks[1,5] + ArtU_Tasks[1,5] + ArtL_Tasks[1,6] + ArtU_Tasks[1,6]
       + ArtL_Tasks[1,7] + ArtU_Tasks[1,7] + ArtL_Tasks[1,8] + ArtU_Tasks[1,8]
       +......++ ArtL_Tasks[156,95] + ArtU_Tasks[156,95] + ArtP_Taskexecution[1]
       + ArtN_Taskexecution[1] + ArtP_Taskexecution[2] + ArtN_Taskexecution[2]
       + ArtP_Taskexecution[3] + ArtN_Taskexecution[3] + ArtP_Taskexecution[4]
       + ArtN_Taskexecution[4] + ArtP_Taskexecution[5] + ArtN_Taskexecution[5]
       + ArtP_Taskexecution[6] + ArtN_Taskexecution[6] + ArtP_Taskexecution[7]
       +...........+ArtN_Transfertime[6,0] + ArtP_Transfertime[6,1]
       + ArtN_Transfertime[6,1] + ArtP_Transfertime[6,2]
       + ArtN_Transfertime[6,2] + ArtP_Transfertime[6,3]
       + ArtN_Transfertime[6,3] + ArtP_Transfertime[6,4]
       + ArtN_Transfertime[6,4]+..........+..........

    Subject To
     Taskexecution[1]: Tasks[1,0] + Tasks[1,1] + Tasks[1,2] + Tasks[1,3]
       + Tasks[1,4] + Tasks[1,5] + Tasks[1,6] + Tasks[1,7] + Tasks[1,8]
       + Tasks[1,9] + Tasks[1,10] + Tasks[1,11] + Tasks[1,12] + Tasks[1,13]
       + Tasks[1,14] + Tasks[1,15] + Tasks[1,16] + Tasks[1,17] + Tasks[1,18]
       + Tasks[1,19] .......+ ArtP_Taskexecution[1]
       - ArtN_Taskexecution[1] = 1



     Transfertime[17,39]: Resources[17,39] + ArtP_Transfertime[17,39]
       - ArtN_Transfertime[17,39] = 0
     Transfertime[17,40]: Resources[17,40] + ArtP_Transfertime[17,40]
       - ArtN_Transfertime[17,40] = 0



    Endresources_time[95][126]: Resources[126,95] = 1
     Endresources_time[95][127]: Resources[127,95] = 1
     Endresources_time[95][128]: Resources[128,95] = 1......



    Taskexecution1[145]: Tasks[145,0] + Tasks[145,1] + Tasks[145,2]
       + Tasks[145,3] + Tasks[145,4] + Tasks[145,5] + Tasks[145,6]
       + Tasks[145,7] + Tasks[145,8] + Tasks[145,9] + Tasks[145,10]
       + Tasks[145,11]........

     Transfertime1[56]: Resources[56,0] + Resources[56,1] + Resources[56,2]
       + Resources[56,3] + Resources[56,4] + Resources[56,5] + Resources[56,6]
       + Resources[56,7] + Resources[56,8] + Resources[56,9] + Resources[56,10]
       + Resources[56,11].........



     Resourcebalane[2,23]: - Resources[2,22] + Resources[2,23] - Tasks[49,18]
       + Tasks[49,23] - Tasks[50,18] + Tasks[50,23] - Tasks[51,18]
       + Tasks[51,23] - Tasks[52,18] + Tasks[52,23] - Tasks[53,17]
       + Tasks[53,23] - Tasks[54,17] + Tasks[54,23] - Tasks[55,17]
       + Tasks[55,23]........



    Energyusage[174,0]: Resources[174,0] - 21.25 Tasks[1,0] - 21.25 Tasks[2,0]
       - 21.25 Tasks[3,0] - 21.25 Tasks[4,0] - 21.25 Tasks[5,0]
       - 21.25 Tasks[6,0] - 21.25 Tasks[7,0] - 21.25 Tasks[8,0]
       - 21.25 Tasks[9,0]..........



    CArtL_Resources[1,0]: Resources[1,0] + ArtL_Resources[1,0] >= 0
     CArtL_Resources[1,1]: Resources[1,1] + ArtL_Resources[1,1] >= 0
     CArtL_Resources[1,2]: Resources[1,2] + ArtL_Resources[1,2] >= 0
     CArtL_Resources[1,3]: Resources[1,3] + ArtL_Resources[1,3] >= 0.........



    CArtU_Tasks[11,7]: Tasks[11,7] - ArtU_Tasks[11,7] <= 1
     CArtL_Tasks[11,8]: Tasks[11,8] + ArtL_Tasks[11,8] >= 0
     CArtU_Tasks[11,8]: Tasks[11,8] - ArtU_Tasks[11,8] <= 1
     CArtL_Tasks[11,9]: Tasks[11,9] + ArtL_Tasks[11,9] >= 0
     CArtU_Tasks[11,9]: Tasks[11,9] - ArtU_Tasks[11,9] <= 1.........



    Bounds
     Resources[1,0] free
     Resources[1,1] free
     Resources[1,2] free
     Resources[1,3] free
     Resources[1,4] free
     Resources[1,5] free
     Resources[1,6] free......



    Tasks[1,0] free
     Tasks[1,1] free
     Tasks[1,2] free
     Tasks[1,3] free
     Tasks[1,4] free
     Tasks[1,5] free
     Tasks[1,6] free.......



    Binaries
     Tasks[1,0] Tasks[1,1] Tasks[1,2] Tasks[1,3] Tasks[1,4] Tasks[1,5]
     Tasks[1,6] Tasks[1,7] Tasks[1,8] Tasks[1,9] Tasks[1,10] Tasks[1,11]
     Tasks[1,12] Tasks[1,13] Tasks[1,14] Tasks[1,15] Tasks[1,16] Tasks[1,17]
     Tasks[1,18] Tasks[1,19].........



    Generals
     Resources[1,0] Resources[1,1] Resources[1,2] Resources[1,3] Resources[1,4]
     Resources[1,5] Resources[1,6] Resources[1,7] Resources[1,8] Resources[1,9]
     Resources[1,10] Resources[1,11] Resources[1,12] Resources[1,13]
     Resources[1,14] Resources[1,15] Resources[1,16] Resources[1,17]..........

    This is the output :

     

     

     

    0
  • Jaromił Najman
    • Gurobi Staff

    Hi Margi,

    I have tried doing what was recommended by you,However I dont seem so what is there in steel_feasrelax.lp file.I will write some output here to make you aware.

    Your model is so complex that even solving the feasibility relaxation takes a lot of time.

    However I feel,I have tried each method to analyse the results, do you think I should post the code snippet here to see from scratch what must be causing problem, beacuse in terms of constraints & formulations I am confident . In terms of Gurobi, I am not sure if there is something minor going wrong. It will be clear after you will run it once.

    This would not help, because the current model is too big. As already mentioned, please try reducing the size of your model to see whether the issue prevails. You could use less timesteps and less resources to construct a model of moderate size which can then be handled in acceptable time.

    If you cannot reduce the size of your model, then the only way to find what's going wrong is checking every constraints against the model formulation you have available and see whether you can spot something wrong.

    0
  • Margi Shah
    • Gurobi-versary
    • Thought Leader
    • Curious

    Hi Jaromil,

    What if I reduce time t variable to t={1,2,3] instead of 95 values?

    Do you suggest me doing this?

    This can I think reduce so much computational time?

    0
  • Jaromił Najman
    • Gurobi Staff

    What if I reduce time t variable to t={1,2,3] instead of 95 values?

    Reducing time to 1,2,3 is a very good step. However, you still have over 100 resources. This will still make the problem quite large, but it might be a first step.

    Do you suggest me doing this?

    Yes.

    This can I think reduce so much computational time?

    The idea is that if you reduce the number of time steps and the model still remains infeasible, that you can then more quickly compute an IIS and hopefully the IIS is small. If this does not help, then you definitely have to reduce the number of resources as well to further simplify the model.

    If the smaller model is feasible, then it means that adding too many time steps makes the model infeasible. However, I do not know the reason why adding more time steps would make the model infeasible.

    0
  • Margi Shah
    • Gurobi-versary
    • Thought Leader
    • Curious

    How to reduce the time steps?

    There is no parameter in my code stating Gurobi How many time steps to use. Is there any parameter setting?

    0
  • Jaromił Najman
    • Gurobi Staff

    With time steps I mean your variable t. I guesses that it shall depict time steps, because of the name "time".

    0
  • Margi Shah
    • Gurobi-versary
    • Thought Leader
    • Curious

    OK.

    Also above that, Is there any other parameter settings in Gurobi?

    One thing important to discuss:

    When I first ran & computeted IIS, You saw there were two constraint violations.#

    NO ERROR OTHER THAN THAT.

    When I resolved those, How can my model be infeasible & I think now all constraints have some problem?

    as you can see from the output I mentioned above from feasrelax file, 

    This is something important to know.

    0
  • Jaromił Najman
    • Gurobi Staff

    Also above that, Is there any other parameter settings in Gurobi?

    No paramter that would help you resolving the infeasibility. This is something  you have to manage on your own. The only tools from Gurobi which might help you are IIS and feasRelax which you are using already. Now, the best way is to reduce the size of the model and try figuring out what happens then.

    When I resolved those, How can my model be infeasible & I think now all constraints have some problem?

    The IIS algorithm computes one irreducible infeasible subset. It does not guarantee that all infeasibility possibilities are caught within this subset. There can be multiple IISs, cf. computeIIS documentation.

    0

Post is closed for comments.