Decision Optimization

Decision Optimization

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

 View Only
Expand all | Collapse all

Choose the objective function

  • 1.  Choose the objective function

    Posted Wed June 25, 2008 05:50 PM

    Originally posted by: SystemAdmin


    [shadi said:]

    hi
    how i can create a cplex model with two objective function and each time to choose one, by assigning a variable (for example ObjectiveFunction )??

    im trying somthing like this but it dosnt work:


    [b]minimize
    if (ObjectiveFunction==1){
    sum (p in Columns)pair[p];
    }
    else
    {
        sum (i in Columns) item(pairCst,i).v * costPerKm[i] * pair[i] + sum(i in Columns) activationCost[i] * pair[i];
    }[/b]




    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Choose the objective function

    Posted Wed June 25, 2008 06:01 PM

    Originally posted by: SystemAdmin


    [Didier Vidal said:]


    depxr int obj1 = sum (p in Columns)pair[p];
    dexpr int obj2 = sum (i in Columns) item(pairCst,i).v * costPerKm * pair + sum(i in Columns) activationCost * pair;

    minimize ObjectiveFunction*obj1 + (1-ObjectiveFunction)*obj2;

    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Choose the objective function

    Posted Wed June 25, 2008 06:58 PM

    Originally posted by: SystemAdmin


    [shadi said:]


    thank you Didier...
    #CPLEXOptimizers
    #DecisionOptimization