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
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
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
, , 6
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
(b) Now suppose the contractor would like to allow backlogging of demand. In other words, not all demand must be met in the month it is generated. The contractor pays a fee of $19 per engine per month backlogged, regardless of engine size. Modify your code from part (a) to include the ability to backlog. Not all demand must be met, but the same ending stock requirements should be enforced in part (b) and inventory should be nonnegative in the final month. How, if at all, does this change the optimal objective value and solution? Speculate as to the reason for the change (or lack of change). , , 7
, , , , , , , , 8
9
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
1.4 Problem 3 – Timetabling The College of Engineering has 5 different levels of classes (e.g., intro level, PhD level, . . . ) it plans to offer next year in the Summer 2023 session. For simplicity, the class levels are labeled A , B , C , D , and E . There are 5 different types of professors (based on area of expertise and type of professorship) who can teach classes next summer: I 1, I 2, I 3, I 4, and I 5. Each individual instructor can teach one course. Professors of type I 1 can teach any of the 5 levels. Professors of type I 2 can teach levels A , C , and D . Professors of type I 3 can teach levels B , C , and E . Professors of type I 4 can teach levels A and D . Finally, Professors of type I 5 are highly specialized and can only teach level E . The number of classes at each level that are scheduled to be taught next year are given in the table below: Level A B C D E # needed 5 8 12 11 4 The cost of hiring a professor to teach a class and the available number of each type of professor are listed in the table below (the cost does not depend on the level of class taught - only on the type of professor). It is not required to use all professors – these number available quantities represent the maximum of each type that can be used. Prof. type ( i ) I 1 I 2 I 3 I 4 I 5 Cost of hiring $385 $340 $300 $270 $250 # available ( M i ) 20 7 10 11 3 Formulate a linear program that will help determine how many professors of each type should be hired to teach the required courses next year at a minimum cost. Solve your model in Julia and report the solution (make sure you interpret the meaning of your solution). What type of MCNF problem is this? 1.5 Solution This is a transportation problem: , , , , 10
, , 1.6 Problem 4 – A tricky one We’re going to model a math puzzle as a shortest path problem. Start with the number 1. At each step, you can either triple the current number or add one to the current number. What is the minimal number of operations (steps) needed to get from 1 to 2020? There are a few different 11
ways to solve this problem. For full credit, build an optimization model structured as a shortest path problem. , 12
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
13