Decision Optimization

Decision Optimization

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


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

post processing - opl cplex

  • 1.  post processing - opl cplex

    Posted 05/23/19 06:14 PM

    Originally posted by: 88Simon88


    Hello everybody,

    I want to write a code like this, but I face an error. Why?

     

    execute DISPLAY_OBJ
    {
        var ofile = new IloOplOutputFile("OPL.txt");
        
        for (var t = 1; t <= 4; t++)
        {
            for (var i = 1; i <= 81; i++)
            {
                for (var p = 1; p <= 7; p++)
                {
                     Obj[s] == L[s][t][i][p] * price_infested_woods[p] - X[s][t][i] * harvesting_cost + I[s][T+1][i][p] * price_infested_inventory[p] - Z[s][t] * purchasing_price;
                 }                        
            }                
        }    
        ofile.close();
    }


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: post processing - opl cplex

    Posted 05/24/19 01:12 PM

    Hi,

    and if you change

     Obj[s] == L[s][t][i][p] * price_infested_woods[p] - X[s][t][i] * harvesting_cost + I[s][T+1][i][p] * price_infested_inventory[p] - Z[s][t] * purchasing_price;

    into

     Obj[s] = L[s][t][i][p] * price_infested_woods[p] - X[s][t][i] * harvesting_cost + I[s][T+1][i][p] * price_infested_inventory[p] - Z[s][t] * purchasing_price;

    ?

     

    regards

     

    PS:

     

    https://medium.com/@alexfleischer_84755/optimization-simply-do-more-with-less-zoo-buses-and-kids-66940178db6


    #DecisionOptimization
    #OPLusingCPLEXOptimizer