Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Define a set

    Posted 04/26/16 11:08 AM

    Originally posted by: Crubal


    Hi,

     

    During writing the code, I want to define sets (described in the attachment); where I have the initial code:

    int Resources = ...; // Number of Stations to select;
     range Stations = 1..Resources;
     float charge_stations[Stations];
      
     range Interchanges = 1..Resources; // Number of Interchanges to be covered;

     // Define Traffic Flow sets, distance and related binary variable
     tuple flow    {int i; int j;}
     setof(flow) Flows  = {<i,j> | ordered i,j in Interchanges};
     float distance_flow[Flows] = ...;
     
     
     tuple stations {
     float charge_stations; 
     }
     
     tuple traffic_flow {
     float distance_flow; 
     }

     float Budget;
     float Safety_distance;

     dvar int Build[Stations];
     dvar boolean FlowsInSet1[Flows];
     dvar boolean Cover[<i,j> in Flows];

     

     

    Thanks a lot!


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Define a set

    Posted 04/26/16 02:22 PM

    This looks like an OPL question, so I recommend you post it on the OPL forum.


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Define a set

    Posted 04/26/16 03:21 PM

    Originally posted by: Crubal


    Already, thanks fro reminding!


    #CPLEXOptimizers
    #DecisionOptimization