Help with error "Sorry, minos cannot handle logical constraints."

288 views
Skip to first unread message

felipewag...@gmail.com

unread,
Apr 19, 2016, 9:28:39 PM4/19/16
to AMPL Modeling Language
Hi,

When i run the model, the ampl points the error "Sorry, minos cannot handle logical constraints."

Model

set PROD; # products
set MAQ; # machines

param t {j in MAQ, i in PROD}; # processing time (minutes/unit) of product i in machine j
param d {j in MAQ}; # avaliable minutes in machine j
param p {i in PROD}; # price per unit of product i
param c {i in PROD}; # cost per unit of product i
param m {i in PROD} >= 0; # max demand of product i

var X {i in PROD} >= 0; # units of product i

maximize_Profit: sum {i in PROD} X[i] * p[i] - sum {i in PROD} X[i] * c[i];

subject to process_time {j in MAQ}: sum {i in PROD} X[i] * t[j,i] <= d[j];
subject to demand {i in PROD}: X[i] <= m[i];

Data

set PROD := P Q;
set MAQ := M1 M2 M3 M4;

param t:
 P Q :=
M1 20 10
M2 12 28
M3 15 6
M4 10 15 ;

param d :=
M1 1800
M2 1440
M3 1440
M4 2400 ;

param: p  c  m :=
P 90  45  100
Q 100 40 40 ;




I aprecciate if someone helps me.

Thanks
Felipe

Victor Zverovich

unread,
Apr 19, 2016, 10:15:48 PM4/19/16
to am...@googlegroups.com
maximize_Profit is declared as a constraint

  maximize_Profit: sum {i in PROD} X[i] * p[i] - sum {i in PROD} X[i] * c[i];

rather than an objective because an objective declaration should start with maximize or minimize keyword, e.g.

 maximize maximize_Profit: ...

or 

  maximize Profit: ...

HTH,
Victor

--
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.

Felipe Wagner da Rosa

unread,
Apr 19, 2016, 10:33:51 PM4/19/16
to am...@googlegroups.com
Hi Victor,

Thats it.

Thanks for your help.

Felipe

--
You received this message because you are subscribed to a topic in the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ampl/aewh8dk-QcI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ampl+uns...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages