Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  String ranges

    Posted 10/11/18 12:40 PM

    Originally posted by: JamesGordon16549879


    Hello  everybody ! , 

     

    i am new on Cplex and i am trying  to build a model for  scheduling patients using data from excel  : (in attachement the files  ) 

     

    the probleme is that i can not define a non integer ranges but i want to set up  patient  , doctors  like strings by their names  and i do need ranges  to cross all the list of my patients and doctors  .  and that also in order to use them  for the display of the result . 

     

    an other solution would be to match every name  of  patients with their number at the end of the runing if this one is affected and display it , but how i can do it on cplex . 

     

     

    thank you best regards  


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: String ranges

    Posted 10/11/18 01:25 PM

    Hi

    why don t you use sets of strings ?

    You may find an example in CPLEX_Studio128\opl\examples\opl\nurses

    tuple nurse {
      key string name;
      int seniority;
      int qualification;
      int payRate;
    }

     

    regards

     

    https://www.linkedin.com/pulse/making-decision-optimization-simple-alex-fleischer/


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: String ranges

    Posted 10/11/18 04:47 PM

    Originally posted by: JamesGordon16549879


    First thanks for your  help ! 

    Yeah, it could be a solution for a none changing model, but I have a futher  issue for my model, I want to implement a rolling horizon approach to my model in order to introduce changes like cancelation or new incoming patients and also none assigned patient for the last iteration, so I have to be able to add patients on my set of patients and save a historical for the lasts iteration's .


    What kind of approach do you advise me for? with Excel can not set up a range of strings.
     

    and did ACCES 2007 permit me to add and delete results made and calculated by cplex  like if Yp1=0 for the last iteration i have to add  p1 to the table of patients for the next iteration . 


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: String ranges

    Posted 10/12/18 05:13 AM

    Hi,

    you have some how to at https://www.linkedin.com/pulse/how-opl-alex-fleischer/

    Plus you can do union of strings:

    {string} s1={"A","B"};
    {string} s2={"C"};

    {string} s3=s1 union s2;

    execute
    {
    writeln("s3=",s3);
    }

     

    gives

     

    s3= {"A" "B" "C"}

    regards


    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: String ranges

    Posted 10/12/18 11:05 AM

    Originally posted by: JamesGordon16549879


    Thanks  for your help realy appreciated ! 


    #CPLEXOptimizers
    #DecisionOptimization