Decision Optimization

Decision Optimization

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


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

how to do minimize the maximal one in a multi-dimension array

  • 1.  how to do minimize the maximal one in a multi-dimension array

    Posted 03/14/11 09:10 AM

    Originally posted by: BDoppelganger


    hello, everybody.
    I'm using CP optimizer C++ API to optimize an problem(version 12.1). The optimum is to minimize the biggest one in a multi-dimension array. For example, minimizing the max(A][). Here is my code:
    IloExpr b(env);
    for(int s=0;s<dimension1;s++)
    {for(int y=0;y<dimension2;y++)
    {model.add(b>=A[s][y]);}
    model.add(IloMinimize(env,b));
    But the model can't get the right solution. I can make sure that the rest of the code is correct. Can anybody help me find out where the problem is or give me a doable way to solve this. Thanks a lot.
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: how to do minimize the maximal one in a multi-dimension array

    Posted 03/14/11 09:23 AM

    Originally posted by: SystemAdmin


    As far as I can see the expression you have in variable 'b' is always empty? That would not be very meaningful. Have you looked at the generated model? Does it have a non-empty objective function?
    What happens if you do
    IloNumVar b(env);
    

    instead of
    IloExpr b(env);
    

    Does this produce more meaningful results?
    #CPLEXOptimizers
    #DecisionOptimization