Parser related questions

Some parser related questions:

  1. is it valid for a restaurant to have a recipe that no cook can make? I understand the incident version of it but what about at parsing time specifically?

  2. can a recipe have no ingredients?

  3. Page 29 line 28

There must exist exactly 1 recipe per basic dish name.

However, page 18 lines 8-10

All restaurants with the same restaurant type have the same basic dishes per default, however they might vary in their recipes.

Isnt this contradictory? The first line is suggesting that for each basic dish there exists only 1 recipe, however, the later line is saying that different restaurants could have different recipes for the same basic dish, i.e. >1 recipes. Any clarification on this would be greatly appreciated.

  1. If a customerGroup has a favourite dish name that doesn’t have any associated recipe globally, would that be a parsing error? Or would it be just overlooked in the restaurant as the restaurant not having the dish?

  2. Is it valid to have no incidents in the simulation?

  3. Is it valid to have no customers in the simulation?

Thanks in advance!

1 Like
  1. yes, this is valid. The kitchen still plans/buys ingredients for such recipes, but the dish cannot be ordered without an eligible cook.
  2. no, a recipe must contain at least one ingredient, this can be seen in the recipe schema later.
  3. There is one global default recipe per basicDish name (basicDishFor). Restaurants may use a different recipe with the same dish name as their local adaptation; each individual restaurant may still have only one recipe for that dish name.
  4. that would be a parsing error, favourite dishes must refer to an existing recipe dish name.
  5. yes. incidents may be empty.
  6. yes. customerGroups may be empty.
1 Like