Starting from:

$30

MCEN 4125/5125 Homework #4

MCEN 4125/5125
Homework #4
Due: at the beginning of class on the Thursday.
1. For this problem you will solve the Diet Problem.
• You will find the Excel Data (shown in class) on D2L
• You should hand in a short report via your favorite document editor. No handwritten work, that includes equations.
• Describe the Diet Problem (variables, constraints, const function etc)
• Set up (and show your work) the Diet Problem as an LP in Inequality Form:
minimize c
Tx
subject to Ax ≤ b
• Solve the LP using only the following matlab LP solving code: linprog(c,A,b)
• Describe the solution you get.
• Play with the problem, as you see fit, to get a solution that better fits your diet.
2. Solve the scaffolding problem we worked in class.
• See separate PDF file for problem statement.
• Set up (and show your work) the Diet Problem as an LP in Standard (Equality)
Form:
minimize c
Tx
subject to Ax = b
x >= 0
• Solve the Standard form LP using the linprog function without converting it to
any other form. So you’ll have to type “‘help linprog” in the command line to
find out how to do that.
3. This problem is for you to do on your own and not to be turned in: Resolve 10.2 of Lieven Vandenberghe’s “Additional Excercises” for course UCLA EE133
via the method I explained in lecture... whereby you do not specify a final value for
the masses to meet, but you define the constraint that the difference of the two final
positions must be zero and let the optimization find the best position for them to meet.
1