Email: support@essaywriterpros.com
Call Us: US - +1 845 478 5244 | UK - +44 20 7193 7850 | AUS - +61 2 8005 4826

modeling discrete optimization

Answer to Math-4410 HW#2 questions

1. The Diet Problem

LINGO model:

MODEL:

SETS:

FOODS/ BREAD, MEAT, VEGGIES/

:CALORIES, COST, VITAMINS, QUANTITY;

ENDSETS

DATA:

CALORIES= 24, 32, 16;

COST= 2, 3, 2;

VITAMINS= 8, 20, 12;

CALORIE_UPPER = 450;

CALORIE_LOWER = 200;

VITAMIN_LOWER = 100;

ENDDATA

!Objective function;

MIN= @SUM(FOODS: QUANTITY*COST);

@SUM(FOODS: QUANTITY*CALORIES) <= CALORIE_UPPER; !Upper limit of calories;

@SUM(FOODS: QUANTITY*CALORIES) >= CALORIE_LOWER; !Lower limit of calories;

@SUM(FOODS: QUANTITY*VITAMINS) >= VITAMIN_LOWER; !Lower limit of vitamins;

END

Global optimal solution found.

Objective value: 17.85714

Infeasibilities: 0.000000

Total solver iterations: 2

Variable Value Reduced Cost

CALORIE_UPPER 450.0000 0.000000

CALORIE_LOWER 200.0000 0.000000

VITAMIN_LOWER 100.0000 0.000000

CALORIES( BREAD) 24.00000 0.000000

CALORIES( MEAT) 32.00000 0.000000

CALORIES( VEGGIES) 16.00000 0.000000

COST( BREAD) 2.000000 0.000000

COST( MEAT) 3.000000 0.000000

COST( VEGGIES) 2.000000 0.000000

VITAMINS( BREAD) 8.000000 0.000000

VITAMINS( MEAT) 20.00000 0.000000

VITAMINS( VEGGIES) 12.00000 0.000000

QUANTITY( BREAD) 3.571429 0.000000

QUANTITY( MEAT) 3.571429 0.000000

QUANTITY( VEGGIES) 0.000000 0.4285714

Row Slack or Surplus Dual Price

OBJ 17.85714 -1.000000