Rec3_sol_2010 - ORIE 3300/5300 Fall 2010 Solutions for Recitation 3 Problem 1-4 in AMPL book(a First we have to know what products(types of cars we

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ORIE 3300/5300 - Fall 2010 Solutions for Recitation 3 Problem 1-4 in AMPL book (a) First, we have to know what products (types of cars) we are going to produce. We will declare this set as set P; Then, for each car type we need: • time it takes to produce the car: param time { j in P ; } • unit profit for each type: param profit { j in P } ; • orders of each type: param orders { j in P } ; Finally, we need to define the total available time: param b; The decision variables describe how many cars of each type we produce. To declare them in AMPL we write: var X { j in P } ; (b) Assuming that the objective is to maximize total profit, we should structure the problem in the following way: • objective: maximize Total Profit: sum { j in P } profit[j]*X[j]; subject to two constraints: • constraint on time - total production time is at most b . In AMPL we write: subject to Time: sum { j in P } time[j]*X[j] <= b; • orders constraint - for each car type, we have a lower bound on pro- duction in order to meet dealer requirements. In AMPL we write: subject to LB { j in P } : X[j] >= orders[j];...
View Full Document

This note was uploaded on 01/25/2011 for the course ORIE 5300 taught by Professor Todd during the Fall '08 term at Cornell University (Engineering School).

Page1 / 4

Rec3_sol_2010 - ORIE 3300/5300 Fall 2010 Solutions for Recitation 3 Problem 1-4 in AMPL book(a First we have to know what products(types of cars we

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online