BookmarkSubscribeRSS Feed
Fibo1123
Calcite | Level 5

I am writing a SAS Proc Optmodel program to optimize a work schedule allocation. I am allocating employees to hourly slots each day in a monthly schedule [i.e. total number of slots=(# of days in month)x(24 hour-long slots each day) ]. Individual employees generate different amounts of profit when allocated to different time slots. My objective function maximizes sum(total revenue given the current allocation).

 

Using the Proc Optmodel MILP option, this is straight-forward to do.

 

I would like to give employees the ability to state preferences for some, but potentially not all, available time slots. For example, Employee A might state a preference to work at 2pm on the 17th day of the month and at 8am on 22nd day of the month, while Employee B might state a preference to work on the 3rd day of the month (with not time slot preference), and Employee C might not have a preference at all.

 

I would like Proc Optmodel to give preference to these preferences when possible, but not consider them as strict constraints, i.e. the program will schedule you there if possible, but no promises.  Is this possible to do in Proc Optmodel?

 

I looked at the SAS scheduling example below, which does incorporate preferences, but it a) requires employees to rank preferences for ALL slots and b) uses an objective function that maximizes the sum(slot preference rank). This won't work for me since my employees would only indicate the day/time slots that they would like to work, and my objective function maximizes revenue rather than the degree to which we respect schedule preferences.

 

Example 13.4 Scheduling 

 

I know that conditional constraints are not allowed in Proc Optmodel, i.e. if Condition A=True then enforce Constraint B. But I am hoping someone knows a way to allow soft consideration of preferences.

 

I have read through the Proc Optmodel documentation and reviewed other online questions, including Sas forum and Stack Overflow questions about conditional constraints, but have not found anything specifically addressing the soft consideration of preferred variable assignment.

Just looking for someone to point me in the right direction, or tell me that I'm out of my mind and should give up this nonsense.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 0 replies
  • 120 views
  • 0 likes
  • 1 in conversation