LP建模问题:汉堡店雇佣员工

This article is categorized as "Garbage" . It should NEVER be appeared in your search engine's results.


本笔记写于2024-12-25,目的仅仅是为了回忆去年做过的一道题,而不是探索这类问题(实际上的这类问题要复杂很多,我只是遇到了一个简化版本)。原题找不到了,用claude帮我回忆了一下,觉得大概是这个样子,数字都没有经过验证的,所以下面的题就不要想着用求解器去求解了


注意:实际上下面的问题应该是integer programming范畴的问题,而且要求应该更复杂,但这里仅仅讨论建模思路


Claude给我的题:

Consider a Burger King store that needs to schedule workers for a week. The store is open 7 days a week, and they need at least 10 workers each day to operate effectively. This constant staffing requirement makes the problem cleaner while preserving its mathematical essence.

The store employs two types of workers:

Full-time workers:

  • Must work exactly 5 consecutive days per week
  • Cost $150 per day
  • Can start their work sequence on any day of the week

Part-time workers:

  • Must work exactly 3 consecutive days per week
  • Cost $175 per day
  • Can start their work sequence on any day of the week

Object: minimize total costs to hire workers


这道题的关键在于建立变量的思路,或者说如何正确理解 consecutive . 正确思路应该是:

变量[mathjax]f_i[/mathjax]: Number of full-time workers starting from [mathjax]i-th[/mathjax] day of a week. [mathjax]i=1, 2, 3, 4, 5, 6, 7[/mathjax]

变量[mathjax]p_i[/mathjax]: Number of part-time workers starting from [mathjax]i-th[/mathjax] day of a week. [mathjax]i=1, 2, 3, 4, 5, 6, 7[/mathjax]


所以如果要想知道周一(1)有多少员工,应该是[mathjax]f_4+f_5+f_6+f_7+f_1+p_6+p_7+p_1[/mathjax].

周二到周日同理


答案:


实际上这道题还应该加上额外限制:

  1. 每一天的最低员工要求都是不一样的,比如周一到周五要求应该低一些,周末要求应该高一些
  2. 员工数必须是整数(超出本篇范畴)


 Last Modified in 2024-12-25 

Leave a Comment Anonymous comment is allowed / 允许匿名评论