matplotlib

This Page

simx.core.core module

SimX Classes and Functions Exported from C++

class simx.core.core.Entity

Bases: Boost.Python.instance

get_now((Entity)arg1) → int :

Returns the current simulation time. Note that this is the simulation time local to the logical process on which this entity lives.

class simx.core.core.EntityData((object)arg1)

Bases: Boost.Python.instance

data_
id_
profile_
profile_id_
type_
class simx.core.core.EntityID

Bases: Boost.Python.instance

simx internal EntityID type

class simx.core.core.EntityInput((object)arg1)

Bases: Boost.Python.instance

data_

returns the data object associated with this input object

get_profile((EntityInput)arg1) → dict :

Returns profile object associated with this input object

load_services((EntityInput)arg1, (dict)arg2) → None :

loads services specified in this input object

class simx.core.core.InfoData((object)arg1, (int)arg2, (tuple)arg3, (int)arg4, (int)arg5, (int)arg6, (dict)arg7, (object)arg8)

Bases: Boost.Python.instance

class simx.core.core.LP

Bases: Boost.Python.instance

get_id((LP)arg1) → int
get_now((LP)arg1) → int
class simx.core.core.PyEntity((object)arg1, (EntityID)arg2, (LP)arg3, (EntityInput)arg4, (object)arg5)

Bases: simx.core.core.Entity

Python Entity Class PyEntity(EntityID, LP, EntityInput)

EntityID : id of the Entity being constructed (a python tuple) LP : Reference to the logical process in which this entity lives EntityInput : Input passed to the entity at construction time
create_services((PyEntity)arg1, (EntityInput)arg2) → None :

Creates services specified in EntityInput on PyEntity

get_id((PyEntity)arg1) → tuple :

Returns Entity ID

get_service((PyEntity)arg1, (int)arg2) → object :

Returns service object residing at the given service address

install_service(service, address, profile=None, data=None)

A method of PyEntity. Installs the service at the given address with the given profile(optional) and data(optional) on this this entity.

print_address((PyEntity)arg1) → None :

Prints memory address of C++ PyEntity object

send_info((PyEntity)arg1, (object)arg2, (int)arg3, (tuple)arg4, (int)arg5) → None :

schedules a message(info) to be sent after ‘delay’ time units to ‘dest_entity’ Message will be handled by service living at address given by ‘dest_service’

class simx.core.core.PyService((object)arg1, (ServiceName)arg2, (PyEntity)arg3, (ServiceInput)arg4, (object)arg5)

Bases: simx.core.core.Service

get_entity((PyService)arg1) → PyEntity
get_entity_id((PyService)arg1) → tuple
print_i((PyService)arg1) → None
send_info((PyService)arg1, (object)arg2, (int)arg3, (tuple)arg4, (int)arg5) → None
class simx.core.core.Service

Bases: Boost.Python.instance

get_name((Service)arg1) → str :

Returns name string of Service object

get_now((Service)arg1) → int :

Returns current simulation time. Note that this is the simulation time local to the logical process on which this service lives.

get_random((Service)arg1) → TRandom :

Returns the random number object associated with this Service

class simx.core.core.ServiceAddress

Bases: Boost.Python.enum

names = {}
values = {}
class simx.core.core.ServiceData((object)arg1)

Bases: Boost.Python.instance

data_
name_
profile_
profile_id_
type_
class simx.core.core.ServiceInput((object)arg1)

Bases: Boost.Python.instance

data_
get_profile((ServiceInput)arg1) → dict :

Gets profile object associated with this input object

class simx.core.core.ServiceName

Bases: Boost.Python.instance

class simx.core.core.SimPhase

Bases: Boost.Python.enum

PHASE_INIT = simx.core.core.SimPhase.PHASE_INIT
PHASE_RUN = simx.core.core.SimPhase.PHASE_RUN
PHASE_WRAPUP = simx.core.core.SimPhase.PHASE_WRAPUP
names = {'PHASE_INIT': simx.core.core.SimPhase.PHASE_INIT, 'PHASE_RUN': simx.core.core.SimPhase.PHASE_RUN, 'PHASE_WRAPUP': simx.core.core.SimPhase.PHASE_WRAPUP}
values = {0: simx.core.core.SimPhase.PHASE_INIT, 1: simx.core.core.SimPhase.PHASE_RUN, 2: simx.core.core.SimPhase.PHASE_WRAPUP}
class simx.core.core.TRandom

Bases: Boost.Python.instance

get_beta((TRandom)arg1, (float)beta, (float)gamma) → float :

Return beta distributed double in range [0, 1). Parameters are alpha and beta shape parameters.

get_cauchy((TRandom)arg1, (float)scale, (float)location) → float :

Returns a Cauchy distributed double with scale and location as parameters

get_exponential((TRandom)arg1, (float)mean) → float :

Return exponentially distributed double in range [0, infinity). Parameter is the mean.

get_gamma((TRandom)arg1, (float)alpha, (float)beta) → float :

Return gamma distributed double in range [0, infinity)

get_lognormal((TRandom)arg1, (float)meanlog, (float)stdlog) → float :

Return log-normally distributed double in range (0, infinity). Parameters are mean and standard deviation on logarithmic scale (mean and sd of the underlining normal distr).

get_normal((TRandom)arg1, (float)mean, (float)std) → float :

Return normally distributed double in range (-infinity, infinity). Parameters are mean and standard deviation.

get_num_streams() → int :

Returns the number of random streams

get_seed() → int :

Returns the value of the random seed

get_triangular((TRandom)arg1, (float)min, (float)max, (float)mode) → float :

Return a triangularly distributed double in range [min, max]. Parameters are minimum, maximum and mode.

get_uniform((TRandom)arg1[, (float)arg2[, (float)arg3]]) → float

get_uniform( (TRandom)arg1, (int)arg2, (int)arg3) -> int

get_uniform( (TRandom)arg1, (int)arg2, (int)arg3) -> int

get_weibull((TRandom)arg1, (float)alpha, (float)gamma, (float)mi) → float :

Returns Weibull distributed double with parameters alpha, gamma, mi

make_seed() → int :

Generate and return the random seed based upon system date and time

set_num_streams((int)nstreams) → None :

Sets the number of random streams

set_seed((int)seed) → None :

Defines the random seed

simx.core.core.create_input_info((InfoData)arg1) → None :

Creates an Info object from data supplied from Python

simx.core.core.create_profile((object)arg1, (object)arg2, (dict)arg3) → int :

Creates a profile dictionary

simx.core.core.create_pyentity((EntityData)arg1) → None :

Creates entities from entity data supplied from Python

simx.core.core.debug1((str)arg1) → None :

Returns handler to the simx Debug level 1 stream

simx.core.core.debug2((str)arg1) → None :

Returns handler to the simx Debug level 2 stream

simx.core.core.debug3((str)arg1) → None :

Returns handler to the simx Debug level 3 stream

simx.core.core.debug_info((str)arg1) → None :

Returns handler to the simx Info stream

simx.core.core.distribute_info((PyEntity)arg1, (object)arg2, (PyService)arg3, (bool)arg4) → int
simx.core.core.error((str)arg1) → None :

Returns handler to the simx Error stream

simx.core.core.failure((str)arg1) → None :

Returns handler to the simx failure stream

simx.core.core.get_entity((tuple)arg1) → object :

Returns the Entity object associated with the given entity Id

simx.core.core.get_entity_lp_id((tuple)arg1) → int :

Returns the Id of the Logical Process (LP) on which the given entity lives

simx.core.core.get_local_min_delay() → int :

Returns the minimum delay with which events can be schedules on the local processor

simx.core.core.get_min_delay() → int :

Returns the value of look-ahead in a parallel simulatoin

simx.core.core.get_now() → int :

Returns the value of the simulation clock on this logical process

simx.core.core.get_num_lps() → int :

Returns the number of logical processes. This is usually the same as the number of MPI processes.

simx.core.core.get_num_machines() → int :

Returns the number of MPI processes in a simulation

simx.core.core.get_processor_name() → str :

Returns the processor name on which the calling process is running

simx.core.core.get_rank() → int :

Returns the MPI rank of this process

simx.core.core.get_sim_phase() → SimPhase :

Returns the current simulation phase. Will be one of PHASE_INIT, PHASE_RUN or PHASE_WRAPUP

simx.core.core.init_config() → int :

Initializes the configuration module. This has to be initialized before the configuration values are set.

simx.core.core.init_env() → int
simx.core.core.init_mpi((object)arg1) → int :

Initializes MPI communicator

simx.core.core.output((PyEntity)arg1, (int)arg2, (str)arg3) → None

output( (PyService)arg1, (int)arg2, (str)arg3) -> None

simx.core.core.prepare_service((ServiceData)arg1) → None :

Pre-initialization of service

simx.core.core.prepare_services((list)arg1) → None :

Pre-initialization of all services in the given list of services

simx.core.core.probe_entities((str)arg1, (object)arg2, (tuple)arg3) → None :

Calls the given class method on all the entities of the given class, that live on this logical process

simx.core.core.register_address((str)arg1, (int)arg2) → None :

Registers service address

simx.core.core.register_entity((object)arg1) → None :

Registers Python Entity class

simx.core.core.register_packer((object)arg1) → None
simx.core.core.register_service((object)arg1) → None :

Registers Python Service class

simx.core.core.register_unpacker((object)arg1) → None
simx.core.core.run() → int :

Calling this function actually starts the simulation. Typically called after initializing the configuration variables, creating entities, etc

simx.core.core.set_config_value((object)arg1, (object)arg2) → int :

Sets (key,value) pairs

simx.core.core.set_event_scheduler((object)arg1) → None :

Sets the Python event scheduler obejct for staggered creation of simulation events

simx.core.core.set_event_scheduler_timer((int)arg1) → None :

Sets the time after which the next batch of events will be scheduled

simx.core.core.warn((str)arg1) → None :

Returns handler to the simx Warn stream