Decision Optimization

 View Only
  • 1.  (Such as) expression in Cplex optimizer help

    Posted Wed May 15, 2013 10:02 AM

    Originally posted by: ouss


    Hello everybody

    At the moment I am trying to program a code for operating room scheduling .. I have one problem that one of my constraints requires to code the expression ( such as)  but I do not know how to do it on OPL Cplex optimizer .. When I run the program the following message appears

    [ decision variable (or expression) Fd is not authorized ]

    Please look at the attached files for the Cplex code and the mathematical expression of the constraint

    Bearing in mind that       Fd(i)      is a decision variable and     dur(i)  and     d   are parameters

    It is urgent for me and thank you in advance for your kind help

     

     

     


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 2.  Re: (Such as) expression in Cplex optimizer help

    Posted Thu May 16, 2013 06:57 AM

    Hi,

     

    Fd is a decision variable so you can not use it in slicing.

    What you can do is write the slicing as an expression  like (Fd[d]+dur[i]==d) * L[i] in your sum

     

    regards


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 3.  Re: (Such as) expression in Cplex optimizer help

    Posted Thu May 16, 2013 11:07 AM

    Originally posted by: ouss


    Thank you AlexFleischer for your help.

    I just want to know, this expression "Fd[i]+dur[i]==d" means that only the operations 'i' that have their competion time plus the length of stay of the patient who have submitted the operation 'i' who coincides with the date 'd' are only considered.

     

    regards


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 4.  Re: (Such as) expression in Cplex optimizer help

    Posted Thu May 16, 2013 03:11 PM

    hi

     

    yes since in other cases (Fd[d]+dur[i]==d) will be 0

     

    regards


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 5.  Re: (Such as) expression in Cplex optimizer help

    Posted Fri May 17, 2013 03:52 AM

    Originally posted by: ouss


    Thank you AlexFleischer for your help


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 6.  Re: (Such as) expression in Cplex optimizer help

    Posted Tue June 18, 2013 10:24 AM

    Originally posted by: ouss


    hi,

    Even the expression (Fd[d]+dur[i]==d) * L[i] was not accepted, because Fd[d] is a decision variable.

    Please, is there another solution?

    Please look at the attached file for the Cplex code of the constraint

    regards.


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 7.  Re: (Such as) expression in Cplex optimizer help

    Posted Thu June 20, 2013 05:59 AM

    Originally posted by: rdumeur


    Hi,

    I suspect there must be a problem somewhere else. It is very strange that a decision variable cannot appear in a constraint. Could you please post your model (in text, not png) so that we can try reproduce your problem?

    Cheers,


    #DecisionOptimization
    #OPLusingCPOptimizer