Assignment1Solution - Fall 2010 Optimization I (ORIE...

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

View Full Document Right Arrow Icon
Optimization I (ORIE 3300/5300) Assignment 1 Solution Problem 2 After reading pages 1-11 from the AMPL book, you noticed that the wine problem is just a special case of the production model, so we only need to construct the corresponding data file. Let’s start with the set of products. We have three products, the three types of wine: little red, Big Red, and AD White. So, the first line of the data file will be: set P := lred BRed ADWhite; Now we have to specify, for each type of wine, three parameters: profit (3, 4, and 5 dollars per bottle), maximum daily production (400, 300, and 200 bottles) and production rate (90, 80, and 60 bottles per hour). We can follow the original production data file to get: param: a c u := lred 90 3 400 BRed 80 4 300 ADWhite 60 5 200; The last parameter we have to define is the number of hours available for production: param b := 8; After saving the data file, we can run AMPL, read the model and data file, solve the problem and display the results: ampl: reset; ampl: model prod.mod; data plonk.dat; solve; display X; MINOS 5.5: optimal solution found. 3 iterations, objective 2447.5 X [*] := ADWhite 200 BRed 300 lred 82.5 ; So, the winery should produce 200 bottles of AD WHite, 300 bottles of Big Red, and 82.5 bottles of little red wine, for a total daily profit of $2447.50. Now, for Friday, the problem is a little bit different; there are only 6 hours available. So, we change the parameter b from 8 to 6. We can do this by modifying plonk.dat; alternatively, we could leave plonk.dat unchanged, but type the following command: ampl: let b:= 6; . Then, we solve the modified problem and obtain a new solution: ampl: let b:= 6; ampl: solve; MINOS 5.5: optimal solution found. 2 iterations, objective 1875
Background image of page 1

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

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

This note was uploaded on 11/11/2010 for the course ORIE 3300 at Cornell University (Engineering School).

Page1 / 7

Assignment1Solution - Fall 2010 Optimization I (ORIE...

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