Gams ignores binarity of variable

Hey all,

I defined a problem where the type of my variable x is defined as binary. However, after solving the problem, the output for x is not binary, it is just a value between 0 and 1. Furthermore, I actually have 480 time steps, but it only gets a solutions for a couple of them.
Does anymone know what happened?
I would appreciate your help alot!

Best regards Felix


Here what I defined:
Sets
I time / 1*480 /
W machines / AA1, AA2, … /;

Variables
x(I,W) On or off;
binary variable x;


My output then looks like this:

---- VAR X
LOWER LEVEL UPPER MARGINAL
1 .AA1 . . 1.000 .
1 .AA2 . . 1.000 .
.
.
2 .AA1 . . 1.000 .
2 .AA2 . . 1.000 .
.
.
3 .AA1 . . 1.000 1.660
3 .AA2 . . 1.000 1.660
.
.
4 .AA1 . . 1.000 0.910
4 .AA2 . . 1.000 0.910
.
.
.
21 .AA1 . . 1.000 1.148
21 .AA2 . . 1.000 1.148
.
.
22 .AA1 . 1.000 1.000 -20.999
22 .AA2 . 1.000 1.000 -20.999
.
.
23 .AA1 . 1.000 1.000 -36.204
23 .AA2 . 1.000 1.000 -36.204
23 .AA3 . 0.691 1.000 .
23 .AA4 . . 1.000 1.104
23 .AA5 . 1.000 1.000 -5.743
23 .AA6 . 1.000 1.000 -3.55E-15
23 .AA7 . 0.004 1.000 .
23 .AA8 . 0.445 1.000 .
23 .AA9 . 1.000 1.000 EPS



I checked the solution report, but it looks normal:

S O L V E S U M M A R Y
MODEL PUMPEN OBJECTIVE K
TYPE RMIP DIRECTION MINIMIZE
SOLVER CPLEX FROM LINE 246

**** SOLVER STATUS 1 Normal Completion
**** MODEL STATUS 1 Optimal
**** OBJECTIVE VALUE -1160.0291

RESOURCE USAGE, LIMIT 2.091 1000.000
ITERATION COUNT, LIMIT 1601 2000000000


\

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 https://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.

You explicitly told GAMS (and Cplex) to ignore the “binarity” by solving an RMIP:


S O L V E S U M M A R Y
MODEL PUMPEN OBJECTIVE K
TYPE RMIP DIRECTION MINIMIZE
SOLVER CPLEX FROM LINE 246

From the manual (http://gams.com/help/topic/gams.doc/userguides/userguide/_u_g__model_solve.html):

RMIP: Relaxed mixed integer programming. The model can contain discrete variables but the discrete requirements are relaxed, meaning that the integer and binary variables can assume any values between their bounds.

Hope this helps,
Michael

On Wednesday, March 2, 2016 at 5:18:49 AM UTC-5, Felix wrote:


Hey all,

I defined a problem where the type of my variable x is defined as binary. However, after solving the problem, the output for x is not binary, it is just a value between 0 and 1. Furthermore, I actually have 480 time steps, but it only gets a solutions for a couple of them.
Does anymone know what happened?
I would appreciate your help alot!

Best regards Felix


Here what I defined:
Sets
I time / 1*480 /
W machines / AA1, AA2, … /;

Variables
x(I,W) On or off;
binary variable x;


My output then looks like this:

---- VAR X
LOWER LEVEL UPPER MARGINAL
1 .AA1 . . 1.000 .
1 .AA2 . . 1.000 .
.
.
2 .AA1 . . 1.000 .
2 .AA2 . . 1.000 .
.
.
3 .AA1 . . 1.000 1.660
3 .AA2 . . 1.000 1.660
.
.
4 .AA1 . . 1.000 0.910
4 .AA2 . . 1.000 0.910
.
.
.
21 .AA1 . . 1.000 1.148
21 .AA2 . . 1.000 1.148
.
.
22 .AA1 . 1.000 1.000 -20.999
22 .AA2 . 1.000 1.000 -20.999
.
.
23 .AA1 . 1.000 1.000 -36.204
23 .AA2 . 1.000 1.000 -36.204
23 .AA3 . 0.691 1.000 .
23 .AA4 . . 1.000 1.104
23 .AA5 . 1.000 1.000 -5.743
23 .AA6 . 1.000 1.000 -3.55E-15
23 .AA7 . 0.004 1.000 .
23 .AA8 . 0.445 1.000 .
23 .AA9 . 1.000 1.000 EPS



I checked the solution report, but it looks normal:

S O L V E S U M M A R Y
MODEL PUMPEN OBJECTIVE K
TYPE RMIP DIRECTION MINIMIZE
SOLVER CPLEX FROM LINE 246

**** SOLVER STATUS 1 Normal Completion
**** MODEL STATUS 1 Optimal
**** OBJECTIVE VALUE -1160.0291

RESOURCE USAGE, LIMIT 2.091 1000.000
ITERATION COUNT, LIMIT 1601 2000000000


\

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 https://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.

Thank you! I usually used another method, so I looked for everything except of this…
So thanks again!


Am Mittwoch, 2. März 2016 12:51:32 UTC+1 schrieb Michael Bussieck:

You explicitly told GAMS (and Cplex) to ignore the “binarity” by solving an RMIP:


S O L V E S U M M A R Y
MODEL PUMPEN OBJECTIVE K
TYPE RMIP DIRECTION MINIMIZE
SOLVER CPLEX FROM LINE 246

From the manual (http://gams.com/help/topic/gams.doc/userguides/userguide/_u_g__model_solve.html):

RMIP: Relaxed mixed integer programming. The model can contain discrete variables but the discrete requirements are relaxed, meaning that the integer and binary variables can assume any values between their bounds.

Hope this helps,
Michael

On Wednesday, March 2, 2016 at 5:18:49 AM UTC-5, Felix wrote:


Hey all,

I defined a problem where the type of my variable x is defined as binary. However, after solving the problem, the output for x is not binary, it is just a value between 0 and 1. Furthermore, I actually have 480 time steps, but it only gets a solutions for a couple of them.
Does anymone know what happened?
I would appreciate your help alot!

Best regards Felix


Here what I defined:
Sets
I time / 1*480 /
W machines / AA1, AA2, … /;

Variables
x(I,W) On or off;
binary variable x;


My output then looks like this:

---- VAR X
LOWER LEVEL UPPER MARGINAL
1 .AA1 . . 1.000 .
1 .AA2 . . 1.000 .
.
.
2 .AA1 . . 1.000 .
2 .AA2 . . 1.000 .
.
.
3 .AA1 . . 1.000 1.660
3 .AA2 . . 1.000 1.660
.
.
4 .AA1 . . 1.000 0.910
4 .AA2 . . 1.000 0.910
.
.
.
21 .AA1 . . 1.000 1.148
21 .AA2 . . 1.000 1.148
.
.
22 .AA1 . 1.000 1.000 -20.999
22 .AA2 . 1.000 1.000 -20.999
.
.
23 .AA1 . 1.000 1.000 -36.204
23 .AA2 . 1.000 1.000 -36.204
23 .AA3 . 0.691 1.000 .
23 .AA4 . . 1.000 1.104
23 .AA5 . 1.000 1.000 -5.743
23 .AA6 . 1.000 1.000 -3.55E-15
23 .AA7 . 0.004 1.000 .
23 .AA8 . 0.445 1.000 .
23 .AA9 . 1.000 1.000 EPS



I checked the solution report, but it looks normal:

S O L V E S U M M A R Y
MODEL PUMPEN OBJECTIVE K
TYPE RMIP DIRECTION MINIMIZE
SOLVER CPLEX FROM LINE 246

**** SOLVER STATUS 1 Normal Completion
**** MODEL STATUS 1 Optimal
**** OBJECTIVE VALUE -1160.0291

RESOURCE USAGE, LIMIT 2.091 1000.000
ITERATION COUNT, LIMIT 1601 2000000000


\

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 https://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.