@@ -262,7 +262,7 @@ to_symbol(label::NodeLabel) = Symbol(String(label.name) * "_" * string(label.glo
262262
263263Base. show (io:: IO , label:: NodeLabel ) = print (io, label. name, " _" , label. global_counter)
264264Base.:(== )(label1:: NodeLabel , label2:: NodeLabel ) = label1. name == label2. name && label1. global_counter == label2. global_counter
265- Base. hash (label:: NodeLabel , h:: UInt ) = hash (label. name, hash (label . global_counter, h) )
265+ Base. hash (label:: NodeLabel , h:: UInt ) = hash (label. global_counter, h)
266266
267267"""
268268 EdgeLabel(symbol, index)
@@ -1481,7 +1481,8 @@ end
14811481
14821482function add_constant_node! (model:: Model , context:: Context , options:: NodeCreationOptions , name:: Symbol , index)
14831483 label = __add_variable_node! (model, context, options, name, index)
1484- context[to_symbol (label), index] = label
1484+ context[Symbol (String (name) * " _" * string (label. global_counter)), index] = label
1485+ return label
14851486end
14861487
14871488function __add_variable_node! (model:: Model , context:: Context , options:: NodeCreationOptions , name:: Symbol , index)
@@ -2130,9 +2131,9 @@ Calls a plugin specific logic after the model has been created. By default does
21302131"""
21312132postprocess_plugin (plugin, model) = nothing
21322133
2133- function preprocess_plugins (type:: AbstractPluginTraitType , model:: Model , context:: Context , label, nodedata, options)
2134+ function preprocess_plugins (type:: AbstractPluginTraitType , model:: Model , context:: Context , label:: NodeLabel , nodedata:: NodeData , options)
21342135 plugins = filter (type, getplugins (model))
21352136 return foldl (plugins; init = (label, nodedata)) do (label, nodedata), plugin
21362137 return preprocess_plugin (plugin, model, context, label, nodedata, options)
2137- end
2138+ end :: Tuple{NodeLabel, NodeData}
21382139end
0 commit comments