Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.

 View Only
Expand all | Collapse all

Network optimizer for max-flow

  • 1.  Network optimizer for max-flow

    Posted Sat November 24, 2018 01:21 AM

    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


  • 2.  Re: Network optimizer for max-flow

    Posted Sat November 24, 2018 08:06 AM

    First thing I would try to do is to use the conflict refiner to figure out why CPLEX things your model is infeasible.

    You did not show your actual model but only the data, so hard to tell where things could go wrong.

    Since your S node has supply 3, doesn't your T node need to have supply -3? Or where else is the flow going?


    #CPLEXOptimizers
    #DecisionOptimization