Lesson 16, (model-error): Function 'min' is not a model-level evaluable function

Hi,

As part of the challenge of Lesson 16, I added an energy attribute to each reindeer, with the goal to calculate the maximum flight time as the minimum of flight time per reindeer defined by their energy / power.

First learning you can not do this directly but have to create an intermediate variable it seems:

attribute flightTimePerReindeer subsets ISQ::duration = reindeer.energy / reindeer.power;
attribute maxFlightTime subsets ISQ::duration := min(flightTimePerReindeer);

But when then running the python, I get the error:

[:79:58: error (model-error): Function β€˜min’ is not a model-level evaluable function]

Which triggers the following questions:

  1. What does it mean when a function is not model-level evaluable?
  2. Why is it not a model-level evaluable?
  3. Which functions are model-level evaluable and which are not?

Hi,

Syside can currently only evaluate most operator expressions and a few standard library functions. When the evaluation returns an error Function β€˜...’ is not a model-level evaluable function, it usually means that the expression or function has not been implemented yet. You can find a list of supported expressions and functions at Expression Evaluation.