File tree Expand file tree Collapse file tree
src/frontend/specification Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,6 +27,11 @@ struct Label{N} <: EdgeModifier
2727end
2828label (args... ) = Label (args)
2929
30+ # test whether the modifier is NaN
31+ isnanmodval (val:: Number ) = isnan (val)
32+ isnanmodval (val:: Symbol ) = val == :NaN
33+ isnanmodval (val:: SimpleNode{Symbol} ) = val. node == :NaN
34+
3035# ###########################################################################################
3136# ## constructor for parameter table from graph
3237# ###########################################################################################
@@ -81,17 +86,19 @@ function ParameterTable(
8186 end
8287 modval = modifier. value[something (group, 1 )]
8388 if modifier isa Fixed
84- if modval == :NaN
89+ if isnanmodval ( modval)
8590 free[i] = true
8691 value_fixed[i] = 0.0
8792 else
8893 free[i] = false
8994 value_fixed[i] = modval
9095 end
9196 elseif modifier isa Start
92- start[i] = modval
97+ if ! isnanmodval (modval)
98+ start[i] = modval
99+ end
93100 elseif modifier isa Label
94- if modval == :NaN
101+ if isnanmodval ( modval)
95102 throw (DomainError (NaN , " NaN is not allowed as a parameter label." ))
96103 end
97104 param_refs[i] = modval
You can’t perform that action at this time.
0 commit comments