SIMLIB/C++  3.07
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
simlib3 Namespace Reference

Implementation of class CalendarList
interface is static - using global functions in SQS namespace. More...

Namespaces

 SQS
 Special namespace for calendar implementation.
 

Classes

class  _Abs2D
 
class  _Abs3D
 
class  _Add
 block sum of two inputs More...
 
class  _Add2D
 
class  _Add3D
 
class  _Div
 divider block More...
 
class  _Div2D
 
class  _Div3D
 
class  _FileWrap
 
class  _Mul
 multiplier block More...
 
class  _Mul2D1D
 
class  _Mul3D
 
class  _Mul3D1D
 
class  _Norm2D
 
class  _Norm3D
 
class  _ScalarProduct2D
 
class  _ScalarProduct3D
 
class  _Sub
 block to subtract two inputs More...
 
class  _Sub2D
 
class  _Sub3D
 
class  _Time
 block wrapper for simulation time More...
 
class  _UMinus
 unary minus block More...
 
class  _UMinus2D
 
class  _UMinus3D
 
class  _XYpart
 
class  _XYZpart
 
class  aBlock
 abstract base class for all blocksblocks/SimObject have not copy semantics (TODO: add move semantics) More...
 
class  ABM4
 
class  aCondition
 abstract base class for all state-condition blocks State event in combined model is executed at the time when the condition changes its boolean value More...
 
class  aContiBlock
 abstract base for continuous blocks with single output suitable for expression-tree building and evaluation More...
 
class  aContiBlock1
 base for continuous blocks with single input and algebraic loop check More...
 
class  aContiBlock2
 base for continuous blocks with two inputs More...
 
class  aContiBlock2D
 Abstract 2D block with single 2D output. More...
 
class  aContiBlock2D1
 continuous block with single input and alg. More...
 
class  aContiBlock2D2
 continuous block vith 2 inputs and alg. More...
 
class  aContiBlock2D3
 continuous block with 3 inputs and alg. More...
 
class  aContiBlock3
 base for continuous blocks vith three inputs and algebraic loop check More...
 
class  aContiBlock3D
 Abstract 3D block with single 3D output. More...
 
class  aContiBlock3D1
 continuous 3D block with single input More...
 
class  aContiBlock3D2
 continuous block vith 2 inputs and alg. More...
 
class  aContiBlock3D3
 continuous block with 3 inputs and alg. More...
 
class  Adaptor2D
 Convert 2 scalar inputs to single 2D vector output. More...
 
class  Adaptor3D
 Converts 3 scalar inputs to single 3D vector output. More...
 
class  AlgLoop
 abstract base for algebraic loop solvers More...
 
class  AlgLoopDetector
 class for algebraic loop detection AlgLoopDetector object should be used in Value() method only it checks for recursion in continuous block expression evaluation
User should remove algebraic loop manualy using special block (see AlgLoop solvers) More...
 
class  Barrier
 synchronization tool for processes More...
 
class  Bisect
 solve using bisection method More...
 
class  Blash
 nonlinear block - backlash More...
 
class  Calendar
 common interface for all calendar (PES) implementations More...
 
class  CalendarList
 class CalendarList — list implementation of calendar More...
 
class  CalendarListImplementation
 class CalendarListImplementation — sorted list More...
 
class  CalendarQueue
 CQ implementation of calendar. More...
 
class  Condition
 change detector - Boolean version (int) More...
 
class  ConditionDown
 detector of TRUE–>FALSE More...
 
class  ConditionUp
 detector of FALSE–>TRUE More...
 
class  Constant
 block: constant (value can not be changed) More...
 
class  Constant2D
 2D vector value that can't be changed More...
 
class  Constant3D
 3D vector value that can't be changed More...
 
class  Delay
 continuous signal delay block More...
 
class  Entity
 abstract base class for active entities (Process, Event) instances of derived classes provide Behavior() method implementation, execution can be scheduled in calendar More...
 
class  EULER
 
class  Event
 abstract base class for events Event behavior is simple function (can not be interrupted) More...
 
struct  EventNotice
 activation record More...
 
class  EventNoticeAllocator
 allocate activation records fast More...
 
struct  EventNoticeLinkBase
 calendar item - PRIVATE for any implementation
we use double-linked circular list More...
 
struct  Expression
 reference to block expression This block can be used as handle for block expression trees More...
 
struct  Expression2D
 Reference to 2D vector block-expression. More...
 
struct  Expression3D
 3D vector block-expression handle More...
 
class  Facility
 (SOL-like) facility Facility with exclusive access and service priority More...
 
class  Frict
 nonlinear block: friction More...
 
class  Function1
 block parametrized by function with single argument More...
 
class  Function2
 block parametrized by function with two arguments More...
 
class  FW
 
class  Histogram
 histogram statistics More...
 
class  Hyst
 nonlinear block - hysteresis More...
 
class  Input
 continuous block connection (transparent reference) wrapper for pointer to objects of aContiBlock derived classes
(small object, without virtual methods)
It is used for referencing of continuous blocks in block-expressions. More...
 
class  Input2D
 Continuous block connection (transparent reference) More...
 
class  Input3D
 Continuous block connection (transparent reference) More...
 
class  Insv
 nonlinear block: dead zone More...
 
class  IntegrationMethod
 IntegrationMethod - Abstract base class for integration methods. More...
 
class  Integrator
 block for numerical integration input is derivative, output is state More...
 
class  Integrator2D
 2D vector integrator More...
 
class  Integrator3D
 3D vector integrator More...
 
class  IntegratorContainer
 IntegratorContainer - internal container of integrators (singleton) More...
 
class  Iterations
 solve using iterations More...
 
class  Lim
 nonlinear block: limitation More...
 
class  Link
 base class for all double-linked list items
item can be at single place only (identified by where() method)
used for Queue implementation More...
 
class  List
 list of Link* items, uses data from Link More...
 
class  MultiStepMethod
 base for multi-step integration method More...
 
class  NameDict
 
class  Newton
 solve using modified Newton's method More...
 
struct  P_Context_t
 internal structure for storing of process context More...
 
class  Param
 
class  Parameter
 block: parameter (can not be changed during simulation run) More...
 
class  Parameter2D
 Special variable (can't be changed at simulation time) More...
 
class  Parameter3D
 Special variable (can't be changed at simulation time) More...
 
class  ParameterVector
 
class  Process
 Abstract base class for all simulation processesProcess behavior is specified by Behavior method and can be interrupted during execution by e.g. More...
 
class  Qntzr
 nonlinear block: quantizer More...
 
class  Queue
 priority queue More...
 
class  RegulaFalsi
 solve using regula falsi method More...
 
class  Relay
 Relay this implementation detects exact time of switch. More...
 
class  RKE
 
class  RKF3
 
class  RKF5
 
class  RKF8
 
class  Rline
 nonlinear block: function defined by given table of values More...
 
class  Sampler
 objects of this class call global function periodically (typicaly used for output of continuous model) More...
 
class  Semaphore
 basic synchronization tool for processes simplified implementation More...
 
class  SIMLIB_Delay
 continuous delay block More...
 
class  SIMLIB_DelayBuffer
 memory for delayed pairs (Time,value) More...
 
class  SIMLIB_module
 Class for internal registration of modules. More...
 
struct  SIMLIB_statistics_t
 internal statistics structure
contains basic statistics of simulator execution More...
 
class  SIMLIB_ZDelayTimer
 
class  SimObject
 Base class for almost all SIMLIB classes. More...
 
class  SingleStepMethod
 base for single-step integration methods More...
 
class  Stat
 class for statistical information gathering More...
 
class  Status
 State variables (memory) base for blocks with internal state (Relay, ...) More...
 
class  StatusContainer
 StatusContainer - internal container of status variables (singleton) More...
 
class  StatusMethod
 Abstract base class for integration methods with status auxiliary memories. More...
 
class  Store
 (SOL-like) store store capacity can be changed dynamically More...
 
class  TStat
 time dependent statistic More...
 
class  Value2D
 2D vector value More...
 
class  Value3D
 3D vector value More...
 
class  Variable
 block: variable (value can be changed) More...
 
class  Variable2D
 2D vector variable More...
 
class  Variable3D
 3D vector variable More...
 
class  WaitUntilList
 
class  ZDelay
 
class  ZDelayTimer
 

Typedefs

typedef void(* SIMLIB_atexit_function_t) ()
 
typedef void(* VoidFunctionPtr) ()
 
typedef double(* opt_function_t) (const ParameterVector &p)
 
typedef long myint32
 
typedef signed char EntityPriority_t
 Priority of the process/event. More...
 
typedef unsigned char ServicePriority_t
 Service priority (see Facility::Seize) More...
 
typedef Hyst Hysteresis
 
typedef Blash Backlash
 
typedef Lim Limitation
 
typedef Insv DeadZone
 
typedef Qntzr Quantizer
 
typedef Frict Friction
 

Enumerations

enum  _ErrEnum {
  Copyright, UnknownError, InternalError, MemoryError,
  InitError, TwiceInitError, InitInRunError, RunUseError,
  SetStepError, InitMinStepError, SetStepError2, SetAccuracyError,
  SFunctionUseError, AccuracyError, LinkRefError, LinkDelError,
  LinkOutError, DuplicateCalendar, DeletingActive, SchedulingBeforeTime,
  EmptyCalendar, ProcessNotInitialized, HistoStepError, HistoCountError,
  ListActivityError, ListEmptyError, QueueRefError, EmptyWUListError,
  EntityRefError, EntityIsNotScheduled, TStatNotInitialized, CantCreateIntg,
  CantDestroyIntg, CantCreateStatus, CantDestroyStatus, FacInterruptError,
  ReleaseError, ReleaseNotSeized, EnterCapError, LeaveManyError,
  SetCapacityError, SetQueueError, WeibullError, ErlangError,
  NegBinError, NegBinMError1, NegBinMError2, PoissonError,
  GeomError, HyperGeomError1, HyperGeomError2, OutFilePutError,
  OutFileOpenError, CantOpenOutFile, CantCloseOutFile, AlgLoopDetected,
  LowGreaterHigh, BadQntzrStep, InconsistentHeader, SemaphoreError,
  BadUniformParam, StatNoRecError, StatDispError, AL_BadBounds,
  AL_BadInitVal, AL_Diverg, AL_MaxCount, AL_NotInLoop,
  NI_UnknownMeth, NI_MultDefMeth, NI_IlStepSize, NI_NotSingleStep,
  NI_NotMultiStep, NI_CantSetMethod, NI_CantSetStarter, RlineErr1,
  RlineErr2, NoDebugErr, DelayTimeErr, ParameterChangeErr,
  UserError, Copyright, UnknownError, InternalError,
  MemoryError, InitError, TwiceInitError, InitInRunError,
  RunUseError, SetStepError, InitMinStepError, SetStepError2,
  SetAccuracyError, SFunctionUseError, AccuracyError, LinkRefError,
  LinkDelError, LinkOutError, DuplicateCalendar, DeletingActive,
  SchedulingBeforeTime, EmptyCalendar, ProcessNotInitialized, HistoStepError,
  HistoCountError, ListActivityError, ListEmptyError, QueueRefError,
  EmptyWUListError, EntityRefError, EntityIsNotScheduled, TStatNotInitialized,
  CantCreateIntg, CantDestroyIntg, CantCreateStatus, CantDestroyStatus,
  FacInterruptError, ReleaseError, ReleaseNotSeized, EnterCapError,
  LeaveManyError, SetCapacityError, SetQueueError, WeibullError,
  ErlangError, NegBinError, NegBinMError1, NegBinMError2,
  PoissonError, GeomError, HyperGeomError1, HyperGeomError2,
  OutFilePutError, OutFileOpenError, CantOpenOutFile, CantCloseOutFile,
  AlgLoopDetected, LowGreaterHigh, BadQntzrStep, InconsistentHeader,
  SemaphoreError, BadUniformParam, StatNoRecError, StatDispError,
  AL_BadBounds, AL_BadInitVal, AL_Diverg, AL_MaxCount,
  AL_NotInLoop, NI_UnknownMeth, NI_MultDefMeth, NI_IlStepSize,
  NI_NotSingleStep, NI_NotMultiStep, NI_CantSetMethod, NI_CantSetStarter,
  RlineErr1, RlineErr2, NoDebugErr, DelayTimeErr,
  ParameterChangeErr, UserError
}
 
enum  SIMLIB_Phase_t {
  START, INITIALIZATION, SIMULATION, TERMINATION,
  ERROREXIT
}
 values indicate current phase of experiment More...
 
enum  _ErrEnum {
  Copyright, UnknownError, InternalError, MemoryError,
  InitError, TwiceInitError, InitInRunError, RunUseError,
  SetStepError, InitMinStepError, SetStepError2, SetAccuracyError,
  SFunctionUseError, AccuracyError, LinkRefError, LinkDelError,
  LinkOutError, DuplicateCalendar, DeletingActive, SchedulingBeforeTime,
  EmptyCalendar, ProcessNotInitialized, HistoStepError, HistoCountError,
  ListActivityError, ListEmptyError, QueueRefError, EmptyWUListError,
  EntityRefError, EntityIsNotScheduled, TStatNotInitialized, CantCreateIntg,
  CantDestroyIntg, CantCreateStatus, CantDestroyStatus, FacInterruptError,
  ReleaseError, ReleaseNotSeized, EnterCapError, LeaveManyError,
  SetCapacityError, SetQueueError, WeibullError, ErlangError,
  NegBinError, NegBinMError1, NegBinMError2, PoissonError,
  GeomError, HyperGeomError1, HyperGeomError2, OutFilePutError,
  OutFileOpenError, CantOpenOutFile, CantCloseOutFile, AlgLoopDetected,
  LowGreaterHigh, BadQntzrStep, InconsistentHeader, SemaphoreError,
  BadUniformParam, StatNoRecError, StatDispError, AL_BadBounds,
  AL_BadInitVal, AL_Diverg, AL_MaxCount, AL_NotInLoop,
  NI_UnknownMeth, NI_MultDefMeth, NI_IlStepSize, NI_NotSingleStep,
  NI_NotMultiStep, NI_CantSetMethod, NI_CantSetStarter, RlineErr1,
  RlineErr2, NoDebugErr, DelayTimeErr, ParameterChangeErr,
  UserError, Copyright, UnknownError, InternalError,
  MemoryError, InitError, TwiceInitError, InitInRunError,
  RunUseError, SetStepError, InitMinStepError, SetStepError2,
  SetAccuracyError, SFunctionUseError, AccuracyError, LinkRefError,
  LinkDelError, LinkOutError, DuplicateCalendar, DeletingActive,
  SchedulingBeforeTime, EmptyCalendar, ProcessNotInitialized, HistoStepError,
  HistoCountError, ListActivityError, ListEmptyError, QueueRefError,
  EmptyWUListError, EntityRefError, EntityIsNotScheduled, TStatNotInitialized,
  CantCreateIntg, CantDestroyIntg, CantCreateStatus, CantDestroyStatus,
  FacInterruptError, ReleaseError, ReleaseNotSeized, EnterCapError,
  LeaveManyError, SetCapacityError, SetQueueError, WeibullError,
  ErlangError, NegBinError, NegBinMError1, NegBinMError2,
  PoissonError, GeomError, HyperGeomError1, HyperGeomError2,
  OutFilePutError, OutFileOpenError, CantOpenOutFile, CantCloseOutFile,
  AlgLoopDetected, LowGreaterHigh, BadQntzrStep, InconsistentHeader,
  SemaphoreError, BadUniformParam, StatNoRecError, StatDispError,
  AL_BadBounds, AL_BadInitVal, AL_Diverg, AL_MaxCount,
  AL_NotInLoop, NI_UnknownMeth, NI_MultDefMeth, NI_IlStepSize,
  NI_NotSingleStep, NI_NotMultiStep, NI_CantSetMethod, NI_CantSetStarter,
  RlineErr1, RlineErr2, NoDebugErr, DelayTimeErr,
  ParameterChangeErr, UserError
}
 
enum  { LOWEST_PRIORITY = -127, HIGHEST_PRIORITY = 127, DEFAULT_PRIORITY = 0 }
 entity/process priority values
(Warning: changed from 0..255 in SIMLIB v 3.03) More...
 

Functions

void SIMLIB_atexit (SIMLIB_atexit_function_t p)
 
static void SIMLIB_atexit_call ()
 
void SetCalendar (const char *name)
 choose calendar implementation default is list More...
 
void SIMLIB_DoConditions ()
 
void SIMLIB_Dynamic ()
 performs evaluation of integrators and status blocks More...
 
Input operator+ (Input a, Input b)
 block operator + More...
 
Input operator- (Input a, Input b)
 block operator - More...
 
Input operator* (Input a, Input b)
 block operator * More...
 
Input operator/ (Input a, Input b)
 block operator / More...
 
Input Sqr (Input x)
 square function More...
 
Input operator- (Input a)
 unary - block operator More...
 
void DebugON ()
 start debugging output More...
 
void DebugOFF ()
 stop debugging output More...
 
unsigned long Debug (unsigned long mode)
 
void SIMLIB_error (const enum _ErrEnum N)
 print error message and abort program More...
 
void SIMLIB_error (const char *fmt,...)
 print error message and abort program More...
 
void SIMLIB_error (const char *filename, const int linenum)
 print error message and abort program More...
 
void SIMLIB_warning (const enum _ErrEnum N)
 print warning message and continue More...
 
void SIMLIB_warning (const char *fmt,...)
 print warning message and continue More...
 
const char * _ErrMsg (enum _ErrEnum N)
 
static double sign (double x)
 
Input Abs (Input x)
 
Input Sin (Input x)
 
Input Cos (Input x)
 
Input Tan (Input x)
 
Input ASin (Input x)
 
Input ACos (Input x)
 
Input ATan (Input x)
 
Input ATan2 (Input y, Input x)
 
Input Exp (Input x)
 
Input Log10 (Input x)
 
Input Ln (Input x)
 
Input Pow (Input x, Input y)
 
Input Sign (Input x)
 
Input Sqrt (Input x)
 
Input Min (Input x, Input y)
 
Input Max (Input x, Input y)
 
static unsigned * Alloc (unsigned n)
 
void SIMLIB_DoActions ()
 
void SIMLIB_ContinueInit ()
 
void SIMLIB_WUClear ()
 
double min (double a, double b)
 
double max (double a, double b)
 
std::string SIMLIB_create_tmp_name (const char *fmt,...)
 printf-like function to create temporary name (the length of temporary names is limited)
used only for printing More...
 
void ContractStep ()
 contract step of integration More...
 
void ContractStep (double time)
 contract step of integration to end step time More...
 
void SetStep (double dtmin, double dtmax)
 Set integration step interval. More...
 
void SetAccuracy (double abserr, double relerr)
 set max. More...
 
void SetAccuracy (double relerr)
 set max. More...
 
void SetName (SimObject &o, const std::string &name)
 assign name to object More...
 
void SetName (SimObject *o, const std::string &name)
 assign name to object More...
 
void RemoveName (SimObject &o)
 remove name More...
 
void RemoveName (SimObject *o)
 remove name More...
 
std::string GetName (SimObject &o)
 get name of object More...
 
std::string GetName (SimObject *o)
 get name of object More...
 
void SetErrNo (int num)
 
static double hooke_step (double *delta, opt_function_t f, ParameterVector &p, double min0)
 
double Optimize_hooke (opt_function_t f, ParameterVector &parameter, double rho, double epsilon, int itermax)
 
bool operator== (const ParameterVector &p1, const ParameterVector &p2)
 
bool accept_bad (double eps)
 
void move_to_next_point (ParameterVector &p, double eps)
 
double Optimize_simann (double(*f)(const ParameterVector &p), ParameterVector &p, int MAXT)
 
double Optimize_simann (opt_function_t f, ParameterVector &p, int MAXT)
 
double Optimize_gradient (opt_function_t f, ParameterVector &p, double MAXITER)
 
void SetOutput (const char *name)
 redirects Output(), Print() to file More...
 
int _Print (const char *fmt,...)
 output of messages to stdout, too More...
 
int Print (const char *fmt,...)
 for Output methods, can be redirected More...
 
int Print (const double x)
 output single value More...
 
int Print (const double x, const double y)
 output 2 values More...
 
int Print (const double x, const double y, const double z)
 output 3 values More...
 
void Error (const char *fmt,...)
 print message and terminate program More...
 
static void THREAD_INTERRUPT_f () __attribute__((noinline))
 Special function called from Process::Behavior() directly or indirectly. More...
 
static void FREE_CONTEXT () __attribute__((noinline))
 non-inline function for deallocating saved process context More...
 
void RandomSeed (long seed)
 initialize random number seed More...
 
double Random ()
 base uniform generator (range 0-0.999999...) the default implementation is simple LCG 32bit More...
 
void SetBaseRandomGenerator (double(*new_gen)())
 set another random generator default Random() implementation can be replaced More...
 
double SIMLIB_RandomBase ()
 
static double _gam (double AK)
 
double Uniform (double l, double h)
 Uniform distribution generator. More...
 
double Normal (double mi, double sigma)
 Gauss distribution generator. More...
 
double Weibul (double lambda, double alfa)
 Weibul distribution generator. More...
 
double Erlang (double alfa, int beta)
 Erlang distribution generator. More...
 
int NegBin (double q, int k)
 
double Gamma (double alfa, double beta)
 Gamma distribution generator. More...
 
double Exponential (double mv)
 Exponential distribution generator. More...
 
int NegBinM (double p, int m)
 
double Beta (double th, double fi, double min, double max)
 Beta distribution generator. More...
 
double Triag (double mod, double min, double max)
 
double Logar (double mi, double delta)
 
double Rayle (double delta)
 
int Poisson (double lambda)
 Poisson distribution generator. More...
 
int Geom (double q)
 
int HyperGeom (double p, int n, int m)
 
 DEFINE_HOOK (Delay)
 
 DEFINE_HOOK (DelayInit)
 
void SampleDelays ()
 
 DEFINE_HOOK (ZDelayTimerInit)
 
 DEFINE_HOOK (Break)
 
void InstallBreak (void(*f)())
 InstallBreak — set function for checking if user breaks simulation. More...
 
 DEFINE_HOOK (SamplerAct)
 
 DEFINE_HOOK (SamplerInit)
 
 DEFINE_HOOK (WUclear)
 
 DEFINE_HOOK (WUget_next)
 
void Stop ()
 stop current simulation run More...
 
void Abort ()
 end simulation program More...
 
void SIMLIB_Init (double T0, double T1, unsigned version)
 
void Run ()
 run simulation experiment More...
 
const char * SIMLIB_version_string ()
 Get version of SIMLIB. More...
 
void Init (double t0, double t1=SIMLIB_MAXTIME)
 Initialize simulator and model time. More...
 
void SetStep (double dt)
 set fixed integration step More...
 
void Activate (Entity *e)
 activate entity e More...
 
void Passivate (Entity *e)
 passivate entity e More...
 
void SetMethod (const char *name)
 select the integration method More...
 
const char * GetMethod (void)
 get the name of the method which is used More...
 
void SetStarter (const char *name, const char *slave_name)
 set the method which will be used to start given multistep method More...
 
void SetStarter (const char *slave_name)
 set the method which will be used to start currently used multistep method More...
 
const char * GetStarter (const char *name)
 get the name of the method which is used to start given multistep method More...
 
const char * GetStarter (void)
 get the name of the method which is used to start currently used multistep method More...
 
double abs (const Value2D &a)
 
Value2D operator+ (const Value2D &a, const Value2D &b)
 
Value2D operator- (const Value2D &a, const Value2D &b)
 
Value2D operator- (const Value2D &a)
 
Value2D operator* (const Value2D &a, const double b)
 
Value2D operator* (const double a, const Value2D &b)
 
double scalar_product (const Value2D &a, const Value2D &b)
 
Value2D operator/ (const Value2D &a, const double b)
 
Input2D operator+ (Input2D a, Input2D b)
 
Input2D operator- (Input2D a, Input2D b)
 
Input2D operator* (Input2D a, Input b)
 
Input2D operator* (Input a, Input2D b)
 
Input2D operator/ (Input2D a, Input b)
 
Input2D operator- (Input2D a)
 
Input Abs (Input2D x)
 absolute value of vector (1D block) More...
 
Input2D UnitVector (Input2D v)
 make unit vector from input (Abs(output_vec)==1) More...
 
Input ScalarProduct (Input2D x, Input2D y)
 dot product: xvec . yvec More...
 
Input Xpart (Input2D a)
 get x part of (x,y) vector value More...
 
Input Ypart (Input2D a)
 get y part of (x,y) vector value More...
 
void Print (Value2D a)
 
double abs (const Value3D &a)
 
Value3D operator+ (const Value3D &a, const Value3D &b)
 
Value3D operator- (const Value3D &a, const Value3D &b)
 
Value3D operator- (const Value3D &a)
 
Value3D operator* (const Value3D &a, const Value3D &b)
 
Value3D operator* (const Value3D &a, const double b)
 
Value3D operator* (const double a, const Value3D &b)
 
double scalar_product (const Value3D &a, const Value3D &b)
 
Value3D operator/ (const Value3D &a, const double b)
 
Input3D operator+ (Input3D a, Input3D b)
 
Input3D operator- (Input3D a, Input3D b)
 
Input3D operator* (Input3D a, Input3D b)
 
Input3D operator* (Input3D a, Input b)
 
Input3D operator* (Input a, Input3D b)
 
Input3D operator/ (Input3D a, Input b)
 
Input3D operator- (Input3D a)
 
Input Abs (Input3D x)
 absolute value of vector (1D block) More...
 
Input3D UnitVector (Input3D x)
 make unit vector from input (Abs(output_vec)==1) More...
 
Input ScalarProduct (Input3D x, Input3D y)
 dot product: xvec . yvec More...
 
Input Xpart (Input3D a)
 get x part of (x,y,z) vector value More...
 
Input Ypart (Input3D a)
 get y part of (x,y,z) vector value More...
 
Input Zpart (Input3D a)
 get z part of (x,y,z) vector value More...
 
void Print (Value3D a)
 
void WU_print ()
 

Variables

 SIMLIB_IMPLEMENTATION
 
static const int MAX_ATEXIT = 10
 
static int counter = 0
 
static SIMLIB_atexit_function_t atexit_array [MAX_ATEXIT] = { 0, }
 
class simlib3::EventNoticeAllocator allocator
 
const unsigned LIST_MAX = 512
 
const unsigned MINBUCKETS = LIST_MAX>4?LIST_MAX:4
 
const unsigned LIST_MIN = LIST_MAX/2
 
const double COEF_PAR = 1.5
 
const double MUL_PAR = 1.0
 
bool SIMLIB_ConditionFlag = false
 
static class _Time _T
 block – simulation time More...
 
aContiBlockT = _T
 simulation time block reference More...
 
unsigned long SIMLIB_debug_flag = 0UL
 
static unsigned long SIMLIB_Entity_Count = 0L
 current number of entities in model More...
 
static const char _Errors []
 
const unsigned MAXHISTOCOUNT = 10000
 
static SIMLIB_module SIMLIB_module_id
 Create single global registration object in each SIMLIB module. More...
 
const SIMLIB_Phase_tPhase = SIMLIB_Phase
 This variable contains the current phase of experiment (used for internal checking) More...
 
double SIMLIB_Time
 
bool SIMLIB_DynamicFlag = false
 in dynamic section More...
 
bool SIMLIB_ResetStatus = false
 flag set if there is a need for integration method restart More...
 
SIMLIB_Phase_t SIMLIB_Phase = START
 
EntitySIMLIB_Current = NULL
 
int SIMLIB_ERRNO =0
 
bool SIMLIB_ContractStepFlag = false
 requests shorter step More...
 
double SIMLIB_ContractStep = SIMLIB_MAXTIME
 requested step size More...
 
double SIMLIB_StepStartTime
 last step time More...
 
double SIMLIB_DeltaTime
 Time-SIMLIB_StepStartTime. More...
 
double SIMLIB_OptStep
 optimal step More...
 
double SIMLIB_MinStep =1e-10
 minimal step More...
 
double SIMLIB_MaxStep =1
 max. step More...
 
double SIMLIB_StepSize
 actual step More...
 
double SIMLIB_AbsoluteError =0
 absolute error More...
 
double SIMLIB_RelativeError =0.001
 relative error More...
 
double SIMLIB_StartTime
 
double SIMLIB_NextTime
 
double SIMLIB_EndTime
 
const double & MinStep =SIMLIB_MinStep
 minimal integration step More...
 
const double & MaxStep =SIMLIB_MaxStep
 maximal integration step More...
 
const double & StepSize =SIMLIB_StepSize
 actual integration step More...
 
const double & OptStep =SIMLIB_OptStep
 optimal integration step More...
 
const double & AbsoluteError =SIMLIB_AbsoluteError
 max. abs. error of integration More...
 
const double & RelativeError =SIMLIB_RelativeError
 max. rel. error More...
 
Constant SIMLIB_Integrator_0input (0)
 dummy input with zero value More...
 
const int abm_ord =4
 
ABM4 abm4 ("abm4", "rkf5")
 Adams-Bashforth-Moulton, 4th order. More...
 
EULER euler ("euler")
 Euler method. More...
 
FW fw ("fw")
 Fowler-Warten (Warning: needs testing, do not use) More...
 
RKE rke ("rke")
 Runge-Kutta-England, 4th order? More...
 
RKF3 rkf3 ("rkf3")
 Runge-Kutta-Fehlberg, 3rd order. More...
 
RKF5 rkf5 ("rkf5")
 Runge-Kutta-Fehlberg, 5th order. More...
 
RKF8 rkf8 ("rkf8")
 Runge-Kutta-Fehlberg, 8th order. More...
 
static bool SimObject_allocated = false
 
static NameDict name_dict
 
class simlib3::_FileWrap OutFile
 
static jmp_buf P_DispatcherStatusBuffer
 setjmp() state before dispatch More...
 
static char *volatile P_StackBase = 0
 global start of stack area More...
 
static char *volatile P_StackBase2 = 0
 for checking start of stack More...
 
static P_Context_t *volatile P_Context = 0
 temporary global process state More...
 
static volatile size_t P_StackSize = 0
 temporary global stack size More...
 
const myint32 INICONST = 1537L
 
const myint32 MULCONST = 1220703125L
 
const myint32 MAXLONGINT = 0x7FFFFFFFUL
 
const myint32 SIGNBIT = 0x80000000UL
 
static myint32 SIMLIB_RandomSeed = INICONST
 
static double(* SIMLIB_RandomBasePtr )() = SIMLIB_RandomBase
 
const double & StartTime = SIMLIB_StartTime
 time of simulation start More...
 
const double & Time = SIMLIB_Time
 model time (is NOT the block) More...
 
const double & NextTime = SIMLIB_NextTime
 next-event time More...
 
const double & EndTime = SIMLIB_EndTime
 time of simulation end More...
 
Entity *const & Current = SIMLIB_Current
 pointer to active (now running) entity More...
 
unsigned long SIMLIB_experiment_no = 0
 
static SIMLIB_statistics_t SIMLIB_run_statistics
 
const SIMLIB_statistics_tSIMLIB_statistics = SIMLIB_run_statistics
 interface to internal run-time statistics structure More...
 
static bool StopFlag = false
 
const unsigned SIMLIB_version = __SIMLIB__
 library version More...
 
const double SIMLIB_MINTIME = 0.0
 minimal time value More...
 
const double SIMLIB_MAXTIME = 1.0e30
 maximum time (1e30 works for float, too) More...
 
static Constant2D Zero2D (0, 0)
 
static Constant3D Zero3D (0, 0, 0)
 
static bool flag = false
 

Detailed Description

Implementation of class CalendarList
interface is static - using global functions in SQS namespace.

Main SIMLIB (version 3+) namespace.


uses double-linked list and dynamic calendar queue [brown1988]

Usage: using namespace simlib3;

Typedef Documentation

◆ Backlash

Definition at line 1396 of file simlib.h.

◆ DeadZone

Definition at line 1584 of file simlib.h.

◆ EntityPriority_t

typedef signed char simlib3::EntityPriority_t

Priority of the process/event.

Definition at line 363 of file simlib.h.

◆ Friction

Definition at line 1617 of file simlib.h.

◆ Hysteresis

Definition at line 1380 of file simlib.h.

◆ Limitation

Definition at line 1567 of file simlib.h.

◆ myint32

typedef long simlib3::myint32

Definition at line 39 of file random1.cc.

◆ opt_function_t

typedef double(* simlib3::opt_function_t) (const ParameterVector &p)

Definition at line 83 of file optimize.h.

◆ Quantizer

Definition at line 1600 of file simlib.h.

◆ ServicePriority_t

typedef unsigned char simlib3::ServicePriority_t

Service priority (see Facility::Seize)

Definition at line 365 of file simlib.h.

◆ SIMLIB_atexit_function_t

typedef void(* simlib3::SIMLIB_atexit_function_t) ()

Definition at line 150 of file internal.h.

◆ VoidFunctionPtr

typedef void(* simlib3::VoidFunctionPtr) ()

Definition at line 177 of file internal.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

entity/process priority values
(Warning: changed from 0..255 in SIMLIB v 3.03)

Enumerator
LOWEST_PRIORITY 
HIGHEST_PRIORITY 
DEFAULT_PRIORITY 

Definition at line 357 of file simlib.h.

◆ _ErrEnum [1/2]

Enumerator
Copyright 
UnknownError 
InternalError 
MemoryError 
InitError 
TwiceInitError 
InitInRunError 
RunUseError 
SetStepError 
InitMinStepError 
SetStepError2 
SetAccuracyError 
SFunctionUseError 
AccuracyError 
LinkRefError 
LinkDelError 
LinkOutError 
DuplicateCalendar 
DeletingActive 
SchedulingBeforeTime 
EmptyCalendar 
ProcessNotInitialized 
HistoStepError 
HistoCountError 
ListActivityError 
ListEmptyError 
QueueRefError 
EmptyWUListError 
EntityRefError 
EntityIsNotScheduled 
TStatNotInitialized 
CantCreateIntg 
CantDestroyIntg 
CantCreateStatus 
CantDestroyStatus 
FacInterruptError 
ReleaseError 
ReleaseNotSeized 
EnterCapError 
LeaveManyError 
SetCapacityError 
SetQueueError 
WeibullError 
ErlangError 
NegBinError 
NegBinMError1 
NegBinMError2 
PoissonError 
GeomError 
HyperGeomError1 
HyperGeomError2 
OutFilePutError 
OutFileOpenError 
CantOpenOutFile 
CantCloseOutFile 
AlgLoopDetected 
LowGreaterHigh 
BadQntzrStep 
InconsistentHeader 
SemaphoreError 
BadUniformParam 
StatNoRecError 
StatDispError 
AL_BadBounds 
AL_BadInitVal 
AL_Diverg 
AL_MaxCount 
AL_NotInLoop 
NI_UnknownMeth 
NI_MultDefMeth 
NI_IlStepSize 
NI_NotSingleStep 
NI_NotMultiStep 
NI_CantSetMethod 
NI_CantSetStarter 
RlineErr1 
RlineErr2 
NoDebugErr 
DelayTimeErr 
ParameterChangeErr 
UserError 
Copyright 
UnknownError 
InternalError 
MemoryError 
InitError 
TwiceInitError 
InitInRunError 
RunUseError 
SetStepError 
InitMinStepError 
SetStepError2 
SetAccuracyError 
SFunctionUseError 
AccuracyError 
LinkRefError 
LinkDelError 
LinkOutError 
DuplicateCalendar 
DeletingActive 
SchedulingBeforeTime 
EmptyCalendar 
ProcessNotInitialized 
HistoStepError 
HistoCountError 
ListActivityError 
ListEmptyError 
QueueRefError 
EmptyWUListError 
EntityRefError 
EntityIsNotScheduled 
TStatNotInitialized 
CantCreateIntg 
CantDestroyIntg 
CantCreateStatus 
CantDestroyStatus 
FacInterruptError 
ReleaseError 
ReleaseNotSeized 
EnterCapError 
LeaveManyError 
SetCapacityError 
SetQueueError 
WeibullError 
ErlangError 
NegBinError 
NegBinMError1 
NegBinMError2 
PoissonError 
GeomError 
HyperGeomError1 
HyperGeomError2 
OutFilePutError 
OutFileOpenError 
CantOpenOutFile 
CantCloseOutFile 
AlgLoopDetected 
LowGreaterHigh 
BadQntzrStep 
InconsistentHeader 
SemaphoreError 
BadUniformParam 
StatNoRecError 
StatDispError 
AL_BadBounds 
AL_BadInitVal 
AL_Diverg 
AL_MaxCount 
AL_NotInLoop 
NI_UnknownMeth 
NI_MultDefMeth 
NI_IlStepSize 
NI_NotSingleStep 
NI_NotMultiStep 
NI_CantSetMethod 
NI_CantSetStarter 
RlineErr1 
RlineErr2 
NoDebugErr 
DelayTimeErr 
ParameterChangeErr 
UserError 

Definition at line 10 of file errors.cc.

◆ _ErrEnum [2/2]

Enumerator
Copyright 
UnknownError 
InternalError 
MemoryError 
InitError 
TwiceInitError 
InitInRunError 
RunUseError 
SetStepError 
InitMinStepError 
SetStepError2 
SetAccuracyError 
SFunctionUseError 
AccuracyError 
LinkRefError 
LinkDelError 
LinkOutError 
DuplicateCalendar 
DeletingActive 
SchedulingBeforeTime 
EmptyCalendar 
ProcessNotInitialized 
HistoStepError 
HistoCountError 
ListActivityError 
ListEmptyError 
QueueRefError 
EmptyWUListError 
EntityRefError 
EntityIsNotScheduled 
TStatNotInitialized 
CantCreateIntg 
CantDestroyIntg 
CantCreateStatus 
CantDestroyStatus 
FacInterruptError 
ReleaseError 
ReleaseNotSeized 
EnterCapError 
LeaveManyError 
SetCapacityError 
SetQueueError 
WeibullError 
ErlangError 
NegBinError 
NegBinMError1 
NegBinMError2 
PoissonError 
GeomError 
HyperGeomError1 
HyperGeomError2 
OutFilePutError 
OutFileOpenError 
CantOpenOutFile 
CantCloseOutFile 
AlgLoopDetected 
LowGreaterHigh 
BadQntzrStep 
InconsistentHeader 
SemaphoreError 
BadUniformParam 
StatNoRecError 
StatDispError 
AL_BadBounds 
AL_BadInitVal 
AL_Diverg 
AL_MaxCount 
AL_NotInLoop 
NI_UnknownMeth 
NI_MultDefMeth 
NI_IlStepSize 
NI_NotSingleStep 
NI_NotMultiStep 
NI_CantSetMethod 
NI_CantSetStarter 
RlineErr1 
RlineErr2 
NoDebugErr 
DelayTimeErr 
ParameterChangeErr 
UserError 
Copyright 
UnknownError 
InternalError 
MemoryError 
InitError 
TwiceInitError 
InitInRunError 
RunUseError 
SetStepError 
InitMinStepError 
SetStepError2 
SetAccuracyError 
SFunctionUseError 
AccuracyError 
LinkRefError 
LinkDelError 
LinkOutError 
DuplicateCalendar 
DeletingActive 
SchedulingBeforeTime 
EmptyCalendar 
ProcessNotInitialized 
HistoStepError 
HistoCountError 
ListActivityError 
ListEmptyError 
QueueRefError 
EmptyWUListError 
EntityRefError 
EntityIsNotScheduled 
TStatNotInitialized 
CantCreateIntg 
CantDestroyIntg 
CantCreateStatus 
CantDestroyStatus 
FacInterruptError 
ReleaseError 
ReleaseNotSeized 
EnterCapError 
LeaveManyError 
SetCapacityError 
SetQueueError 
WeibullError 
ErlangError 
NegBinError 
NegBinMError1 
NegBinMError2 
PoissonError 
GeomError 
HyperGeomError1 
HyperGeomError2 
OutFilePutError 
OutFileOpenError 
CantOpenOutFile 
CantCloseOutFile 
AlgLoopDetected 
LowGreaterHigh 
BadQntzrStep 
InconsistentHeader 
SemaphoreError 
BadUniformParam 
StatNoRecError 
StatDispError 
AL_BadBounds 
AL_BadInitVal 
AL_Diverg 
AL_MaxCount 
AL_NotInLoop 
NI_UnknownMeth 
NI_MultDefMeth 
NI_IlStepSize 
NI_NotSingleStep 
NI_NotMultiStep 
NI_CantSetMethod 
NI_CantSetStarter 
RlineErr1 
RlineErr2 
NoDebugErr 
DelayTimeErr 
ParameterChangeErr 
UserError 

Definition at line 10 of file internal.h.

◆ SIMLIB_Phase_t

values indicate current phase of experiment

Enumerator
START 
INITIALIZATION 
SIMULATION 
TERMINATION 
ERROREXIT 

Definition at line 76 of file internal.h.

Function Documentation

◆ _ErrMsg()

const char * simlib3::_ErrMsg ( enum _ErrEnum  N)

Definition at line 97 of file errors.cc.

References _Errors.

Referenced by SIMLIB_error(), and SIMLIB_warning().

◆ _gam()

static double simlib3::_gam ( double  AK)
static

Definition at line 35 of file random2.cc.

References Random().

Referenced by Beta(), and Gamma().

◆ _Print()

int simlib3::_Print ( const char *  fmt,
  ... 
)

◆ Abort()

void simlib3::Abort ( )

end simulation program

Definition at line 159 of file run.cc.

References Dprintf, and ERROREXIT.

Referenced by SetStep().

◆ abs() [1/2]

double simlib3::abs ( const Value3D a)

Definition at line 38 of file simlib3D.cc.

References simlib3::Value3D::_x, simlib3::Value3D::_y, and simlib3::Value3D::_z.

◆ abs() [2/2]

double simlib3::abs ( const Value2D a)

◆ Abs() [1/3]

Input simlib3::Abs ( Input  x)

Definition at line 94 of file fun.cc.

Referenced by simlib3::Integrator3D::Init(), and simlib3::Integrator2D::SetInput().

◆ Abs() [2/3]

Input simlib3::Abs ( Input2D  x)

absolute value of vector (1D block)

Definition at line 387 of file simlib2D.cc.

◆ Abs() [3/3]

Input simlib3::Abs ( Input3D  x)

absolute value of vector (1D block)

Definition at line 406 of file simlib3D.cc.

◆ accept_bad()

bool simlib3::accept_bad ( double  eps)

Definition at line 30 of file opt-simann.cc.

References Random().

Referenced by Optimize_simann().

◆ ACos()

Input simlib3::ACos ( Input  x)

Definition at line 101 of file fun.cc.

◆ Activate()

void simlib3::Activate ( Entity e)
inline

activate entity e

Examples:
_test_.cc, examples/model2-timeout.cc, examples/model2.cc, and examples/multiexp.cc.

Definition at line 431 of file simlib.h.

References simlib3::Entity::Activate().

Referenced by simlib3::Entity::Activate(), and main().

◆ Alloc()

static unsigned* simlib3::Alloc ( unsigned  n)
static

Definition at line 35 of file histo.cc.

Referenced by simlib3::Histogram::Histogram(), and simlib3::Histogram::Init().

◆ ASin()

Input simlib3::ASin ( Input  x)

Definition at line 100 of file fun.cc.

◆ ATan()

Input simlib3::ATan ( Input  x)

Definition at line 102 of file fun.cc.

◆ ATan2()

Input simlib3::ATan2 ( Input  y,
Input  x 
)

Definition at line 103 of file fun.cc.

References simlib3::Function2::Function2().

◆ Beta()

double simlib3::Beta ( double  th,
double  fi,
double  min,
double  max 
)

Beta distribution generator.

Parameters
th
fi
min
max

Definition at line 181 of file random2.cc.

References _gam(), and min().

Referenced by SetStep().

◆ ContractStep() [1/2]

void simlib3::ContractStep ( )

contract step of integration

request for shorter step of num. integ.

Definition at line 64 of file intg.cc.

Referenced by simlib3::Relay::Eval(), SetStep(), and simlib3::Condition::Test().

◆ ContractStep() [2/2]

void simlib3::ContractStep ( double  time)

contract step of integration to end step time

request for step end (at most) at given time

Parameters
timeexpected end of step time

Definition at line 72 of file intg.cc.

References SIMLIB_MinStep, and SIMLIB_StepStartTime.

◆ Cos()

Input simlib3::Cos ( Input  x)

Definition at line 97 of file fun.cc.

◆ Debug()

unsigned long simlib3::Debug ( unsigned long  mode)

Definition at line 48 of file debug.cc.

References NoDebugErr, SIMLIB_debug_flag, and SIMLIB_warning().

Referenced by DebugOFF(), and DebugON().

◆ DebugOFF()

void simlib3::DebugOFF ( )

stop debugging output

Definition at line 42 of file debug.cc.

References Debug().

◆ DebugON()

void simlib3::DebugON ( )

start debugging output

Definition at line 36 of file debug.cc.

References Debug().

◆ DEFINE_HOOK() [1/8]

simlib3::DEFINE_HOOK ( Delay  )

◆ DEFINE_HOOK() [2/8]

simlib3::DEFINE_HOOK ( DelayInit  )

◆ DEFINE_HOOK() [3/8]

simlib3::DEFINE_HOOK ( ZDelayTimerInit  )

◆ DEFINE_HOOK() [4/8]

simlib3::DEFINE_HOOK ( Break  )

◆ DEFINE_HOOK() [5/8]

simlib3::DEFINE_HOOK ( SamplerAct  )

◆ DEFINE_HOOK() [6/8]

simlib3::DEFINE_HOOK ( SamplerInit  )

◆ DEFINE_HOOK() [7/8]

simlib3::DEFINE_HOOK ( WUclear  )

◆ DEFINE_HOOK() [8/8]

simlib3::DEFINE_HOOK ( WUget_next  )

◆ Erlang()

double simlib3::Erlang ( double  alfa,
int  beta 
)

Erlang distribution generator.

Parameters
alfa
beta

Definition at line 109 of file random2.cc.

References ErlangError, Random(), and SIMLIB_error().

Referenced by SetStep().

◆ Error()

void simlib3::Error ( const char *  fmt,
  ... 
)

print message and terminate program

Definition at line 123 of file print.cc.

References _Print(), simlib3::_FileWrap::OutFile, SIMLIB_error(), and UserError.

Referenced by simlib3::Barrier::ChangeHeight(), simlib3::Barrier::Init(), and SetStep().

◆ Exp()

Input simlib3::Exp ( Input  x)

Definition at line 105 of file fun.cc.

◆ Exponential()

double simlib3::Exponential ( double  mv)

Exponential distribution generator.

Parameters
mvmean value
Examples:
examples/model2-timeout.cc, examples/model2.cc, and examples/multiexp.cc.

Definition at line 152 of file random2.cc.

References Random().

Referenced by SetStep().

◆ FREE_CONTEXT()

static void simlib3::FREE_CONTEXT ( )
static

non-inline function for deallocating saved process context

Definition at line 241 of file process.cc.

Referenced by THREAD_INTERRUPT_f().

◆ Gamma()

double simlib3::Gamma ( double  alfa,
double  beta 
)

Gamma distribution generator.

Parameters
alfa
beta

Definition at line 141 of file random2.cc.

References _gam().

Referenced by SetStep().

◆ Geom()

int simlib3::Geom ( double  q)

Definition at line 257 of file random2.cc.

References GeomError, Random(), and SIMLIB_error().

Referenced by SetStep().

◆ GetName() [1/2]

std::string simlib3::GetName ( SimObject o)

get name of object

Definition at line 66 of file name.cc.

References simlib3::SimObject::Name().

Referenced by simlib3::Newton::Newton().

◆ GetName() [2/2]

std::string simlib3::GetName ( SimObject o)

get name of object

Definition at line 72 of file name.cc.

References simlib3::SimObject::Name().

◆ hooke_step()

static double simlib3::hooke_step ( double *  delta,
opt_function_t  f,
ParameterVector p,
double  min0 
)
static

Definition at line 29 of file opt-hooke.cc.

References simlib3::ParameterVector::size().

Referenced by Optimize_hooke().

◆ HyperGeom()

int simlib3::HyperGeom ( double  p,
int  n,
int  m 
)

Definition at line 270 of file random2.cc.

References HyperGeomError1, HyperGeomError2, Random(), and SIMLIB_error().

Referenced by SetStep().

◆ Init()

void simlib3::Init ( double  t0,
double  t1 = SIMLIB_MAXTIME 
)
inline

◆ Ln()

Input simlib3::Ln ( Input  x)

Definition at line 107 of file fun.cc.

◆ Log10()

Input simlib3::Log10 ( Input  x)

Definition at line 106 of file fun.cc.

◆ Logar()

double simlib3::Logar ( double  mi,
double  delta 
)

Definition at line 210 of file random2.cc.

References Normal().

Referenced by SetStep().

◆ Max()

Input simlib3::Max ( Input  x,
Input  y 
)

Definition at line 115 of file fun.cc.

References simlib3::Function2::Function2(), and max().

Referenced by simlib3::Sampler::GetStep().

◆ max()

double simlib3::max ( double  a,
double  b 
)
inline

◆ Min()

Input simlib3::Min ( Input  x,
Input  y 
)

Definition at line 114 of file fun.cc.

References simlib3::Function2::Function2(), and min().

Referenced by simlib3::Sampler::GetStep().

◆ min()

double simlib3::min ( double  a,
double  b 
)
inline

◆ move_to_next_point()

void simlib3::move_to_next_point ( ParameterVector p,
double  eps 
)

Definition at line 39 of file opt-simann.cc.

References Random(), and simlib3::ParameterVector::size().

Referenced by Optimize_simann().

◆ NegBin()

int simlib3::NegBin ( double  q,
int  k 
)

Definition at line 121 of file random2.cc.

References NegBinError, Random(), and SIMLIB_error().

Referenced by SetStep().

◆ NegBinM()

int simlib3::NegBinM ( double  p,
int  m 
)

Definition at line 164 of file random2.cc.

References NegBinMError1, NegBinMError2, Random(), and SIMLIB_error().

Referenced by SetStep().

◆ Normal()

double simlib3::Normal ( double  mi,
double  sigma 
)

Gauss distribution generator.

Parameters
mimean value
sigmastd. deviation

Definition at line 82 of file random2.cc.

References Random().

Referenced by Logar(), Poisson(), and SetStep().

◆ operator*() [1/11]

Value3D simlib3::operator* ( const Value3D a,
const Value3D b 
)

Definition at line 58 of file simlib3D.cc.

References simlib3::Value3D::_x, simlib3::Value3D::_y, and simlib3::Value3D::_z.

◆ operator*() [2/11]

Value3D simlib3::operator* ( const Value3D a,
const double  b 
)

Definition at line 66 of file simlib3D.cc.

References simlib3::Value3D::_x, simlib3::Value3D::_y, and simlib3::Value3D::_z.

◆ operator*() [3/11]

Value2D simlib3::operator* ( const Value2D a,
const double  b 
)

Definition at line 68 of file simlib2D.cc.

References simlib3::Value2D::_x, and simlib3::Value2D::_y.

◆ operator*() [4/11]

Value3D simlib3::operator* ( const double  a,
const Value3D b 
)

Definition at line 71 of file simlib3D.cc.

◆ operator*() [5/11]

Value2D simlib3::operator* ( const double  a,
const Value2D b 
)

Definition at line 73 of file simlib2D.cc.

◆ operator*() [6/11]

Input simlib3::operator* ( Input  a,
Input  b 
)

block operator *

Definition at line 228 of file continuous.cc.

◆ operator*() [7/11]

Input2D simlib3::operator* ( Input2D  a,
Input  b 
)

Definition at line 312 of file simlib2D.cc.

◆ operator*() [8/11]

Input2D simlib3::operator* ( Input  a,
Input2D  b 
)

Definition at line 313 of file simlib2D.cc.

◆ operator*() [9/11]

Input3D simlib3::operator* ( Input3D  a,
Input3D  b 
)

Definition at line 330 of file simlib3D.cc.

◆ operator*() [10/11]

Input3D simlib3::operator* ( Input3D  a,
Input  b 
)

Definition at line 331 of file simlib3D.cc.

◆ operator*() [11/11]

Input3D simlib3::operator* ( Input  a,
Input3D  b 
)

Definition at line 332 of file simlib3D.cc.

◆ operator+() [1/5]

Value3D simlib3::operator+ ( const Value3D a,
const Value3D b 
)

Definition at line 43 of file simlib3D.cc.

References simlib3::Value3D::_x, simlib3::Value3D::_y, and simlib3::Value3D::_z.

◆ operator+() [2/5]

Value2D simlib3::operator+ ( const Value2D a,
const Value2D b 
)

Definition at line 43 of file simlib2D.cc.

References simlib3::Value2D::_x, and simlib3::Value2D::_y.

◆ operator+() [3/5]

Input simlib3::operator+ ( Input  a,
Input  b 
)

block operator +

Definition at line 224 of file continuous.cc.

◆ operator+() [4/5]

Input2D simlib3::operator+ ( Input2D  a,
Input2D  b 
)

Definition at line 310 of file simlib2D.cc.

◆ operator+() [5/5]

Input3D simlib3::operator+ ( Input3D  a,
Input3D  b 
)

Definition at line 328 of file simlib3D.cc.

◆ operator-() [1/10]

Value3D simlib3::operator- ( const Value3D a,
const Value3D b 
)

Definition at line 48 of file simlib3D.cc.

References simlib3::Value3D::_x, simlib3::Value3D::_y, and simlib3::Value3D::_z.

◆ operator-() [2/10]

Value2D simlib3::operator- ( const Value2D a,
const Value2D b 
)

Definition at line 48 of file simlib2D.cc.

References simlib3::Value2D::_x, and simlib3::Value2D::_y.

◆ operator-() [3/10]

Value3D simlib3::operator- ( const Value3D a)

Definition at line 53 of file simlib3D.cc.

References simlib3::Value3D::_x, simlib3::Value3D::_y, and simlib3::Value3D::_z.

◆ operator-() [4/10]

Value2D simlib3::operator- ( const Value2D a)

Definition at line 53 of file simlib2D.cc.

References simlib3::Value2D::_x, and simlib3::Value2D::_y.

◆ operator-() [5/10]

Input simlib3::operator- ( Input  a,
Input  b 
)

block operator -

Definition at line 226 of file continuous.cc.

◆ operator-() [6/10]

Input simlib3::operator- ( Input  a)

unary - block operator

Definition at line 262 of file continuous.cc.

◆ operator-() [7/10]

Input2D simlib3::operator- ( Input2D  a,
Input2D  b 
)

Definition at line 311 of file simlib2D.cc.

◆ operator-() [8/10]

Input3D simlib3::operator- ( Input3D  a,
Input3D  b 
)

Definition at line 329 of file simlib3D.cc.

◆ operator-() [9/10]

Input2D simlib3::operator- ( Input2D  a)

Definition at line 334 of file simlib2D.cc.

◆ operator-() [10/10]

Input3D simlib3::operator- ( Input3D  a)

Definition at line 353 of file simlib3D.cc.

◆ operator/() [1/5]

Value3D simlib3::operator/ ( const Value3D a,
const double  b 
)

Definition at line 81 of file simlib3D.cc.

References simlib3::Value3D::_x, simlib3::Value3D::_y, and simlib3::Value3D::_z.

◆ operator/() [2/5]

Value2D simlib3::operator/ ( const Value2D a,
const double  b 
)

Definition at line 83 of file simlib2D.cc.

References simlib3::Value2D::_x, and simlib3::Value2D::_y.

◆ operator/() [3/5]

Input simlib3::operator/ ( Input  a,
Input  b 
)

block operator /

Definition at line 230 of file continuous.cc.

◆ operator/() [4/5]

Input2D simlib3::operator/ ( Input2D  a,
Input  b 
)

Definition at line 314 of file simlib2D.cc.

◆ operator/() [5/5]

Input3D simlib3::operator/ ( Input3D  a,
Input  b 
)

Definition at line 333 of file simlib3D.cc.

◆ operator==()

bool simlib3::operator== ( const ParameterVector p1,
const ParameterVector p2 
)

◆ Optimize_gradient()

double simlib3::Optimize_gradient ( opt_function_t  f,
ParameterVector p,
double  MAXITER 
)

◆ Optimize_hooke()

double simlib3::Optimize_hooke ( opt_function_t  f,
ParameterVector parameter,
double  rho,
double  epsilon,
int  itermax 
)

◆ Optimize_simann() [1/2]

double simlib3::Optimize_simann ( double(*)(const ParameterVector &p)  f,
ParameterVector p,
int  MAXT 
)

Definition at line 52 of file opt-simann.cc.

References accept_bad(), move_to_next_point(), and Print().

◆ Optimize_simann() [2/2]

double simlib3::Optimize_simann ( opt_function_t  f,
ParameterVector p,
int  MAXT 
)

◆ Passivate()

void simlib3::Passivate ( Entity e)
inline

passivate entity e

Definition at line 432 of file simlib.h.

References simlib3::Entity::Passivate().

Referenced by simlib3::Process::_WaitUntil(), simlib3::Entity::Activate(), and simlib3::Semaphore::P().

◆ Poisson()

int simlib3::Poisson ( double  lambda)

Poisson distribution generator.

Parameters
lambda

Definition at line 229 of file random2.cc.

References Normal(), PoissonError, Random(), and SIMLIB_error().

Referenced by SetStep().

◆ Pow()

Input simlib3::Pow ( Input  x,
Input  y 
)

Definition at line 108 of file fun.cc.

References simlib3::Function2::Function2().

◆ Print() [1/6]

int simlib3::Print ( const char *  fmt,
  ... 
)

◆ Print() [2/6]

int simlib3::Print ( const double  x)

output single value

Parameters
xvalue to print

Definition at line 105 of file print.cc.

References Print().

◆ Print() [3/6]

int simlib3::Print ( const double  x,
const double  y 
)

output 2 values

Parameters
xvalue to print
yvalue to print

Definition at line 110 of file print.cc.

References Print().

◆ Print() [4/6]

int simlib3::Print ( const double  x,
const double  y,
const double  z 
)

output 3 values

Parameters
xvalue to print
yvalue to print
zvalue to print

Definition at line 115 of file print.cc.

References Print().

◆ Print() [5/6]

void simlib3::Print ( Value2D  a)
inline

Definition at line 237 of file simlib2D.h.

References simlib3::Value2D::Print().

◆ Print() [6/6]

void simlib3::Print ( Value3D  a)
inline

Definition at line 245 of file simlib3D.h.

References simlib3::Value3D::Print().

◆ Random()

double simlib3::Random ( )

base uniform generator (range 0-0.999999...) the default implementation is simple LCG 32bit

Definition at line 95 of file random1.cc.

References SIMLIB_RandomBasePtr.

Referenced by _gam(), accept_bad(), Erlang(), Exponential(), Geom(), HyperGeom(), move_to_next_point(), NegBin(), NegBinM(), Normal(), Poisson(), Rayle(), SetStep(), Triag(), Uniform(), and Weibul().

◆ RandomSeed()

void simlib3::RandomSeed ( long  seed)

initialize random number seed

Parameters
seedinitial value of generator state

Definition at line 64 of file random1.cc.

Referenced by SetStep().

◆ Rayle()

double simlib3::Rayle ( double  delta)

Definition at line 219 of file random2.cc.

References Random().

Referenced by SetStep().

◆ RemoveName() [1/2]

void simlib3::RemoveName ( SimObject o)

remove name

Definition at line 54 of file name.cc.

References simlib3::SimObject::SetName().

Referenced by simlib3::Newton::Newton().

◆ RemoveName() [2/2]

void simlib3::RemoveName ( SimObject o)

remove name

Definition at line 60 of file name.cc.

References simlib3::SimObject::SetName().

◆ Run()

void simlib3::Run ( )

◆ SampleDelays()

void simlib3::SampleDelays ( )

Definition at line 92 of file run.cc.

References CALL_HOOK, and DEFINE_HOOK().

Referenced by SIMLIB_DoConditions().

◆ scalar_product() [1/2]

double simlib3::scalar_product ( const Value3D a,
const Value3D b 
)

Definition at line 76 of file simlib3D.cc.

References simlib3::Value3D::_x, simlib3::Value3D::_y, and simlib3::Value3D::_z.

◆ scalar_product() [2/2]

double simlib3::scalar_product ( const Value2D a,
const Value2D b 
)

◆ ScalarProduct() [1/2]

Input simlib3::ScalarProduct ( Input2D  x,
Input2D  y 
)

dot product: xvec . yvec

Definition at line 389 of file simlib2D.cc.

Referenced by simlib3::Integrator3D::Init(), and simlib3::Integrator2D::SetInput().

◆ ScalarProduct() [2/2]

Input simlib3::ScalarProduct ( Input3D  x,
Input3D  y 
)

dot product: xvec . yvec

Definition at line 408 of file simlib3D.cc.

◆ SetAccuracy() [1/2]

void simlib3::SetAccuracy ( double  abserr,
double  relerr 
)

set max.

error estimate for numerical integration method used for adaptive stepsize control

Parameters
abserrabsolute tolerance
relerrtolerance relative to integrator value
Examples:
_test_.cc, examples/ball.cc, examples/ball2.cc, examples/ctest.cc, examples/heating.cc, examples/lorenz.cc, examples/wheel.cc, and examples/wheel2.cc.

Definition at line 106 of file intg.cc.

References Dprintf, SetAccuracyError, and SIMLIB_error().

Referenced by main(), SetAccuracy(), and SetStep().

◆ SetAccuracy() [2/2]

void simlib3::SetAccuracy ( double  relerr)

set max.

relative error estimate for numerical integration method

Parameters
relerrtolerance relative to integrator value

Definition at line 116 of file intg.cc.

References SetAccuracy().

◆ SetBaseRandomGenerator()

void simlib3::SetBaseRandomGenerator ( double(*)()  new_gen)

set another random generator default Random() implementation can be replaced

Parameters
new_genpointer to user-defined function

Definition at line 103 of file random1.cc.

References SIMLIB_RandomBase(), and SIMLIB_RandomBasePtr.

Referenced by SetStep().

◆ SetCalendar()

void simlib3::SetCalendar ( const char *  name)

choose calendar implementation default is list

Set calendar implementation.

Parameters
nameString identification of calendar: "list", "cq"

Definition at line 1250 of file calendar.cc.

References simlib3::CalendarList::create(), simlib3::CalendarQueue::create(), simlib3::Calendar::delete_instance(), INITIALIZATION, SIMLIB_error(), SIMLIB_Phase, and SIMULATION.

Referenced by Init().

◆ SetErrNo()

void simlib3::SetErrNo ( int  num)

Definition at line 327 of file numint.cc.

References SIMLIB_ERRNO.

Referenced by simlib3::IntegrationMethod::GetMethod().

◆ SetName() [1/2]

void simlib3::SetName ( SimObject o,
const std::string &  name 
)

assign name to object

Definition at line 42 of file name.cc.

References simlib3::SimObject::SetName().

◆ SetName() [2/2]

void simlib3::SetName ( SimObject o,
const std::string &  name 
)

assign name to object

Definition at line 48 of file name.cc.

References simlib3::SimObject::SetName().

◆ SetOutput()

void simlib3::SetOutput ( const char *  name)

◆ SetStep() [1/2]

void simlib3::SetStep ( double  dtmin,
double  dtmax 
)

Set integration step interval.

Parameters
dtminmin. step size
dtmaxmax. step size (can be slightly increased)
Examples:
_test_.cc, examples/ball.cc, examples/ball2.cc, examples/bessel.cc, examples/heating.cc, examples/rc.cc, examples/rlc.cc, examples/test3D.cc, and examples/wheel.cc.

Definition at line 92 of file intg.cc.

References Dprintf, SetStepError, and SIMLIB_error().

Referenced by Init(), main(), and SetStep().

◆ SetStep() [2/2]

void simlib3::SetStep ( double  dt)
inline

◆ sign()

static double simlib3::sign ( double  x)
static

Definition at line 78 of file fun.cc.

Referenced by Sign().

◆ Sign()

Input simlib3::Sign ( Input  x)

Definition at line 110 of file fun.cc.

References sign().

◆ SIMLIB_atexit()

void simlib3::SIMLIB_atexit ( SIMLIB_atexit_function_t  p)

◆ SIMLIB_atexit_call()

static void simlib3::SIMLIB_atexit_call ( )
static

Definition at line 39 of file atexit.cc.

References DBG_ATEXIT, DEBUG, and MAX_ATEXIT.

Referenced by simlib3::SIMLIB_module::~SIMLIB_module().

◆ SIMLIB_ContinueInit()

void simlib3::SIMLIB_ContinueInit ( )

◆ SIMLIB_create_tmp_name()

std::string simlib3::SIMLIB_create_tmp_name ( const char *  fmt,
  ... 
)

◆ SIMLIB_DoActions()

void simlib3::SIMLIB_DoActions ( )

Definition at line 135 of file run.cc.

References simlib3::Entity::_Run(), and CALL_HOOK.

Referenced by simlib3::Entity::Cancel(), and Run().

◆ SIMLIB_DoConditions()

void simlib3::SIMLIB_DoConditions ( )

◆ SIMLIB_Dynamic()

void simlib3::SIMLIB_Dynamic ( )

◆ SIMLIB_error() [1/3]

void simlib3::SIMLIB_error ( const enum _ErrEnum  N)

print error message and abort program

print specific error messages

Definition at line 38 of file error.cc.

References _ABORT_TXT, _ERR_TXT, _ErrMsg(), _Print(), ERROREXIT, SIMLIB_DynamicFlag, SIMLIB_Phase, and Time.

Referenced by simlib3::aContiBlock2D::_Eval(), simlib3::aContiBlock3D::_Eval(), simlib3::aContiBlock::_Eval(), simlib3::Process::_Run(), simlib3::aContiBlock1::aContiBlock1(), simlib3::aContiBlock2::aContiBlock2(), simlib3::aContiBlock2D1::aContiBlock2D1(), simlib3::aContiBlock2D2::aContiBlock2D2(), simlib3::aContiBlock2D3::aContiBlock2D3(), simlib3::aContiBlock3::aContiBlock3(), simlib3::aContiBlock3D1::aContiBlock3D1(), simlib3::aContiBlock3D2::aContiBlock3D2(), simlib3::aContiBlock3D3::aContiBlock3D3(), simlib3::AlgLoop::AlgLoop(), simlib3::Integrator::CtrInit(), simlib3::Status::CtrInit(), simlib3::Calendar::delete_instance(), simlib3::Store::Enter(), Erlang(), Error(), simlib3::CalendarQueue::estimate_bucket_width(), simlib3::Frict::Frict(), Geom(), simlib3::SIMLIB_DelayBuffer::get(), simlib3::CalendarList::Get(), simlib3::CalendarQueue::Get(), simlib3::List::Get(), simlib3::CalendarList::GetFirst(), simlib3::CalendarQueue::GetFirst(), simlib3::Histogram::Histogram(), HyperGeom(), simlib3::Histogram::Init(), simlib3::Insv::Insv(), simlib3::IntegrationMethod::IntegrationMethod(), simlib3::Store::Leave(), simlib3::Lim::Lim(), simlib3::AlgLoopDetector::lock(), simlib3::Stat::MeanValue(), simlib3::TStat::MeanValue(), NegBin(), NegBinM(), simlib3::Parameter2D::operator=(), simlib3::Parameter3D::operator=(), simlib3::Link::Out(), simlib3::Entity::Passivate(), Poisson(), simlib3::List::PostIns(), simlib3::List::PredIns(), simlib3::IntegrationMethod::Prepare(), simlib3::Qntzr::Qntzr(), simlib3::Facility::Release(), simlib3::Rline::Rline(), Run(), simlib3::SQS::ScheduleAt(), simlib3::CalendarList::ScheduleAt(), simlib3::CalendarQueue::ScheduleAt(), simlib3::IntegrationMethod::SearchMethod(), simlib3::CalendarQueue::SearchMinTime(), simlib3::Facility::Seize(), simlib3::AlgLoop::Set(), SetAccuracy(), SetCalendar(), simlib3::Store::SetCapacity(), simlib3::IntegrationMethod::SetMethod(), simlib3::MultiStepMethod::SetStarter(), SetStep(), SIMLIB_Init(), simlib3::MultiStepMethod::SlavePtr(), simlib3::Stat::StdDev(), Stop(), THREAD_INTERRUPT_f(), Uniform(), simlib3::Semaphore::V(), simlib3::Iterations::Value(), simlib3::Bisect::Value(), simlib3::RegulaFalsi::Value(), simlib3::Newton::Value(), Weibul(), simlib3::Integrator::~Integrator(), simlib3::Link::~Link(), and simlib3::Status::~Status().

◆ SIMLIB_error() [2/3]

void simlib3::SIMLIB_error ( const char *  fmt,
  ... 
)

print error message and abort program

print formatted error messages

Definition at line 48 of file error.cc.

References _ABORT_TXT, _ERR_TXT, _Print(), and Time.

◆ SIMLIB_error() [3/3]

void simlib3::SIMLIB_error ( const char *  filename,
const int  linenum 
)

print error message and abort program

print internal error messages

Definition at line 61 of file error.cc.

References _ABORT_TXT, _ErrMsg(), _INT_ERR_TXT, _Print(), ERROREXIT, InternalError, SIMLIB_DynamicFlag, SIMLIB_Phase, and Time.

◆ SIMLIB_Init()

void simlib3::SIMLIB_Init ( double  T0,
double  T1,
unsigned  version 
)

◆ SIMLIB_RandomBase()

double simlib3::SIMLIB_RandomBase ( )

Definition at line 75 of file random1.cc.

References MAXLONGINT, MULCONST, and SIMLIB_RandomSeed.

Referenced by SetBaseRandomGenerator().

◆ SIMLIB_version_string()

const char * simlib3::SIMLIB_version_string ( )

Get version of SIMLIB.

Returns
string with version of SIMLIB/C++

Definition at line 13 of file version.cc.

References SIMLIB_VERSION.

◆ SIMLIB_warning() [1/2]

void simlib3::SIMLIB_warning ( const enum _ErrEnum  N)

◆ SIMLIB_warning() [2/2]

void simlib3::SIMLIB_warning ( const char *  fmt,
  ... 
)

print warning message and continue

print warnings

Definition at line 80 of file error.cc.

References _ERR_TXT, _Print(), and Time.

◆ SIMLIB_WUClear()

void simlib3::SIMLIB_WUClear ( )

Definition at line 123 of file run.cc.

References CALL_HOOK, and DEFINE_HOOK().

Referenced by SIMLIB_Init().

◆ Sin()

Input simlib3::Sin ( Input  x)
Examples:
_test_.cc, and examples/rc.cc.

Definition at line 96 of file fun.cc.

◆ Sqr()

Input simlib3::Sqr ( Input  x)

square function

Definition at line 233 of file continuous.cc.

◆ Sqrt()

Input simlib3::Sqrt ( Input  x)

Definition at line 112 of file fun.cc.

◆ Stop()

void simlib3::Stop ( )

stop current simulation run

Examples:
examples/ball.cc, and examples/ball2.cc.

Definition at line 147 of file run.cc.

References Dprintf, SFunctionUseError, SIMLIB_error(), and SIMULATION.

Referenced by SetStep().

◆ Tan()

Input simlib3::Tan ( Input  x)

Definition at line 98 of file fun.cc.

◆ THREAD_INTERRUPT_f()

static void simlib3::THREAD_INTERRUPT_f ( )
static

Special function called from Process::Behavior() directly or indirectly.

This function: 1) computes stack content size, 2) allocates memory for stack contents, 3) saves stack contents to allocated memory, 4) saves CPU context using setjmp(), and 5) interrupts execution of current function using longjmp() to process dispatcher code, == (now run dispatcher and other code) 6) continues execution after longjmp from dispatcher. 7) frees memory allocated at 2)

Warning: This function is critical to process switching code and should not be inlined! It is never called directly by SIMLIB user.

Definition at line 603 of file process.cc.

References ALLOC_CONTEXT, CANARY2, FREE_CONTEXT(), SIMLIB_error(), simlib3::P_Context_t::stack, simlib3::P_Context_t::status, and THREAD_DEBUG.

◆ Triag()

double simlib3::Triag ( double  mod,
double  min,
double  max 
)

Definition at line 193 of file random2.cc.

References min(), and Random().

Referenced by SetStep().

◆ Uniform()

double simlib3::Uniform ( double  l,
double  h 
)

Uniform distribution generator.

Parameters
llow limit
hhigh limit

Definition at line 71 of file random2.cc.

References BadUniformParam, Random(), and SIMLIB_error().

Referenced by SetStep().

◆ UnitVector() [1/2]

Input2D simlib3::UnitVector ( Input2D  x)

make unit vector from input (Abs(output_vec)==1)

Definition at line 388 of file simlib2D.cc.

Referenced by simlib3::Integrator3D::Init(), and simlib3::Integrator2D::SetInput().

◆ UnitVector() [2/2]

Input3D simlib3::UnitVector ( Input3D  x)

make unit vector from input (Abs(output_vec)==1)

Definition at line 407 of file simlib3D.cc.

◆ Weibul()

double simlib3::Weibul ( double  lambda,
double  alfa 
)

Weibul distribution generator.

Parameters
lambda
alfa

Definition at line 94 of file random2.cc.

References Random(), SIMLIB_error(), and WeibullError.

Referenced by SetStep().

◆ WU_print()

void simlib3::WU_print ( )

◆ Xpart() [1/2]

Input simlib3::Xpart ( Input2D  a)

get x part of (x,y) vector value

Definition at line 420 of file simlib2D.cc.

References simlib3::_XYpart::x.

Referenced by simlib3::Integrator3D::Init(), and simlib3::Integrator2D::SetInput().

◆ Xpart() [2/2]

Input simlib3::Xpart ( Input3D  a)

get x part of (x,y,z) vector value

Definition at line 440 of file simlib3D.cc.

References simlib3::_XYZpart::x.

◆ Ypart() [1/2]

Input simlib3::Ypart ( Input2D  a)

get y part of (x,y) vector value

Definition at line 421 of file simlib2D.cc.

References simlib3::_XYpart::y.

Referenced by simlib3::Integrator3D::Init(), and simlib3::Integrator2D::SetInput().

◆ Ypart() [2/2]

Input simlib3::Ypart ( Input3D  a)

get y part of (x,y,z) vector value

Definition at line 441 of file simlib3D.cc.

References simlib3::_XYZpart::y.

◆ Zpart()

Input simlib3::Zpart ( Input3D  a)

get z part of (x,y,z) vector value

Definition at line 442 of file simlib3D.cc.

References simlib3::_XYZpart::z.

Referenced by simlib3::Integrator3D::Init().

Variable Documentation

◆ _Errors

const char simlib3::_Errors[]
static

Definition at line 13 of file errors.cc.

Referenced by _ErrMsg().

◆ _T

class _Time simlib3::_T
static

block – simulation time

Definition at line 274 of file continuous.cc.

◆ abm4

ABM4 simlib3::abm4("abm4", "rkf5")

Adams-Bashforth-Moulton, 4th order.

Referenced by simlib3::StatusMethod::GoToState().

◆ abm_ord

const int simlib3::abm_ord =4

Definition at line 20 of file ni_abm4.h.

Referenced by simlib3::ABM4::Integrate().

◆ AbsoluteError

const double & simlib3::AbsoluteError =SIMLIB_AbsoluteError

max. abs. error of integration

max absolute error

Definition at line 53 of file intg.cc.

◆ allocator

class simlib3::EventNoticeAllocator simlib3::allocator

◆ atexit_array

SIMLIB_atexit_function_t simlib3::atexit_array[MAX_ATEXIT] = { 0, }
static

Definition at line 23 of file atexit.cc.

◆ COEF_PAR

const double simlib3::COEF_PAR = 1.5

◆ counter

int simlib3::counter = 0
static

Definition at line 22 of file atexit.cc.

Referenced by simlib3::SIMLIB_module::Init().

◆ Current

Entity *const & simlib3::Current = SIMLIB_Current

pointer to active (now running) entity

Examples:
examples/rc.cc.

Definition at line 54 of file run.cc.

Referenced by simlib3::Store::Enter(), simlib3::Barrier::Enter(), simlib3::Semaphore::P(), simlib3::Facility::Seize(), and simlib3::Barrier::Wait().

◆ EndTime

const double & simlib3::EndTime = SIMLIB_EndTime

time of simulation end

Definition at line 50 of file run.cc.

Referenced by simlib3::SIMLIB_statistics_t::Output().

◆ euler

EULER simlib3::euler("euler")

Euler method.

Referenced by simlib3::StatusMethod::GoToState().

◆ flag

bool simlib3::flag = false
static

Definition at line 89 of file waitunti.cc.

Referenced by simlib3::Facility::Release(), and simlib3::Status::SetValid().

◆ fw

FW simlib3::fw("fw")

Fowler-Warten (Warning: needs testing, do not use)

Referenced by simlib3::StatusMethod::GoToState().

◆ INICONST

const myint32 simlib3::INICONST = 1537L

Definition at line 48 of file random1.cc.

◆ LIST_MAX

const unsigned simlib3::LIST_MAX = 512

Definition at line 535 of file calendar.cc.

◆ LIST_MIN

const unsigned simlib3::LIST_MIN = LIST_MAX/2

Definition at line 537 of file calendar.cc.

◆ MAX_ATEXIT

const int simlib3::MAX_ATEXIT = 10
static

Definition at line 21 of file atexit.cc.

Referenced by SIMLIB_atexit(), and SIMLIB_atexit_call().

◆ MAXHISTOCOUNT

const unsigned simlib3::MAXHISTOCOUNT = 10000

Definition at line 30 of file histo.cc.

◆ MAXLONGINT

const myint32 simlib3::MAXLONGINT = 0x7FFFFFFFUL

Definition at line 52 of file random1.cc.

Referenced by SIMLIB_RandomBase().

◆ MaxStep

const double & simlib3::MaxStep =SIMLIB_MaxStep

maximal integration step

maximal step size

Definition at line 47 of file intg.cc.

Referenced by simlib3::SIMLIB_statistics_t::Output().

◆ MINBUCKETS

const unsigned simlib3::MINBUCKETS = LIST_MAX>4?LIST_MAX:4

Definition at line 536 of file calendar.cc.

Referenced by simlib3::CalendarQueue::Resize().

◆ MinStep

const double & simlib3::MinStep =SIMLIB_MinStep

minimal integration step

minimal step size

Definition at line 46 of file intg.cc.

Referenced by simlib3::SIMLIB_statistics_t::Output().

◆ MUL_PAR

const double simlib3::MUL_PAR = 1.0

Definition at line 543 of file calendar.cc.

◆ MULCONST

const myint32 simlib3::MULCONST = 1220703125L

Definition at line 49 of file random1.cc.

Referenced by SIMLIB_RandomBase().

◆ name_dict

NameDict simlib3::name_dict
static

Definition at line 66 of file object.cc.

◆ NextTime

const double & simlib3::NextTime = SIMLIB_NextTime

◆ OptStep

const double & simlib3::OptStep =SIMLIB_OptStep

◆ OutFile

class simlib3::_FileWrap simlib3::OutFile

◆ P_Context

P_Context_t* volatile simlib3::P_Context = 0
static

temporary global process state

Definition at line 132 of file process.cc.

Referenced by simlib3::Process::_Run().

◆ P_DispatcherStatusBuffer

jmp_buf simlib3::P_DispatcherStatusBuffer
static

setjmp() state before dispatch

Definition at line 128 of file process.cc.

◆ P_StackBase

char* volatile simlib3::P_StackBase = 0
static

global start of stack area

Definition at line 129 of file process.cc.

Referenced by simlib3::Process::_Run().

◆ P_StackBase2

char* volatile simlib3::P_StackBase2 = 0
static

for checking start of stack

Definition at line 130 of file process.cc.

◆ P_StackSize

volatile size_t simlib3::P_StackSize = 0
static

temporary global stack size

Definition at line 133 of file process.cc.

Referenced by simlib3::Process::_Run().

◆ Phase

const SIMLIB_Phase_t & simlib3::Phase = SIMLIB_Phase

This variable contains the current phase of experiment (used for internal checking)

Definition at line 58 of file run.cc.

◆ RelativeError

const double & simlib3::RelativeError =SIMLIB_RelativeError

max. rel. error

max relative error

Definition at line 54 of file intg.cc.

◆ rke

RKE simlib3::rke("rke")

Runge-Kutta-England, 4th order?

Referenced by simlib3::StatusMethod::GoToState().

◆ rkf3

RKF3 simlib3::rkf3("rkf3")

Runge-Kutta-Fehlberg, 3rd order.

Referenced by simlib3::StatusMethod::GoToState().

◆ rkf5

RKF5 simlib3::rkf5("rkf5")

Runge-Kutta-Fehlberg, 5th order.

Referenced by simlib3::StatusMethod::GoToState().

◆ rkf8

RKF8 simlib3::rkf8("rkf8")

Runge-Kutta-Fehlberg, 8th order.

Referenced by simlib3::StatusMethod::GoToState().

◆ SIGNBIT

const myint32 simlib3::SIGNBIT = 0x80000000UL

Definition at line 53 of file random1.cc.

◆ SIMLIB_AbsoluteError

double simlib3::SIMLIB_AbsoluteError =0

◆ SIMLIB_ConditionFlag

bool simlib3::SIMLIB_ConditionFlag = false

◆ SIMLIB_ContractStep

double simlib3::SIMLIB_ContractStep = SIMLIB_MAXTIME

◆ SIMLIB_ContractStepFlag

bool simlib3::SIMLIB_ContractStepFlag = false

◆ SIMLIB_Current

Entity * simlib3::SIMLIB_Current = NULL

◆ SIMLIB_debug_flag

unsigned long simlib3::SIMLIB_debug_flag = 0UL

Definition at line 32 of file debug.cc.

Referenced by Debug().

◆ SIMLIB_DeltaTime

double simlib3::SIMLIB_DeltaTime

◆ SIMLIB_DynamicFlag

bool simlib3::SIMLIB_DynamicFlag = false

◆ SIMLIB_EndTime

double simlib3::SIMLIB_EndTime

Definition at line 43 of file run.cc.

◆ SIMLIB_Entity_Count

unsigned long simlib3::SIMLIB_Entity_Count = 0L
static

current number of entities in model

Definition at line 27 of file entity.cc.

◆ SIMLIB_ERRNO

int simlib3::SIMLIB_ERRNO =0

◆ SIMLIB_experiment_no

unsigned long simlib3::SIMLIB_experiment_no = 0

Definition at line 61 of file run.cc.

Referenced by SIMLIB_Init().

◆ SIMLIB_IMPLEMENTATION

simlib3::SIMLIB_IMPLEMENTATION

Definition at line 34 of file algloop.cc.

◆ SIMLIB_Integrator_0input

Constant simlib3::SIMLIB_Integrator_0input(0)

dummy input with zero value

Referenced by simlib3::Integrator::CtrInit().

◆ SIMLIB_MaxStep

double simlib3::SIMLIB_MaxStep =1

◆ SIMLIB_MAXTIME

const double simlib3::SIMLIB_MAXTIME = 1.0e30

◆ SIMLIB_MinStep

double simlib3::SIMLIB_MinStep =1e-10

◆ SIMLIB_MINTIME

const double simlib3::SIMLIB_MINTIME = 0.0

minimal time value

Definition at line 147 of file simlib.h.

Referenced by SIMLIB_Init().

◆ SIMLIB_module_id

SIMLIB_module simlib3::SIMLIB_module_id
static

Create single global registration object in each SIMLIB module.

Should be first initialized object in the module

Definition at line 73 of file internal.h.

◆ SIMLIB_NextTime

double simlib3::SIMLIB_NextTime

Definition at line 42 of file run.cc.

◆ SIMLIB_OptStep

double simlib3::SIMLIB_OptStep

◆ SIMLIB_Phase

SIMLIB_Phase_t simlib3::SIMLIB_Phase = START

◆ SIMLIB_RandomBasePtr

double(* simlib3::SIMLIB_RandomBasePtr) () = SIMLIB_RandomBase
static

Definition at line 88 of file random1.cc.

Referenced by Random(), and SetBaseRandomGenerator().

◆ SIMLIB_RandomSeed

myint32 simlib3::SIMLIB_RandomSeed = INICONST
static

Definition at line 59 of file random1.cc.

Referenced by SIMLIB_RandomBase().

◆ SIMLIB_RelativeError

double simlib3::SIMLIB_RelativeError =0.001

◆ SIMLIB_ResetStatus

bool simlib3::SIMLIB_ResetStatus = false

flag set if there is a need for integration method restart

Definition at line 86 of file intg.cc.

Referenced by simlib3::IntegrationMethod::Prepare(), Run(), and SIMLIB_DoConditions().

◆ SIMLIB_run_statistics

SIMLIB_statistics_t simlib3::SIMLIB_run_statistics
static

Definition at line 77 of file run.cc.

◆ SIMLIB_StartTime

double simlib3::SIMLIB_StartTime

Definition at line 40 of file run.cc.

◆ SIMLIB_statistics

const SIMLIB_statistics_t & simlib3::SIMLIB_statistics = SIMLIB_run_statistics

◆ SIMLIB_StepSize

double simlib3::SIMLIB_StepSize

◆ SIMLIB_StepStartTime

double simlib3::SIMLIB_StepStartTime

◆ SIMLIB_Time

double simlib3::SIMLIB_Time

Definition at line 209 of file internal.h.

Referenced by SIMLIB_ContinueInit().

◆ SIMLIB_version

const unsigned simlib3::SIMLIB_version = __SIMLIB__

library version

Definition at line 9 of file version.cc.

Referenced by SIMLIB_Init().

◆ SimObject_allocated

bool simlib3::SimObject_allocated = false
static

Definition at line 24 of file object.cc.

◆ StartTime

const double & simlib3::StartTime = SIMLIB_StartTime

time of simulation start

Definition at line 47 of file run.cc.

Referenced by simlib3::SIMLIB_statistics_t::Output().

◆ StepSize

const double & simlib3::StepSize =SIMLIB_StepSize

actual integration step

current step size

Definition at line 48 of file intg.cc.

Referenced by Run().

◆ StopFlag

bool simlib3::StopFlag = false
static

Definition at line 83 of file run.cc.

◆ T

aContiBlock & simlib3::T = _T

simulation time block reference

model time (continuous block)

Examples:
_test_.cc, examples/ball.cc, examples/ball2.cc, examples/bessel.cc, examples/ctest.cc, examples/heating.cc, examples/lorenz.cc, examples/rc.cc, examples/rlc.cc, examples/wheel.cc, and examples/wheel2.cc.

Definition at line 276 of file continuous.cc.

Referenced by Sample().

◆ Time

const double & simlib3::Time = SIMLIB_Time

◆ Zero2D

Constant2D simlib3::Zero2D(0, 0)
static

◆ Zero3D

Constant3D simlib3::Zero3D(0, 0, 0)
static