Decision Optimization

 View Only
Expand all | Collapse all

dvar boolean*dvar int constraint

  • 1.  dvar boolean*dvar int constraint

    Posted Fri February 21, 2014 07:14 PM

    Originally posted by: AlexWhiter


    i've got a problem somewhat like staff scheduling: I have a several kinds of vacations of different length and have to make personal schedule for every person, including quantity of working hours for each day and vacation schedule. And i totally cannot merge working hours and vacation constraints.

    lamest way is

    working_hours[periods]==availability_schedule[periods]*working_hours_schedule[periods],

    where unavailability schedule is boolean.

    but its not convex. So the best i've come up with is

    working_hours[periods]==minl(availability_schedule[periods]*24,working_hours_schedule[periods])

    is there any better method possible?

     

    Thanks.

     


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: dvar boolean*dvar int constraint

    Posted Mon February 24, 2014 12:20 PM

    Hi,

    you may use logical constraints:

    (availability_schedule[periods]==1)   ==  (working_hours[periods]==working_hours_schedule[periods]);

    (availability_schedule[periods]==0)   ==  (working_hours[periods]==0);

    regards

     


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: dvar boolean*dvar int constraint

    Posted Tue February 25, 2014 07:55 AM

    Originally posted by: AlexWhiter


    Unfortunately it seems that this variant computes over a far more longer time

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer