Book Example: diet
Description: book example autogenerated using diet.mod, diet.dat, and diet.run
Tags: ampl-only, ampl-book
Notebook author: Marcos Dominguez Velad <marcos@ampl.com>
Model author: N/A
Example: diet
Generated using diet.mod, diet.dat, and diet.run.
Consider the problem of choosing prepared foods to meet certain nutritional requirements.
Sets:
Parameters:
cost {FOOD}
: cost of each food
f_min {FOOD}
: minimum amount of food to buy
f_max {FOOD}
: maximum amount of food to buy
n_min {NUTR}
: minimum amount required of each nutrient
n_max {NUTR}
: maximum amount allowed of each nutrient
amt {NUTR, FOOD}
: amount of each nutrient in each food
Variables:
Objective:
Constraints: