Decision Optimization

Decision Optimization

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


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

no value for decision variables

  • 1.  no value for decision variables

    Posted 08/18/15 07:22 AM

    Originally posted by: Cplex


    Hey,

     

    I'm facing a problem. I wrote my model into ILOG and CPLEX is running without any errors. But the decision variables as well as the objective don't take any value.

     

    My formulation looks like that:

     

    .mod

     

    //indices

    range N = 1..2;            //Produktionskapazitätsstufe
    range M = 1..2;            //Produkt
    range T = 1..2;            //Periode


    //parameters

    int C[N] =...;           
    int D[T][M] =...;      
    int K_h =...;          
    int K_kp[N] =...;       


    //decision variables

    dvar int x[T][M];      
    dvar int s[0..2][M];   
    dvar boolean y[T][N];  


    //objective function

    dexpr int Kosten = sum(t in T,m in M) K_h * s[t][m] + sum(t in T, n in N) K_kp[n] * y[t][n];
    minimize Kosten;


    //constraints

    subject to{
        
        forall(t in T)
          sum(m in M) x[t][m] <= sum(n in N) C[n] * y[t][n];
        
        forall(t in T)
          sum(n in N) y[t][n] <= 1;
          
        forall(t in T,m in M)
          D[t][m] == x[t][m] + s[t-1][m] - s[t][m];
    }

     

     

     

    .dat

     

     

    C = [1000,2000];

    D = [[1000,1800]
         [500, 900]];
        
    K_h = 3;
    K_kp = [500,800];

     

     

    Is there anyone who can help me please?

     

    Thanks in advance!!


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: no value for decision variables

    Posted 08/20/15 06:28 AM

    Originally posted by: Cplex


    Got it!


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: no value for decision variables

    Posted 08/22/15 03:59 PM

    Hi

    s = [[1500
                 2700]
                 [500 900]
                 [0 0]];
    y = [[0 0]
                 [0 0]];
    x = [[0 0]
                 [0 0]];

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer