79188632

Date: 2024-11-14 11:58:20
Score: 0.5
Natty:
Report link

There are actually several errors in your model and data:

Errors in the model:

  1. Cost is an indexed parameter, but you have declared as an scalar parameter param cost;, yo should rather use param cost{FOODS};.

  2. This happens with other parameters in your model.

  3. You should not name parameters and constraints in the same way, so you have "proteins" as a parameter and also as a constraint.

Errors in the data: 4. In your data section, you are re-declaring parameters. Data section is to assign values rather than declaring new entities:

param calories{FOODS};
param proteins{FOODS};
param calcium{FOODS};
param vitaminA{FOODS};
param cost{FOODS};

All the previous lines in the data section shouldn't be there

  1. The "param" keyword is missing before assigning values to the previous ones:
param calcium :=
Bread   418
Meat    41
  1. "Gelatin" or "Gelatine"? You have 2 different names for a food.
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: marcos