simulator
Package¶
hpc_simulator_adapter
¶
- class tvb.adapters.simulator.hpc_simulator_adapter.HPCSimulatorAdapter(storage_path, is_group_launch)[source]¶
Bases:
SimulatorAdapter
- launch(view_model: SimulatorAdapterModel) [TimeSeriesIndex, SimulationHistoryIndex] [source]¶
- Called from the GUI to launch a simulation.
: string class name of chosen model, etc… *_parameters: dictionary of parameters for chosen model, etc… connectivity: tvb.datatypes.connectivity.Connectivity object. surface: tvb.datatypes.surfaces.CorticalSurface: or None. stimulus: tvb.datatypes.patters. object
- class tvb.adapters.simulator.hpc_simulator_adapter.HPCTimeseriesMetricsAdapter(storage_path, input_time_series_index)[source]¶
Bases:
TimeseriesMetricsAdapter
- configure(view_model: TimeseriesMetricsAdapterModel) None [source]¶
Store the input shape to be later used to estimate memory usage.
range_parameters
¶
simulator_adapter
¶
Adapter that uses the traits module to generate interfaces to the Simulator. Few supplementary steps are done here:
from submitted Monitor/Model… names, build transient entities
after UI parameters submit, compose transient Cortex entity to be passed to the Simulator.
- class tvb.adapters.simulator.simulator_adapter.SimulatorAdapter[source]¶
Bases:
ABCAdapter
Interface between the Simulator and the Framework.
- algorithm = None¶
- branch_simulation_state_gid = None¶
- configure(view_model: SimulatorAdapterModel) None [source]¶
Make preparations for the adapter launch.
- get_adapter_fragments(view_model)[source]¶
The result will be used for introspecting and checking operation changed input params from the defaults, to show in web gui. :return: a list of ABCAdapterForm classes, in case the current Adapter GUI will be composed of multiple sub-forms.
- get_execution_time_approximation(view_model: SimulatorAdapterModel) int [source]¶
Method should approximate based on input arguments, the time it will take for the operation to finish (in seconds).
- get_required_disk_size(view_model: SimulatorAdapterModel) int [source]¶
Return the required disk size this algorithm estimates it will take. (in kB)
- get_required_memory_size(view_model: SimulatorAdapterModel) int [source]¶
Return the required memory to run this algorithm.
- launch(view_model: SimulatorAdapterModel) [TimeSeriesIndex, SimulationHistoryIndex] [source]¶
- Called from the GUI to launch a simulation.
: string class name of chosen model, etc… *_parameters: dictionary of parameters for chosen model, etc… connectivity: tvb.datatypes.connectivity.Connectivity object. surface: tvb.datatypes.surfaces.CorticalSurface: or None. stimulus: tvb.datatypes.patters. object
- class tvb.adapters.simulator.simulator_adapter.SimulatorAdapterForm[source]¶
Bases:
ABCAdapterForm
- fill_from_trait(trait: Simulator) None [source]¶
Sets data for all traited fields from a trait instance. Note that FormFields are not TraitFields, so this does not work recursively Override to fill in sub-forms
- fill_trait(datatype)[source]¶
Copies the value of the TraitFields to the corresponding Attr-ibutes of the given trait instance Note that FormFields are not TraitFields, so this does not work recursively Override to fill in sub-forms
- static get_filters()[source]¶
Should keep filters for the required_datatype. These filters are stored in DB at introspection time. :return: FilterChain
- static get_input_name()[source]¶
The Form’s input name for the required_datatype. Will be stored in DB at introspection time. :return: str