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