Hello;
I modeled the following simple IP problem in Gams, but the solutions given by the Cplex solver and Xpress solver are strangely different. I mean the Cplex solver came up with only a feasible solution (3,3)[z=39] and not an optimal solution, but the right answer is (5,0)[z=40] that Xpress solver gives us.
I want to know what the problem is and how it can be solved.
Max z=8x+5y
St: x+y<=6
9x+5y<=45
x,y are integer and non-negative
Regard,
Anvar
–
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.
Hi Hesam
I think you manipulated the solver setting. I suggest you to reset the solver setting and whenever
you need to change solver, use the following command before solve statement:
Option lp=Solver_name;
The best and exact solution of your problem is:
x=3.75;
y=2.25;
z=41.25;
which is obtained by using Cplex;
On Fri, Nov 8, 2013 at 11:15 PM, hesameddin anvar wrote:
Hello;
I modeled the following simple IP problem in Gams, but the solutions given by the Cplex solver and Xpress solver are strangely different. I mean the Cplex solver came up with only a feasible solution (3,3)[z=39] and not an optimal solution, but the right answer is (5,0)[z=40] that Xpress solver gives us.
I want to know what the problem is and how it can be solved.
Max z=8x+5y
St: x+y<=6
9x+5y<=45
x,y are integer and non-negative
Regard,
Anvar
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.
Hello,
Please try this piece of code, it gives z=40 at (5,0).
I guess the option optcr is missed in your run.
HTH,
Yan
- –
integer variables x, y;
variable z;
equation e1, e2, e3;
e1… z =E= 8x+5y;
e2… x+y =L= 6;
e3… 9x+5y =L= 45;
model tmp /all/;
x.lo = 0;
y.lo = 0;
option optcr=0;
option mip=cplex;
solve tmp maxmizing z using mip;
- –
å‘件人: hesameddin anvar
å‘é€æ—¶é—´ï¼š 2013-11-10 01:20:36
收件人: gamsworld
抄é€ï¼š
主题: Cplex solver doesn’t come up with optimal solution
Hello;
I modeled the following simple IP problem in Gams, but the solutions given by the Cplex solver and Xpress solver are strangely different. I mean the Cplex solver came up with only a feasible solution (3,3)[z=39] and not an optimal solution, but the right answer is (5,0)[z=40] that Xpress solver gives us.
I want to know what the problem is and how it can be solved.
Max z=8x+5y
St: x+y<=6
9x+5y<=45
x,y are integer and non-negative
Regard,
Anvar
Reply-to: gamsworld@googlegroups.com
Thanks Ryan
On Monday, November 11, 2013 7:32:30 AM UTC+3:30, Ryan Ren wrote:
Hello,
Please try this piece of code, it gives z=40 at (5,0).
I guess the option optcr is missed in your run.
HTH,
Yan
- –
integer variables x, y;
variable z;
equation e1, e2, e3;
e1… z =E= 8x+5y;
e2… x+y =L= 6;
e3… 9x+5y =L= 45;
model tmp /all/;
x.lo = 0;
y.lo = 0;
option optcr=0;
option mip=cplex;
solve tmp maxmizing z using mip;
- –
å‘件人: hesameddin anvar
å‘é€æ—¶é—´ï¼š 2013-11-10 01:20:36
收件人: gamsworld
抄é€ï¼š
主题: Cplex solver doesn’t come up with optimal solution
Hello;
I modeled the following simple IP problem in Gams, but the solutions given by the Cplex solver and Xpress solver are strangely different. I mean the Cplex solver came up with only a feasible solution (3,3)[z=39] and not an optimal solution, but the right answer is (5,0)[z=40] that Xpress solver gives us.
I want to know what the problem is and how it can be solved.
Max z=8x+5y
St: x+y<=6
9x+5y<=45
x,y are integer and non-negative
Regard,
Anvar
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.
–
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.