Decision Optimization

Decision Optimization

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

 View Only
  • 1.  My model sometimes makes a beug

    Posted Fri April 21, 2017 03:39 AM

    Originally posted by: Rym


    Hi

    My model sometimes makes a beug i.e, it can't solve the model.

     

    dvar boolean lumda[V][P];
    dvar boolean phy[P];

    dvar float R[P][D] in 0..1;
    dvar float ro[P] in 0..1;
    dexpr int OP = sum( j in P) phy[j];

    minimize OP;


    //constraints


    subject to{ 

     

    forall(j in P) 
    {cv:

    R[j][1]==(cpuj[j]-(sum(i in V) lumda[i][j]*cpui[i]))/cpuj[j];
    R[j][2]==(ramj[j]-(sum(i in V) lumda[i][j]*rami[i]))/ramj[j];
    R[j][3]==(diskj[j]-(sum(i in V) lumda[i][j]*diski[i]))/diskj[j];

    }

       
    //une machine virtuelle est hébergée par au plus une seule pm
      limit:
       forall( i in V)
         sum( j in P ) lumda[i][j] <= 1;
        

    //la quantité de cpu consommée par les vms ne depasse la la quantité de cpu de la pm j
       cpur:
        forall( j in P)
          sum( i in V) cpui[i]*lumda[i][j] <= cpuj[j];
            

    //la quantité de ram consommée par les vms ne depasse la la quantité de ram de la pm j
        ramr:
         forall( j in P)
           sum( i in V) rami[i]*lumda[i][j] <= ramj[j];

    //la quantité de disk consommée par les vms ne depasse la la quantité de disk de la pm 

        diskr: 
         forall( j in P)
           sum( i in V) diski[i]*lumda[i][j] <= diskj[j];
           

    //quand est ce que pm prends un

         phyone:
           forall ( i in V, j in P)
          lumda[i][j]<= phy[j] ;

    //quand est ce que pm prends zero

        phynull:
          forall (j in P)
            phy[j]<= sum (i in V) lumda[i][j];
            forall(j in P) 

             
                   forall(j in P,k in D)
    { cps: ro[j]<=R[j][k];

    }     
            glob:
      fo <= sum (i in V, j in P) lumda[i][j];
        
             
     rwco: 
    sum(j in P,k in D)(R[j][k]-ro[j])<=Rwa; 

    }


    #DecisionOptimization
    #MathematicalProgramming-General


  • 2.  Re: My model sometimes makes a beug

    Posted Fri April 21, 2017 10:06 AM

    Hi,

    can you attach .mod and .dat so that other users could try ?

    regards


    #DecisionOptimization
    #MathematicalProgramming-General


  • 3.  Re: My model sometimes makes a beug

    Posted Fri April 21, 2017 05:35 PM

    Originally posted by: Rym


    The file is attached .


    #DecisionOptimization
    #MathematicalProgramming-General


  • 4.  Re: My model sometimes makes a beug

    Posted Sun April 23, 2017 04:43 AM

    Hi

    your model is not feasible so you get a relaxed solution

    regards


    #DecisionOptimization
    #MathematicalProgramming-General


  • 5.  Re: My model sometimes makes a beug

    Posted Sun April 23, 2017 07:32 AM

    Originally posted by: Rym


    Thanks Alex. Now, my model is correct but Cplex can't generate any results. The model is attached.


    #DecisionOptimization
    #MathematicalProgramming-General


  • 6.  Re: My model sometimes makes a beug

    Posted Mon April 24, 2017 12:19 PM


  • 7.  Re: My model sometimes makes a beug

    Posted Mon April 24, 2017 04:14 PM

    Originally posted by: Rym


    Thanks ALex. Can you help me to correct the formulation of the model.


    #DecisionOptimization
    #MathematicalProgramming-General


  • 8.  Re: My model sometimes makes a beug

    Posted Tue April 25, 2017 03:10 AM

    Hi,

    if you comment cps

    //        forall(j in P,k in D)
    //{ cps: ro[j]<=R[j][k];
    //}

    then you model gets feasible

    regards


    #DecisionOptimization
    #MathematicalProgramming-General


  • 9.  Re: My model sometimes makes a beug

    Posted Tue April 25, 2017 02:41 PM

    Originally posted by: Rym


    Thanks ALex. But I need the value of "ro[j]", so if i comment cps the "ro[j] will be affceted to zero .


    #DecisionOptimization
    #MathematicalProgramming-General


  • 10.  Re: My model sometimes makes a beug

    Posted Tue April 25, 2017 02:56 PM


  • 11.  Re: My model sometimes makes a beug

    Posted Tue April 25, 2017 03:33 PM

    Originally posted by: Rym


    Thanks ALEX :)


    #DecisionOptimization
    #MathematicalProgramming-General