Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  unnamed constraint problem

    Posted 04/15/12 12:37 PM

    Originally posted by: SystemAdmin


    Hi everyone,

    I just started using the cplex optimizer, and I have this small problem to fix.

    In my program I want to create an examination schedule.

    This is a part of my input:

    range Student = 1..NbStudents;
    range Exam = 1..NbExams;
    range Timeslot = 1..NbTimeslots;
    {int} VaksStudent; // This is an array I assigned for each student containg the exams he/she has to undertake

    I now have the following constraint:

    forall(s in Student, e in Vaks[s])
    ct:
    sum(t in Timeslot)x[s][e][t]==1;

    In this constraint I only look at the exams a student has to undertake in stead of looking at every exam.

    Doing this I get the error: Constraint labeling not supported for dimensions with variable size.

    But when I ignore the labeling I get a conflict while running the program saying that the constraint is unnamed and the constraints gets relaxed.

    How can I solve this?

    Regards,
    #ConstraintProgramming-General
    #DecisionOptimization


  • 2.  Re: unnamed constraint problem

    Posted 04/16/12 04:30 AM
    Hi,

    in the documentation

    IDE and OPL > Optimization Programming Language (OPL) > Language Reference Manual > OPL, the modeling language > Constraints > Constraint labels

    you should have a look at the section

    Labels and a variable size indexer

    Regards
    #ConstraintProgramming-General
    #DecisionOptimization


  • 3.  Re: unnamed constraint problem

    Posted 04/16/12 04:53 AM

    Originally posted by: SystemAdmin


    I was able to figure it out.

    Thanks for the help!
    #ConstraintProgramming-General
    #DecisionOptimization