wrench::Simulation Class Reference

The simulation state. More...

#include <Simulation.h>

Public Member Functions

 Simulation ()
 Constructor.
 
 ~Simulation ()
 Destructor.
 
void init (int *, char **)
 Initialize the simulation, which parses out WRENCH-specific and SimGrid-specific command-line arguments, if any. More...
 
void instantiatePlatform (std::string)
 Instantiate a simulated platform. More...
 
std::vector< std::string > getHostnameList ()
 Retrieve the list of names of all the hosts in the platform. More...
 
void launch ()
 Launch the simulation. More...
 
ComputeServiceadd (std::unique_ptr< ComputeService > executor)
 Add a ComputeService to the simulation. More...
 
StorageServiceadd (std::unique_ptr< StorageService > executor)
 Add a StorageService to the simulation. More...
 
void setFileRegistryService (std::unique_ptr< FileRegistryService > file_registry_service)
 Set a FileRegistryService for the simulation. More...
 
void setNetworkProximityService (std::unique_ptr< NetworkProximityService > network_proximity_service)
 Set a NetworkProximityService for the simulation. More...
 
void stageFile (WorkflowFile *file, StorageService *storage_service)
 Stage a copy of a file on a storage service. More...
 
void stageFiles (std::set< WorkflowFile *> files, StorageService *storage_service)
 Stage a set of a file copies on a storage service. More...
 
WMSsetWMS (std::unique_ptr< WMS >)
 Set a WMS for the simulation. More...
 

Public Attributes

SimulationOutput output
 The simulation post-mortem output.
 

Detailed Description

The simulation state.

Member Function Documentation

◆ add() [1/2]

ComputeService * wrench::Simulation::add ( std::unique_ptr< ComputeService service)

Add a ComputeService to the simulation.

Parameters
servicea compute service
Returns
the compute service
Exceptions
std::invalid_argument
std::runtime_error

◆ add() [2/2]

StorageService * wrench::Simulation::add ( std::unique_ptr< StorageService service)

Add a StorageService to the simulation.

Parameters
servicea storage service
Returns
the storage service
Exceptions
std::invalid_argument
std::runtime_error

◆ getHostnameList()

std::vector< std::string > wrench::Simulation::getHostnameList ( )

Retrieve the list of names of all the hosts in the platform.

Returns
a vector of hostnames

◆ init()

void wrench::Simulation::init ( int *  argc,
char **  argv 
)

Initialize the simulation, which parses out WRENCH-specific and SimGrid-specific command-line arguments, if any.

Parameters
argcmain()'s argument count
argvmain()'s argument list
Exceptions
std::invalid_argument

◆ instantiatePlatform()

void wrench::Simulation::instantiatePlatform ( std::string  filename)

Instantiate a simulated platform.

Parameters
filenamethe path to a SimGrid XML platform description file
Exceptions
std::runtime_error

◆ launch()

void wrench::Simulation::launch ( )

Launch the simulation.

Exceptions
std::runtime_error

◆ setFileRegistryService()

void wrench::Simulation::setFileRegistryService ( std::unique_ptr< FileRegistryService file_registry_service)

Set a FileRegistryService for the simulation.

Parameters
file_registry_servicea file registry service
Exceptions
std::invalid_argument

◆ setNetworkProximityService()

void wrench::Simulation::setNetworkProximityService ( std::unique_ptr< NetworkProximityService network_proximity_service)

Set a NetworkProximityService for the simulation.

Parameters
network_proximity_servicea network proximity service
Exceptions
std::invalid_argument

◆ setWMS()

WMS * wrench::Simulation::setWMS ( std::unique_ptr< WMS wms)

Set a WMS for the simulation.

Parameters
wmsa WMS
Returns
the WMS
Exceptions
std::invalid_argument
std::runtime_error

◆ stageFile()

void wrench::Simulation::stageFile ( WorkflowFile file,
StorageService storage_service 
)

Stage a copy of a file on a storage service.

Parameters
filea file to stage on a storage service
storage_servicethe storage service
Exceptions
std::runtime_error
std::invalid_argument

◆ stageFiles()

void wrench::Simulation::stageFiles ( std::set< WorkflowFile *>  files,
StorageService storage_service 
)

Stage a set of a file copies on a storage service.

Parameters
filesa set of files to stage on a storage service
storage_servicethe storage service
Exceptions
std::runtime_error
std::invalid_argument

The documentation for this class was generated from the following files:
  • include/wrench/simulation/Simulation.h
  • src/wrench/simulation/Simulation.cpp