Constraint programming constraints cannot be used in combination with real valued variables

566 views
Skip to first unread message

Haneen

unread,
Oct 9, 2014, 1:36:47 PM10/9/14
to ai...@googlegroups.com
Hello,

Can you please help in solving the following error that I got when I executed my program:

Constraint programming constraints cannot be used in combination with real valued variables, only with integer valued variables, element valued variables, and activities.  The real valued objective variable is an exception.  The mathematical program "LeastCost" has both constraint programming constraints and real valued variables, for instance constraint "BusAngleConstr" and variable "SupplyMWCleared".


I attached my program too in this post.


Thank you so much,

Haneen


5-bus.aimms

Deanne Zhang

unread,
Oct 10, 2014, 7:03:05 PM10/10/14
to ai...@googlegroups.com
Haneen,

What is your model type? Please specify it in the Math Program attribute, instead of using the default "Automatic" option.

If you intend to model your problem as an LP(Linear Programming), but some constraints accidentally become nonlinear, for example, containing variable in the "if" condition, AIMMS gives such error, because the model does fit either as an LP type or as a CP(Constraint Programming) type. I suggest you check constraint "BusAngleConstr" to see if the formulation satisfies the rules of an LP constraint.

Best,
Deanne
Reply all
Reply to author
Forward
0 new messages