SimGrid  3.12
Versatile Simulation of Distributed Systems
NetworkModel Class Referenceabstract

SURF network model interface class. More...

#include <network_interface.hpp>

Inheritance diagram for NetworkModel:
Model

Public Member Functions

 NetworkModel ()
 Constructor.
 
 ~NetworkModel ()
 Destructor.
 
virtual LinkcreateLink (const char *name, double bw_initial, tmgr_trace_t bw_trace, double lat_initial, tmgr_trace_t lat_trace, e_surf_resource_state_t state_initial, tmgr_trace_t state_trace, e_surf_link_sharing_policy_t policy, xbt_dict_t properties)=0
 Create a Link. More...
 
virtual Actioncommunicate (RoutingEdge *src, RoutingEdge *dst, double size, double rate)=0
 Create a communication between two hosts. More...
 
virtual double latencyFactor (double size)
 Get the right multiplicative factor for the latency. More...
 
virtual double bandwidthFactor (double size)
 Get the right multiplicative factor for the bandwidth. More...
 
virtual double bandwidthConstraint (double rate, double bound, double size)
 Get definitive bandwidth. More...
 
- Public Member Functions inherited from Model
 Model ()
 Constructor.
 
virtual ~Model ()
 Destructor.
 
virtual ActionList * getReadyActionSet ()
 Get the set of actions in ready state. More...
 
virtual ActionList * getRunningActionSet ()
 Get the set of actions in running state. More...
 
virtual ActionList * getFailedActionSet ()
 Get the set of actions in failed state. More...
 
virtual ActionList * getDoneActionSet ()
 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 shareResources (double now)
 share the resources More...
 
virtual void updateActionsState (double now, double delta)
 Update state of actions. More...
 
virtual bool shareResourcesIsIdempotent ()=0
 Returns whether this model have an idempotent shareResource() More...
 

Data Fields

void(* f_networkSolve )(lmm_system_t) = lmm_solve
 Function pointer to the function to use to solve the lmm_system_t. More...
 

Detailed Description

SURF network model interface class.

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

Member Function Documentation

virtual Link* NetworkModel::createLink ( const char *  name,
double  bw_initial,
tmgr_trace_t  bw_trace,
double  lat_initial,
tmgr_trace_t  lat_trace,
e_surf_resource_state_t  state_initial,
tmgr_trace_t  state_trace,
e_surf_link_sharing_policy_t  policy,
xbt_dict_t  properties 
)
pure virtual

Create a Link.

Parameters
nameThe name of the Link
bw_initialThe initial bandwidth of the Link in bytes per second
bw_traceThe trace associated to the Link bandwidth
lat_initialThe initial latency of the Link in seconds
lat_traceThe trace associated to the Link latency
state_initialThe initial Link (state)[e_surf_resource_state_t]
state_traceThe trace associated to the Link (state)[e_surf_resource_state_t]
policyThe sharing policy of the Link
propertiesDictionary of properties associated to this Resource
Returns
The created Link
virtual Action* NetworkModel::communicate ( RoutingEdge src,
RoutingEdge dst,
double  size,
double  rate 
)
pure virtual

Create a communication between two hosts.

It makes calls to the routing part, and execute the communication between the two end points.

Parameters
srcThe source of the communication
dstThe destination of the communication
sizeThe size of the communication in bytes
rateAllows to limit the transfer rate. Negative value means unlimited.
Returns
The action representing the communication
double NetworkModel::latencyFactor ( double  size)
virtual

Get the right multiplicative factor for the latency.

Depending on the model, the effective latency when sending a message might be different from the theoretical latency of the link, in function of the message size. In order to account for this, this function gets this factor.

Parameters
sizeThe size of the message.
Returns
The latency factor.
double NetworkModel::bandwidthFactor ( double  size)
virtual

Get the right multiplicative factor for the bandwidth.

Depending on the model, the effective bandwidth when sending a message might be different from the theoretical bandwidth of the link, in function of the message size. In order to account for this, this function gets this factor.

Parameters
sizeThe size of the message.
Returns
The bandwidth factor.
double NetworkModel::bandwidthConstraint ( double  rate,
double  bound,
double  size 
)
virtual

Get definitive bandwidth.

It gives the minimum bandwidth between the one that would occur if no limitation was enforced, and the one arbitrary limited.

Parameters
rateThe desired maximum bandwidth.
boundThe bandwidth with only the network taken into account.
sizeThe size of the message.
Returns
The new bandwidth.

Field Documentation

void(* NetworkModel::f_networkSolve) (lmm_system_t) = lmm_solve

Function pointer to the function to use to solve the lmm_system_t.

Parameters
systemThe lmm_system_t to solve

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