dimanche 18 octobre 2020

If / else logical constraints in CPLEX

I want to write 3 scenarios of if/then condition for the GW_C equation. I tried to write it in the following form but it didn't work. Can it be coded in one if equation?

 (sum(h in Gwsystem: h!= "XS" && h!="RM") H[h] >= 1) =>  
    Gw_C == sum (h in Gwsystem) GW[h].Gw_Capital*(sum(t in time) pbefore[t]); 

 forall(t in time) (H["RM"] >= 1) =>
    Gw_C== GW["RM"].Gw_Capital * 578.87* maxl(pbefore[t])+17276;
    
 forall(t in time) (sum(h in Gwsystem) H["XS"] >= 1) => 
    Gw_C== GW["XS"].Gw_Capital* 278.64*maxl(pbefore[t])+65967;`

Aucun commentaire:

Enregistrer un commentaire