Skip to content

ModelicaMixin: Fix skipping of non-specified start value

Tjerk Vreeken requested to merge fix-modelica-seed into master

If the start attribute is the default of zero, we assume that it has not been explicitly set. The type of the start attribute can however be more than just a float; it can also be a bool, int (depending on the Python type of the variable). We reformulate the check such that it catches all these cases.

Note that the default seed value is zero anyway in CollInt, so in practice the result will often be the same. The only difference is that a failing check on 0.0 would explicitly set the seed to zero, which could trigger code that checks if a seed for a certain variable has been specified.

Merge request reports