HELP..!! PROBLEM WITH BINARY VARIABLE..!!!!!

215 views
Skip to first unread message

APRIL ROSSE PADILLA CASTANO

unread,
Jun 25, 2016, 6:05:36 PM6/25/16
to AMPL Modeling Language
I have a problem with a binary variable. It is define as: 

var Y {p in PLANT, j in LOCATION} binary;

but the result no is equal to 1 or 0. 
The result are numbers between 1 and 0: Y[p,j] =  0,8    0,9    0,7

Please, help me!

what should i do??

Alessandro Oscar Gilardino Arias

unread,
Jun 25, 2016, 6:15:06 PM6/25/16
to am...@googlegroups.com

Hi April. I had the same problem once.

Which solver are you using? Remember that Minos ignore integrality of variables, for that reason, even if you define the variable as binary the solution will be non-integer values.

You should use, as an example, CPLEX to sove the problem and have binary values in your solution.

Regards

--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ampl+uns...@googlegroups.com.
To post to this group, send email to am...@googlegroups.com.
Visit this group at https://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.

APRIL ROSSE PADILLA CASTANO

unread,
Jun 25, 2016, 6:43:08 PM6/25/16
to AMPL Modeling Language
I've tried with GRUBI, Kintro and CPLEX. But all have the same problem.

Victor Zverovich

unread,
Jul 11, 2016, 5:20:00 PM7/11/16
to am...@googlegroups.com
What was the solver (e.g. CPLEX) output? Did it report finding an optimal solution?

HTH,
Victor
Reply all
Reply to author
Forward
0 new messages