Decision Optimization

Decision Optimization

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

 View Only
  • 1.  tuple initialization

    Posted Thu June 30, 2011 05:00 PM

    Originally posted by: academician1


    In my model, there ar many tuple structures. When I initialize the data, there are some errors with data generation.

    For instance

    tuple RData1 {string PResources;
    float PSpeed;
    float psetup;
    float pscost;
    float ppcost;}

    {RData1} RDatas1=...;

    float PSpeed PResources;
    float PSetupT PResources;
    float PSCost PResources;
    float PPCost PResources;

    execute INITIALIZE2 {
    for (var b in RDatas1)
    PSpeed http://b.PResources=b.PSpeed;
    PSetupT http://b.PResources=b.psetup;
    PSCost http://b.PResources=b.pscost;
    PPCosthttp://b.PResources=b.ppcost;}

    The data PSpeed is generated correctly. But PSetupT, and the other data was generated incorrectly. All values were equal to 0, except belong to the last Resource.
    How the datashould be initialized so that the data could be generated?
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: tuple initialization

    Posted Fri July 01, 2011 05:54 AM
    Hi

    I think you simpli have forgotten some parenthesis.
    You should have written:

    execute INITIALIZE2 {
    for (var b in RDatas1)
    {
    PSpeed[b.PResources]=b.PSpeed;
    PSetupT[b.PResources]=b.psetup;
    PSCost[b.PResources]=b.pscost;
    PPCost[b.PResources]=b.ppcost;
    }
    }
    


    Alex
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: tuple initialization

    Posted Fri July 01, 2011 06:53 AM

    Originally posted by: academician1


    Thanks very much. I noticed it after I wrote the message.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer