Pinned topic Is it possible to have an infeasible solution with different objective?
I am using the CPLEX optimizer via MATLAB and I have a MILP problem that is feasible and i want to find all the min and max of the variables. So i loop through all the variables and some of the variables were infeasible when i tried to maximize them.
Is this possible?
best rgds

Re: Is it possible to have an infeasible solution with different objective?
20130205T16:35:07ZThis is the accepted answer. This is the accepted answer.No changing the objective should not render a problem infeasible. But it may make it unbounded. Are you sure that the problem is infeasible and not unbounded? What is the solution status you get? 
Re: Is it possible to have an infeasible solution with different objective?
20130205T16:36:36ZThis is the accepted answer. This is the accepted answer.Do you mean that some of the models are infeasible when you solve them (maximize some variable subject to the original constraints)?
If a problem is feasible, altering the objective function cannot make it infeasible. If the feasible region is unbounded, however, altering the objective can switch the problem between being unbounded and having an optimal solution.
Paul
Mathematicians are like Frenchmen: whenever you say something to them, they translate it into their own language, and at once it is something entirely different. (Goethe) 
Re: Is it possible to have an infeasible solution with different objective?
20130205T17:32:26ZThis is the accepted answer. This is the accepted answer. SystemAdmin
 20130205T16:35:07Z
No changing the objective should not render a problem infeasible. But it may make it unbounded. Are you sure that the problem is infeasible and not unbounded? What is the solution status you get?
This is the solution i have from the solver:
ans =
status: 103
statusstring: 'integer infeasible'
time: 0.0997
method: 12
mipitcnt: 231
nodecnt: 1
bestobjval: 1.0000e+75
cutoff: 1.0000e+75
pool: 1x1 struct 
Re: Is it possible to have an infeasible solution with different objective?
20130210T09:58:27ZThis is the accepted answer. This is the accepted answer. kc78
 20130205T17:32:26Z
Hi Daniel
This is the solution i have from the solver:
ans =
status: 103
statusstring: 'integer infeasible'
time: 0.0997
method: 12
mipitcnt: 231
nodecnt: 1
bestobjval: 1.0000e+75
cutoff: 1.0000e+75
pool: 1x1 struct
Can you export the model before and after your modifications as an LP file and check that the only difference between them is the expected change in the objective function?
Maybe also export the models as SAV file and attach them here so that we can take a look at the differences as well. 
Re: Is it possible to have an infeasible solution with different objective?
20130729T19:43:11ZThis is the accepted answer. This is the accepted answer. SystemAdmin
 20130210T09:58:27Z
That is weird and should not happen.
Can you export the model before and after your modifications as an LP file and check that the only difference between them is the expected change in the objective function?
Maybe also export the models as SAV file and attach them here so that we can take a look at the differences as well.Hi
I have this MILP model whereby I am only changing the objective function and it turns from feasible to infeasible. I am using the CPLEX 12.5 through the MATLAB interface. When i try to solve the problem in 12.4, it does not even solve in the first instance.
Attachments

 cplex_feas.mat
 323 KB

 cplex_infes.mat
 172 KB

Re: Is it possible to have an infeasible solution with different objective?
20130729T19:48:11ZThis is the accepted answer. This is the accepted answer. SystemAdmin
 20130210T09:58:27Z
That is weird and should not happen.
Can you export the model before and after your modifications as an LP file and check that the only difference between them is the expected change in the objective function?
Maybe also export the models as SAV file and attach them here so that we can take a look at the differences as well.Hi
I have this MILP model whereby I am only changing the objective function and it turns from feasible to infeasible. I am using the CPLEX 12.5 through the MATLAB interface. When i try to solve the problem in 12.4, it does not even solve in the first instance.
Attachments

 cplex_feas.mat
 323 KB

 cplex_infes.mat
 172 KB

Re: Is it possible to have an infeasible solution with different objective?
20130729T19:53:39ZThis is the accepted answer. This is the accepted answer. SystemAdmin
 20130205T16:36:36Z
Do you mean that some of the models are infeasible when you solve them (maximize some variable subject to the original constraints)?
If a problem is feasible, altering the objective function cannot make it infeasible. If the feasible region is unbounded, however, altering the objective can switch the problem between being unbounded and having an optimal solution.
Paul
Mathematicians are like Frenchmen: whenever you say something to them, they translate it into their own language, and at once it is something entirely different. (Goethe)Hi
I have this MILP model whereby I am only changing the objective function and it turns from feasible to infeasible. I am using the CPLEX 12.5 through the MATLAB interface. When i try to solve the problem in 12.4, it does not even solve in the first instance.
Attachments

 Archive.zip
 648 KB

Re: Is it possible to have an infeasible solution with different objective?
20130730T12:22:38ZThis is the accepted answer. This is the accepted answer. kc78
 20130729T19:53:39Z
Hi
I have this MILP model whereby I am only changing the objective function and it turns from feasible to infeasible. I am using the CPLEX 12.5 through the MATLAB interface. When i try to solve the problem in 12.4, it does not even solve in the first instance.
I was able to reproduce your problem with CPLEX 12.5.0.0 but not with 12.5.1.0 (the most recent version). Could you upgrade to 12.5.1 or is that impossible right now?

Re: Is it possible to have an infeasible solution with different objective?
20130730T12:54:29ZThis is the accepted answer. This is the accepted answer. DanielJunglas
 20130730T12:22:38Z
I was able to reproduce your problem with CPLEX 12.5.0.0 but not with 12.5.1.0 (the most recent version). Could you upgrade to 12.5.1 or is that impossible right now?
Hi Daniel
I just tried out 12.5.1.0 and using the Interactive Optimizer but the infeasible problem still infeasible. Is there any reason why this could happen?

Re: Is it possible to have an infeasible solution with different objective?
20130730T13:19:05ZThis is the accepted answer. This is the accepted answer. kc78
 20130730T12:54:29Z
Hi Daniel
I just tried out 12.5.1.0 and using the Interactive Optimizer but the infeasible problem still infeasible. Is there any reason why this could happen?
I think feas.lp is in fact infeasible. Try dis sol qual and you will see a huge slack bound error. If I disable presolving, feas.lp also becomes infeasible. I guess your problem is due to numerical problems.
Best regards,
Thomas 
Re: Is it possible to have an infeasible solution with different objective?
20130805T12:17:01ZThis is the accepted answer. This is the accepted answer. T_O
 20130730T13:19:05Z
I think feas.lp is in fact infeasible. Try dis sol qual and you will see a huge slack bound error. If I disable presolving, feas.lp also becomes infeasible. I guess your problem is due to numerical problems.
Best regards,
ThomasThanks for all the advice and testing!
How can i turn off presolve for the MATLAB cplex class?

Re: Is it possible to have an infeasible solution with different objective?
20130812T07:38:33ZThis is the accepted answer. This is the accepted answer. kc78
 20130805T12:17:01Z
Thanks for all the advice and testing!
How can i turn off presolve for the MATLAB cplex class?
Setting parameters in matlab is explained here.
The parameter to disable presolve is CPX_PARAM_PREIND.