Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Unit Commitment problem

    Posted 09/23/16 11:51 AM

    Originally posted by: patrijuvet


    Hi it's  1 months now that I tried to write a code for unit commitment but i'm always blocked somewhere.

    can some body help me to correct my program or send me an exemple of unit commitment problem?

    I've attached my code,

    This is two problem that i'm facing now

     

    1) cplex signal error to my objective function (1)

    2) I dont know how to write constraint (9)

    Thank you for you help


    #ConstraintProgramming-General
    #DecisionOptimization


  • 2.  Re: Unit Commitment problem

    Posted 09/26/16 04:33 AM

    Hi

    You may find a unit commitment example at http://www.ibm.com/support/knowledgecenter/SSQVNT_3.9.0/ilog.odms.ide.odm.enterprise.help/ODME/ODM_Studio/Demo_UCP/topics/UCP_Top2Welcome.html

    In order to fix your objective,

    you may use Constraint Programming and then add using CP; at the top of your model and then turn your dvar float into dvar float

    Or if you choose linear programming, what you could do is add a new decision variable PX

    dvar float+ PX[I][T];

    and then add in the subject to block 2 logical constraints


      forall (i in I ,t in T) (X[i][t]==1)=>(PX[i][t]==P[i][t]) ;
      forall (i in I ,t in T) (X[i][t]==0)=>(PX[i][t]==0) ;

    and then rewrite your objective into

    maximize
     
      sum (t in T, i in I) (P[i,t]*SP[t])*X[i,t]
      -  sum (t in T, i in I) (r*R[i,t]*RP[t])*X[i,t]
      - (1-r)* ( sum(t in T, i in I) (a[i]*X[i,t] + b[i]*P[i,t]*X[i,t] + c[i]*P[i,t]*PX[i,t] )) - (r)* ( sum(t in T, i in I) (a[i] + b[i]*(P[i,t]+R[i,t]) + c[i]*(P[i,t]+R[i,t] )^2)  );
                                

    regards


    #ConstraintProgramming-General
    #DecisionOptimization


  • 3.  Re: Unit Commitment problem

    Posted 09/27/16 12:45 AM

    Originally posted by: patrijuvet


     

    Thank you very much for all what you done for US in this forum.

    For that ODM_STUDIO, I dont have it , I have tried to seach but I dont found it, plesase can  you help me  how to get that ODM_studio or send  me just the code of the unit  commitment exemple?

    Thank you...

     

     


    #ConstraintProgramming-General
    #DecisionOptimization


  • 4.  Re: Unit Commitment problem



  • 5.  Re: Unit Commitment problem

    Posted 09/27/16 08:39 PM

    Originally posted by: patrijuvet


     

    Hi! I've followed the link to IBM but  I'm not able to download Décision optimisation center. They ask me my site number , and I dont have it. May the software is not free for student

     

     


    #ConstraintProgramming-General
    #DecisionOptimization


  • 6.  Re: Unit Commitment problem

    Posted 09/28/16 06:27 AM

    Hi,

    indeed IBM Decision Optimization Centre is not free for students

    regards


    #ConstraintProgramming-General
    #DecisionOptimization


  • 7.  Re: Unit Commitment problem

    Posted 09/29/16 05:37 AM

    Originally posted by: patrijuvet


     

    OK,Thank  you!

    Please can you help me to write that constraint "9"?

     

     

     

     

     

     

     

     


    #ConstraintProgramming-General
    #DecisionOptimization


  • 8.  Re: Unit Commitment problem

    Posted 09/29/16 09:00 AM

    Originally posted by: patrijuvet


     

    Hi!  How can I change dvar float onto dvar float? I've tried  to add a dvar float+ PX[I][T]; but I still have the same error : CPLEX Error 5002: ' ct1("Pth1")("1")' is not convex

     

     

     

     

     

     

     

     

     

     


    #ConstraintProgramming-General
    #DecisionOptimization


  • 9.  Re: Unit Commitment problem

    Posted 09/29/16 10:00 AM

    Originally posted by: ChrisBr


    Hello Patrick,

    There was a typo in Alex's answer.
    You should read
     "turn your dvar float into dvar int".

    Regards,

    Chris.


    #ConstraintProgramming-General
    #DecisionOptimization


  • 10.  Re: Unit Commitment problem

    Posted 09/29/16 11:48 AM

    Hi

    indeed thanks @ChrisBr a22db77d-c4c3-4036-a90f-2e2a20ecec65​ , there was a typo.

    Now if you want to go with linear programming what you could do in order to get rid of the convexity error:

    Rewrite ct1 into

    // Demand load balance     (2)
     forall (i in I ,t in T) {
     ct1:
     sum(i in I) PX[i][t] <=PD[t] ;

    Do what you did for P but now for R:

    dvar float+ RX[I][T]; // Reserve generation

    and then

    forall (i in I ,t in T) (X[i][t]==1)=>(RX[i][t]==R[i][t]) ;
      forall (i in I ,t in T) (X[i][t]==0)=>(RX[i][t]==0) ;

    and then turn ct3 into

    //Spinning reserve        (4)
      forall (i in I, t in T) {
     ct3:
     sum(i in I) RX[i,t] <= SR[t] ;

    And then at the top of your model

    execute
    {
    cplex.solutionTarget=3;
    }

    regards

     

     


    #ConstraintProgramming-General
    #DecisionOptimization