Adding extra workers.
AnsweredHello,
I was wondering how I can do that like Gurobi Workforce Scheduling online solver does. I want my model to add just enough extra workers in case that there is no enough worker to meet shifts requirements.
Thank you, Have a nice day.
-
Official comment
This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?. -
Hello Ahmet,
Could you explain what exactly you mean by the Gurobi Workforce Scheduling online solver? Do you mean the Gurobi Cloud or do you mean the Workforce example or do you mean something else?
Best regards,
Jaromił0 -
Hello Jaromił thank you for your respond. My problem is more general, I just give Gurobi Workforce Scheduling Optimization Application as an example, you are right though I should have been more spesific. What I tried to mean was this (https://www.gurobi.com/workforce-scheduling/). The modelling working behind this allows the model to add enough workers (Extra workers) automatically to make the model feasible. To do this, I can use while loops or sth like that, a loop that increases the number of workers until the model becomes feasible. However, I want to do so by using gurobi or mathematical modelling. And I couldn't figure out. For example, let's speak for a day and on that day, shifts requirements is 10 but I have 8 workers here I want my model to say to me that I have to have 2 extra workers.
Best regards,
Ahmet
0 -
Hi Ahmet,
Thank you for clarifying. To model extra workers, you could add additional variables to represent additional workers. Then add a penalty to the objective function when additional workers are used, i.e., add something like \(\dots + p \cdot x_{\text{extra worker}}\) to the objective function where \(p\) is some large penalty value. This way, the optimal solution would only make use of those extra workers if they are truly needed in order to avoid the penalty cost in the objective function.
Best regards,
Jaromił1 -
Hello Jaromił,
I understand what you explained. From what I understand, this will work as I want it to. I will try to implement this Thank you so much.
Best regards,
Ahmet0
Post is closed for comments.
Comments
5 comments