Originally posted by: kreitzpa
Hi all,
Can someone help me use the network optimizer to solve max-flow, assuming it does? I figured it should but I am not able to get my problem to work. The solution says status = 3 (infeasible) and does not seem to respect the idea that flow in = flow out.
Direct help, where you tell me what is wrong in the code, or conceptual would be greatly appreciated!
Example I am trying to use to figure out how the optimizer works:
Graph:
A--------C
/ | |\
5 | | 2
/ | | \
S 3 1 T
\ | | /
4 | | 8
\ | | /
B--------D
How I arranged the code:
double supply[nnodes] = {3, 0.0, 0.0, 0.0, 0.0, 0.0};
// S = NODE 0, A = 1, B = 2, C = 3, D = 4, T = 5
// SA SB AB AC BD CD CT DT
int tail[nedges] = {0, 0, 2, 1, 2, 3, 3, 4};
int head[nedges] = {1, 2, 1, 3, 4, 4, 5, 5};
double ub[nedges] = {5, 4, 3, 4, 3, 1, 2, 8};
double lb[nedges] = {0,0,0,0,0,0,0,0};
double ob_functionj[nedges] = {5, 4, 3, 4, 3, 1, 2, 8};
#CPLEXOptimizers#DecisionOptimization