Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  decision variables

    Posted 07/29/18 11:21 AM

    Originally posted by: -3300-


    Hey, 

    I hope you can help me. I try to specify a decision variable. The variable should be zero or higher than 50.

     

    I tried to to model this fact with the logical constraints. Like this:          a(i)(k)==0 || a(i)(i)>=50  But it doesn't work.

    Therefore I need your help. Do you have another idea how I can model the fact?

     

     


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: decision variables

    Posted 07/29/18 03:46 PM

    Hi

    dvar int a[1..2][1..2];
    subject to
    {
     forall(i,k in 1..2) a[i][k]==0 || a[i][i]>=50  ;
    }

    works fine

    regards

    https://www.linkedin.com/pulse/how-opl-alex-fleischer/


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: decision variables

    Posted 07/30/18 03:02 AM

    Originally posted by: -3300-


    Hey Alex,

     

    thank you for your help. The quantity limits works fine. But now the model doesn't work right. My model is a transportation problem and there are two requirements are not completely fulfills. 

     

    My quantity limits are just for nine from fourteen sources. Therefore I model this like this. 

     

    dvar    a[1..14][1..13]

    subject {

         forall (i in 1..9, k in goods)

        a[i][k]==0 ||  a[i][k]>=50 ;

    }

    Perhaps do you have an other idea, how I can model my problem.

     


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: decision variables

    Posted 07/30/18 03:11 AM

    Hi

    then you could write

    range goods=1..13;
    dvar int   a[1..14][goods] ;
    subject to
    {
     forall (i in 1..9, k in goods)

        a[i][k]==0 ||  a[i][k]>=50 ;
    }

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 5.  Re: decision variables

    Posted 07/30/18 06:01 AM

    Originally posted by: -3300-


    Thank you


    #DecisionOptimization
    #OPLusingCPLEXOptimizer