Homework 2 Solutions (1)

.pdf

School

University of Wisconsin, Madison *

*We aren’t endorsed by this school

Course

345

Subject

Mechanical Engineering

Date

Dec 6, 2023

Type

pdf

Pages

13

Uploaded by ProfessorRose11914

Report
Homework 2 Solutions July 8, 2022 1 Homework #2 Solutions Due July 5 @ 11:59pm 1.1 Submission requirements Upload a single PDF or HTML file of your IJulia notebook for this entire assigment. Clearly denote which question each section of your file corresponds to. 1.2 Problem 1 – On your mark, get set, bake! A bakery mass produces 4 different types of cake: carrot, chocolate, vanilla, and angel-food. The bakery measures cake characteristics using two different features: sweetness ( S ) and density ( D ). The following table summarizes the characteristics of each type of cake as well as the (max) num- ber of each type that are baked each month: Cake S D Max baked Carrot 100 15 3810 Chocolate 90 18 2700 Vanilla 86 6 4000 Angel food 110 3 1500 The cakes can either be sold as-is at $14 a cake or combined into a “party platter” for catering. There are two party platter options – A and B – that have requirements for average sweetness and density. No more than 7 cakes can be added to any individual platter. The table below summarizes these requirements and gives the selling price per platter: Platter S D Max cakes Price A at least 98 at most 10 7 $20 B at least 100 at most 8 7 $30 The S and D values for the party platters are calculated as the weighted averages of the S and D of the cakes added to the platter. (a) Formulate a linear program that will yield the largest possible revenue for the bakery. As- sume it is okay to sell fractional cakes, since we are planning in aggregate. 1
1.2.1 Solution Let C be the set of cake types and P be the set of party platter types. Decision variables x i : number of each cake of type i C that are sold as-is y ij : number of each cake of type i C that is used in party platter type j P Objective max 14 i C x i + 20 i C y iA + 30 i C y iB Constraints • Do not exceed total number of each cake type produced x _ { car } + y _ { car , A } + y _ { car , B } ≤ 3810 x _ { choc } + y _ { choc , A } + y _ { choc , B } ≤ 2700 x _ { van } + y _ { van , A } + y _ { van , B } ≤ 4000 x _ { ang } + y _ { ang , A } + y _ { ang , B } ≤ 1500 • Max number of cakes on each party platter i Cy iA 7; i Cy iB 7 • Minimum sweetness on party platters 100 y _ { car , A } + 90 y _ { choc , A } + 86 y _ { van , A } + 110 y _ { ang , A } ≥ 98 i Cy iA 100 y _ { car , B } + 90 y _ { choc , B } + 86 y _ { van , B } + 110 y _ { ang , B } ≥ 100 i Cy iA • Maximum density on party platters 15 y _ { car , A } + 18 y _ { choc , A } + 6 y _ { van , A } + 3 y _ { ang , A } ≤ 10 i Cy iA 15 y _ { car , B } + 18 y _ { choc , B } + 6 y _ { van , B } + 3 y _ { ang , B } ≤ 8 i Cy iA (b) Build and solve the problem in Julia. What are the optimalnumbers of each type of cake and party platter that the bakery should sell? 2
, , , 3
1.3 Problem 2 – Multi-period Planning A company who works with car manufacturers produces and sells engines of various types and sizes. There is one particular style of engine that comes in three different sizes (call them “size 1,” “size 2,” and “size 3”). The contractor processes raw materials to procude the engines. Processing a pallet of raw materials costs $700 per pallet and produces 2 size 1 engines, 1 size 2 engine, and 1 size 3 engine. Size 1 engines sell for $160 each, size 2 engines sell for $210 each, and size 3 engines sell for $300 each. Engines (of any size) can be stored from month to month. Keeping engines in good working condition costs $5 × (engine size) per engine per month (i.e.,$5 for size 1, $10 for size 2, $15 for size 3). The table below shows the maximum amount of each engine the contractor can sell in the next three months as well as the maximum number of pallets of raw materials it can process in each month. Demand that is not met in the month it occurs cannot be carried over to a later month (i.e., no backlogging is allowed – so the demand amounts in the table represent the maximum that can be sell – it may not be possible to sell this much). The contractor currently has 10 size 1 engines and 2 size 3 engines (no size 2 engines) in stock, and wishes to have at least that much – plus at least one size 2 engine – in stock at the end of month 3. Month ( t ) Max raw materials (RM t ) Max size 1 (M1 t ) Max size 2 (M2 t ) Max size 3 (M3 t ) 1 15 30 12 15 2 20 15 18 17 3 12 20 13 21 Formulate a linear programming model to help the contractor maximize its profits over the next three months. Solve the model in Julia/JuMP and display the production plan (how many of each engine size to produce, store, and sell in each month). , 4
, , , , , 5
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help