Question: 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.

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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!