You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is used for things that need to happen at the very beginning of a timestep
(optional) Insure that components are loaded into the state['model_data] dictionary at model startup in main.py
If the new model component data is not stored in the already loaded json file, or is stored in an hdf5 table that is not already loaded via a function, add function to load this data in main.py
HSP2
directoryom_[new_component_name].py
HSP2/specl/
directory see STATE sub-module refactor #126ModelObject
inom_[new_component_name].py
:[NewComponentName]
__init__()
methodNewComponentName.parse_model_props()
if supporting custom json-typemodel_props
arrayNewComponentName.tokenize()
method to add necessary integer keys to run in@njit
runtimeNewComponentName.parseUCI()
if loadable from classic UCIclass SpecialAction(ModelObject):
@njit
compatible runtime evaluation function with prefixstep_
(ex:step_[new_component_name]()
)(op, state_ix)
( op, state_ix, dict_ix, op_tokens, step)
step_special_action()
@njit
compatible runtime pre-eval function with prefixprestep_
om.py
:from HSP2.om_[new_model_object] import *
from HSP2.om_special_action import *
model_class_loader()
if object_class =='NewModelObject':
model_object = NewModelObject(model_props.get('name'), container, model_props)
SpecialAction
step_one()
step_special_action()
pre_step_model()
state['model_data]
dictionary at model startup inmain.py
main.py
state_load_dynamics_specl()
The text was updated successfully, but these errors were encountered: