{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Rec3_sol_2010

# Rec3_sol_2010 - ORIE 3300/5300 Fall 2010 Solutions for...

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

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];

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern