SimNetwork Class Reference

#include <SimNetwork.h>

Inheritance diagram for SimNetwork:

Inheritance graph
[legend]
Collaboration diagram for SimNetwork:

Collaboration graph
[legend]

List of all members.

Adding a single new object specified by an object model / factory

void addObject (const SimObjectFactory &model, const SimEngine::ID &engine, SimObject::ID &id)
 One instance of a simulation object is created and added at specified simulation engine of the network.
void addObject (const SimObjectFactory &model, SimObject::ID &id)
 One instance of a simulation object is created and added to the network using the current distribution strategy.
SimObject::ID::Packed create (const SimObjectFactory &model, const SimEngine::ID &engine)
 One instance of a simulation object is created and added at specified simulation engine of the network.
SimObject::ID::Packed add (const SimObjectFactory &model, const SimEngine::ID &engine)
SimObject::ID::Packed create (const SimObjectFactory &model)
 One instance of a simulation object is created and added to the network using the current distribution strategy.
SimObject::ID::Packed add (const SimObjectFactory &model)
virtual void _addObject_ (const SimObjectFactory &model, const SimEngine::ID &engine, SimObject::ID &id)
 One instance of a simulation object is created and added at specified simulation engine of the network.
virtual void _addObject_ (const SimObjectFactory &model, SimObject::ID &id)
 One instance of a simulation object is created and added to the network using the current distribution strategy.

Mounting and inserting a new object to already existing object

void mount (const SimObjectFactory &model, const SimObject::ID &mountpoint, SimObject::ID &gid)
 One instance of a simulation object is created and "mounted" to the mount simulation object.
SimObject::ID::Packed mount (const SimObjectFactory &model, const SimObject::ID &mountpoint)
 One instance of a simulation object is created and "mounted" to the mount simulation object.
SimObject::ID::Packed mount (const SimObjectFactory &model, const SimObject::ID::Packed &mountpoint)
 One instance of a simulation object is created and "mounted" to the mount simulation object.
SimObject::ID::Vector mount (const SimObjectFactory &model, std::vector< SimObject::ID::Packed > const &mountpoints, bool collect=false)
 One instance of a simulation object is created and "mounted" to the mount simulation object.
void insert (const SimObjectFactory &model, const SimObject::ID &container, SimObject::ID &gid)
 One instance of a simulation object is created and "inserted" into the container simulation object.
SimObject::ID::Packed insert (const SimObjectFactory &model, const SimObject::ID &container)
 One instance of a simulation object is created and "inserted" to the mount simulation object.
SimObject::ID::Packed insert (const SimObjectFactory &model, const SimObject::ID::Packed &container)
 One instance of a simulation object is created and "inserted" to the mount simulation object.
virtual void _mount_ (const SimObjectFactory &model, const SimObject::ID &mountpoint, SimObject::ID &gid)
 One instance of a simulation object is created and "mounted" to the mount simulation object.
virtual void _insert_ (const SimObjectFactory &model, const SimObject::ID &container, SimObject::ID &gid)
 One instance of a simulation object is created and "inserted" into the container simulation object.

Create a recorder in the same simEngine as the object and make a connection between the object and the recorder

SimObject::ID::Packed record (const SimObject::ID::Packed &obj, const SimObjectFactory &recFactory, const port_t rec_port=0)
 Record values from port 0 of an object. Creates a recorder in the same SingleThreadEngine as the object and makes a connection without a delay.
SimObject::ID::Packed record (const SimObject::ID::Packed &obj, const port_t src_port, const SimObjectFactory &recFactory, const port_t rec_port=0)
 Record values from a specific port of an object. Creates a recorder in the same SingleThreadEngine as the object and makes a connection without a delay.
SimObject::ID::Packed record (const SimObject::ID::Packed &obj, const string field, const SimObjectFactory &recFactory, const port_t rec_port=0)
 Record values from a specified field of an object. Creates a recorder in the same SingleThreadEngine as the object and makes a connection without a delay.
virtual void _connect_ (SimObject::ID const &src, port_t out, const SimObject::ID &dst, port_t in, int delay)
 Make a connection where the type of connection (spike or analog) is determined (guessed) automatically.

Messages

void addSpikeMessage (const SimObject::ID &sender, const port_t out, const SimObject::ID &receiver, const port_t in, const Time &delay)
 Set up a spike message channel with a given delay.
void addAnalogMessage (const SimObject::ID &sender, int sender_port, const SimObject::ID &receiver, int recv_port, const Time &delay)
void addAnalogMessage (const SimObject::ID &sender, int sender_port, const SimObject::ID &receiver, string destfield, const Time &delay)
void addAnalogMessage (const SimObject::ID &sender, string srcfield, const SimObject::ID &receiver, int recv_port, const Time &delay)
void addAnalogMessage (const SimObject::ID &sender, string srcfield, const SimObject::ID &receiver, string destfield, const Time &delay)
virtual void _addSpikeMessage_ (const SimObject::ID &sender, const port_t out, const SimObject::ID &receiver, const port_t in, const Time &delay)
 Set up a spike message channel with a given delay.
virtual void _addAnalogMessage_ (const SimObject::ID &sender, int sender_port, const SimObject::ID &receiver, int recv_port, const Time &delay)
virtual void _addAnalogMessage_ (const SimObject::ID &sender, int sender_port, const SimObject::ID &receiver, string destfield, const Time &delay)
virtual void _addAnalogMessage_ (const SimObject::ID &sender, string srcfield, const SimObject::ID &receiver, int recv_port, const Time &delay)
virtual void _addAnalogMessage_ (const SimObject::ID &sender, string srcfield, const SimObject::ID &receiver, string destfield, const Time &delay)

Controlling the simulation

void initialize ()
 Initialize the network for forthcoming simulation. Should be called after construction and before simulation.
void reset ()
void advance (int nSteps=1)
void simulate (const Time &T)
void simulate (double T)
void set_dt (const Time &dt)
Time get_dt () const
virtual void _initialize_ ()
virtual void _reset_ ()
virtual void _advance_ (int nSteps=1)

Public Member Functions

int mpi_rank ()
 Return the MPI rank of the calling node.
int mpi_size ()
 Return the size of the used MPI communicator.
unsigned nSpikeMessage ()
unsigned nAnalogMessages ()
const SimParametersimParameter ()
RandomEnginegetMainConstructRNGEngine ()
std::vector< RandomEngine * > & getIncomingConstructRNGEngines ()
std::vector< RandomEngine * > & getOutgoingConstructRNGEngines ()
RandomEnginegetObjectVariationRNDEngine ()
void seed (uint32 noiseRNGseed)
virtual gl_engineid_t maxLocalEngineID (void) const
 Return the largest local simulation engine ID.
Construction / Destruction
 SimNetwork (MPI::Intracomm &mpiCommunicator, SimParameter sp, DistributionStrategy::DistributionFunction *df)
virtual ~SimNetwork ()
Adding many new objects at once
SimObject::ID::Vector create (SimObjectFactory const &model, std::vector< SimEngine::ID > const &engines)
 Several instances of a simulation object are created and added to the network at the specified simulation engines.
SimObject::ID::Vector add (SimObjectFactory const &model, std::vector< SimEngine::ID > const &engines)
SimObject::ID::Vector create (SimObjectFactory const &model, unsigned const n)
 Several instances of a simulation object are created and added to the network using the current distribution strategy.
SimObject::ID::Vector add (SimObjectFactory const &model, unsigned const n)
 Several instances of a simulation object are created and added to the network using the current distribution strategy.
void setDistributionStrategy (DistributionStrategy::DistributionFunction *distFunc)
 Define the dsitribution strategy used for the next objects to add.
One to one connections from specified output port to a specified input port
void connect (const SimObject::ID &src, const port_t out, const SimObject::ID &dst, const port_t in, const Time &delay)
 Make a connection where the type of connection (spike or analog) is determined (guessed) automatically.
void connect (const SimObject::ID::Packed &src, const port_t out, const SimObject::ID::Packed &dst, const port_t in, const Time &delay)
 Make a connection where the type of connection (spike or analog) is determined (guessed) automatically.
void connect (const SimObject::ID &src, const port_t out, const SimObject::ID &dst, const port_t in)
 Make a connection where the amount of delay is given by the receiving object.
void connect (const SimObject::ID::Packed &src, const port_t out, const SimObject::ID::Packed &dst, const port_t in)
 Make a connection where the amount of delay is given by the receiving object.
One to one analog connections from specified output port/field to a specified input port/field
void connect (const SimObject::ID &src, const port_t out, const SimObject::ID &dst, const string in, const Time &delay)
 Make an analog connection with a specified delay and specified input and output ports/fields.
void connect (const SimObject::ID::Packed &src, const port_t out, const SimObject::ID::Packed &dst, const string in, const Time &delay)
 Make an analog connection with a specified delay and specified input and output ports/fields.
void connect (const SimObject::ID &src, const string out, const SimObject::ID &dst, const port_t in, const Time &delay)
 Make an analog connection with a specified delay and specified input and output ports/fields.
void connect (const SimObject::ID::Packed &src, const string out, const SimObject::ID::Packed &dst, const port_t in, const Time &delay)
 Make an analog connection with a specified delay and specified input and output ports/fields.
void connect (const SimObject::ID &src, const string out, const SimObject::ID &dst, const string in, const Time &delay)
 Make an analog connection with a specified delay and specified input and output ports/fields.
void connect (const SimObject::ID::Packed &src, const string out, const SimObject::ID::Packed &dst, const string in, const Time &delay)
 Make an analog connection with a specified delay and specified input and output ports/fields.
One to one connections between objects using default ports (i.e. in == out == 0).
void connect (const SimObject::ID &src, const SimObject::ID &dst, const Time &delay)
 Make a connection using the default porst; i.e. in = out = 0.
void connect (const SimObject::ID::Packed &src, const SimObject::ID::Packed &dst, const Time &delay)
 Make a connection using the default porst; i.e. in = out = 0.
void connect (const SimObject::ID &src, const SimObject::ID &dst)
 Make a connection using the default porst; i.e. in = out = 0.
void connect (const SimObject::ID::Packed &src, const SimObject::ID::Packed &dst)
 Make a connection using the default porst; i.e. in = out = 0.
One to one connections between objects using a connector object model
void connect (const SimObject::ID &src, const SimObject::ID &dst, const SimObjectFactory &connObjFactory, SimObject::ID &connID)
 Make a connection between to objects using a connector object.
SimObject::ID connect (const SimObject::ID &src, const SimObject::ID &dst, const SimObjectFactory &connObjFactory)
 Make a connection between to objects using a connector object.
SimObject::ID::Packed connect (const SimObject::ID::Packed &src, const SimObject::ID::Packed &dst, const SimObjectFactory &connObjFactory)
 Make a connection between to objects using a connector object.
One to One connections between objects
unsigned connect (std::vector< SimObject::ID::Packed > const &src, std::vector< SimObject::ID::Packed > const &dst, const Time &delay)
 Connect each source object to each destination object using default ports and a specified delay.
Many to Many connections between objects
unsigned connect (std::vector< SimObject::ID::Packed > const &src, std::vector< SimObject::ID::Packed > const &dst, ConnectionIterator &decider)
 Connect each source object to each destination object using default ports and a connection decider.
Many to Many connections between objects using a connector object model
SimObject::ID::Vector connect (std::vector< SimObject::ID::Packed > const &src, std::vector< SimObject::ID::Packed > const &dst, const SimObjectFactory &model, ConnectionIterator &decider, bool collect=false)
 Connect each source object to each destination object using an individual instance of the specified model.
SimObject::ID::Vector connectFast (std::vector< SimObject::ID::Packed > const &sources, std::vector< SimObject::ID::Packed > const &destinations, const SimObjectFactory &model, ConnectionIterator &decider, bool collect=false)
Getting acces to objects
template<class T>
bool getObject (const SimObject::ID &id, T &p)
 Get a pointer to an object (if on the executing node).
template<class T>
bool getObject (const SimObject::ID::Packed &id, T &p)
 Get a pointer to an object (if on the executing node).
SimObjectobject (const SimObject::ID &id)
SimObjectobject (const SimObject::ID::Packed &id)
SimObjectgetObject (const SimObject::ID &id)

Protected Types

typedef LaggedFibonacci607 simRNGSeedGenerator_t

Protected Member Functions

virtual void _change_timestep_width_ (const Time &old_dt, const Time &new_dt)
virtual uint32 getUniqueSeedOverMpi (uint32 seed)
uint32 makeSeed (uint32 seed_or_negative)
virtual void seed_noise_rng (uint32 noiseRNGseed)
void fillSeedVector (uint32 noiseRNGseed, std::vector< uint32 > &sim_seeds)
uint32 getSeedFromGenerator ()
void setupConstructRNGEngines ()
Getting acces to objects
virtual SimObject_getObject_ (const SimObject::ID &id)

Protected Attributes

SimParameter simParam
DistributionStrategy::DistributionFunctiondistributionStrategy
 Function object which determines the current distribution strategy.
int _mpi_rank
 The mpi rank.
int _mpi_size
 The size of the MPI communicator in use.
bool initialized
 Flag which idicates whether initialize() has already been called or not.
bool reseted
 Flag which idicates whether reset() has already been called or not.
unsigned _nSpikeMessages
 Counter of in and outgoing spike messages.
unsigned _nAnalogMessages
 Counter of in and outgoing analog messages.
simRNGSeedGenerator_t simRNGSeedGenerator
RandomEngineconstructMainRNDEngine
 Random number generator engine.
RandomEngineobjectVariationRNDEngine
 Random number generator engine.
std::vector< RandomEngine * > constructIncomingRNGEngines
 std::vector of rng engines needed for synchronized distributed construction of the network
std::vector< RandomEngine * > constructOutgoingRNGEngines

Friends

class NoiseRandomEngineTest


Detailed Description

Definition at line 30 of file SimNetwork.h.


Member Typedef Documentation

Definition at line 509 of file SimNetwork.h.


Constructor & Destructor Documentation

SimNetwork::SimNetwork ( MPI::Intracomm &  mpiCommunicator,
SimParameter  sp,
DistributionStrategy::DistributionFunction df 
)

Definition at line 9 of file SimNetwork.cpp.

References PCSIM::init().

Here is the call graph for this function:

SimNetwork::~SimNetwork (  )  [virtual]


Member Function Documentation

void SimNetwork::addObject ( const SimObjectFactory model,
const SimEngine::ID engine,
SimObject::ID id 
) [inline]

One instance of a simulation object is created and added at specified simulation engine of the network.

Parameters:
model The model of the simobject to be created
engine Specifies the node and local engine where the object should be added to.
id The resulting unique identifier (node,engine,type,localid) of the created object.

Definition at line 52 of file SimNetwork.h.

References _addObject_().

Referenced by SingleThreadNetwork::_addObject_(), MultiThreadNetwork::_addObject_(), add(), and AugmentedSpatialPopulation::populate().

Here is the call graph for this function:

virtual void SimNetwork::_addObject_ ( const SimObjectFactory model,
const SimEngine::ID engine,
SimObject::ID id 
) [inline, protected, virtual]

One instance of a simulation object is created and added at specified simulation engine of the network.

Reimplemented in DistributedNetwork, MultiThreadNetwork, and SingleThreadNetwork.

Definition at line 59 of file SimNetwork.h.

Referenced by addObject().

void SimNetwork::addObject ( const SimObjectFactory model,
SimObject::ID id 
) [inline]

One instance of a simulation object is created and added to the network using the current distribution strategy.

Parameters:
model A model (factory) which specifis how the instance of the object to be added is created.
id The resulting unique identifier (node,engine,type,localid) of the created object.
See also:
setDistributionStrategy

Definition at line 70 of file SimNetwork.h.

References _addObject_().

Here is the call graph for this function:

virtual void SimNetwork::_addObject_ ( const SimObjectFactory model,
SimObject::ID id 
) [inline, protected, virtual]

One instance of a simulation object is created and added to the network using the current distribution strategy.

Reimplemented in DistributedNetwork, MultiThreadNetwork, and SingleThreadNetwork.

Definition at line 77 of file SimNetwork.h.

SimObject::ID::Packed SimNetwork::create ( const SimObjectFactory model,
const SimEngine::ID engine 
) [inline]

One instance of a simulation object is created and added at specified simulation engine of the network.

Definition at line 564 of file SimNetwork.h.

Referenced by record().

SimObject::ID::Packed SimNetwork::add ( const SimObjectFactory model,
const SimEngine::ID engine 
) [inline]

Parameters:
model A simulation object model (factory) which specifies how the new instance is created
engine Specify the simulation engine (node, local engine ID) to which the object should be assigned
Returns:
Compact representation of the unique object ID which contains node, engine, type, and local id.

Definition at line 542 of file SimNetwork.h.

Referenced by SimObjectPopulation::SimObjectPopulation().

SimObject::ID::Packed SimNetwork::create ( const SimObjectFactory model  )  [inline]

One instance of a simulation object is created and added to the network using the current distribution strategy.

Definition at line 570 of file SimNetwork.h.

SimObject::ID::Packed SimNetwork::add ( const SimObjectFactory model  )  [inline]

Parameters:
model A simulation object model (factory) which specifies how the new instance is created
Returns:
Compact representation of the unique object ID which contains node, engine, type, and local id.
See also:
setDistributionStrategy

Definition at line 555 of file SimNetwork.h.

void SimNetwork::mount ( const SimObjectFactory model,
const SimObject::ID mountpoint,
SimObject::ID gid 
) [inline]

One instance of a simulation object is created and "mounted" to the mount simulation object.

Definition at line 588 of file SimNetwork.h.

References _mount_().

Referenced by mount().

Here is the call graph for this function:

SimObject::ID::Packed SimNetwork::mount ( const SimObjectFactory model,
const SimObject::ID mountpoint 
) [inline]

One instance of a simulation object is created and "mounted" to the mount simulation object.

Parameters:
model A simulation object model (factory) which specifies how the new instance is created
mountpoint Specify the simulation object to which the object should be "mounted"
Returns:
Compact representation of the unique object ID which contains node, engine, type, and local id.

Definition at line 599 of file SimNetwork.h.

References mount().

Here is the call graph for this function:

SimObject::ID::Packed SimNetwork::mount ( const SimObjectFactory model,
const SimObject::ID::Packed mountpoint 
) [inline]

One instance of a simulation object is created and "mounted" to the mount simulation object.

Parameters:
model A simulation object model (factory) which specifies how the new instance is created
mountpoint Specify the simulation object to which the object should be "mounted"
Returns:
Compact representation of the unique object ID which contains node, engine, type, and local id.

Definition at line 611 of file SimNetwork.h.

References mount().

Here is the call graph for this function:

SimObject::ID::Vector SimNetwork::mount ( const SimObjectFactory model,
std::vector< SimObject::ID::Packed > const &  mountpoints,
bool  collect = false 
)

One instance of a simulation object is created and "mounted" to the mount simulation object.

virtual void SimNetwork::_mount_ ( const SimObjectFactory model,
const SimObject::ID mountpoint,
SimObject::ID gid 
) [inline, protected, virtual]

One instance of a simulation object is created and "mounted" to the mount simulation object.

Parameters:
model A model (factory) which specifis how the instance of the object to be added is created.
id The resulting unique identifier (node,engine,type,localid) of the created object.

Reimplemented in DistributedNetwork, MultiThreadNetwork, and SingleThreadNetwork.

Definition at line 120 of file SimNetwork.h.

Referenced by mount().

void SimNetwork::insert ( const SimObjectFactory model,
const SimObject::ID container,
SimObject::ID gid 
) [inline]

One instance of a simulation object is created and "inserted" into the container simulation object.

Definition at line 618 of file SimNetwork.h.

References _insert_().

Referenced by insert().

Here is the call graph for this function:

SimObject::ID::Packed SimNetwork::insert ( const SimObjectFactory model,
const SimObject::ID container 
) [inline]

One instance of a simulation object is created and "inserted" to the mount simulation object.

Parameters:
model A simulation object model (factory) which specifies how the new instance is created
container Specify the simulation object to which the object should be "inserted"
Returns:
Compact representation of the unique object ID which contains node, engine, type, and local id.

Definition at line 628 of file SimNetwork.h.

References insert().

Here is the call graph for this function:

SimObject::ID::Packed SimNetwork::insert ( const SimObjectFactory model,
const SimObject::ID::Packed container 
) [inline]

One instance of a simulation object is created and "inserted" to the mount simulation object.

Parameters:
model A simulation object model (factory) which specifies how the new instance is created
container Specify the simulation object to which the object should be "inserted"
Returns:
Compact representation of the unique object ID which contains node, engine, type, and local id.

Definition at line 640 of file SimNetwork.h.

References insert().

Here is the call graph for this function:

virtual void SimNetwork::_insert_ ( const SimObjectFactory model,
const SimObject::ID container,
SimObject::ID gid 
) [inline, protected, virtual]

One instance of a simulation object is created and "inserted" into the container simulation object.

Parameters:
model A model (factory) which specifis how the instance of the object to be added is created.
id The resulting unique identifier (node,engine,type,localid) of the created object.

Reimplemented in DistributedNetwork, MultiThreadNetwork, and SingleThreadNetwork.

Definition at line 144 of file SimNetwork.h.

Referenced by connect(), and insert().

SimObject::ID::Vector SimNetwork::create ( SimObjectFactory const &  model,
std::vector< SimEngine::ID > const &  engines 
) [inline]

Several instances of a simulation object are created and added to the network at the specified simulation engines.

Definition at line 576 of file SimNetwork.h.

SimObject::ID::Vector SimNetwork::add ( SimObjectFactory const &  model,
std::vector< SimEngine::ID > const &  engines 
)

SimObject::ID::Vector SimNetwork::create ( SimObjectFactory const &  model,
unsigned const   n 
) [inline]

Several instances of a simulation object are created and added to the network using the current distribution strategy.

Definition at line 582 of file SimNetwork.h.

SimObject::ID::Vector SimNetwork::add ( SimObjectFactory const &  model,
unsigned const   n 
)

Several instances of a simulation object are created and added to the network using the current distribution strategy.

Parameters:
model Simulationobjct model (factory) which determines how the object should be created an initialized
n Number of instances to create and add.
Returns:
Vector of compact object identifiers.

Definition at line 59 of file SimNetwork.cpp.

References addObject().

Here is the call graph for this function:

void SimNetwork::setDistributionStrategy ( DistributionStrategy::DistributionFunction distFunc  )  [inline]

Define the dsitribution strategy used for the next objects to add.

Parameters:
distFunc A function object which gets a pointer to the used DistributedNetwork and returns a global engine ID.
See also:
addObject

Definition at line 652 of file SimNetwork.h.

References distributionStrategy.

void SimNetwork::connect ( const SimObject::ID src,
const port_t  out,
const SimObject::ID dst,
const port_t  in,
const Time delay 
) [inline]

Make a connection where the type of connection (spike or analog) is determined (guessed) automatically.

Parameters:
src The sending object
out The output port number of the sending object
dst The receiving object
in The input port number of the receiving object
delay Specifies how much the message should be delayed

Definition at line 665 of file SimNetwork.h.

References _connect_(), get_dt(), and Time::in_steps().

Referenced by connect(), SimpleAllToAllWiringMethod::connect(), OneToOneWiringMethod::connect(), DistributedSyncWiringMethod::connect(), and record().

Here is the call graph for this function:

void SimNetwork::connect ( const SimObject::ID::Packed src,
const port_t  out,
const SimObject::ID::Packed dst,
const port_t  in,
const Time delay 
) [inline]

Make a connection where the type of connection (spike or analog) is determined (guessed) automatically.

Parameters:
src The sending object
out The output port number of the sending object
dst The receiving object
in The input port number of the receiving object
delay Specifies how much the message should be delayed

Definition at line 678 of file SimNetwork.h.

References _connect_(), get_dt(), and Time::in_steps().

Here is the call graph for this function:

void SimNetwork::connect ( const SimObject::ID src,
const port_t  out,
const SimObject::ID dst,
const port_t  in 
) [inline]

Make a connection where the amount of delay is given by the receiving object.

The delay is given by the method managedDelay() of the receiving object.

Parameters:
src The sending object
out The output port number of the sending object
dst The receiving object
in The input port number of the receiving object

Definition at line 690 of file SimNetwork.h.

References _connect_().

Here is the call graph for this function:

void SimNetwork::connect ( const SimObject::ID::Packed src,
const port_t  out,
const SimObject::ID::Packed dst,
const port_t  in 
) [inline]

Make a connection where the amount of delay is given by the receiving object.

The delay is given by the method managedDelay() of the receiving object.

Parameters:
src The sending object
out The output port number of the sending object
dst The receiving object
in The input port number of the receiving object

Definition at line 702 of file SimNetwork.h.

References _connect_().

Here is the call graph for this function:

void SimNetwork::connect ( const SimObject::ID src,
const port_t  out,
const SimObject::ID dest,
const string  in,
const Time delay 
) [inline]

Make an analog connection with a specified delay and specified input and output ports/fields.

Parameters:
src The sending object
out The output port number of the sending object
dst The receiving object
in The input field name of the receiving object
delay Specifies how much the message should be delayed

Definition at line 802 of file SimNetwork.h.

References addAnalogMessage().

Here is the call graph for this function:

void SimNetwork::connect ( const SimObject::ID::Packed src,
const port_t  out,
const SimObject::ID::Packed dest,
const string  in,
const Time delay 
) [inline]

Make an analog connection with a specified delay and specified input and output ports/fields.

Parameters:
src The sending object
out The output port number of the sending object
dst The receiving object
in The input field name of the receiving object
delay Specifies how much the message should be delayed

Definition at line 815 of file SimNetwork.h.

References addAnalogMessage().

Here is the call graph for this function:

void SimNetwork::connect ( const SimObject::ID src,
const string  out,
const SimObject::ID dest,
const port_t  in,
const Time delay 
) [inline]

Make an analog connection with a specified delay and specified input and output ports/fields.

Parameters:
src The sending object
out The output field name of the sending object
dst The receiving object
in The input port number of the receiving object
delay Specifies how much the message should be delayed

Definition at line 828 of file SimNetwork.h.

References addAnalogMessage().

Here is the call graph for this function:

void SimNetwork::connect ( const SimObject::ID::Packed src,
const string  out,
const SimObject::ID::Packed dest,
const port_t  in,
const Time delay 
) [inline]

Make an analog connection with a specified delay and specified input and output ports/fields.

Parameters:
src The sending object
out The output field name of the sending object
dst The receiving object
in The input port number of the receiving object
delay Specifies how much the message should be delayed

Definition at line 841 of file SimNetwork.h.

References addAnalogMessage().

Here is the call graph for this function:

void SimNetwork::connect ( const SimObject::ID src,
const string  out,
const SimObject::ID dest,
const string  in,
const Time delay 
) [inline]

Make an analog connection with a specified delay and specified input and output ports/fields.

Parameters:
src The sending object
out The output field name of the sending object
dst The receiving object
in The input field name of the receiving object
delay Specifies how much the message should be delayed

Definition at line 854 of file SimNetwork.h.

References addAnalogMessage().

Here is the call graph for this function:

void SimNetwork::connect ( const SimObject::ID::Packed src,
const string  out,
const SimObject::ID::Packed dest,
const string  in,
const Time delay 
) [inline]

Make an analog connection with a specified delay and specified input and output ports/fields.

Parameters:
src The sending object
out The output field name of the sending object
dst The receiving object
in The input field name of the receiving object
delay Specifies how much the message should be delayed

Definition at line 867 of file SimNetwork.h.

References addAnalogMessage().

Here is the call graph for this function:

void SimNetwork::connect ( const SimObject::ID src,
const SimObject::ID dst,
const Time delay 
) [inline]

Make a connection using the default porst; i.e. in = out = 0.

Definition at line 713 of file SimNetwork.h.

References _connect_(), get_dt(), and Time::in_steps().

Here is the call graph for this function:

void SimNetwork::connect ( const SimObject::ID::Packed src,
const SimObject::ID::Packed dst,
const Time delay 
) [inline]

Make a connection using the default porst; i.e. in = out = 0.

Definition at line 724 of file SimNetwork.h.

References _connect_(), get_dt(), and Time::in_steps().

Here is the call graph for this function:

void SimNetwork::connect ( const SimObject::ID src,
const SimObject::ID dst 
) [inline]

Make a connection using the default porst; i.e. in = out = 0.

The delay is given by the method managedDelay() of the receiving object.

Parameters:
src The sending object
dst The receiving object

Definition at line 734 of file SimNetwork.h.

References _connect_().

Here is the call graph for this function:

void SimNetwork::connect ( const SimObject::ID::Packed src,
const SimObject::ID::Packed dst 
) [inline]

Make a connection using the default porst; i.e. in = out = 0.

The delay is given by the method managedDelay() of the receiving object.

Parameters:
src The sending object
dst The receiving object

Definition at line 744 of file SimNetwork.h.

References _connect_().

Here is the call graph for this function:

void SimNetwork::connect ( const SimObject::ID src,
const SimObject::ID dst,
const SimObjectFactory connector,
SimObject::ID connID 
) [inline]

Make a connection between to objects using a connector object.

The delay is given by the method managedDelay() of the connector object. The default ports in = out = 0 are used.

Parameters:
src The sending object
dst The receiving object
connector A model (factory) which describes how the connector object is created
connID The resulting unique identifier (node,engine,type,localid) of the created object.

Definition at line 757 of file SimNetwork.h.

References _connect_(), and _insert_().

Here is the call graph for this function:

SimObject::ID SimNetwork::connect ( const SimObject::ID src,
const SimObject::ID dst,
const SimObjectFactory connector 
) [inline]

Make a connection between to objects using a connector object.

The delay is given by the method managedDelay() of the connector object. The default ports in = out = 0 are used.

Parameters:
src The sending object
dst The receiving object
connector A model (factory) which describes how the connector object is created
Returns:
Compact Resulting unique identifier (node,engine,type,localid) of the created object.

Definition at line 771 of file SimNetwork.h.

References connect().

Here is the call graph for this function:

SimObject::ID::Packed SimNetwork::connect ( const SimObject::ID::Packed src,
const SimObject::ID::Packed dst,
const SimObjectFactory connector 
) [inline]

Make a connection between to objects using a connector object.

The delay is given by the method managedDelay() of the connector object. The default ports in = out = 0 are used.

Parameters:
src The sending object
dst The receiving object
connector A model (factory) which describes how the connector object is created
Returns:
Compact representation of the resulting unique identifier (node,engine,type,localid) of the created object.

Definition at line 786 of file SimNetwork.h.

References connect().

Here is the call graph for this function:

unsigned SimNetwork::connect ( std::vector< SimObject::ID::Packed > const &  src,
std::vector< SimObject::ID::Packed > const &  dst,
const Time delay 
)

Connect each source object to each destination object using default ports and a specified delay.

unsigned SimNetwork::connect ( std::vector< SimObject::ID::Packed > const &  src,
std::vector< SimObject::ID::Packed > const &  dst,
ConnectionIterator decider 
)

Connect each source object to each destination object using default ports and a connection decider.

SimObject::ID::Vector SimNetwork::connect ( std::vector< SimObject::ID::Packed > const &  src,
std::vector< SimObject::ID::Packed > const &  dst,
const SimObjectFactory model,
ConnectionIterator decider,
bool  collect = false 
)

Connect each source object to each destination object using an individual instance of the specified model.

SimObject::ID::Vector SimNetwork::connectFast ( std::vector< SimObject::ID::Packed > const &  sources,
std::vector< SimObject::ID::Packed > const &  destinations,
const SimObjectFactory model,
ConnectionIterator decider,
bool  collect = false 
)

SimObject::ID::Packed SimNetwork::record ( const SimObject::ID::Packed obj,
const SimObjectFactory recFactory,
const port_t  rec_port = 0 
) [inline]

Record values from port 0 of an object. Creates a recorder in the same SingleThreadEngine as the object and makes a connection without a delay.

Parameters:
obj ID of The recorded object
recFactory The factory used to create the recorder
rec_port The input port of the recorder where the recorded values arrive
Returns:
ID of the created recorder

Definition at line 897 of file SimNetwork.h.

Referenced by SimObjectPopulation::record().

SimObject::ID::Packed SimNetwork::record ( const SimObject::ID::Packed obj,
const port_t  src_port,
const SimObjectFactory recFactory,
const port_t  rec_port = 0 
) [inline]

Record values from a specific port of an object. Creates a recorder in the same SingleThreadEngine as the object and makes a connection without a delay.

Parameters:
obj ID of the recorded object
src_port The output port that is recorded
recFactory The factory used to create the recorder
rec_port The input port of the recorder where the recorded values arrive
Returns:
ID of the created recorder

Definition at line 881 of file SimNetwork.h.

References connect(), create(), SimObject::ID::eng, SimObject::ID::node, and Time::sec().

Here is the call graph for this function:

SimObject::ID::Packed SimNetwork::record ( const SimObject::ID::Packed obj,
const string  field,
const SimObjectFactory recFactory,
const port_t  rec_port = 0 
) [inline]

Record values from a specified field of an object. Creates a recorder in the same SingleThreadEngine as the object and makes a connection without a delay.

Parameters:
obj ID of the recorded object
field The name of the recorded field
recFactory The factory used to create the recorder
rec_port The input port of the recorder where the recorded values arrive
Returns:
ID of the created recorder

Definition at line 913 of file SimNetwork.h.

References connect(), create(), SimObject::ID::eng, SimObject::ID::node, and Time::sec().

Here is the call graph for this function:

virtual void SimNetwork::_connect_ ( SimObject::ID const &  src,
port_t  out,
const SimObject::ID dst,
port_t  in,
int  delay 
) [inline, protected, virtual]

Make a connection where the type of connection (spike or analog) is determined (guessed) automatically.

Parameters:
src The sending object
out The output port number of the sending object
dst The receiving object
in The input port number of the receiving object
delay Specifies how much simulation time steps the message should be delayed. If delay < 0 then the value returned by the destination objects getManagedDelay() method is used. If a positive value is specified this value overwrites the dstobj.getManagedDelay() value.

Reimplemented in DistributedNetwork, MultiThreadNetwork, and SingleThreadNetwork.

Definition at line 257 of file SimNetwork.h.

Referenced by connect().

void SimNetwork::addSpikeMessage ( const SimObject::ID sender,
const port_t  out,
const SimObject::ID receiver,
const port_t  in,
const Time delay 
) [inline]

void SimNetwork::addAnalogMessage ( const SimObject::ID sender,
int  sender_port,
const SimObject::ID receiver,
int  recv_port,
const Time delay 
) [inline]

Definition at line 274 of file SimNetwork.h.

References _addAnalogMessage_().

Referenced by SingleThreadNetwork::_connect_(), MultiThreadNetwork::_connect_(), DistributedNetwork::_connect_(), and connect().

Here is the call graph for this function:

void SimNetwork::addAnalogMessage ( const SimObject::ID sender,
int  sender_port,
const SimObject::ID receiver,
string  destfield,
const Time delay 
) [inline]

Definition at line 279 of file SimNetwork.h.

References _addAnalogMessage_().

Here is the call graph for this function:

void SimNetwork::addAnalogMessage ( const SimObject::ID sender,
string  srcfield,
const SimObject::ID receiver,
int  recv_port,
const Time delay 
) [inline]

Definition at line 284 of file SimNetwork.h.

References _addAnalogMessage_().

Here is the call graph for this function:

void SimNetwork::addAnalogMessage ( const SimObject::ID sender,
string  srcfield,
const SimObject::ID receiver,
string  destfield,
const Time delay 
) [inline]

Definition at line 289 of file SimNetwork.h.

References _addAnalogMessage_().

Here is the call graph for this function:

virtual void SimNetwork::_addSpikeMessage_ ( const SimObject::ID sender,
const port_t  out,
const SimObject::ID receiver,
const port_t  in,
const Time delay 
) [inline, protected, virtual]

Set up a spike message channel with a given delay.

Reimplemented in DistributedNetwork, MultiThreadNetwork, and SingleThreadNetwork.

Definition at line 297 of file SimNetwork.h.

Referenced by addSpikeMessage().

virtual void SimNetwork::_addAnalogMessage_ ( const SimObject::ID sender,
int  sender_port,
const SimObject::ID receiver,
int  recv_port,
const Time delay 
) [inline, protected, virtual]

virtual void SimNetwork::_addAnalogMessage_ ( const SimObject::ID sender,
int  sender_port,
const SimObject::ID receiver,
string  destfield,
const Time delay 
) [inline, protected, virtual]

virtual void SimNetwork::_addAnalogMessage_ ( const SimObject::ID sender,
string  srcfield,
const SimObject::ID receiver,
int  recv_port,
const Time delay 
) [inline, protected, virtual]

virtual void SimNetwork::_addAnalogMessage_ ( const SimObject::ID sender,
string  srcfield,
const SimObject::ID receiver,
string  destfield,
const Time delay 
) [inline, protected, virtual]

template<class T>
bool SimNetwork::getObject ( const SimObject::ID id,
T &  p 
) [inline]

Get a pointer to an object (if on the executing node).

Definition at line 943 of file SimNetwork.h.

References _getObject_().

Referenced by SimObjectPopulation::setFieldScale().

Here is the call graph for this function:

template<class T>
bool SimNetwork::getObject ( const SimObject::ID::Packed id,
T &  p 
) [inline]

Get a pointer to an object (if on the executing node).

Definition at line 950 of file SimNetwork.h.

References _getObject_().

Here is the call graph for this function:

SimObject * SimNetwork::object ( const SimObject::ID id  )  [inline]

Definition at line 961 of file SimNetwork.h.

References _getObject_().

Referenced by SimObjectPopulation::object(), and ConnectionsProjection::object().

Here is the call graph for this function:

SimObject * SimNetwork::object ( const SimObject::ID::Packed id  )  [inline]

Definition at line 956 of file SimNetwork.h.

References _getObject_().

Here is the call graph for this function:

SimObject* SimNetwork::getObject ( const SimObject::ID id  )  [inline]

Definition at line 332 of file SimNetwork.h.

References _getObject_().

Here is the call graph for this function:

virtual SimObject* SimNetwork::_getObject_ ( const SimObject::ID id  )  [inline, protected, virtual]

void SimNetwork::initialize (  )  [inline]

Initialize the network for forthcoming simulation. Should be called after construction and before simulation.

Definition at line 354 of file SimNetwork.h.

References _initialize_().

Referenced by DistributedMultiThreadNetwork::_initialize_(), SingleThreadNetwork::_reset_(), MultiThreadNetwork::_reset_(), DistributedSingleThreadNetwork::_reset_(), and DistributedMultiThreadNetwork::_reset_().

Here is the call graph for this function:

virtual void SimNetwork::_initialize_ (  )  [inline, protected, virtual]

void SimNetwork::reset (  )  [inline]

virtual void SimNetwork::_reset_ (  )  [inline, protected, virtual]

void SimNetwork::advance ( int  nSteps = 1  )  [inline]

Definition at line 380 of file SimNetwork.h.

References _advance_().

Here is the call graph for this function:

void SimNetwork::simulate ( const Time T  )  [inline]

Definition at line 385 of file SimNetwork.h.

References _advance_(), get_dt(), and Time::in_steps().

Here is the call graph for this function:

void SimNetwork::simulate ( double  T  )  [inline]

Definition at line 390 of file SimNetwork.h.

References _advance_(), and get_dt().

Here is the call graph for this function:

virtual void SimNetwork::_advance_ ( int  nSteps = 1  )  [inline, protected, virtual]

void SimNetwork::set_dt ( const Time dt  )  [inline]

Definition at line 922 of file SimNetwork.h.

References _change_timestep_width_(), _nAnalogMessages, _nSpikeMessages, SimParameter::dt, reset(), and simParam.

Here is the call graph for this function:

Time SimNetwork::get_dt (  )  const [inline]

int SimNetwork::mpi_rank (  )  [inline]

int SimNetwork::mpi_size (  )  [inline]

Return the size of the used MPI communicator.

Definition at line 417 of file SimNetwork.h.

References _mpi_size.

Referenced by DistributedNetwork::seed_noise_rng().

unsigned SimNetwork::nSpikeMessage (  )  [inline]

Definition at line 422 of file SimNetwork.h.

References _nSpikeMessages.

unsigned SimNetwork::nAnalogMessages (  )  [inline]

Definition at line 427 of file SimNetwork.h.

References _nAnalogMessages.

const SimParameter& SimNetwork::simParameter (  )  [inline]

RandomEngine* SimNetwork::getMainConstructRNGEngine (  )  [inline]

std::vector< RandomEngine* >& SimNetwork::getIncomingConstructRNGEngines (  )  [inline]

Definition at line 442 of file SimNetwork.h.

References constructIncomingRNGEngines.

Referenced by DistributedSyncWiringMethod::connect().

std::vector< RandomEngine* >& SimNetwork::getOutgoingConstructRNGEngines (  )  [inline]

Definition at line 447 of file SimNetwork.h.

References constructOutgoingRNGEngines.

Referenced by DistributedSyncWiringMethod::connect().

RandomEngine* SimNetwork::getObjectVariationRNDEngine (  )  [inline]

Definition at line 452 of file SimNetwork.h.

References objectVariationRNDEngine.

Referenced by SingleThreadSimEngine::addObject().

void SimNetwork::seed ( uint32  noiseRNGseed  )  [inline]

Definition at line 457 of file SimNetwork.h.

References seed_noise_rng().

Referenced by makeSeed(), and DistributedNetwork::seed_noise_rng().

Here is the call graph for this function:

virtual gl_engineid_t SimNetwork::maxLocalEngineID ( void   )  const [inline, virtual]

virtual void SimNetwork::_change_timestep_width_ ( const Time old_dt,
const Time new_dt 
) [inline, protected, virtual]

Definition at line 471 of file SimNetwork.h.

Referenced by set_dt().

uint32 SimNetwork::getUniqueSeedOverMpi ( uint32  seed  )  [protected, virtual]

Reimplemented in DistributedNetwork.

Definition at line 133 of file SimNetwork.cpp.

Referenced by setupConstructRNGEngines().

uint32 SimNetwork::makeSeed ( uint32  seed_or_negative  )  [protected]

virtual void SimNetwork::seed_noise_rng ( uint32  noiseRNGseed  )  [inline, protected, virtual]

Reimplemented in DistributedNetwork, MultiThreadNetwork, and SingleThreadNetwork.

Definition at line 503 of file SimNetwork.h.

Referenced by seed().

void SimNetwork::fillSeedVector ( uint32  noiseRNGseed,
std::vector< uint32 > &  sim_seeds 
) [protected]

uint32 SimNetwork::getSeedFromGenerator (  )  [protected]

Definition at line 161 of file SimNetwork.cpp.

References RandomEngine::max(), RandomEngine::min(), and simRNGSeedGenerator.

Referenced by setupConstructRNGEngines().

Here is the call graph for this function:

void SimNetwork::setupConstructRNGEngines (  )  [protected]


Friends And Related Function Documentation

friend class NoiseRandomEngineTest [friend]

Reimplemented in DistributedMultiThreadNetwork.

Definition at line 526 of file SimNetwork.h.


Member Data Documentation

Function object which determines the current distribution strategy.

Definition at line 479 of file SimNetwork.h.

Referenced by DistributedNetwork::_addObject_(), and setDistributionStrategy().

The size of the MPI communicator in use.

Definition at line 485 of file SimNetwork.h.

Referenced by mpi_size(), and setupConstructRNGEngines().

unsigned SimNetwork::_nSpikeMessages [protected]

unsigned SimNetwork::_nAnalogMessages [protected]

Counter of in and outgoing analog messages.

Definition at line 497 of file SimNetwork.h.

Referenced by SingleThreadNetwork::_addAnalogMessage_(), MultiThreadNetwork::_addAnalogMessage_(), nAnalogMessages(), and set_dt().

Definition at line 510 of file SimNetwork.h.

Referenced by getSeedFromGenerator(), and setupConstructRNGEngines().

Random number generator engine.

Definition at line 516 of file SimNetwork.h.

Referenced by getMainConstructRNGEngine(), setupConstructRNGEngines(), and ~SimNetwork().

std::vector of rng engines needed for synchronized distributed construction of the network

Definition at line 522 of file SimNetwork.h.

Referenced by getIncomingConstructRNGEngines(), setupConstructRNGEngines(), and ~SimNetwork().


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

Generated on Wed Jul 9 16:34:53 2008 for PCSIM by  doxygen 1.5.5