idmtools.entities.simulation module

class idmtools.entities.simulation.Simulation(_uid: uuid.UUID = None, 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: 3>, _platform_object: Any = None, name: str = None, assets: idmtools.assets.asset_collection.AssetCollection = <factory>, task: ITask = None, pre_creation_hooks: List[Callable[[], NoReturn]] = <factory>, _Simulation__assets_gathered: bool = False)

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 = 3

Item Type. Should not be changed from Simulation

pre_creation_hooks: List[Callable[], NoReturn]]

List of hooks that we can modify to add additional behaviour before creation of simulations

property experiment
pre_creation()

Called before the actual creation of the entity.

post_creation() → None

Called after the actual creation of the entity.

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