Topic
  • 17 replies
  • Latest Post - ‏2013-12-15T13:58:02Z by DanielJunglas
2T3M_lolol
2T3M_lolol
36 Posts

Pinned topic unfeasible but still run

‏2013-12-10T18:13:37Z |

Hi, dear all,

 

I have a question that when I ran my model with cplex. It shows that unbounded and infeasible. However, it still runs.....Why it is like that??/

 

Thank you 

  • PaulRubin
    PaulRubin
    484 Posts
    ACCEPTED ANSWER

    Re: unfeasible but still run

    ‏2013-12-11T19:08:23Z  

    Hi Paul,

     

    First , thank  you for your reply .

    Second, yes , it shows "unbounded OR infeasible". You can find the code of the Cplex in the attachment . 

    Third, I have named all the constraints. When I tried to make it present in a LP format. Why it could not show the name of the constraints? And why the id could not show by order?  for examplex, id 56, id57.......

    Last, my model will deal with big data. It seems that it will take lot of time to handle it by the usual way by cplex. So , could you give me some suggestions?

    Thank you for your great help

    BR

    Amanda

    I think it would be better if you posted your model as a SAV or LP file (SAV would be better), as well as the MOD file in your zip archive.

    Paul

  • DanielJunglas
    DanielJunglas
    2013 Posts
    ACCEPTED ANSWER

    Re: unfeasible but still run

    ‏2013-12-15T13:58:02Z  

    hi Daniel, 

    in my .lp file, i could not see nothing of the name of my constraints...... could you tell me where is the option to disable names?
     

    Thank you

     

    Hm, I looked at the LP file that you attached to another post in this thread (in the testlp.zip archive). There I found these labeled constraints:

     obj: d#0 + d#1 + d#2 + d#3 + d#4 + d#5 + d#6 + d#7 + d#8 + d#9 + d#10 + d#11
     c10:     n#1  = 218
     c35:     Qh#0#0 + Qh#0#1 + Qh#0#2 + Qh#0#3 + Qh#0#4 + Qh#0#5 + Qh#0#6 + Qh#0#7

    So it looks like some constraints end up with the expected name in the file. I am not sure but maybe those other constraints all have empty index sets and therefore do not give rise to anything that would be printed to an LP file? I suggest you go through your .mod file again and make sure that all constraints are named (in the original .mod file not all constraints were named).

    Moreover, it looks like you are naming your constraint in the wrong way. In your .mod file I see

    c1:
    forall ( x in t: x>=1&& x<t1 )  
     s[x]== 0;

    while the correct way to name this would be

    forall ( x in t: x>=1&& x<t1 )  
     c1: s[x]== 0;

    Note that the 'c1' label is within the forall construct.

  • PaulRubin
    PaulRubin
    484 Posts

    Re: unfeasible but still run

    ‏2013-12-10T21:39:58Z  

    First, "unbounded AND infeasible" makes no sense. Do you mean "unbounded OR infeasible"?

    Second, what produces the message? If it shows up in the output log, perhaps you should post that portion of the log, including several lines on either side of the message.

  • 2T3M_lolol
    2T3M_lolol
    36 Posts

    Re: unfeasible but still run

    ‏2013-12-11T14:23:26Z  
    • PaulRubin
    • ‏2013-12-10T21:39:58Z

    First, "unbounded AND infeasible" makes no sense. Do you mean "unbounded OR infeasible"?

    Second, what produces the message? If it shows up in the output log, perhaps you should post that portion of the log, including several lines on either side of the message.

    Hi Paul,

     

    First , thank  you for your reply .

    Second, yes , it shows "unbounded OR infeasible". You can find the code of the Cplex in the attachment . 

    Third, I have named all the constraints. When I tried to make it present in a LP format. Why it could not show the name of the constraints? And why the id could not show by order?  for examplex, id 56, id57.......

    Last, my model will deal with big data. It seems that it will take lot of time to handle it by the usual way by cplex. So , could you give me some suggestions?

    Thank you for your great help

    BR

    Amanda

    Attachments

  • DanielJunglas
    DanielJunglas
    2013 Posts

    Re: unfeasible but still run

    ‏2013-12-11T16:31:21Z  

    Hi Paul,

     

    First , thank  you for your reply .

    Second, yes , it shows "unbounded OR infeasible". You can find the code of the Cplex in the attachment . 

    Third, I have named all the constraints. When I tried to make it present in a LP format. Why it could not show the name of the constraints? And why the id could not show by order?  for examplex, id 56, id57.......

    Last, my model will deal with big data. It seems that it will take lot of time to handle it by the usual way by cplex. So , could you give me some suggestions?

    Thank you for your great help

    BR

    Amanda

    The "unbounded or infeasible" message usually comes up during presolve.

    To further investigate what is going on you should turn off presolve in a settings file and try again. If the problem turns out to be infeasible you can use the conflict refiner to figure out which constraints are in conflict. More information about how to refine conflicts in the IDE can be found here and here.

  • 2T3M_lolol
    2T3M_lolol
    36 Posts

    Re: unfeasible but still run

    ‏2013-12-11T16:46:14Z  

    The "unbounded or infeasible" message usually comes up during presolve.

    To further investigate what is going on you should turn off presolve in a settings file and try again. If the problem turns out to be infeasible you can use the conflict refiner to figure out which constraints are in conflict. More information about how to refine conflicts in the IDE can be found here and here.

    Hi Daniel,

     

    In fact, when I changed the data used by the constraint. It will find a solution. So, I suppose that it is because there are so many data in my model . Could you give me some suggestions how to solve this problem? To make the cplex can find the solution with some special data more effectively? What is more, could you tell me,  I have named all the constraints. When I tried to make it present in a LP format. Why it could not show the name of the constraints? And why the id could not show by order?  for examplex, id 56, id57.......

     

    Thank you

    Amanda

  • PaulRubin
    PaulRubin
    484 Posts

    Re: unfeasible but still run

    ‏2013-12-11T19:08:23Z  

    Hi Paul,

     

    First , thank  you for your reply .

    Second, yes , it shows "unbounded OR infeasible". You can find the code of the Cplex in the attachment . 

    Third, I have named all the constraints. When I tried to make it present in a LP format. Why it could not show the name of the constraints? And why the id could not show by order?  for examplex, id 56, id57.......

    Last, my model will deal with big data. It seems that it will take lot of time to handle it by the usual way by cplex. So , could you give me some suggestions?

    Thank you for your great help

    BR

    Amanda

    I think it would be better if you posted your model as a SAV or LP file (SAV would be better), as well as the MOD file in your zip archive.

    Paul

  • 2T3M_lolol
    2T3M_lolol
    36 Posts

    Re: unfeasible but still run

    ‏2013-12-11T20:53:23Z  
    • PaulRubin
    • ‏2013-12-11T19:08:23Z

    I think it would be better if you posted your model as a SAV or LP file (SAV would be better), as well as the MOD file in your zip archive.

    Paul

    Hi Paul,

     

    Please find it in the attachment.

    Thank you

    Amanda

    Attachments

  • T_O
    T_O
    475 Posts

    Re: unfeasible but still run

    ‏2013-12-11T21:39:44Z  

    Hi Paul,

     

    Please find it in the attachment.

    Thank you

    Amanda

    Hmm,

    both CPLEX 12.5.1 and 12.6 find an integer feasible solution for both the lp and the sav file in a few seconds.

    Thomas

  • PaulRubin
    PaulRubin
    484 Posts

    Re: unfeasible but still run

    ‏2013-12-11T21:50:10Z  

    Hi Paul,

     

    Please find it in the attachment.

    Thank you

    Amanda

    I ran your problem (both the LP and SAV files) in CPLEX 12.6 and got identical solutions. I also ran the SAV file with CPLEX 12.4. None of those runs produced an "infeasible or unbounded" message.

    However, the run with CPLEX 12.4 had a worst-case basis condition number nine orders of magnitude worse than corresponding value in CPLEX 12.6. There was a warning message that "CPLEX encountered numerical difficulties while solving this model" in every run, which is not good but not necessarily bad. (CPLEX has ways to cope with "numerical difficulties".) CPLEX 12.6 reported that 100% of the basis matrices were either "stable" (best category) or at worst "suspicious" (second best), whereas CPLEX 12.4 reported that a bit over 1% of the bases were in the two worst categories (most "unstable", a few "ill-posed").

    You did not specify which version of CPLEX you are using. If it is an older version, and if the problem you supplied was one that generated the "infeasible or unbounded" message, it's possible the message was due to the presolver encountering some numerical instability in the problem.

    Paul

  • T_O
    T_O
    475 Posts

    Re: unfeasible but still run

    ‏2013-12-11T22:20:07Z  
    • PaulRubin
    • ‏2013-12-11T21:50:10Z

    I ran your problem (both the LP and SAV files) in CPLEX 12.6 and got identical solutions. I also ran the SAV file with CPLEX 12.4. None of those runs produced an "infeasible or unbounded" message.

    However, the run with CPLEX 12.4 had a worst-case basis condition number nine orders of magnitude worse than corresponding value in CPLEX 12.6. There was a warning message that "CPLEX encountered numerical difficulties while solving this model" in every run, which is not good but not necessarily bad. (CPLEX has ways to cope with "numerical difficulties".) CPLEX 12.6 reported that 100% of the basis matrices were either "stable" (best category) or at worst "suspicious" (second best), whereas CPLEX 12.4 reported that a bit over 1% of the bases were in the two worst categories (most "unstable", a few "ill-posed").

    You did not specify which version of CPLEX you are using. If it is an older version, and if the problem you supplied was one that generated the "infeasible or unbounded" message, it's possible the message was due to the presolver encountering some numerical instability in the problem.

    Paul

    The sav file is from 12.2, quite an old version.

    Thomas

  • PaulRubin
    PaulRubin
    484 Posts

    Re: unfeasible but still run

    ‏2013-12-11T22:55:18Z  
    • T_O
    • ‏2013-12-11T22:20:07Z

    The sav file is from 12.2, quite an old version.

    Thomas

    Didn't think to check the file signature with a hex editor, but you're quite correct -- that version is well past its prime.

  • T_O
    T_O
    475 Posts

    Re: unfeasible but still run

    ‏2013-12-11T23:04:32Z  
    • PaulRubin
    • ‏2013-12-11T22:55:18Z

    Didn't think to check the file signature with a hex editor, but you're quite correct -- that version is well past its prime.

    You don't need a hex editor, any plain text editor is sufficient. You will see CPLEXMIPQCQ   1220 right at the beginning.

    Thomas

  • 2T3M_lolol
    2T3M_lolol
    36 Posts

    Re: unfeasible but still run

    ‏2013-12-12T16:10:16Z  
    • T_O
    • ‏2013-12-11T23:04:32Z

    You don't need a hex editor, any plain text editor is sufficient. You will see CPLEXMIPQCQ   1220 right at the beginning.

    Thomas

    hi Thomas

     

    I tried to used the version 12.5. however why there is error like this????

     

    Could you tell me what does it mean please?

    Thank you

    Amanda

    Attachments

  • 2T3M_lolol
    2T3M_lolol
    36 Posts

    Re: unfeasible but still run

    ‏2013-12-12T16:11:48Z  
    • PaulRubin
    • ‏2013-12-11T22:55:18Z

    Didn't think to check the file signature with a hex editor, but you're quite correct -- that version is well past its prime.

    Thank you Paul. I am sorry that i forgot to mention the version' What i used before is version 12.2. now i tried to use the version 12.5. However, it does not work and shows the error like this. please find in the attachment 

    Attachments

  • T_O
    T_O
    475 Posts

    Re: unfeasible but still run

    ‏2013-12-12T16:18:19Z  

    hi Thomas

     

    I tried to used the version 12.5. however why there is error like this????

     

    Could you tell me what does it mean please?

    Thank you

    Amanda

    I am not an OPL expert, but this looks like a file encoding problem. Maybe due to the strange characters in the above comments. Try removing them. Or try to save the file in a single byte format.

    Thomas

  • DanielJunglas
    DanielJunglas
    2013 Posts

    Re: unfeasible but still run

    ‏2013-12-13T14:58:57Z  

    Hi Daniel,

     

    In fact, when I changed the data used by the constraint. It will find a solution. So, I suppose that it is because there are so many data in my model . Could you give me some suggestions how to solve this problem? To make the cplex can find the solution with some special data more effectively? What is more, could you tell me,  I have named all the constraints. When I tried to make it present in a LP format. Why it could not show the name of the constraints? And why the id could not show by order?  for examplex, id 56, id57.......

     

    Thank you

    Amanda

    No, I don't think that the amount of data is the problem here. The problem is that the first data set produces a model that does not have a feasible solution while the second data produces a problem that has a feasible solution. So this is either an error in your model or in your data (OK, it may also be a bug in CPLEX). You should figure out what is the issue here (to do that use the conflict refiner as I described).

    As far as I can see you did not name all the constraints. For example there is this constraint

    v[t1-1]== Numt1v;

    and that is not named. There are other constraints like this. In your LP file, do all constraints have names idXX or only some? The constraints that you named in your .mod file should appear with that name. Or did you happen to disable the creation of names (there is an option to disable names in models since that saved memory)?

    The numbers in id56, id57, etc. are more or less random. You cannot conclude anything from that. That is why they are not in order.

  • 2T3M_lolol
    2T3M_lolol
    36 Posts

    Re: unfeasible but still run

    ‏2013-12-13T15:26:21Z  

    No, I don't think that the amount of data is the problem here. The problem is that the first data set produces a model that does not have a feasible solution while the second data produces a problem that has a feasible solution. So this is either an error in your model or in your data (OK, it may also be a bug in CPLEX). You should figure out what is the issue here (to do that use the conflict refiner as I described).

    As far as I can see you did not name all the constraints. For example there is this constraint

    v[t1-1]== Numt1v;

    and that is not named. There are other constraints like this. In your LP file, do all constraints have names idXX or only some? The constraints that you named in your .mod file should appear with that name. Or did you happen to disable the creation of names (there is an option to disable names in models since that saved memory)?

    The numbers in id56, id57, etc. are more or less random. You cannot conclude anything from that. That is why they are not in order.

    hi Daniel, 

    in my .lp file, i could not see nothing of the name of my constraints...... could you tell me where is the option to disable names?
     

    Thank you

     

  • DanielJunglas
    DanielJunglas
    2013 Posts

    Re: unfeasible but still run

    ‏2013-12-15T13:58:02Z  

    hi Daniel, 

    in my .lp file, i could not see nothing of the name of my constraints...... could you tell me where is the option to disable names?
     

    Thank you

     

    Hm, I looked at the LP file that you attached to another post in this thread (in the testlp.zip archive). There I found these labeled constraints:

     obj: d#0 + d#1 + d#2 + d#3 + d#4 + d#5 + d#6 + d#7 + d#8 + d#9 + d#10 + d#11
     c10:     n#1  = 218
     c35:     Qh#0#0 + Qh#0#1 + Qh#0#2 + Qh#0#3 + Qh#0#4 + Qh#0#5 + Qh#0#6 + Qh#0#7

    So it looks like some constraints end up with the expected name in the file. I am not sure but maybe those other constraints all have empty index sets and therefore do not give rise to anything that would be printed to an LP file? I suggest you go through your .mod file again and make sure that all constraints are named (in the original .mod file not all constraints were named).

    Moreover, it looks like you are naming your constraint in the wrong way. In your .mod file I see

    c1:
    forall ( x in t: x>=1&& x<t1 )  
     s[x]== 0;

    while the correct way to name this would be

    forall ( x in t: x>=1&& x<t1 )  
     c1: s[x]== 0;

    Note that the 'c1' label is within the forall construct.