> Now I #39;d like to be able to model conditional non-binary > variables. Does anybody know how to formulate this in mathprog?
> ----------Begin Description ------------------- > *) a,b are binary > *) c,d,e is continuous. > *) I #39;d like c to be > - 0 if a=b=0 > - d if a=0,b=1 > - e if a=1,b=0 > - 0 if a=b=1 > ----------End Description Let: z1 = 1: 0 if a=b=0 z2 = 1: d if a=0,b=1 z3 = 1: e if a=1,b=0 z4 = 1: 0 if a=b=1 Then: z1 + z2 + z3 + z4 = 1 a = z3 + z4 b = z2 + z4 c = if z2 then d else (if z3 then e else 0) where z1, z2, z3, z4 are auxiliary binary variables. _______________________________________________ Help-glpk mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-glpk
