CPLEX return error solution

157 views
Skip to first unread message

riccardo zanella

unread,
Nov 12, 2015, 10:54:49 AM11/12/15
to AMPL Modeling Language
Good evening!
I have implemented a model but when i solve them:

ampl: model '/home/riccardo/amplide-demo/example/Second_problem.mod';
ampl
: option solver cplex;
ampl
: option cplex_option 'primalopt';
ampl
: solve;
CPLEX
12.6.1.0: unbounded problem.
19 dual simplex iterations (19 in phase I)
variable
.unbdd returned
2 extra simplex iterations for ray

suffix unbdd OUT
;
ampl
: display u_0;
u_0
= 0

ampl
: display u_1;
u_1
= -1.14573

ampl
: display u_7;
u_7
= 1.75

ampl
: display a_0;
a_0
= -0.25


this solution isn't correct in fact (for exemple) daesn't respect my first constraint:

subject to Constraints1: - u_0 - u_1 - u_7 + a_0 >= 0;

-0 +1.14573 -1.75 -0.25 <0   <=>  -0.854272 < 0

why?? where i wrong?

riccardo zanella

unread,
Nov 12, 2015, 11:34:27 AM11/12/15
to AMPL Modeling Language
possible that the problem is that I use dual simplex?

ampl: model '/home/riccardo/amplide-demo/example/Second_problem.mod';
ampl
: option cplex_option 'primal';

ampl
: solve;
CPLEX
12.6.1.0: unbounded problem.
19 dual simplex iterations (19 in phase I)
variable
.unbdd returned
2 extra simplex iterations for ray

suffix unbdd OUT
;

if the answer is yes why?

riccardo...@gmail.com

unread,
Nov 12, 2015, 11:56:42 AM11/12/15
to AMPL Modeling Language
Good evening!
I have a problem that I can't resolve!

I implemented a simple model the output is:

ampl: model '/home/riccardo/amplide-demo/example/Second_problem.mod';

ampl
: option solver cplex;
ampl
: option cplex_option 'primalopt';

ampl
: solve;
CPLEX
12.6.1.0: unbounded problem.
19 dual simplex iterations (19 in phase I)
variable
.unbdd returned
2 extra simplex iterations for ray

suffix unbdd OUT
;

ampl
: display u_0;
u_0
= 0

ampl
: display u_1;
u_1
= -1.14573

ampl
: display u_7;
u_7
= 1.75

ampl
: display a_0;
a_0
= -0.25


This isn't a correct solution in fact  (for example)  daesn't respect my first constraint:

subject to Constraints1: - u_0 - u_1 - u_7 + a_0 >= 0;

-0+
1.14573-1.75-0.25 < 0 => -0.854272 < 0

I don't understand why... Where I am wrong??
I

Robert Fourer

unread,
Nov 13, 2015, 12:00:26 AM11/13/15
to am...@googlegroups.com
CPLEX reports an "unbounded problem" so you know that an optimal solution does not exist, and the solution that CPLEX returned is not an optimal one. But since CPLEX used the dual simplex method, it doesn't even have a feasible solution to return. To see whether there is a feasible solution you should try running the primal simplex, which you tried to do, but your specification should have been

option cplex_options 'primalopt';

(that is, with "options" rather than "option").

Bob Fourer
am...@googlegroups.com

=======
Reply all
Reply to author
Forward
0 new messages