SimGrid  3.13
Versatile Simulation of Distributed Systems
simgrid::surf::Model Class Referenceabstract

SURF model interface class. More...

#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::VMModel 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 next_occuring_event (double now)
 Share the resources between the actions. More...
 
virtual double next_occuring_event_lazy (double now)
 
virtual double next_occuring_event_full (double now)
 
double shareResourcesMaxMin (ActionList *running_actions, lmm_system_t sys, void(*solve)(lmm_system_t))
 
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 next_occuring_event_isIdempotent ()=0
 Returns whether this model have an idempotent shareResource() More...
 

Protected Attributes

ActionLmmListPtr modifiedSet_
 
lmm_system_t maxminSystem_ = nullptr
 
e_UM_t updateMechanism_ = UM_UNDEFINED
 
int selectiveUpdate_
 
xbt_heap_t actionHeap_
 

Detailed Description

SURF model interface class.

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

Constructor & Destructor Documentation

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

Member Function Documentation

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

Get the set of actions in ready state.

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

Get the set of actions in running state.

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

Get the set of actions in failed state.

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

Get the set of actions in done state.

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

Get the set of modified actions.

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

Get the maxmin system of the current Model.

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

Get the update mechanism of the current Model.

See also
e_UM_t
xbt_heap_t simgrid::surf::Model::getActionHeap ( )
inline

Get Action heap.

double simgrid::surf::Model::next_occuring_event ( 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::VMHL13Model, simgrid::surf::StorageN11Model, simgrid::surf::HostCLM03Model, simgrid::surf::NetworkConstantModel, and simgrid::surf::NetworkNS3Model.

double simgrid::surf::Model::next_occuring_event_lazy ( double  now)
virtual
double simgrid::surf::Model::next_occuring_event_full ( double  now)
virtual
double simgrid::surf::Model::shareResourcesMaxMin ( ActionList running_actions,
lmm_system_t  sys,
void(*)(lmm_system_t solve 
)
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::VMHL13Model, simgrid::surf::HostCLM03Model, simgrid::surf::StorageN11Model, simgrid::surf::NetworkConstantModel, and simgrid::surf::NetworkNS3Model.

void simgrid::surf::Model::updateActionsStateLazy ( double  now,
double  delta 
)
virtual
void simgrid::surf::Model::updateActionsStateFull ( double  now,
double  delta 
)
virtual
virtual bool simgrid::surf::Model::next_occuring_event_isIdempotent ( )
pure virtual

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.

Implemented in simgrid::surf::StorageModel, simgrid::surf::NetworkL07Model, simgrid::surf::HostModel, simgrid::surf::CpuModel, simgrid::surf::NetworkCm02Model, simgrid::surf::NetworkConstantModel, and simgrid::surf::NetworkNS3Model.

Member Data Documentation

ActionLmmListPtr simgrid::surf::Model::modifiedSet_
protected
lmm_system_t simgrid::surf::Model::maxminSystem_ = nullptr
protected
e_UM_t simgrid::surf::Model::updateMechanism_ = UM_UNDEFINED
protected
int simgrid::surf::Model::selectiveUpdate_
protected
xbt_heap_t simgrid::surf::Model::actionHeap_
protected

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