SimGrid  3.14.159
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 ()
 Get the set of actions in ready state. More...
 
virtual ActionListgetRunningActionSet ()
 Get the set of actions in running state. More...
 
virtual ActionListgetFailedActionSet ()
 Get the set of actions in failed state. More...
 
virtual ActionListgetDoneActionSet ()
 Get the set of actions in done state. More...
 
virtual ActionLmmListPtr getModifiedSet ()
 Get the set of modified actions. More...
 
lmm_system_t getMaxminSystem ()
 Get the maxmin system of the current Model. More...
 
e_UM_t getUpdateMechanism ()
 Get the update mechanism of the current Model. More...
 
xbt_heap_t getActionHeap ()
 Get Action heap. More...
 
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
 
e_UM_t updateMechanism_ = UM_UNDEFINED
 
bool selectiveUpdate_
 
xbt_heap_t actionHeap_
 

Constructor & Destructor Documentation

§ Model()

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

§ ~Model()

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

Member Function Documentation

§ getReadyActionSet()

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

Get the set of actions in ready state.

§ getRunningActionSet()

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

Get the set of actions in running state.

§ getFailedActionSet()

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

Get the set of actions in failed state.

§ getDoneActionSet()

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

Get the set of actions in done state.

§ getModifiedSet()

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

Get the set of modified actions.

§ getMaxminSystem()

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

Get the maxmin system of the current Model.

§ getUpdateMechanism()

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

Get the update mechanism of the current Model.

See also
e_UM_t

§ getActionHeap()

xbt_heap_t simgrid::surf::Model::getActionHeap ( )
inline

Get Action heap.

§ 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

§ updateMechanism_

e_UM_t simgrid::surf::Model::updateMechanism_ = UM_UNDEFINED
protected

§ selectiveUpdate_

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

§ actionHeap_

xbt_heap_t simgrid::surf::Model::actionHeap_
protected

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