error : Constraint _scon[1] is not convex quadratic since it is an equality constraint.

22 views
Skip to first unread message

marios gavaletakis

unread,
May 20, 2018, 12:11:06 PM5/20/18
to AMPL Modeling Language
i am running ampl with cplex solver and i get the error :
Constraint _scon[1] is not convex quadratic since it is an equality constraint.

here are all my constrains :
subject to Quantity {j in O, i in 1..Y}: 0<= a[j,i] <=u[j] ;
subject to Quality {i in 1..Y}: s[i]= (sum {j in O} ( a[j,i]* qual[j] )) / ( sum {j in O} (a[j,i])) ; 
subject to Numberofmints {i in 1..Y} : sum {j in O} ( w[j,i]) <= 3;

subject to Closedforever {j in O,i in 1..Y,f in 1..Y : f>=i } : k[j,f] <= k[j,i] ; 

subject to Con {j in O,i in 1..Y} : a[j,i] <=M* w[j,i] ; 

subject to Cons {j in O,i in 1..Y} : w[j,i]<=M *k[j,i]  ; 

And the variables are :
var a {O,1..Y}; 
var k {O,1..Y} binary ; 
var w {O,1..Y} binary ;
                                                          
please help! what should i change ? 

AMPL Google Group

unread,
May 20, 2018, 3:59:21 PM5/20/18
to Ampl Modeling Language
You can modify the Quality constraint and multiply left hand side by ( sum {j in O} (a[j,i])) instead of dividing the right hand side expression.

Thanks,
Paras

--
Paras Tiwari
am...@googlegroups.com
{#HS:584439147-8148#}
--
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.



Reply all
Reply to author
Forward
0 new messages