Sensitivity Analysis for Case Study:
Province Healthcare
Students may work in groups of up to three people. You are strongly encouraged to work in groups; if
you’re unable to find a partner, please let me know. You may be able to use piazza to find teammates.
You may consult your textbooks, your notes, online information, and me. You may not solicit help from
other sources.
Due: Friday November 17, 2023, by 11.50pm on LMS. (40 points.)
1 Introduction
The solution found in Part 1 depends on the precise values of various parameters. Use sensitivity analysis
to answer the following questions. Include printouts of relevant parts of your AMPL output. Assume that
each part is independent of the others. Procedures for obtaining shadow prices and other relevant
information are given below.
If you prefer to use it, my model file is available on LMS and the course website. The solution to the
LP relaxation has value 271196.7797. If your model returns a different value for the first 6
significant digits, you need to either modify your model so it does give this value, or use my
model.
Notes: (1) You may want to solve a modified problem to check your answers or to try to determine
where to look for sensitivity information. That is OK, but I don’t want to see those results! You must give
me the requested information using only sensitivity analysis, unless stated otherwise. (2) AMPL might
give a dual variable or reduced cost of the opposite sign from what you expect. That’s OK, you can just
use the sign you’d expect.
2 Questions
- (4 points) Province Healthcare has noticed that no patients are moved from Zone 1 to
Zone 2, or vice versa. Each of these moves is estimated to cost $200. For what cost would it
be attractive to move patients between zones?
- (4 points) For what nurse transfer cost would it be attractive to move extra nurses to melon?
- (4 points) What is the minimum transportation cost for which would it be unattractive to
move patients from Apple City to the hospital in Grape?
- (8 points) It looks like the number of sick patients in Apple City may be greater than forecast.
What would be the change in the optimal value per patient for a small number of extra
patients in Apple City? Why is this number less than the cost to create an extra IC bed at
the Apple hospital? Use the let command to show your estimate is accurate if the demand
is revised to 80 patients, but inaccurate if it is revised to 85 patients. Does it cost more per
extra patient or less for patients 81–85? Why?
- (10 points) An outside company is offering to provide up to 20 travel nurses to help cover
the additional IC beds. The rate per week that they charge Province Healthcare for each
nurse is $100 greater than the cost of employing an internal IC nurse. Use dual variables to
determine at which hospitals (if any) it would be beneficial to hire travel nurses. What is your
predicted savings if all 20 travel nurses are hired? Modify the model file and confirm your
result is accurate.
- (10 points) Currently, Province Healthcare has a balance requirement that each hospital
have a certain value that is at least 80% of a certain average. Use dual variables to estimate
how much they would save if this was relaxed to 79%. Check your answer using the let
command.
3 AMPL notes
- To find the value of a dual variable corresponding to a constraint called fabcap, type
To find the slack in the constraint, type
- To find the reduced cost of a variable called SELL in the optimal tableau, type
- If you are working in a Windows operating system, you can edit your model and data files in Office,
for example. Save the files as plain text files. Windows may append the suffix txt to the file
names, in which case you would need to include that suffix when asking ampl to read the
file.
- If you want to read in a new model file chips.mod and data file chips.dat, you can use the reset
command:
ampl: reset;
ampl: model chips.mod;
ampl: data chips.dat;
- If you want to reset the whole data file and read in a new data file chips.dat, but you want to keep
the model file as before, you can type
ampl: reset data;
ampl: data chips.dat;
- If you want to change one parameter, you can use the let command as follows:
(OS) ampl
ampl: model sample/steel.mod;
ampl: data sample/steel.dat;
ampl: solve;
MINOS 5.4: optimal solution found.
2 iterations, objective 192000
ampl: let rate["bands"]:=250;
ampl: solve;
MINOS 5.4: optimal solution found.
1 iterations, objective 217200
This changes the rate for bands and then resolves the problem.
- One way to find bounds on parameters in AMPL is to use the cplex option of sensitivity. This will
let you find ranges in which parameters can be changed without the set of optimal basic variables
changing. First make sure CPLEX is the solver:
ampl: option solver cplex;
Once you’ve established cplex as the solver, enter the following command:
ampl: option cplex_options ’sensitivity’;
Solve the problem again, and then you can then use the suffixes up and down on variable and
constraint names, as described for reduced costs and slacks. For variables, this should give you a
range within which the objective function coefficient can be changed without changing the optimal
basic sequence. Similarly, for constraints it should give you a range for the right hand side for which
the optimal basic sequence doesn’t change.
- Two useful commands to suppress the displaying of zero-valued variables are:
ampl: option omit_zero_rows 1;
and
ampl: option display_1col 10000;
The first command suppresses the zeroes, except in a matrix. The second command prevents the
display of output in matrices (unless the row of the matrix would have at least 10000
entries).
- All the variables and their reduced costs can be displayed simultaneously by using the
command
display {j in 1.._nvars} (_varname[j],_var[j],_var[j].rc);
(See page 249 of the AMPL text.)
All the constraints and their shadow prices can be displayed simultaneously by using the
command
display {j in 1.._ncons} (_conname[j],_con[j]);
(Again, see page 249 of the AMPL text.)
These commands can be used with the other suffixes available when using the cplex sensitivity
option.
- You can use sum and other AMPL commands after solving the problem to find values of various
combinations of the primal and dual variables and the parameters. For example, you can display the
total value of a variable hydrorelease[h,t] over all time periods t from 1 to horizon at a particular
reservoir A using the command:
ampl: display sum{t in 1..horizon} hydrorelease[’A’,t];
Another example of using sum within a display command:
ampl: display {i in NODES}: sum{j in NODES : (i,j) in ARCS}
flow[i,j];
- More hints are available online from my page about AMPL:
- This project is available from LMS and also from the course webpage, at
where you will also find more information about AMPL.