Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  MCF problem in OPL

    Posted 05/13/12 09:25 AM

    Originally posted by: SystemAdmin


    Dear all,

    I have built a MCF problem (multi-commodity flow problem) in wireless network with OPL language in CPLEX 12.4. (see the model below).
    It works well for the 9-node(or less nodes) grid network.
    my problem is in those networks with more nodes (e.g., 16-node), it always output 'solution (optimal) with objective 0' as follows.
    so, i don't know what is the problem with my program.
    can someone check for me where the problem is.

    Thank a lot!

    // solution (optimal) with objective 0
    // Quality There are no bound infeasibilities.
    // There are no reduced-cost infeasibilities.
    // Maximum Ax-b residual = 0
    // Maximum c-B'pi residual = 0
    // Maximum |x| = 0
    // Maximum |pi| = 0
    // Maximum |red-cost| = 0
    // Condition number of unscaled basis = 0.0e+000

    ////////////////////////////////////////////////
    int NumNodes = ...;
    range Nodes = 1..NumNodes;
    int NumScheduleSet = ...;
    range ScheduleSet = 1..NumScheduleSet;

    tuple link{
    key int fromNode;
    key int toNode;
    float bandwidth;
    };
    {link} Links = ...;
    int scheduleMatrixScheduleSetLinks = ...;
    tuple commodity {
    key int Src;
    key int Dest;
    };
    {commodity} Flows = ...;

    dvar float+ valueFlowsLinks;
    dvar float+ factorScheduleSet in 0 .. 1;

    maximize sum(f in Flows) (sum (<f.Src,i,b> in Links) value[f]http://<f.Src,i,b>);
    subject to {
    forall (n in Nodes, f in Flows) {
    ctFlow: // flow constraints
    if (f.Src == n) {
    sum (<t,n,b> in Links) value[f]<t,n,b> == 0;
    }
    else if (f.Dest == n) {
    sum (<n,t,b> in Links) value[f]<n,t,b> == 0;
    }
    else {
    sum (<n,t,b> in Links) value[f]<n,t,b> - sum (<t,n,b> in Links) value[f]<t,n,b> == 0;
    }
    }

    ctFactor: // factor constraint
    sum (s in ScheduleSet) factor[s] <= 1;

    forall (a in Links) {
    ctSchedule: // schedule constraints
    sum (f in Flows) value[f][a] <=
    (sum (s in ScheduleSet) (factor[s] * scheduleMatrix[s][a])) * a.bandwidth;
    }
    }
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: MCF problem in OPL

    Posted 05/16/12 10:37 AM

    Originally posted by: SystemAdmin


    In additional, when the number of constraints is over about 500, cplex will go wrong with a message "CPLEX ERROR 1200 CPXERR_INDEX_RANGE Index is outside range of valid values" (happen to the decision variables "value[f][a]" and "factor[s]").

    How can I deal with this problem? thanks!

    j.y. zhou
    #DecisionOptimization
    #OPLusingCPLEXOptimizer