equal
deleted
inserted
replaced
80 for(OutEdgeIt e(g,n);e!=INVALID;++e) ex-=x[e]; |
80 for(OutEdgeIt e(g,n);e!=INVALID;++e) ex-=x[e]; |
81 lp.addRow(ex==0); |
81 lp.addRow(ex==0); |
82 } |
82 } |
83 |
83 |
84 //Objective function: the flow value entering 't' |
84 //Objective function: the flow value entering 't' |
85 { |
85 LpDefault::Expr obj; |
86 LpDefault::Expr ex; |
86 for(InEdgeIt e(g,t);e!=INVALID;++e) obj+=x[e]; |
87 for(InEdgeIt e(g,t);e!=INVALID;++e) ex+=x[e]; |
87 for(OutEdgeIt e(g,t);e!=INVALID;++e) obj-=x[e]; |
88 for(OutEdgeIt e(g,t);e!=INVALID;++e) ex-=x[e]; |
88 lp.setObj(obj); |
89 lp.setObj(ex); |
89 |
90 } |
|
91 |
90 |
92 //Maximization |
91 //Maximization |
93 lp.max(); |
92 lp.max(); |
94 |
93 |
95 #ifdef HAVE_GLPK |
94 #ifdef HAVE_GLPK |