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 would be useful to create full, self-contained simulation setups that don't require any user input, e.g., using the %create_setup magic command or later when a command-line interface is available.
xsimlab.Model could provide a default_setup argument that accepts a dictionary with the exact same structure than the xsimlab.create_setup arguments (i.e., clocks, input_vars, output_vars).
If default_setup is provided, then xsimlab.create_setup is called at model creation and the resulting dataset is attached to the new Model object. This dataset could be accessible, e.g., with the Model.default_setup property.
Activity
[-]Add default clocks and output variables to a Model object[/-][+]Default simulation setup[/+]benbovy commentedon Nov 23, 2020
xsimlab.Modelcould provide adefault_setupargument that accepts a dictionary with the exact same structure than thexsimlab.create_setuparguments (i.e.,clocks,input_vars,output_vars).If
default_setupis provided, thenxsimlab.create_setupis called at model creation and the resulting dataset is attached to the new Model object. This dataset could be accessible, e.g., with theModel.default_setupproperty.Pros:
This would allow something like:
Cons:
Default setup would likely break when creating new models with
update_processesordrop_processes. It would be tricky to propagate the default setup.