My model has written correct but when it runs some items shows infeasible.

Problems with modeling
Post Reply
paulacabrales
User
User
Posts: 5
Joined: 1 year ago

My model has written correct but when it runs some items shows infeasible.

Post by paulacabrales »

Hello,

I have a LRP model with additional characteristics. GAMs shows that my model has written correct but when it runs some items shows infeasible and I never have a solution.

¿What could be the error?

Thanks

Image
Attachments
Sin título.png
Sin título.png
Fred
Posts: 372
Joined: 7 years ago

Re: My model has written correct but when it runs some items shows infeasible.

Post by Fred »

The infeasibility you see in the solver log refers to particular nodes in the Branch and Bound tree. No need to worry about that. You should check the model status and solver status after the solve to interpret whether you got an optimal or feasible solution or if the model was infeasible.

I hope this helps!

Fred
paulacabrales
User
User
Posts: 5
Joined: 1 year ago

Re: My model has written correct but when it runs some items shows infeasible.

Post by paulacabrales »

Thanks Fred. The problem is that the model never finish. I have invested hours running it and anyone solution is found. I have reviewed that the problem happens when I put these constraints together:

R12(t,w).. qt(w,t)=E=sum((v,g),xcag(g,t,v)*cmv(w,v));
R13(t).. sum[(w,m),(qtrat(w,m,t))*(1-alpha(w,m))*(beta(w,m))]=E=sum(r,Tr(t,r));
R14(r).. qr(r)=E=[sum((w,v,g),xcag(g,r,v)*cmv(w,v))]+[sum(t,Tr(t,r))];
R15(t).. sum[(w,m),(qtrat(w,m,t))*(1-alpha(w,m))*(1-beta(w,m))]=E=sum(f,Tf(t,f));
R16(r).. [(qr(r))*(1-mu(r))]=E=sum(f,Rf(r,f));
R17(f).. qf(f)=E=[sum(t,Tf(t,f))]+[sum(r,Rf(r,f))];

I have proved separately the constraints and the model runs but together the model doesn't obtain a solution.

qt,qr,qf,qtrat,xcag,Tf,Tr,Rf are positive variables and cmv, alpha,beta,mu are parameters.

Thanks for helping me.
Fred
Posts: 372
Joined: 7 years ago

Re: My model has written correct but when it runs some items shows infeasible.

Post by Fred »

Hi,

Just from looking at the constraints I find it impossible to to come up with a diagnosis.
It seems that no integer feasible solution can be found. Maybe because there is none or maybe it is just very hared to find one.

Are you sure that there is an integer feasible solution? If so, can you compute one (e.g. through some heuristic) and provide it as starting point to see if this is accepted?

You do not say anything about the dimensions of your model. Usually when developing/debugging a model it is good to do this in a way that it can easily be scaled up/down (e.g. if there is a time axis in your model, solve it for a single day instead of a full year etc.) because model debugging with large scale models can be tedious.

In any case, if you want other forum users to provide help, it will probably be necessary that you share the model + data, so others can reproduce what you are doing.

Best,
Fred
paulacabrales
User
User
Posts: 5
Joined: 1 year ago

Re: My model has written correct but when it runs some items shows infeasible.

Post by paulacabrales »

Thanks Fred,

I found the problem, but my model runs and the solution said it:

MODEL hwlrp OBJECTIVE Z
TYPE MIP DIRECTION MINIMIZE
SOLVER CPLEX FROM LINE 255

**** SOLVER STATUS 1 Normal Completion
**** MODEL STATUS 8 Integer Solution
**** OBJECTIVE VALUE 2687897.8728

RESOURCE USAGE, LIMIT 10882.109 10000000000.000
ITERATION COUNT, LIMIT 83550517 2147483647
--- GAMS/Cplex Link licensed for continuous and discrete problems.
--- GMO setup time: 0.00s
--- Space for names approximately 0.33 Mb
--- Use option 'names no' to turn use of names off
--- GMO memory 3.90 Mb (peak 3.95 Mb)
--- Dictionary memory 0.00 Mb
--- Cplex 20.1.0.1 link memory 0.24 Mb (peak 1.06 Mb)
--- Starting Cplex


--- MIP status (102): integer optimal, tolerance.
--- Cplex Time: 10882.02sec (det. 10035964.89 ticks)

--- Fixing integer variables and solving final LP...


--- Fixed MIP status (3): infeasible.
--- Cplex Time: 0.02sec (det. 2.62 ticks)

--- Rerunning with presolve turned off and solving with LPMETHOD=1.


--- Fixed MIP status (3): infeasible.
--- Cplex Time: 0.06sec (det. 15.83 ticks)

*** WARNING: Final solve did not return an optimal solution.
--- Returning a primal only solution to GAMS (marginals all set to NA).

Solution satisfies tolerances
MIP Solution: 2687897.872756 (83550517 iterations, 3252644 nodes)
Final Solve: 0.000010 (141 iterations)

Best possible: 2687629.083790
Absolute gap: 268.788967
Relative gap: 0.000100



Can you explain me why Fixed MIP status (3) says infeasible? is it an optimal solution or not?

Thanks for helping me,
Post Reply