Skip to main content
Log in
Čeština ‎(cs)‎ English ‎(en)‎
Documentation
Čeština ‎(cs)‎ English ‎(en)‎

Optimal and Robust Control

B3M35ORR + BE3M35ORR + BE3M35ORC
  1. Home
  2. Courses
  3. BE3M35ORR, B3M35ORR, BE3M35ORC - B212
  4. 18 April - 24 April
  5. Homework problem assignment #1 - Retest
This course is part of an already archived semester and is therefore read-only.

Homework problem assignment #1 - Retest

Completion requirements
Opened: Friday, 22 April 2022, 12:00 AM
Due: Tuesday, 10 May 2022, 11:59 PM

An optimal breakfast

You are given a set of n=3 types of food, each of which has the nutritional characteristic described in the table below. Find the optimal composition (amount of servings per each food) of a breakfast having minimum cost, number of calories between 2,000 and 2,250, amount of vitamin between 5,000 and 10,000, and sugar level no larger than 1,000, assuming that the maximum number of servings per food is 10.

Food Cost Vitamin Sugar Calories
Corn 0.15 107 45 70
Milk 0.25 500 40 121
Bread 0.05 0 60 65

Formulate this task as an optimization problem, identify the class of this optimization problem (LP, QP or NLP) and solve it in Matlab by either CVX or functions from Optimization Toolbox. Submit a Matlab function solving this optimization problem. Your solution will be evaluated automatically thus the function you will submit has to have a certain name and return certain values. Specifically, the function has to be stored in a file named hw1_cvutID.m and the header of the function has to be in the following form:

function [ optval, opt_X, opt_type ] = hw1_cvutID()

where cvutID is you KOS username, optval is the found optimal value, opt_X is the 10-by-3 matrix composed of the optimal plans for individual chargers and opt_type is the class of this optimization problem. In opt_type, the function is supposed to return string 'LP', 'QP' or 'NLP'. You can submit only one m-file. If you need more functions, you can use nested functions (for details, see this).

◄ Online quiz #10
Homework problem assignment #2 - Retest ►
ORR
Optimal and Robust Control
B212 B212 - Summer 21/22
B162 - Summer 16/17 B172 - Summer 17/18 B182 - Summer 18/19 B192 - Summer 19/20 B202 - Summer 20/21 B222 - Summer 22/23 B232 - Summer 23/24 B242 - Summer 24/25

Grades Teachers Participants
 Contact us  Reset user tour on this page
© 2025 Center for Knowledge Management
Useful links
Faculty website Calendar Study department FELSight Moodle API
Navigation
Log in
CTU logo