Re: [AIMMS] Integer Programming Problem

162 views
Skip to first unread message

Leonardo Moraes

unread,
Mar 13, 2013, 1:40:51 PM3/13/13
to ai...@googlegroups.com
Hi,

you should use the constraint y <= x * BigM, replacing BigM by the biggest value that can be assigned to y.

However, there is a special situation... you can have both y <= 0 and x = 1 in this case. To avoid such behavior, add a small penalty cost associated to x in your objective function, so that x = 1 only when it is strictly necessary.

Best regards,

Leo.

2013/3/13 <zlt02...@hotmail.com>

I am a beginner on AIMMS. I want to use AIMMS to solve my integer programming model. Now I need some help about my AIMMS code.

 

Let me take a simple example to explain my problem:

 

x is a 0-1 integer variable, and y is an integer variable.

I need a constraint that if y>0, then x=1; if y<=0, then x=0.

Therefore, I describe the constraint:

 

If y > 0

   Then x=1

   Else x=0

Endif

 

It cannot run due to x and y are both variable, I am not sure why. And the model will become nonlinear model. Do you know how to explain this constraint and still make the model linear?

--
You received this message because you are subscribed to the Google Groups "AIMMS - The Modeling System" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aimms+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Enviado do meu gmail.
Reply all
Reply to author
Forward
0 new messages