Decision Optimization

Decision Optimization

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

 View Only
  • 1.  declare a variable from excel

    Posted Wed April 24, 2019 06:44 AM

    Originally posted by: wj1


    Hello ,

    in the pic attached , there is the variable that i want to declare in the .mod ...course_to_section which combine column course and section...

     

    In the .dat file i declare it as follows : course_to_section from SheetRead (my_sheet,"course_to_section");

    Im not usre how declare in the .mod file ? because i have a constraint that states the sum of the section must be in course_to _section (sum of the section related to course )

    any help how to declare in the .mod ? 

     

    Thank you


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: declare a variable from excel

    Posted Wed April 24, 2019 08:53 AM

    Hi

    similar question at https://www.ibm.com/developerworks/community/forums/html/topic?id=1a11b0a7-3d78-471b-a551-74471b7d7a86&ps=25#repliesPg=0

    You should first read some data from excel through SheetRead and then maybe index your decision variables with that data.

    regards

    PS: very basic examples at https://www.linkedin.com/pulse/making-decision-optimization-simple-alex-fleischer/


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: declare a variable from excel

    Posted Wed April 24, 2019 04:17 PM

    Originally posted by: wj1


    Hi Alex ... i did define it ... but i got an error  , to show you better , im gonna display the constraint :

    forall(i in course ,f in faculties)sum( j in course_to_section) z[f][j]==nb_section_faculty_course[f][i];

    when i write j in course_to_section which the tuple i declared because each course is assigned to many sections and i want to have the sum of sections that belongs to each course , i get an error  which is in the attached picture..

     

    I hope you could help me , it's for an urgent matter ...Thank youuu

     

     


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: declare a variable from excel

    Posted Wed April 24, 2019 05:31 PM

    Hi,

    can you share .mod and .dat instead of screenshots so that other users could try to help you ?

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer