Peter,

We have discussed several topics in this thread and should try to keep things separate.

1. There was the original question how to consider only the positive part of a variable. Some bigM formulations have been discussed. If you understand the reformulation(s), I think this question has been answered.

2. There was the question on how to interpret equation levels in the solution listing.

Claudio's explanation is perfectly fine:

cladelpino wrote: ↑6 months ago

On equation levels: Picture your equation in a way where every variable is on the left hand side of the operator (=g=,=l=, or =e=) , and on the right hand side you have (if there is any) the "constant" (determined only by parameters and constants) term. The equation level is the current value of the left hand side, considering the current values of the variables.

I do not understand your objection. If an equation defines a variable (e.g. as sum of other variables) and there are no other constants involved, all variables are moved to the left hand side and the level of the equation is zero (in a feasible solution).

3. Your model is integer infeasible. It seems that you suspect the cause of infeasibility in an erroneous bigM reformulation. But this is not necessarily the cause. There can be many reasons why your model is infeasible. Unfortunately, you still have not shared your code to allow other users to reproduce this. That makes it difficult to provide target-oriented help for your particular model.

Your model is (integer) infeasible, so there is no feasible point to all the constraints and integrality conditions you have specified. That means, there is either a mistake implementing some constraint, or the combination of model and data really allows for no (integer) feasible solution. This state of the optimization model is in general not a bug or problem. It is one of the possible theoretic outcomes of an optimization run.

The real work it to figure out where the infeasibility comes from. There is no single way of doing this. It very much depends on your knowledge and understanding of the original problem and it's implementation as a model. If you are convinced, that there must be a feasible solution to your problem, maybe you can provide such a solution by hand. If that is possible, a good way to go about analyzing infeasibilities is to provide such a "feasible" solution to the problem by manually setting the variable level values (x.l(i,j) = ...) and then generating the model with a full equation listing (option limrow=1e9;) This will flag the constraints that are infeasible with your "feasible" solution.

If you don't want to work with your own feasible solution, you can also ask Cplex you give you the smallest relaxation of your model to make it feasible (look for option FeasOpt:

https://www.gams.com/latest/docs/S_CPLE ... LEXfeasopt ). This is just an alternative to the iis option mentioned by Claudio. What you posted is the log of the conflict refiner. It shows that Cplex found an irreducible infeasible set of 5 constraints/variable bounds. In the lst file these equations/variables should be reported between solve summary and solution listing.

I hope this helps!

Fred