idmtools.entities.simulation module¶
-
class
idmtools.entities.simulation.
Simulation
(_uid: uuid.UUID = None, _IItem__pre_creation_hooks: List[Callable[[IItem, IPlatform], None]] = <factory>, _IItem__post_creation_hooks: List[Callable[[IItem, IPlatform], None]] = <factory>, platform_id: uuid.UUID = None, _platform: IPlatform = None, parent_id: uuid.UUID = None, _parent: IEntity = None, status: idmtools.core.enums.EntityStatus = None, tags: Dict[str, Any] = <factory>, item_type: idmtools.core.enums.ItemType = <ItemType.SIMULATION: 'Simulation'>, _platform_object: Any = None, name: str = None, assets: idmtools.assets.asset_collection.AssetCollection = <factory>, task: ITask = None, _Simulation__assets_gathered: bool = False, _platform_kwargs: dict = <factory>)¶ Bases:
idmtools.core.interfaces.iassets_enabled.IAssetsEnabled
,idmtools.core.interfaces.inamed_entity.INamedEntity
Class that represents a generic simulation. This class needs to be implemented for each model type with specifics.
-
task
: ITask = None¶ Task representing the configuration of the command to be executed
-
item_type
: idmtools.core.enums.ItemType = 'Simulation'¶ Item Type. Should not be changed from Simulation
-
property
experiment
¶
-
pre_creation
(platform: IPlatform)¶ Runs before a simulation is created server side
- Parameters
platform – Platform the item is being executed on
Returns:
-
post_creation
(platform: IPlatform) → None¶ Called after a simulation is created
- Parameters
platform – Platform simulation is being executed on
Returns:
-
pre_getstate
()¶ Return default values for
pickle_ignore_fields()
. Call before pickling.
-
gather_assets
()¶ Gather all the assets for the simulation.
-
classmethod
from_task
(task: ITask, tags: Dict[str, Any] = None, asset_collection: idmtools.assets.asset_collection.AssetCollection = None)¶ Create a simulation from a task
- Parameters
task – Task to create from
tags – Tags to create on the simulation
asset_collection – Simulation Assets
Returns:
-
list_static_assets
(platform: IPlatform = None, **kwargs) → List[idmtools.assets.asset.Asset]¶ List assets that have been uploaded to a server already
- Parameters
children – When set to true, simulation assets will be loaded as well
platform – Optional platform to load assets list from
**kwargs –
- Returns
List of assets
-
to_dict
() → Dict¶ Do a lightweight conversation to json :returns: Dict representing json of object
-