Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Can I use min() in Cplex model?

    Posted 04/01/10 02:34 AM

    Originally posted by: far123


    I have a axle relocation problem, which tries to find the most proper location for each axle to minimize the cost.

    96 axles and 96 locations, respectively.

    The constraints are very simple.
    The only complicating part is the objective, which uses min() function.

    Cplex cannot find a solution even with very long running time. Does anyone have experience on handling this kind fo objective function? You can find the OPL model below.

    tuple axle{
    key int axleId;
    float relativeSmallDiam;
    float diamError;
    }

    tuple bogie{
    key string bogieId;
    {int} locs;
    }

    {axle} axles = ...;
    float rsDiamsj in axles = j.relativeSmallDiam;
    float dErrorj in axles = j.diamError;

    {int} locations = ...;

    {bogie} bogies = ...;

    float unitWearCost = 30000/60;

    dvar int AxleAlloclocationsaxles in 0..1;

    dexpr float TotalTruingAmount = sum(k in bogies)
    sum(i in k.locs)
    ( (sum(j in axles) rsDiams[j]*AxleAllocitem(locations,ord(locations,i))[j] -
    min(p in k.locs) sum(q in axles) rsDiams[q]*AxleAllocitem(locations,ord(locations,p))[q])*2
    + sum(j in axles) dError[j]*AxleAllocitem(locations,ord(locations,i))[j]);

    minimize unitWearCost * TotalTruingAmount+10;

    subject to{
    forall(i in locations)
    sum(j in axles) AxleAlloc[i][j] == 1;

    forall(j in axles)
    sum(i in locations) AxleAlloc[i][j] == 1;
    }

    Thanks...
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: Can I use min() in Cplex model?

    Posted 04/07/10 06:49 AM

    Originally posted by: far123


    Could anyone help me with this? I'm stuck.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: Can I use min() in Cplex model?

    Posted 04/08/10 10:46 AM

    Originally posted by: Ed Chamberlayne


    I'm sure someone on this forum can give a better answer but I don't believe you can use a min function on your decision variable - in this case, your AxleAlloc variable. You can use a minl or min function over parameters.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: Can I use min() in Cplex model?

    Posted 04/12/10 04:58 AM

    Originally posted by: SystemAdmin


    A min() in an objective term indeed does not seem to be a good idea.
    I did not understand your model in detail but you seem to have
    something like
    min[A + (min(c in C)xc]) + B.
    Have you tried to model the "min(c in C)"-term by an additional
    variable, i.e., you have something additionla constraints like
    forall(c in C) y <= x[c];
    and your objective changes to something like
    minA+B-y

    It's worth giving it a try.

    Hope this wil help.

    Best regards
    Norbert
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 5.  Re: Can I use min() in Cplex model?

    Posted 04/12/10 04:59 AM

    Originally posted by: SystemAdmin


    Nasty formatting ... same mail in a more readable form.
    Sorry for double-posting
    Norbert


    A min() in an objective term indeed does not seem to be a good idea.
    I did not understand your model in detail but you seem to have
    something like
    min[A + (min(c in C)x[c]) + B.
    Have you tried to model the "min(c in C)"-term by an additional
    variable, i.e., you have something additionla constraints like
    forall(c in C) y <= x[c];
    and your objective changes to something like
    minA+B-y

    It's worth giving it a try.

    Hope this wil help.

    Best regards
    Norbert
    #DecisionOptimization
    #OPLusingCPLEXOptimizer