Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

These are some questions about translate OPL code to Computational Optimization. 1. This question will test your ability to understand OPL code. (a) The following

These are some questions about translate OPL code to Computational Optimization.

image text in transcribedimage text in transcribed

1. This question will test your ability to understand OPL code. (a) The following is the .mod file for a particular OPL model. Write out the general structure of the linear program using st andard mathematical notation. // A business assigns workers to a specific shift during the day // In a work cycle, workers get one day off string Day - . .; string Shift - ...; // declares a set of days // declares a set of shifts int minworkers [Shift] [Day] - ...; /declares a 2D-array of integers rows are indexed by shifts and columns are indexed by days minworkers [s,d] -min no. of workers the business needs during shift s on day d */ dvar int+ x[Shift] [Day]; /*declares a 2D-array of non-negative variables where x[s,d] denotes the no. of workers that will work on shift s but get day d off minimize sum(d in Day, s in Shift) x [s,d]; subject to forall(s in Shift, d in Day) f shiftreq sum (dd in day: dd!-d) x [s,dd]>-minworkers [s,d]; (b) The following is the .dat file for the same model in part (a). Write out the com plete linear program using these values. (Write out all variables and constraints.) Day"Mon", "Tue", "Wed", "Thu"; Shift -"Morning""Afternoon"; minorkers = [[20 14 16 22] [23 12 11 21]1; (c) Solve the model from part (a) with the data from part (b) using OPL. What is the number of workers that the business should hire? How should the workers that are hired be assigned their shifts? 1. This question will test your ability to understand OPL code. (a) The following is the .mod file for a particular OPL model. Write out the general structure of the linear program using st andard mathematical notation. // A business assigns workers to a specific shift during the day // In a work cycle, workers get one day off string Day - . .; string Shift - ...; // declares a set of days // declares a set of shifts int minworkers [Shift] [Day] - ...; /declares a 2D-array of integers rows are indexed by shifts and columns are indexed by days minworkers [s,d] -min no. of workers the business needs during shift s on day d */ dvar int+ x[Shift] [Day]; /*declares a 2D-array of non-negative variables where x[s,d] denotes the no. of workers that will work on shift s but get day d off minimize sum(d in Day, s in Shift) x [s,d]; subject to forall(s in Shift, d in Day) f shiftreq sum (dd in day: dd!-d) x [s,dd]>-minworkers [s,d]; (b) The following is the .dat file for the same model in part (a). Write out the com plete linear program using these values. (Write out all variables and constraints.) Day"Mon", "Tue", "Wed", "Thu"; Shift -"Morning""Afternoon"; minorkers = [[20 14 16 22] [23 12 11 21]1; (c) Solve the model from part (a) with the data from part (b) using OPL. What is the number of workers that the business should hire? How should the workers that are hired be assigned their shifts

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Which form of proof do you find most persuasive? Why?

Answered: 1 week ago