leads to the following error during the ts parsing step
TypeError: TS2322 Type 'Discrete<number>' is not assignable to type 'number | Real'.\n Type 'Discrete<number>' is missing the following properties from type 'Real': rate, times, plus, minus, and 6 more.
We want to assign the value of /fruit at some time to the real parameter biteSize. To do that, we use the valueAt operator. But the return of this operator is a Discrete<number> when the parameter expects either a number of a Real.
Possible fix
We could provide a
static toReal(discreteProfile: Discrete<number>): Real
method in the Real class. We'd convert the number profile into its equivalent real profile via a newRealProfileFromDiscrete constraint tree element (values would be the same, rates would be 0).
While working on #1378, I found the following issue. Executing the following goal:
leads to the following error during the ts parsing step
TypeError: TS2322 Type 'Discrete<number>' is not assignable to type 'number | Real'.\n Type 'Discrete<number>' is missing the following properties from type 'Real': rate, times, plus, minus, and 6 more.
We want to assign the value of
/fruit
at some time to the real parameterbiteSize
. To do that, we use thevalueAt
operator. But the return of this operator is aDiscrete<number>
when the parameter expects either anumber
of aReal
.Possible fix
We could provide a
method in the
Real
class. We'd convert the number profile into its equivalent real profile via a newRealProfileFromDiscrete
constraint tree element (values would be the same, rates would be 0).