Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
Expand all | Collapse all

deducing the combinations in 3D variable?

  • 1.  deducing the combinations in 3D variable?

    Posted 06/09/17 01:11 AM

    Originally posted by: ShaCplex


    Dear Alex sir,

    I have a query regarding the elimination of unwanted combinations in a 3D variable;

    Suppose I declare my variable,

    dvar boolean X [trips][trips][aircrafts];

    and the parameter float Cost [t1 in trips][t2 in trips][a in aircrafts]=1000;

    and I am reading the cost value from an excel sheet using,

    tuple TRIPDATA {
    key string tripID1;
    key string tripID2;
    key string aircraftID;
    float cost;
    }
    {TRIPDATA} tripData=...;

    execute
    {
    for(var e in tripData)
        Cost
            [trips.find(e.tripID1)]
            [trips.find(e.tripID2)]
            [aircrafts.find(e.aircraftID)]=e.cost;
    }

     

    Now, suppose if I have 10 trips and 5 aircrafts in the problem, I will have 10*10*5 = 500 variables. i.e 500  [trips][trips][aircrafts] combinations.

    But I will be giving only valid,lets say 250 combinations and its cost in excel. So How can I eliminate those combinations or variables which are not there in the excel sheet?

    Please help me.

     

    Regards,

    shahul

     

     


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: deducing the combinations in 3D variable?

    Posted 06/09/17 06:02 AM

    Hi,

    in documentation, I suggest

    IDE and OPL > Optimization Programming Language (OPL) > Language User's Manual > Introduction to OPL > Modeling tips

    Sparsity

    Discusses sparsity, tuples of parameters, and filtering in the context of model efficiency.


    #DecisionOptimization
    #OPLusingCPLEXOptimizer