Originally posted by: SRDesai
I needed to model the LP given in the attached image. Here is my progress on the same. I am unable to model the constraints. Any help in this regard would be appreciated.
int n = ...;
range Nodes = 1..n;
tuple edge {int i; int j;}
setof(edge) Edges = {<i,j> | i,j in Nodes};
int Weight[Edges] = ...;
dvar float+ z[Edges];
maximize
sum(e in Edges) z[e]*Weight[e];
subject to
{
forall (v in Nodes)
sum(e in Edges:e == <u,v>) e - sum(<w,v> in Edges) <w,v> == 0;
Regards,
SRDesai
#CPLEXOptimizers#DecisionOptimization