I need to have solver solution
UPS has a problem with overtime (OT) spending. The UPS Budget Department claims the operations people over spend their OT budget by millions. The operations chiefs say it is hard to match their workforce to the fluctuating demand. Demand can be forecasted, but it (predictably) varies greatly by season of the year. Because of that variability, there are months in which there are not enough workers available to do all the work, and on the other hand there are months in which there are extra or surplus workers. As such in some months there is OT and others surplus. When there is more work than workers available, UPS must bring in workers on overtime to match the need. To do that, UPS has to have workers come in on their sixth day of the week for a full day, for which they get paid the OT rate. In months with a surplus of workers, no overtime is spent. Those surplus workers are put to work, but the work they do does not reduce the workload of future months. (You can't deliver next month's packages with this month's surplus.) To solve the problem the operations staff set out to build a workforce planning model. It consisted of two parts. The first part was to make a reasoned estimate of how many worker- days would likely be needed each month of the following year taking into account the typical fluctuations in demand for UPS deliveries from month to month. The second part was an analysis of workforce availability given an initial headcount. The percentage of the workforce that shows up for work varies seasonally and from month to month as well. Summer months are vacation months and other times of the year are marked by more sick or injury days. High attrition, mainly due to retirements or promotions, is more likely to occur at certain times of the year as well. The number of worker-days of work required and worker-days available for each month given an initial headcount on January 1 are listed in Table 1. This is the baseline of work that needs to be done under the current forecast and the baseline of worker-days available for the current workforce assuming no additional workers are hired. It includes all absences for vacation, sick leave, etc. as well as attrition. The salaries of the current workers are already built into the budget and therefore can be considered for this analysis a fixed cost. When UPS hires new workers, it puts them through a one-month training period during which they are paid their full salary but are not available for any fieldwork. Assume they are hired on the first day of one month and begin field service the first day of the next month. The training facility can train up to 400 new recruits at one time. New workers earn $3,360 per month. For modeling purposes, the average cost for a worker when they work their sixth day is $350 per day. Assume each month has the same number of work days - 26 days - and that new hires are available for 17 days of straight time work each month after training.Table 1 Month Monthly Requirement Monthly Available January 89,050 96,200 February 86,580 92,950 March* 87,360 95,160 April- 90,740. 90,220 May - 91,260 89,570 June - 92,040 37,230 July - 97,890. 86,450 August 95,680 85,540 September 95,160 88,920 October 92,950 88,010 November 92.430. 86,840 December + 91,130 88,660 UPS wants to find a hiring strategy that minimizes cost yet still meets all work requirements. Model one year of work to answer the following questions: 1.-How much overtime is incurred if no one is hired? 2. -What reduction in cost is achieved by hiring optimally? 3. -How many workers would have to be hired (and when) if the Budget Department said they were limiting operations to $3 million in overtime? Modeling Tip: Overtime is incurred when Requirement is greater than Availability. Surplus is incurred when Availability is greater than Requirement. Total Overtime is the sum of all monthly overtime figures. But since Surplus does not cancel Overtime, you cannot calculate Total Overtime by summing the monthly differences. You want to sum only the monthly differences when Requirement is greater than Availability. Remember: "If Statements" are not allowed in Linear Programming models. In this model set up a variable for eachmonth, say DIFF(June) equal to Requirement( June) minus Availability(June). Add another DECISION variable, say OT, with the constraint that OT(June) is greater than or equal to DIFF(June). Then add another constraint that OT (June) must be greater than or equal to zero. If DIFF(June) is negative indicating a Surplus for June, then OT(June) will have to be zero. Then sum the OTs to get Total Overtime for the year. For example, assume we have 4 months with the following requirements and availability of workers 1 4 Avail- 78000 85800 91000 85800 Require 104000 88400 88400 80600 Diff - 26000 2600- -2600 -5200 (Diff = Require - Avail) Months 1 and 2 are in deficit and months 3 and 4 are in surplus. As such OT is needed in 1 and 2 but not 3 and 4. To get total OT, the positives must be summed without the negatives. Create (in addition to decision variables for hiring) another row of Decision variables below Diff and call it OT, like this: Diff - 26000- 2600- -2600- -5200 OT - 0 0 -0 -0 Since OT is a Decision variable, just put a number (zero is a good start) in the OT cells. The computer (Solver) will figure out which are the right numbers for those cells. In this case it is obvious what the right numbers are: Diff - 26000- 2600- -2600- -5200 OT - 26000 2600- 0 - 0 To make this happen, create in Solver two constraints for each cell in OT. The first is that OT must be greater than or equal to Diff. The second is that OT must be greater than or equal to zero. If Diff is positive, Solver will make OT equal to Diff to satisfy both constraints. If Diff is negative, Solver will make OT equal to zero to satisfy both constraints. In both cases Solver will pick the smallest number that will satisfy both constraints. Total OT then is the sum of the OT row. That times the per day pay for OT gets put into the objective function