Me sale este error en ampl y no se que hacer

274 views
Skip to first unread message

Mónica S. Montilla Viveros

unread,
Jan 30, 2016, 8:03:26 PM1/30/16
to AMPL Modeling Language
Estoy haciendo un ejercicio sobre optimización de la cadena e suministros y no se como hacer la restricción de que me habra por lo menos una planta (son dos plantas), coloco esta restricción

subject to min_pl_abrir: (sum{j in PLANTAS} W[j]) >= 1; #MINIMO NUMERO DE PLANTAS A ABRIR

y me sale este error en ampl CPLEX 12.6.3.0: Constraint _scon[1] is not convex quadratic since it is an equality constraint.

ALGUIEN ME PUEDE AYUDAR, NO SE COMO HACER LA RESTRICCIÓN PARA QUE AMPL ME ENTIENDA QUE DEBE ABRIR POR LO MENOS UNA PLANTA, SI ME AYUDAN SE LOS AGRADECERÍA MUCHO

Robert Fourer

unread,
Feb 1, 2016, 12:07:45 PM2/1/16
to am...@googlegroups.com
There is nothing wrong with your constraint min_pl_abrir as it is written. To see what constraint CPLEX is rejecting, use the command

expand _scon[1];

You should see that this is a quadratic constraint (it has a square of a variable or a variable multiplying a variable) and that it is an = constraint; this is a form of constraint that CPLEX cannot handle. If the constraint appears to be linear, then also check the definitions of the variables in the constraint to see whether one of them is defined in terms of a quadratic expression involving other variables.

For further help you'll need to post the definition of the constraint and also the definitions of all of the parameters and variables that are involved in defining it.

Bob Fourer
am...@googlegroups.com

=======
Reply all
Reply to author
Forward
0 new messages