", line 48, in after_start_callback
SU1.initial_depth=8
^^^^^^^^^^^^^^^^^
File "/Users/bryant/local_development/pyswmm/_attic/venv/lib/python3.12/site-packages/pyswmm/nodes.py", line 430, in initial_depth
self._model.setNodeParam(self._nodeid, NodeParams.initDepth.value,
File "/Users/bryant/local_development/pyswmm/_attic/venv/lib/python3.12/site-packages/pyswmm/swmm5.py", line 701, in setNodeParam
solver.node_set_parameter(index, parameter, value)
File "/Users/bryant/local_development/pyswmm/_attic/venv/lib/python3.12/site-packages/swmm/toolkit/solver.py", line 1117, in node_set_parameter
return _solver.node_set_parameter(index, param, value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Exception:
API Key Error: Simulation Not Running
with Simulation('./SWMMExtCntrlModel.inp',
'./SWMMExtCntrlModel_2.rpt',
'./SWMMExtCntrlModel_2.out') as sim:
SU1 = Nodes(sim)['SU1']
def after_start_callback():
'''Initialize '''
SU1.initial_depth=8
sim.add_after_start(after_start_callback)
for ind, step in enumerate(sim):
pass
Should throw "SIMULATION RUNNING"
https://github.com/pyswmm/Stormwater-Management-Model/blob/459db1d4dfc61ff994ae01f92eae64e378e08915/src/solver/include/toolkit_errors.txt#L16C1-L16C70