1 00:00:05,210 --> 00:00:06,990 Okay, so solving successfully finished, 2 00:00:06,990 --> 00:00:08,990 and we've got the results. 3 00:00:08,990 --> 00:00:11,690 If you had any trouble solving this problem, 4 00:00:11,690 --> 00:00:15,280 then you should go into Options in the Solver 5 00:00:15,280 --> 00:00:19,240 and select that you want to edit the length of solution time 6 00:00:19,240 --> 00:00:22,480 and increase it past 100 seconds. 7 00:00:22,480 --> 00:00:25,680 The LibreOffice Solver is not incredibly powerful, 8 00:00:25,680 --> 00:00:28,550 so it may need more time to find the solution. 9 00:00:28,550 --> 00:00:31,120 We do recommend that if you have access to Excel, 10 00:00:31,120 --> 00:00:34,590 that you use Excel instead for integer optimization problems, 11 00:00:34,590 --> 00:00:36,610 because Excel is a little bit better 12 00:00:36,610 --> 00:00:39,660 with integer optimization. 13 00:00:39,660 --> 00:00:42,370 However, you probably got the solution just fine. 14 00:00:42,370 --> 00:00:46,500 So you'll want to go ahead and click Keep Result. 15 00:00:46,500 --> 00:00:49,980 So now, we can take a look at our solution. 16 00:00:49,980 --> 00:00:53,470 So we've got the objective of 4.46. 17 00:00:53,470 --> 00:00:55,310 This is not particularly interpretable, 18 00:00:55,310 --> 00:00:58,590 until you remember that what our objective is, 19 00:00:58,590 --> 00:01:03,560 is the total of all departments percent of target allocation 20 00:01:03,560 --> 00:01:05,570 hours reached. 21 00:01:05,570 --> 00:01:07,730 So the best possible number that we could get here 22 00:01:07,730 --> 00:01:10,230 would be 5, if every department had 23 00:01:10,230 --> 00:01:15,020 100% of their target allocation hours reached. 24 00:01:15,020 --> 00:01:17,010 So we've got 4.46. 25 00:01:17,010 --> 00:01:18,970 So let's go up and take a look at the solution. 26 00:01:21,630 --> 00:01:24,690 So we're giving ophthalmology a total of four operating 27 00:01:24,690 --> 00:01:28,050 rooms per week, which is 32 weekly hours, 28 00:01:28,050 --> 00:01:30,380 or 81% of their target. 29 00:01:30,380 --> 00:01:33,420 We're giving gynecology 14, which 30 00:01:33,420 --> 00:01:37,410 is 112 weekly hours, 95% of their target. 31 00:01:37,410 --> 00:01:40,050 We're giving oral surgery two, and as we see, 32 00:01:40,050 --> 00:01:42,240 the constraints restricted us so that we only 33 00:01:42,240 --> 00:01:45,190 gave oral surgery operating rooms on Tuesdays 34 00:01:45,190 --> 00:01:47,030 and Thursdays. 35 00:01:47,030 --> 00:01:48,890 This is 80% of the target. 36 00:01:55,820 --> 00:01:59,180 We gave otolaryngology three operating rooms 37 00:01:59,180 --> 00:02:02,010 and general surgery 23 operating rooms, 38 00:02:02,010 --> 00:02:05,830 getting 91% and 97% of their target allocation hours. 39 00:02:08,570 --> 00:02:11,300 So suppose that you were the operating room manager, who 40 00:02:11,300 --> 00:02:13,760 knows integer optimization. 41 00:02:13,760 --> 00:02:16,060 In practice, what would happen is that you would go off 42 00:02:16,060 --> 00:02:17,490 and you would design what we just 43 00:02:17,490 --> 00:02:20,150 did here in the recitation. 44 00:02:20,150 --> 00:02:21,760 You would have this optimization model 45 00:02:21,760 --> 00:02:24,560 for operating room scheduling in the hospital. 46 00:02:24,560 --> 00:02:25,490 You'd solve it. 47 00:02:25,490 --> 00:02:27,350 You'd find the optimal solution. 48 00:02:27,350 --> 00:02:31,800 And you'd come back and present it to the surgical departments. 49 00:02:31,800 --> 00:02:33,560 And they'll look at the schedule. 50 00:02:33,560 --> 00:02:35,579 And all of a sudden, they'll tell you 51 00:02:35,579 --> 00:02:38,310 it doesn't work for them. 52 00:02:38,310 --> 00:02:39,610 And you'll say, why not? 53 00:02:39,610 --> 00:02:42,990 I incorporated everything that you asked for. 54 00:02:42,990 --> 00:02:43,720 And it's true. 55 00:02:43,720 --> 00:02:44,640 You did. 56 00:02:44,640 --> 00:02:47,030 But oftentimes, there are actually other constraints 57 00:02:47,030 --> 00:02:49,690 that they forgot to tell you about. 58 00:02:49,690 --> 00:02:51,590 So what would you do in that case? 59 00:02:51,590 --> 00:02:54,710 Well, you'd listen to their additional constraints 60 00:02:54,710 --> 00:02:57,300 and go back and add them to the model. 61 00:02:57,300 --> 00:02:59,970 So that's exactly what we'll do here. 62 00:02:59,970 --> 00:03:01,750 Suppose the general surgery department 63 00:03:01,750 --> 00:03:04,210 took a look at the schedule and said, "Oh, great, we 64 00:03:04,210 --> 00:03:07,580 have 23 operating rooms per week. 65 00:03:07,580 --> 00:03:12,120 That's exactly two less than actually our maximum. 66 00:03:12,120 --> 00:03:14,210 It's right in between our minimum and our maximum. 67 00:03:14,210 --> 00:03:16,280 And we're getting 97% of our weekly target. 68 00:03:16,280 --> 00:03:17,920 We think that's wonderful. 69 00:03:17,920 --> 00:03:20,070 However, it's a little bit uneven-- six 70 00:03:20,070 --> 00:03:23,150 on Wednesday, three on Thursday. 71 00:03:23,150 --> 00:03:27,829 Can we just have at least four per day?" 72 00:03:27,829 --> 00:03:29,020 We can do that. 73 00:03:29,020 --> 00:03:31,790 So let's go up to the minimum number 74 00:03:31,790 --> 00:03:33,540 of operating rooms per day. 75 00:03:33,540 --> 00:03:37,960 And for general surgery, let's change this from zero to four. 76 00:03:37,960 --> 00:03:39,960 This will help them balance throughout the week. 77 00:03:43,200 --> 00:03:46,920 And potentially, ophthalmology will look at their schedule, 78 00:03:46,920 --> 00:03:48,300 and they'll think the same thing. 79 00:03:48,300 --> 00:03:49,670 They'll think, "Well, we actually 80 00:03:49,670 --> 00:03:52,329 would prefer to balance it throughout the week. 81 00:03:52,329 --> 00:03:55,280 We want at most one operating room per day. 82 00:03:55,280 --> 00:03:57,100 We don't want to have two on Monday. 83 00:03:57,100 --> 00:04:01,130 Let's put one of those on Thursday or Friday." 84 00:04:01,130 --> 00:04:01,770 So that's OK. 85 00:04:01,770 --> 00:04:03,720 We can do that too. 86 00:04:03,720 --> 00:04:06,300 We just go to the maximum number of operating rooms per day. 87 00:04:06,300 --> 00:04:08,680 And for ophthalmology, we change it to one. 88 00:04:13,470 --> 00:04:17,709 Let's re-solve the model and see what we get. 89 00:04:17,709 --> 00:04:20,860 Again, we select the objective. 90 00:04:20,860 --> 00:04:24,040 Go to Tools, pull down the Solver. 91 00:04:24,040 --> 00:04:26,430 It should have everything already loaded up, 92 00:04:26,430 --> 00:04:27,640 and we just get to hit Solve. 93 00:04:30,630 --> 00:04:31,470 So that was quick. 94 00:04:31,470 --> 00:04:33,600 Solving successfully finished. 95 00:04:33,600 --> 00:04:36,180 And it looks like we actually have exactly the same results 96 00:04:36,180 --> 00:04:38,180 as we had before. 97 00:04:38,180 --> 00:04:42,290 Let's hit Keep Result and take a closer look at this. 98 00:04:42,290 --> 00:04:45,540 So our objective function stayed exactly the same. 99 00:04:45,540 --> 00:04:48,380 But we were able to incorporate the new constraints, 100 00:04:48,380 --> 00:04:51,270 the new requirement that the general surgery department have 101 00:04:51,270 --> 00:04:53,930 at least four operating rooms per day, 102 00:04:53,930 --> 00:04:56,190 and that the ophthalmology department have 103 00:04:56,190 --> 00:04:59,670 at most one operating room per day. 104 00:04:59,670 --> 00:05:01,880 This means that within the solution 105 00:05:01,880 --> 00:05:05,770 we had before, there's actually a little bit of wiggle room. 106 00:05:05,770 --> 00:05:08,760 We could move some things around without changing 107 00:05:08,760 --> 00:05:10,730 the optimality of the solution, that is, 108 00:05:10,730 --> 00:05:12,880 without changing the percent of target 109 00:05:12,880 --> 00:05:15,690 that each department received. 110 00:05:15,690 --> 00:05:17,240 And as you see, this is a little more 111 00:05:17,240 --> 00:05:19,390 balanced for the ophthalmology department 112 00:05:19,390 --> 00:05:20,850 and the general surgery department. 113 00:05:23,970 --> 00:05:29,020 So great-- so maybe seeing that this was available, 114 00:05:29,020 --> 00:05:31,140 then you'd go back, you'd present it, 115 00:05:31,140 --> 00:05:35,580 and general surgery would say, well, maybe 116 00:05:35,580 --> 00:05:38,659 could we have at least five per day? 117 00:05:38,659 --> 00:05:40,840 So if you went up and changed this, 118 00:05:40,840 --> 00:05:45,490 made it five all the way across instead of four 119 00:05:45,490 --> 00:05:52,270 and you solved it again, what would happen? 120 00:05:52,270 --> 00:05:53,730 You probably have an idea already. 121 00:05:57,540 --> 00:05:59,340 And this is exactly what you were thinking. 122 00:05:59,340 --> 00:06:01,100 No solution was found. 123 00:06:01,100 --> 00:06:02,390 The model is infeasible. 124 00:06:02,390 --> 00:06:04,560 Check limiting conditions. 125 00:06:04,560 --> 00:06:06,750 So why is the model infeasible? 126 00:06:06,750 --> 00:06:11,710 Well, let's take a look. 127 00:06:11,710 --> 00:06:12,540 Scroll back over. 128 00:06:15,210 --> 00:06:19,060 The model is infeasible because, let's see-- 129 00:06:19,060 --> 00:06:21,130 so it's not because of the minimum 130 00:06:21,130 --> 00:06:24,850 and maximum weekly department requirements, 131 00:06:24,850 --> 00:06:27,630 because general surgery said that they were willing to have 132 00:06:27,630 --> 00:06:32,060 up to 25 operating rooms per week. 133 00:06:32,060 --> 00:06:37,710 However, if you look at the weekly targets, 25 times 8 134 00:06:37,710 --> 00:06:39,240 is 200. 135 00:06:39,240 --> 00:06:43,450 So if we were to actually assign general surgery five operating 136 00:06:43,450 --> 00:06:45,190 rooms per day, we would be assigning 137 00:06:45,190 --> 00:06:48,800 them 200 hours per week, which exceeds their weekly target. 138 00:06:48,800 --> 00:06:51,420 And our optimization model says we cannot exceed the weekly 139 00:06:51,420 --> 00:06:53,100 targets. 140 00:06:53,100 --> 00:06:54,850 So just right there, we can tell that it's 141 00:06:54,850 --> 00:06:57,370 infeasible because of this constraint. 142 00:06:57,370 --> 00:06:58,880 So let's change this back to four. 143 00:07:04,630 --> 00:07:07,390 So suppose you've come up with a solution, 144 00:07:07,390 --> 00:07:09,860 you've gone back to the surgical departments, 145 00:07:09,860 --> 00:07:12,670 you've presented your solution, they've maybe 146 00:07:12,670 --> 00:07:14,470 requested additional changes, and we've 147 00:07:14,470 --> 00:07:16,800 made those changes here. 148 00:07:16,800 --> 00:07:19,810 So does this mean that your job is done? 149 00:07:19,810 --> 00:07:22,980 Well, no, not really. 150 00:07:22,980 --> 00:07:25,580 Of course, you could go back to the surgical departments 151 00:07:25,580 --> 00:07:27,540 and tell them that this is the schedule they're 152 00:07:27,540 --> 00:07:29,580 going to have every week. 153 00:07:29,580 --> 00:07:32,820 But I bet if did that, you'd hear some complaints. 154 00:07:32,820 --> 00:07:37,330 Let's go into our solution and take a closer look to see why. 155 00:07:37,330 --> 00:07:40,340 So for example, let's look at the ophthalmology department. 156 00:07:40,340 --> 00:07:42,990 In our solution, we're assigning them 157 00:07:42,990 --> 00:07:45,680 four operating rooms per week. 158 00:07:45,680 --> 00:07:48,380 That gives them 32 weekly hours, which 159 00:07:48,380 --> 00:07:53,250 is 81% of their target allocation hours. 160 00:07:53,250 --> 00:07:58,310 If you assigned the schedule to ophthalmology every week, then 161 00:07:58,310 --> 00:08:00,310 they would never get more than 81% 162 00:08:00,310 --> 00:08:02,220 of their target allocation hours. 163 00:08:02,220 --> 00:08:06,090 And over time, this would lead to a real shortage. 164 00:08:06,090 --> 00:08:08,810 The reason why we never assign them more than four 165 00:08:08,810 --> 00:08:12,130 in our optimization model is because their weekly target 166 00:08:12,130 --> 00:08:15,740 number of hours was 39.4. 167 00:08:15,740 --> 00:08:18,340 If we had assigned them five operating rooms, 168 00:08:18,340 --> 00:08:20,830 it would be giving them 40 hours per week, 169 00:08:20,830 --> 00:08:23,440 which exceeds their weekly target. 170 00:08:23,440 --> 00:08:25,490 So the way our optimization model is set up, 171 00:08:25,490 --> 00:08:27,550 we will never give them more than four 172 00:08:27,550 --> 00:08:30,610 operating rooms per week. 173 00:08:30,610 --> 00:08:33,409 But if you were the OR manager, you 174 00:08:33,409 --> 00:08:35,970 would realize that this is actually something 175 00:08:35,970 --> 00:08:38,730 that we should be a little more flexible about. 176 00:08:38,730 --> 00:08:40,320 Perhaps you would consider giving them 177 00:08:40,320 --> 00:08:42,760 five operating rooms one week, or maybe 178 00:08:42,760 --> 00:08:48,110 five operating rooms every two weeks out of the month. 179 00:08:48,110 --> 00:08:50,800 This is feasible because we have extra operating 180 00:08:50,800 --> 00:08:56,510 rooms on Thursday and Friday, as you can see down here. 181 00:08:56,510 --> 00:09:00,370 Plus, it seems like it's a more efficient and fair solution. 182 00:09:00,370 --> 00:09:03,140 Yes, although they do exceed their weekly target 183 00:09:03,140 --> 00:09:08,000 by 0.6 hours, it means that on the weeks when they only 184 00:09:08,000 --> 00:09:13,230 get to have 81% of their target allocation, 185 00:09:13,230 --> 00:09:14,950 they know that the next week, they'll 186 00:09:14,950 --> 00:09:18,380 be able to make up for it. 187 00:09:18,380 --> 00:09:20,420 So it seems like a more fair solution, as well as 188 00:09:20,420 --> 00:09:21,510 a more efficient solution. 189 00:09:24,670 --> 00:09:27,490 By combining the power of integer optimization 190 00:09:27,490 --> 00:09:31,130 with the understanding and flexibility of human judgment, 191 00:09:31,130 --> 00:09:33,640 you really get the best of both worlds.