How do I interprete this

252 views
Skip to first unread message

Afolabi Abass

unread,
May 7, 2014, 10:51:55 AM5/7/14
to am...@googlegroups.com
Hi,

Pls I have this error message after i entered the solve command. The Message goes thus:

CPLEX 12.6.0.0: Constraint _scon[1] is a nonquadratic nonlinear constraint.

However, I believe I am working on a linear programming model and I do not have any constraint named  " _scon[1]".

What is this suppose to mean and what may I do?


Thank You

fbahr

unread,
May 7, 2014, 12:10:43 PM5/7/14
to am...@googlegroups.com
If you type

expand _scon[1];

in the AMPL shell, AMPL will display the constraint CPLEX is complaining about.

Most likely you're multiplying multiple decision variables, or use decision variable as part of an if-condition, or a mix of both.

--fbahr

Afolabi Abass

unread,
May 7, 2014, 1:55:03 PM5/7/14
to am...@googlegroups.com
Thanks fbahr,

After I expanded that it gave a reply on one of my constraints as thus:

ampl: expand _scon[1];
subject to st_21['Stage1','Bus1','Bus2','FSC1','C0']:
    abs(phylo['Stage1','C0','Bus1','Bus2','FSC1']/0.278) <= 0;


But after I checked the constraint again, i didn't multiply two variables and never used an if-statement. The constraint is given as:

subject to st_21 {t in T, (k,m) in TC, s in S, c in C: c in (Csub[0] union Csub[2])}: abs(phylo[t,c,k,m,s]/(X[k,m]*Ps[s])) <= Nokm[k,m] * F_ckm[c,k,m] * z[t,k,m,s];
 
In my model my sets are declared as:

set T ordered;     # The 3 stages indexed t
set B;     # set of all Buses indexed k
set TC default {k in B, m in B: k<>m};   # set of Transmission Corridors indedxed km
set S;     # set of candidate FSCs indexed s
param N_km{TC}; # max candidate lines in km
set Y {(k,m) in TC}:=1..N_km[k,m];  # set of candidate lines in corridors indexed y
set C ; # system conditions indexed c
set Csub{0..3} within C;

And my variables are declared as:

var g{T,B};  #power generated at bus K at t in (MW)
var w{T,(k,m) in TC,y in 1..N_km[k,m]} binary; #Binary var rep line y in corridor km at t
var z{T,TC,S} binary ;   #Binary var rep sth FSC dat can b installed in existing lines at km at t
var u{T,(k,m) in TC,y in 1..N_km[k,m],S} binary ;  #Binary var rep sth FSC dat can b installed in yth candidate line in km at t

var fo{T,C,TC}; # Power flow via existing lines in km at t and c in (MW)
var f{T,C,(k,m) in TC,y in 1..N_km[k,m]}; # Power flow via yth candidate line at km,t and c in (MW)
var phylo{T,C,TC,S};  # Auxiliary var used 2 linearlize power flow in existing lines
var phyl{T,C,(k,m) in TC,y in 1..N_km[k,m],S};  # Auxiliary var used 2 linearlize power flow in candidate lines
var theta{T,C,B};  # Voltage angle for bus k in stage t and condition c in (Rad)

And my parameters are declared as:

param G{T}; # Discount factor in %
param Ckm{TC}; # cost of Candidate line at TC in ($)
param Cs{S}; # ratio FSc cost to line cost in (%)
param Ps{S}; # compensation level of FSc in (%)
param P_km{TC}; # max compensation allowed in line in (%)
param D{T,B}; # Power demand in bus k at t in (MW)
param Nokm{TC} integer >=0; # Number of existing lines in corridor km
param X{TC};    # Reactance of line at km in (pu)
param F_ckm{C,TC}; #max power flow in km and condition c
param Eckm{C,TC};  # state of device, anticipatory outage, at km and c either 1 or 0
param Theta;   # max voltage angle difference btw ends of a T.L in (Rad)
param M;        # Large enough +ve constant
param GP{T,B};  # Max Power generated at bus K at t in

I have checked and tripple checked and I can't find any errors.

I will be very glad if you can give me a head way on this.

Thanks

fbahr

unread,
May 7, 2014, 2:12:36 PM5/7/14
to am...@googlegroups.com
On Wednesday, May 7, 2014 7:55:03 PM UTC+2, Afolabi Abass wrote:
Thanks fbahr,

After I expanded that it gave a reply on one of my constraints as thus:

ampl: expand _scon[1];
subject to st_21['Stage1','Bus1','Bus2','FSC1','C0']:
    abs(phylo['Stage1','C0','Bus1','Bus2','FSC1']/0.278) <= 0;


But after I checked the constraint again, i didn't multiply two variables and never used an if-statement. The constraint is given as:

subject to st_21 {t in T, (k,m) in TC, s in S, c in C: c in (Csub[0] union Csub[2])}: abs(phylo[t,c,k,m,s]/(X[k,m]*Ps[s])) <= Nokm[k,m] * F_ckm[c,k,m] * z[t,k,m,s];

So, in your case, it's actually the 'abs' function that's the cause of nonlinearity in your model (cf. http://www.ampl.com/BOOK/CHAPTERS/21-nonlinear.pdf#page=10).

Luckily for you, Paul Rubin has a quite extensive post in his blog discussing multiple variants of how to model absolute values in (mixed integer) linear programs:
> http://orinanobworld.blogspot.com/2012/07/modeling-absolute-values.html

--fbahr

Afolabi Abass

unread,
May 7, 2014, 10:34:52 PM5/7/14
to am...@googlegroups.com

Thanks, fbahr

I have decided to split the constraint and was passed to the next stage, I believe.

Like abs(X + E)<= k
split to :
X+E <=k;
X+E >= -k;

But after solve command, I got this:

ampl: model paper2.mod;
ampl: data termnon.dat;
ampl: solve;
CPLEX 12.6.0.0: integer infeasible.
23262 MIP simplex iterations
0 branch-and-bound nodes
No basis.

I have tried to go about it bot couldn't.

Thanks for all your replies and help.

Thanks
Reply all
Reply to author
Forward
0 new messages