Topic
  • 12 replies
  • Latest Post - ‏2013-08-12T07:38:33Z by DanielJunglas
kc78
kc78
46 Posts

Pinned topic Is it possible to have an infeasible solution with different objective?

‏2013-02-05T12:58:30Z |
Hi

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
Updated on 2013-02-10T09:58:27Z at 2013-02-10T09:58:27Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    7929 Posts

    Re: Is it possible to have an infeasible solution with different objective?

    ‏2013-02-05T16: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?
  • SystemAdmin
    SystemAdmin
    7929 Posts

    Re: Is it possible to have an infeasible solution with different objective?

    ‏2013-02-05T16: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)
  • kc78
    kc78
    46 Posts

    Re: Is it possible to have an infeasible solution with different objective?

    ‏2013-02-05T17:32:26Z  
    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?
    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
  • SystemAdmin
    SystemAdmin
    7929 Posts

    Re: Is it possible to have an infeasible solution with different objective?

    ‏2013-02-10T09:58:27Z  
    • kc78
    • ‏2013-02-05T17: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
    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.
  • kc78
    kc78
    46 Posts

    Re: Is it possible to have an infeasible solution with different objective?

    ‏2013-07-29T19:43:11Z  
    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

  • kc78
    kc78
    46 Posts

    Re: Is it possible to have an infeasible solution with different objective?

    ‏2013-07-29T19:48:11Z  
    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

  • kc78
    kc78
    46 Posts

    Re: Is it possible to have an infeasible solution with different objective?

    ‏2013-07-29T19:53:39Z  
    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

  • DanielJunglas
    DanielJunglas
    2220 Posts

    Re: Is it possible to have an infeasible solution with different objective?

    ‏2013-07-30T12:22:38Z  
    • kc78
    • ‏2013-07-29T19: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?

  • kc78
    kc78
    46 Posts

    Re: Is it possible to have an infeasible solution with different objective?

    ‏2013-07-30T12:54:29Z  

    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?

  • T_O
    T_O
    475 Posts

    Re: Is it possible to have an infeasible solution with different objective?

    ‏2013-07-30T13:19:05Z  
    • kc78
    • ‏2013-07-30T12: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

  • kc78
    kc78
    46 Posts

    Re: Is it possible to have an infeasible solution with different objective?

    ‏2013-08-05T12:17:01Z  
    • T_O
    • ‏2013-07-30T13: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,
    Thomas

    Thanks for all the advice and testing!

    How can i turn off presolve for the MATLAB cplex class?

     

  • DanielJunglas
    DanielJunglas
    2220 Posts

    Re: Is it possible to have an infeasible solution with different objective?

    ‏2013-08-12T07:38:33Z  
    • kc78
    • ‏2013-08-05T12: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.