SimGrid  3.14.159
Versatile Simulation of Distributed Systems
simgrid::surf::NetworkNS3Model Class Reference

#include <network_ns3.hpp>

Inheritance diagram for simgrid::surf::NetworkNS3Model:
simgrid::surf::NetworkModel simgrid::surf::Model

Public Member Functions

 NetworkNS3Model ()
 
 ~NetworkNS3Model ()
 
LinkcreateLink (const char *name, double bandwidth, double latency, e_surf_link_sharing_policy_t policy) override
 Create a Link. More...
 
Actioncommunicate (s4u::Host *src, s4u::Host *dst, double size, double rate) override
 Create a communication between two hosts. More...
 
double nextOccuringEvent (double now) override
 Share the resources between the actions. More...
 
bool nextOccuringEventIsIdempotent ()
 Returns whether this model have an idempotent shareResource() More...
 
void updateActionsState (double now, double delta) override
 Update action to the current time. More...
 
- Public Member Functions inherited from simgrid::surf::NetworkModel
 NetworkModel ()
 Constructor. More...
 
 ~NetworkModel () override
 Destructor. 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...
 
double nextOccuringEventFull (double now) override
 
- Public Member Functions inherited from simgrid::surf::Model
 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 nextOccuringEventLazy (double now)
 
virtual void updateActionsStateLazy (double now, double delta)
 
virtual void updateActionsStateFull (double now, double delta)
 

Additional Inherited Members

- Public Attributes inherited from simgrid::surf::NetworkModel
void(* f_networkSolve )(lmm_system_t) = lmm_solve
 Function pointer to the function to use to solve the lmm_system_t. More...
 
Linkloopback_ = nullptr
 
- Protected Attributes inherited from simgrid::surf::Model
ActionLmmListPtr modifiedSet_
 
lmm_system_t maxminSystem_ = nullptr
 
e_UM_t updateMechanism_ = UM_UNDEFINED
 
bool selectiveUpdate_
 
xbt_heap_t actionHeap_
 

Constructor & Destructor Documentation

§ NetworkNS3Model()

simgrid::surf::NetworkNS3Model::NetworkNS3Model ( )

§ ~NetworkNS3Model()

simgrid::surf::NetworkNS3Model::~NetworkNS3Model ( )

Member Function Documentation

§ createLink()

Link * simgrid::surf::NetworkNS3Model::createLink ( const char *  name,
double  bandwidth,
double  latency,
e_surf_link_sharing_policy_t  policy 
)
overridevirtual

Create a Link.

Parameters
nameThe name of the Link
bandwidthThe initial bandwidth of the Link in bytes per second
latencyThe initial latency of the Link in seconds
policyThe sharing policy of the Link

Implements simgrid::surf::NetworkModel.

§ communicate()

Action * simgrid::surf::NetworkNS3Model::communicate ( s4u::Host src,
s4u::Host dst,
double  size,
double  rate 
)
overridevirtual

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

Implements simgrid::surf::NetworkModel.

§ nextOccuringEvent()

double simgrid::surf::NetworkNS3Model::nextOccuringEvent ( double  now)
overridevirtual

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 from simgrid::surf::Model.

§ nextOccuringEventIsIdempotent()

bool simgrid::surf::NetworkNS3Model::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 from simgrid::surf::Model.

§ updateActionsState()

void simgrid::surf::NetworkNS3Model::updateActionsState ( double  now,
double  delta 
)
overridevirtual

Update action to the current time.

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

Reimplemented from simgrid::surf::Model.


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