SimGrid  3.18
Versatile Simulation of Distributed Systems
simgrid::surf::Model Class Reference

Detailed Description

SURF model interface class.

A model is an object which handle the interactions between its Resources and its Actions

#include <surf_interface.hpp>

Inheritance diagram for simgrid::surf::Model:
simgrid::surf::CpuModel simgrid::surf::HostModel simgrid::surf::NetworkModel simgrid::surf::StorageModel simgrid::surf::CpuCas01Model simgrid::surf::CpuL07Model simgrid::surf::CpuTiModel simgrid::surf::HostCLM03Model simgrid::surf::HostL07Model simgrid::surf::NetworkCm02Model simgrid::surf::NetworkConstantModel simgrid::surf::NetworkL07Model simgrid::surf::NetworkNS3Model simgrid::surf::StorageN11Model

Public Member Functions

 Model ()
 
virtual ~Model ()
 
virtual ActionListgetReadyActionSet () const
 Get the set of actions in ready state. More...
 
virtual ActionListgetRunningActionSet () const
 Get the set of actions in running state. More...
 
virtual ActionListgetFailedActionSet () const
 Get the set of actions in failed state. More...
 
virtual ActionListgetDoneActionSet () const
 Get the set of actions in done state. More...
 
virtual ActionLmmListPtr getModifiedSet () const
 Get the set of modified actions. More...
 
lmm_system_t getMaxminSystem () const
 Get the maxmin system of the current Model. More...
 
e_UM_t getUpdateMechanism () const
 Get the update mechanism of the current Model. More...
 
void setUpdateMechanism (e_UM_t mechanism)
 
heap_typegetActionHeap ()
 Get Action heap. More...
 
double actionHeapTopDate () const
 
ActionactionHeapPop ()
 
bool actionHeapIsEmpty () const
 
virtual double nextOccuringEvent (double now)
 Share the resources between the actions. More...
 
virtual double nextOccuringEventLazy (double now)
 
virtual double nextOccuringEventFull (double now)
 
virtual void updateActionsState (double now, double delta)
 Update action to the current time. More...
 
virtual void updateActionsStateLazy (double now, double delta)
 
virtual void updateActionsStateFull (double now, double delta)
 
virtual bool nextOccuringEventIsIdempotent ()
 Returns whether this model have an idempotent shareResource() More...
 

Protected Attributes

ActionLmmListPtr modifiedSet_
 
lmm_system_t maxminSystem_ = nullptr
 
bool selectiveUpdate_
 

Constructor & Destructor Documentation

◆ Model()

simgrid::surf::Model::Model ( )

◆ ~Model()

simgrid::surf::Model::~Model ( )
virtual

Member Function Documentation

◆ getReadyActionSet()

virtual ActionList* simgrid::surf::Model::getReadyActionSet ( ) const
inlinevirtual

Get the set of actions in ready state.

◆ getRunningActionSet()

virtual ActionList* simgrid::surf::Model::getRunningActionSet ( ) const
inlinevirtual

Get the set of actions in running state.

◆ getFailedActionSet()

virtual ActionList* simgrid::surf::Model::getFailedActionSet ( ) const
inlinevirtual

Get the set of actions in failed state.

◆ getDoneActionSet()

virtual ActionList* simgrid::surf::Model::getDoneActionSet ( ) const
inlinevirtual

Get the set of actions in done state.

◆ getModifiedSet()

virtual ActionLmmListPtr simgrid::surf::Model::getModifiedSet ( ) const
inlinevirtual

Get the set of modified actions.

◆ getMaxminSystem()

lmm_system_t simgrid::surf::Model::getMaxminSystem ( ) const
inline

Get the maxmin system of the current Model.

◆ getUpdateMechanism()

e_UM_t simgrid::surf::Model::getUpdateMechanism ( ) const
inline

Get the update mechanism of the current Model.

See also
e_UM_t

◆ setUpdateMechanism()

void simgrid::surf::Model::setUpdateMechanism ( e_UM_t  mechanism)
inline

◆ getActionHeap()

heap_type& simgrid::surf::Model::getActionHeap ( )
inline

Get Action heap.

◆ actionHeapTopDate()

double simgrid::surf::Model::actionHeapTopDate ( ) const
inline

◆ actionHeapPop()

Action * simgrid::surf::Model::actionHeapPop ( )

◆ actionHeapIsEmpty()

bool simgrid::surf::Model::actionHeapIsEmpty ( ) const
inline

◆ nextOccuringEvent()

double simgrid::surf::Model::nextOccuringEvent ( double  now)
virtual

Share the resources between the actions.

Parameters
nowThe current time of the simulation
Returns
The delta of time till the next action will finish

Reimplemented in simgrid::surf::CpuTiModel, simgrid::surf::HostL07Model, simgrid::surf::StorageN11Model, simgrid::surf::HostCLM03Model, simgrid::surf::NetworkConstantModel, and simgrid::surf::NetworkNS3Model.

◆ nextOccuringEventLazy()

double simgrid::surf::Model::nextOccuringEventLazy ( double  now)
virtual

◆ nextOccuringEventFull()

double simgrid::surf::Model::nextOccuringEventFull ( double  now)
virtual

Reimplemented in simgrid::surf::NetworkModel.

◆ updateActionsState()

void simgrid::surf::Model::updateActionsState ( double  now,
double  delta 
)
virtual

Update action to the current time.

Parameters
nowThe current time of the simulation
deltaThe delta of time since the last update

Reimplemented in simgrid::surf::CpuTiModel, simgrid::surf::HostL07Model, simgrid::surf::StorageN11Model, simgrid::surf::HostCLM03Model, simgrid::surf::NetworkConstantModel, and simgrid::surf::NetworkNS3Model.

◆ updateActionsStateLazy()

void simgrid::surf::Model::updateActionsStateLazy ( double  now,
double  delta 
)
virtual

◆ updateActionsStateFull()

void simgrid::surf::Model::updateActionsStateFull ( double  now,
double  delta 
)
virtual

◆ nextOccuringEventIsIdempotent()

virtual bool simgrid::surf::Model::nextOccuringEventIsIdempotent ( )
inlinevirtual

Returns whether this model have an idempotent shareResource()

The only model that is not is NS3: computing the next timestamp moves the model up to that point, so we need to call it only when the next timestamp of other sources is computed.

Reimplemented in simgrid::surf::NetworkNS3Model.

Member Data Documentation

◆ modifiedSet_

ActionLmmListPtr simgrid::surf::Model::modifiedSet_
protected

◆ maxminSystem_

lmm_system_t simgrid::surf::Model::maxminSystem_ = nullptr
protected

◆ selectiveUpdate_

bool simgrid::surf::Model::selectiveUpdate_
protected

The documentation for this class was generated from the following files: