SIMLIB/C++ 3.09
Loading...
Searching...
No Matches
simlib3 Namespace Reference

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

Namespaces

namespace  SQS

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...
 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::Behavior() 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.
typedef unsigned char ServicePriority_t
 Service priority (see Facility::Seize).
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 }

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
void SIMLIB_DoConditions ()
void SIMLIB_Dynamic ()
 performs evaluation of integrators and status blocks
Input operator+ (Input a, Input b)
 block operator +
Input operator- (Input a, Input b)
 block operator -
Input operator* (Input a, Input b)
 block operator *
Input operator/ (Input a, Input b)
 block operator /
Input Sqr (Input x)
 square function
Input operator- (Input a)
 unary - block operator
void DebugON ()
 start debugging output
void DebugOFF ()
 stop debugging output
unsigned long Debug (unsigned long mode)
void SIMLIB_error (const enum _ErrEnum N)
 print error message and abort program
void SIMLIB_error (const char *fmt,...)
 print error message and abort program
void SIMLIB_error (const char *filename, const int linenum)
 print error message and abort program
void SIMLIB_warning (const enum _ErrEnum N)
 print warning message and continue
void SIMLIB_warning (const char *fmt,...)
 print warning message and continue
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
void ContractStep ()
 contract step of integration
void ContractStep (double time)
 contract step of integration to end step time
void SetStep (double _dtmin, double _dtmax)
void SetAccuracy (double _abserr, double _relerr)
void SetAccuracy (double relerr)
void SetName (SimObject &o, const std::string &name)
 assign name to object
void SetName (SimObject *o, const std::string &name)
 assign name to object
void RemoveName (SimObject &o)
 remove name
void RemoveName (SimObject *o)
 remove name
std::string GetName (SimObject &o)
 get name of object
std::string GetName (SimObject *o)
 get name of object
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)
int _Print (const char *fmt,...)
int Print (const char *fmt,...)
 for Output methods, can be redirected
int Print (const double x)
int Print (const double x, const double y)
int Print (const double x, const double y, const double z)
void Error (const char *fmt,...)
 print message and terminate program
static void PROCESS_INTERRUPT_f ()
 Special function called from Process::Behavior() directly or indirectly.
static void ALLOC_CONTEXT (size_t sz) noexcept
static void FREE_CONTEXT () noexcept
 deallocate saved process context
static void restore_context2 (volatile char *) noexcept
 This function overwrites stack contents. It never returns, see longjmp.
static void restore_context (size_t data_size) noexcept
 This elliminates the need for explicit stack pointer adjustment.
void RandomSeed (long seed)
double Random ()
void SetBaseRandomGenerator (double(*new_gen)())
double SIMLIB_RandomBase ()
static double _gam (double AK)
double Uniform (double l, double h)
 Uniform distribution generator.
double Normal (double mi, double sigma)
 Gauss distribution generator.
double Weibul (double lambda, double alfa)
 Weibul distribution generator.
double Erlang (double alfa, int beta)
 Erlang distribution generator.
int NegBin (double q, int k)
double Gamma (double alfa, double beta)
 Gamma distribution generator.
double Exponential (double mv)
 Exponential distribution generator.
int NegBinM (double p, int m)
double Beta (double th, double fi, double min, double max)
 Beta distribution generator.
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.
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.
 DEFINE_HOOK (SamplerAct)
 DEFINE_HOOK (SamplerInit)
 DEFINE_HOOK (WUclear)
 DEFINE_HOOK (WUget_next)
void Stop ()
 stop current simulation run
void Abort ()
 end simulation program
void SIMLIB_Init (double T0, double T1, unsigned version)
void Run ()
 run simulation experiment
const char * SIMLIB_version_string ()
void Init (double t0, double t1=SIMLIB_MAXTIME)
void SetStep (double dt)
void Activate (Entity *e)
 activate entity e
void Passivate (Entity *e)
 passivate entity e
void SetMethod (const char *name)
const char * GetMethod (void)
void SetStarter (const char *name, const char *slave_name)
void SetStarter (const char *slave_name)
const char * GetStarter (const char *name)
const char * GetStarter (void)
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)
Input2D UnitVector (Input2D v)
 make unit vector from input (Abs(output_vec)==1)
Input ScalarProduct (Input2D x, Input2D y)
 dot product: xvec . yvec
Input Xpart (Input2D a)
 get x part of (x,y) vector value
Input Ypart (Input2D a)
 get y part of (x,y) vector value
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)
Input3D UnitVector (Input3D x)
 make unit vector from input (Abs(output_vec)==1)
Input ScalarProduct (Input3D x, Input3D y)
 dot product: xvec . yvec
Input Xpart (Input3D a)
 get x part of (x,y,z) vector value
Input Ypart (Input3D a)
 get y part of (x,y,z) vector value
Input Zpart (Input3D a)
 get z part of (x,y,z) vector value
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
aContiBlock & T = _T
 simulation time block reference
unsigned long SIMLIB_debug_flag = 0UL
static unsigned long SIMLIB_Entity_Count = 0L
 current number of entities in model
static const char _Errors []
const unsigned MAXHISTOCOUNT = 10000
static SIMLIB_module SIMLIB_module_id
 Create single global registration object in each SIMLIB module.
const SIMLIB_Phase_t & Phase = SIMLIB_Phase
double SIMLIB_Time
bool SIMLIB_DynamicFlag = false
 in dynamic section
bool SIMLIB_ResetStatus = false
 flag set if there is a need for integration method restart
SIMLIB_Phase_t SIMLIB_Phase = START
Entity * SIMLIB_Current = NULL
int SIMLIB_ERRNO =0
bool SIMLIB_ContractStepFlag = false
 requests shorter step
double SIMLIB_ContractStep = SIMLIB_MAXTIME
 requested step size
double SIMLIB_StepStartTime
 last step time
double SIMLIB_DeltaTime
 Time-SIMLIB_StepStartTime.
double SIMLIB_OptStep
 optimal step
double SIMLIB_MinStep =1e-10
 minimal step
double SIMLIB_MaxStep =1
 max. step
double SIMLIB_StepSize
 actual step
double SIMLIB_AbsoluteError =0
 absolute error
double SIMLIB_RelativeError =0.001
 relative error
double SIMLIB_StartTime
double SIMLIB_NextTime
double SIMLIB_EndTime
const double & MinStep =SIMLIB_MinStep
 minimal integration step
const double & MaxStep =SIMLIB_MaxStep
 maximal integration step
const double & StepSize =SIMLIB_StepSize
 actual integration step
const double & OptStep =SIMLIB_OptStep
 optimal integration step
const double & AbsoluteError =SIMLIB_AbsoluteError
 max. abs. error of integration
const double & RelativeError =SIMLIB_RelativeError
 max. rel. error
Constant SIMLIB_Integrator_0input (0)
 dummy input with zero value
const int abm_ord =4
ABM4 abm4 ("abm4", "rkf5")
 Adams-Bashforth-Moulton, 4th order.
EULER euler ("euler")
 Euler method.
FW fw ("fw")
 Fowler-Warten (Warning: needs testing, do not use).
RKE rke ("rke")
 Runge-Kutta-England, 4th order?
RKF3 rkf3 ("rkf3")
 Runge-Kutta-Fehlberg, 3rd order.
RKF5 rkf5 ("rkf5")
 Runge-Kutta-Fehlberg, 5th order.
RKF8 rkf8 ("rkf8")
 Runge-Kutta-Fehlberg, 8th order.
static bool SimObject_allocated = false
static NameDict name_dict
class simlib3::_FileWrap OutFile
static jmp_buf P_DispatcherStatusBuffer
 setjmp() state before dispatch
static char *volatile P_StackBase = 0
 global start of stack area
static char *volatile P_StackBase2 = 0
 used for checking only
static P_Context_t *volatile P_Context = 0
 temporary global process state
static volatile size_t P_StackSize = 0
 temporary global stack size
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
const double & Time = SIMLIB_Time
 model time (is NOT the block)
const double & NextTime = SIMLIB_NextTime
 next-event time
const double & EndTime = SIMLIB_EndTime
 time of simulation end
Entity *const & Current = SIMLIB_Current
 pointer to active (now running) entity
unsigned long SIMLIB_experiment_no = 0
static SIMLIB_statistics_t SIMLIB_run_statistics
const SIMLIB_statistics_t & SIMLIB_statistics = SIMLIB_run_statistics
 interface to internal run-time statistics structure
static bool StopFlag = false
const unsigned SIMLIB_version = __SIMLIB__
 library version
const double SIMLIB_MINTIME = 0.0
 minimal time value
const double SIMLIB_MAXTIME = 1.0e30
 maximum time (1e30 works for float, too)
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.


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

Main SIMLIB (version 3+) namespace.

Usage: using namespace simlib3;

Typedef Documentation

◆ Backlash

Definition at line 1401 of file simlib.h.

◆ DeadZone

Definition at line 1589 of file simlib.h.

◆ EntityPriority_t

typedef signed char simlib3::EntityPriority_t

Priority of the process/event.

Definition at line 368 of file simlib.h.

◆ Friction

Definition at line 1622 of file simlib.h.

◆ Hysteresis

Definition at line 1385 of file simlib.h.

◆ Limitation

Definition at line 1572 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 1605 of file simlib.h.

◆ ServicePriority_t

typedef unsigned char simlib3::ServicePriority_t

Service priority (see Facility::Seize).

Definition at line 370 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 362 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)
extern

Definition at line 97 of file errors.cc.

References _ErrMsg(), and _Errors.

Referenced by _ErrMsg(), SIMLIB_error(), SIMLIB_error(), and SIMLIB_warning().

◆ _gam()

double simlib3::_gam ( double AK)
static

Definition at line 35 of file random2.cc.

References _gam(), and Random().

Referenced by _gam(), 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 Abort(), Dprintf, ERROREXIT, and SIMLIB_Phase.

Referenced by Abort().

◆ Abs() [1/3]

Input simlib3::Abs ( Input x)

Definition at line 94 of file fun.cc.

References Abs(), and simlib3::Function1::Function1().

Referenced by Abs(), Abs(), and Abs().

◆ Abs() [2/3]

Input simlib3::Abs ( Input2D x)

absolute value of vector (1D block)

Definition at line 387 of file simlib2D.cc.

References simlib3::_Abs2D::_Abs2D(), and Abs().

◆ Abs() [3/3]

Input simlib3::Abs ( Input3D x)

absolute value of vector (1D block)

Definition at line 406 of file simlib3D.cc.

References simlib3::_Abs3D::_Abs3D(), and Abs().

◆ abs() [1/2]

double simlib3::abs ( const Value2D & a)

◆ abs() [2/2]

double simlib3::abs ( const Value3D & a)

Definition at line 38 of file simlib3D.cc.

◆ accept_bad()

bool simlib3::accept_bad ( double eps)

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

References accept_bad(), and Random().

Referenced by accept_bad(), and Optimize_simann().

◆ ACos()

Input simlib3::ACos ( Input x)

Definition at line 101 of file fun.cc.

References ACos(), and simlib3::Function1::Function1().

Referenced by ACos().

◆ Activate()

void simlib3::Activate ( Entity * e)
inline

activate entity e

Definition at line 436 of file simlib.h.

References Activate(), and simlib3::Entity::Activate().

Referenced by Activate(), and main().

◆ Alloc()

unsigned * simlib3::Alloc ( unsigned n)
static

◆ ALLOC_CONTEXT()

void simlib3::ALLOC_CONTEXT ( size_t sz)
staticnoexcept

Definition at line 155 of file process.cc.

References ALLOC_CONTEXT(), P_Context, and simlib3::P_Context_t::size.

Referenced by ALLOC_CONTEXT(), and PROCESS_INTERRUPT_f().

◆ ASin()

Input simlib3::ASin ( Input x)

Definition at line 100 of file fun.cc.

References ASin(), and simlib3::Function1::Function1().

Referenced by ASin().

◆ ATan()

Input simlib3::ATan ( Input x)

Definition at line 102 of file fun.cc.

References ATan(), and simlib3::Function1::Function1().

Referenced by ATan().

◆ ATan2()

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

Definition at line 103 of file fun.cc.

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

Referenced by ATan2().

◆ Beta()

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

Beta distribution generator.

Parameters
th

param fi

Parameters
min

param max

Definition at line 181 of file random2.cc.

References _gam(), Beta(), max(), and min().

Referenced by Beta().

◆ 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.

References ContractStep(), and SIMLIB_ContractStepFlag.

Referenced by ContractStep(), ContractStep(), simlib3::Relay::Eval(), 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 ContractStep(), SIMLIB_ContractStep, SIMLIB_ContractStepFlag, SIMLIB_MinStep, and SIMLIB_StepStartTime.

◆ Cos()

Input simlib3::Cos ( Input x)

Definition at line 97 of file fun.cc.

References Cos(), and simlib3::Function1::Function1().

Referenced by Cos().

◆ Debug()

unsigned long simlib3::Debug ( unsigned long mode)

Definition at line 48 of file debug.cc.

References Debug(), NoDebugErr, SIMLIB_debug_flag, and SIMLIB_warning().

Referenced by Debug(), DebugOFF(), and DebugON().

◆ DebugOFF()

void simlib3::DebugOFF ( )

stop debugging output

Definition at line 42 of file debug.cc.

References Debug(), and DebugOFF().

Referenced by DebugOFF().

◆ DebugON()

void simlib3::DebugON ( )

start debugging output

Definition at line 36 of file debug.cc.

References Debug(), and DebugON().

Referenced by DebugON().

◆ DEFINE_HOOK() [1/8]

simlib3::DEFINE_HOOK ( Break )

References DEFINE_HOOK().

◆ DEFINE_HOOK() [2/8]

◆ DEFINE_HOOK() [3/8]

simlib3::DEFINE_HOOK ( DelayInit )

References DEFINE_HOOK().

◆ DEFINE_HOOK() [4/8]

simlib3::DEFINE_HOOK ( SamplerAct )

References DEFINE_HOOK().

◆ DEFINE_HOOK() [5/8]

simlib3::DEFINE_HOOK ( SamplerInit )

References DEFINE_HOOK().

◆ DEFINE_HOOK() [6/8]

simlib3::DEFINE_HOOK ( WUclear )

References DEFINE_HOOK().

◆ DEFINE_HOOK() [7/8]

simlib3::DEFINE_HOOK ( WUget_next )

References DEFINE_HOOK().

◆ DEFINE_HOOK() [8/8]

simlib3::DEFINE_HOOK ( ZDelayTimerInit )

References DEFINE_HOOK().

◆ Erlang()

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

Erlang distribution generator.

Parameters
alfa

param beta

Definition at line 109 of file random2.cc.

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

Referenced by Erlang().

◆ Error()

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

print message and terminate program

Definition at line 123 of file print.cc.

References _Print(), Error(), OutFile, SIMLIB_error(), and UserError.

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

◆ Exp()

Input simlib3::Exp ( Input x)

Definition at line 105 of file fun.cc.

References Exp(), and simlib3::Function1::Function1().

Referenced by Exp().

◆ Exponential()

double simlib3::Exponential ( double mv)

Exponential distribution generator.

Parameters
mvmean value

Definition at line 152 of file random2.cc.

References Exponential(), and Random().

Referenced by Exponential().

◆ FREE_CONTEXT()

void simlib3::FREE_CONTEXT ( )
staticnoexcept

deallocate saved process context

Definition at line 165 of file process.cc.

References FREE_CONTEXT(), and P_Context.

Referenced by FREE_CONTEXT(), and PROCESS_INTERRUPT_f().

◆ Gamma()

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

Gamma distribution generator.

Parameters
alfa

param beta

Definition at line 141 of file random2.cc.

References _gam(), and Gamma().

Referenced by Gamma().

◆ Geom()

int simlib3::Geom ( double q)

Definition at line 257 of file random2.cc.

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

Referenced by Geom().

◆ GetName() [1/2]

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

get name of object

Definition at line 66 of file name.cc.

References GetName(), and simlib3::SimObject::Name().

Referenced by GetName(), and GetName().

◆ GetName() [2/2]

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

get name of object

Definition at line 72 of file name.cc.

References GetName(), and simlib3::SimObject::Name().

◆ hooke_step()

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 hooke_step(), and simlib3::ParameterVector::size().

Referenced by hooke_step(), and Optimize_hooke().

◆ HyperGeom()

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

Definition at line 270 of file random2.cc.

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

Referenced by HyperGeom().

◆ Init()

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

Initialize simulator and model time

Parameters
t0simulation start time
t1simulation end time

Definition at line 186 of file simlib.h.

References __SIMLIB__, Init(), SIMLIB_Init(), and SIMLIB_MAXTIME.

Referenced by Init(), and main().

◆ Ln()

Input simlib3::Ln ( Input x)

Definition at line 107 of file fun.cc.

References simlib3::Function1::Function1(), and Ln().

Referenced by Ln().

◆ Log10()

Input simlib3::Log10 ( Input x)

Definition at line 106 of file fun.cc.

References simlib3::Function1::Function1(), and Log10().

Referenced by Log10().

◆ Logar()

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

Definition at line 210 of file random2.cc.

References Logar(), and Normal().

Referenced by Logar().

◆ Max()

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

Definition at line 115 of file fun.cc.

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

Referenced by Max().

◆ max()

◆ Min()

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

Definition at line 114 of file fun.cc.

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

Referenced by Min().

◆ min()

◆ move_to_next_point()

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

◆ NegBin()

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

Definition at line 121 of file random2.cc.

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

Referenced by NegBin().

◆ NegBinM()

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

Definition at line 164 of file random2.cc.

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

Referenced by NegBinM().

◆ 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 Normal(), and Random().

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

◆ operator*() [1/11]

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

Definition at line 73 of file simlib2D.cc.

◆ operator*() [2/11]

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

Definition at line 71 of file simlib3D.cc.

◆ operator*() [3/11]

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

Definition at line 68 of file simlib2D.cc.

◆ operator*() [4/11]

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

Definition at line 66 of file simlib3D.cc.

◆ operator*() [5/11]

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

Definition at line 58 of file simlib3D.cc.

◆ operator*() [6/11]

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

block operator *

Definition at line 228 of file continuous.cc.

References simlib3::_Mul::_Mul().

◆ operator*() [7/11]

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

Definition at line 313 of file simlib2D.cc.

References simlib3::_Mul2D1D::_Mul2D1D().

◆ operator*() [8/11]

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

Definition at line 332 of file simlib3D.cc.

References simlib3::_Mul3D1D::_Mul3D1D().

◆ operator*() [9/11]

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

Definition at line 312 of file simlib2D.cc.

References simlib3::_Mul2D1D::_Mul2D1D().

◆ operator*() [10/11]

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

Definition at line 331 of file simlib3D.cc.

References simlib3::_Mul3D1D::_Mul3D1D().

◆ operator*() [11/11]

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

Definition at line 330 of file simlib3D.cc.

References simlib3::_Mul3D::_Mul3D().

◆ operator+() [1/5]

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

Definition at line 43 of file simlib2D.cc.

◆ operator+() [2/5]

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

Definition at line 43 of file simlib3D.cc.

◆ operator+() [3/5]

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

block operator +

Definition at line 224 of file continuous.cc.

References simlib3::_Add::_Add().

◆ operator+() [4/5]

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

Definition at line 310 of file simlib2D.cc.

References simlib3::_Add2D::_Add2D().

◆ operator+() [5/5]

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

Definition at line 328 of file simlib3D.cc.

References simlib3::_Add3D::_Add3D().

◆ operator-() [1/10]

Value2D simlib3::operator- ( const Value2D & a)

Definition at line 53 of file simlib2D.cc.

◆ operator-() [2/10]

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

Definition at line 48 of file simlib2D.cc.

◆ operator-() [3/10]

Value3D simlib3::operator- ( const Value3D & a)

Definition at line 53 of file simlib3D.cc.

◆ operator-() [4/10]

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

Definition at line 48 of file simlib3D.cc.

◆ operator-() [5/10]

Input simlib3::operator- ( Input a)

unary - block operator

Definition at line 262 of file continuous.cc.

References simlib3::_UMinus::_UMinus().

◆ operator-() [6/10]

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

block operator -

Definition at line 226 of file continuous.cc.

References simlib3::_Sub::_Sub().

◆ operator-() [7/10]

Input2D simlib3::operator- ( Input2D a)

Definition at line 334 of file simlib2D.cc.

References simlib3::_UMinus2D::_UMinus2D().

◆ operator-() [8/10]

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

Definition at line 311 of file simlib2D.cc.

References simlib3::_Sub2D::_Sub2D().

◆ operator-() [9/10]

Input3D simlib3::operator- ( Input3D a)

Definition at line 353 of file simlib3D.cc.

References simlib3::_UMinus3D::_UMinus3D().

◆ operator-() [10/10]

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

Definition at line 329 of file simlib3D.cc.

References simlib3::_Sub3D::_Sub3D().

◆ operator/() [1/5]

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

Definition at line 83 of file simlib2D.cc.

◆ operator/() [2/5]

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

Definition at line 81 of file simlib3D.cc.

◆ operator/() [3/5]

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

block operator /

Definition at line 230 of file continuous.cc.

References simlib3::_Div::_Div().

◆ operator/() [4/5]

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

Definition at line 314 of file simlib2D.cc.

References simlib3::_Div2D::_Div2D().

◆ operator/() [5/5]

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

Definition at line 333 of file simlib3D.cc.

References simlib3::_Div3D::_Div3D().

◆ operator==()

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

Definition at line 86 of file opt-param.cc.

◆ Optimize_gradient()

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

References Optimize_gradient().

Referenced by Optimize_gradient().

◆ 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(* f )(const ParameterVector &p),
ParameterVector & p,
int MAXT )

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

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

Referenced by Optimize_simann(), and Optimize_simann().

◆ Optimize_simann() [2/2]

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

References Optimize_simann().

◆ Passivate()

void simlib3::Passivate ( Entity * e)
inline

passivate entity e

Definition at line 437 of file simlib.h.

References simlib3::Entity::Passivate(), and Passivate().

Referenced by simlib3::Semaphore::P(), and Passivate().

◆ Poisson()

int simlib3::Poisson ( double lambda)

Poisson distribution generator.

Parameters
lambda

Definition at line 229 of file random2.cc.

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

Referenced by Poisson().

◆ Pow()

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

Definition at line 108 of file fun.cc.

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

Referenced by Pow().

◆ Print() [1/6]

◆ 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 Print(), and simlib3::Value2D::Print().

◆ Print() [6/6]

void simlib3::Print ( Value3D a)
inline

Definition at line 245 of file simlib3D.h.

References Print(), and simlib3::Value3D::Print().

◆ PROCESS_INTERRUPT_f()

void simlib3::PROCESS_INTERRUPT_f ( )
static

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

This function: 1) computes stack data size, 2) allocates memory for stack data, 3) saves stack data to allocated memory, 4) saves CPU context using setjmp(), and 5) interrupts execution of current function using longjmp() to process dispatcher code, == (now runs 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 559 of file process.cc.

References ALLOC_CONTEXT(), CANARY2, DEBUG_PROCESS, FREE_CONTEXT(), P_Context, P_DispatcherStatusBuffer, P_StackBase, P_StackSize, PROCESS_INTERRUPT_f(), SIMLIB_error(), simlib3::P_Context_t::stack, and simlib3::P_Context_t::status.

Referenced by PROCESS_INTERRUPT_f().

◆ 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 Random(), and SIMLIB_RandomBasePtr.

Referenced by _gam(), accept_bad(), Erlang(), Exponential(), Geom(), HyperGeom(), move_to_next_point(), NegBin(), NegBinM(), Normal(), Poisson(), Random(), Rayle(), 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.

References RandomSeed(), and SIMLIB_RandomSeed.

Referenced by RandomSeed().

◆ Rayle()

double simlib3::Rayle ( double delta)

Definition at line 219 of file random2.cc.

References Random(), and Rayle().

Referenced by Rayle().

◆ RemoveName() [1/2]

void simlib3::RemoveName ( SimObject & o)

remove name

Definition at line 54 of file name.cc.

References RemoveName(), and simlib3::SimObject::SetName().

Referenced by RemoveName(), and RemoveName().

◆ RemoveName() [2/2]

void simlib3::RemoveName ( SimObject * o)

remove name

Definition at line 60 of file name.cc.

References RemoveName(), and simlib3::SimObject::SetName().

◆ restore_context()

void simlib3::restore_context ( size_t data_size)
staticnoexcept

This elliminates the need for explicit stack pointer adjustment.

The local array should not be optimized away. Parameters, return address and local variables will be overwritten. Never returns.

Definition at line 366 of file process.cc.

References DEBUG_PROCESS, MAX_PROCESS_STACK_SIZE, P_StackBase2, restore_context(), restore_context2(), and SIMLIB_error().

Referenced by simlib3::Process::_Run(), and restore_context().

◆ restore_context2()

void simlib3::restore_context2 ( volatile char * )
staticnoexcept

This function overwrites stack contents. It never returns, see longjmp.

Definition at line 379 of file process.cc.

References DEBUG_PROCESS, P_Context, P_StackBase, P_StackSize, restore_context2(), simlib3::P_Context_t::stack, and simlib3::P_Context_t::status.

Referenced by restore_context(), and restore_context2().

◆ Run()

◆ SampleDelays()

void simlib3::SampleDelays ( )

Definition at line 92 of file run.cc.

References CALL_HOOK, and SampleDelays().

Referenced by SampleDelays(), and SIMLIB_DoConditions().

◆ scalar_product() [1/2]

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

◆ scalar_product() [2/2]

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

Definition at line 76 of file simlib3D.cc.

◆ ScalarProduct() [1/2]

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

dot product: xvec . yvec

Definition at line 389 of file simlib2D.cc.

References simlib3::_ScalarProduct2D::_ScalarProduct2D(), and ScalarProduct().

Referenced by ScalarProduct(), and ScalarProduct().

◆ ScalarProduct() [2/2]

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

dot product: xvec . yvec

Definition at line 408 of file simlib3D.cc.

References simlib3::_ScalarProduct3D::_ScalarProduct3D(), and ScalarProduct().

◆ 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

Definition at line 106 of file intg.cc.

References Dprintf, SetAccuracy(), SetAccuracyError, SIMLIB_AbsoluteError, SIMLIB_error(), and SIMLIB_RelativeError.

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

◆ 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 SetBaseRandomGenerator(), SIMLIB_RandomBase(), and SIMLIB_RandomBasePtr.

Referenced by SetBaseRandomGenerator().

◆ 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.

◆ SetErrNo()

void simlib3::SetErrNo ( int num)

Definition at line 327 of file numint.cc.

References SetErrNo(), and SIMLIB_ERRNO.

Referenced by SetErrNo().

◆ 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 SetName(), and simlib3::SimObject::SetName().

Referenced by simlib3::List::List(), simlib3::Queue::Queue(), SetName(), and 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 SetName(), and simlib3::SimObject::SetName().

◆ SetOutput()

void simlib3::SetOutput ( const char * name)

redirects Output(), Print() to file

Parameters
namename of output file

Definition at line 50 of file print.cc.

References OutFile, and SetOutput().

Referenced by SetOutput().

◆ 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)

Definition at line 92 of file intg.cc.

References Dprintf, SetStep(), SetStepError, SIMLIB_error(), SIMLIB_MaxStep, and SIMLIB_MinStep.

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

◆ SetStep() [2/2]

void simlib3::SetStep ( double dt)
inline

set fixed integration step

Parameters
dt(almost) fixed step size

Definition at line 201 of file simlib.h.

References SetStep().

◆ Sign()

Input simlib3::Sign ( Input x)

Definition at line 110 of file fun.cc.

References simlib3::Function1::Function1(), Sign(), and sign().

Referenced by Sign().

◆ sign()

double simlib3::sign ( double x)
static

Definition at line 78 of file fun.cc.

References sign().

Referenced by Sign(), and sign().

◆ SIMLIB_atexit()

◆ SIMLIB_atexit_call()

void simlib3::SIMLIB_atexit_call ( )
static

◆ SIMLIB_ContinueInit()

◆ SIMLIB_create_tmp_name()

std::string simlib3::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

Definition at line 80 of file name.cc.

References SIMLIB_create_tmp_name().

Referenced by simlib3::Event::Name(), simlib3::Process::Name(), and SIMLIB_create_tmp_name().

◆ SIMLIB_DoActions()

void simlib3::SIMLIB_DoActions ( )

Definition at line 135 of file run.cc.

Referenced by Run().

◆ SIMLIB_DoConditions()

void simlib3::SIMLIB_DoConditions ( )

◆ SIMLIB_Dynamic()

◆ SIMLIB_error() [1/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_error(), SIMLIB_Phase, and Time.

◆ 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(), SIMLIB_error(), and Time.

◆ SIMLIB_error() [3/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_error(), 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::Store::Enter(), Erlang(), Error(), simlib3::CalendarQueue::estimate_bucket_width(), simlib3::Frict::Frict(), Geom(), simlib3::CalendarList::Get(), simlib3::CalendarQueue::Get(), simlib3::List::Get(), simlib3::SIMLIB_DelayBuffer::get(), simlib3::CalendarList::GetFirst(), simlib3::CalendarQueue::GetFirst(), simlib3::Histogram::Histogram(), 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(), Poisson(), simlib3::List::PostIns(), simlib3::List::PredIns(), simlib3::IntegrationMethod::Prepare(), PROCESS_INTERRUPT_f(), simlib3::Qntzr::Qntzr(), simlib3::Facility::Release(), restore_context(), simlib3::Rline::Rline(), Run(), simlib3::CalendarList::ScheduleAt(), simlib3::CalendarQueue::ScheduleAt(), simlib3::SQS::ScheduleAt(), simlib3::IntegrationMethod::SearchMethod(), simlib3::CalendarQueue::SearchMinTime(), simlib3::Facility::Seize(), simlib3::AlgLoop::Set(), simlib3::AlgLoop::Set(), SetAccuracy(), simlib3::Calendar::SetCalendar, simlib3::Store::SetCapacity(), simlib3::IntegrationMethod::SetMethod(), simlib3::MultiStepMethod::SetStarter(), simlib3::MultiStepMethod::SetStarter(), SetStep(), SIMLIB_error(), SIMLIB_error(), SIMLIB_error(), SIMLIB_Init(), simlib3::MultiStepMethod::SlavePtr(), simlib3::Stat::StdDev(), Stop(), Uniform(), simlib3::Semaphore::V(), simlib3::Bisect::Value(), simlib3::Iterations::Value(), simlib3::Newton::Value(), simlib3::RegulaFalsi::Value(), Weibul(), simlib3::Integrator::~Integrator(), simlib3::Link::~Link(), and simlib3::Status::~Status().

◆ SIMLIB_Init()

◆ SIMLIB_RandomBase()

double simlib3::SIMLIB_RandomBase ( )

Definition at line 75 of file random1.cc.

References MAXLONGINT, MULCONST, SIMLIB_RandomBase(), and SIMLIB_RandomSeed.

Referenced by SetBaseRandomGenerator(), and SIMLIB_RandomBase().

◆ 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, and SIMLIB_version_string().

Referenced by SIMLIB_version_string().

◆ SIMLIB_warning() [1/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(), SIMLIB_warning(), and Time.

◆ SIMLIB_warning() [2/2]

◆ SIMLIB_WUClear()

void simlib3::SIMLIB_WUClear ( )

Definition at line 123 of file run.cc.

References CALL_HOOK, and SIMLIB_WUClear().

Referenced by SIMLIB_Init(), and SIMLIB_WUClear().

◆ Sin()

Input simlib3::Sin ( Input x)
Examples
_test_.cc.

Definition at line 96 of file fun.cc.

References simlib3::Function1::Function1(), and Sin().

Referenced by Sin(), and Test::Test().

◆ Sqr()

Input simlib3::Sqr ( Input x)

square function

Definition at line 233 of file continuous.cc.

References simlib3::_Mul::_Mul(), and Sqr().

Referenced by Sqr().

◆ Sqrt()

Input simlib3::Sqrt ( Input x)

Definition at line 112 of file fun.cc.

References simlib3::Function1::Function1(), and Sqrt().

Referenced by Sqrt().

◆ Stop()

void simlib3::Stop ( )

stop current simulation run

Definition at line 147 of file run.cc.

References Dprintf, SFunctionUseError, SIMLIB_error(), SIMLIB_Phase, SIMULATION, Stop(), and StopFlag.

Referenced by Stop().

◆ Tan()

Input simlib3::Tan ( Input x)

Definition at line 98 of file fun.cc.

References simlib3::Function1::Function1(), and Tan().

Referenced by Tan().

◆ Triag()

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

Definition at line 193 of file random2.cc.

References max(), min(), Random(), and Triag().

Referenced by Triag().

◆ 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(), SIMLIB_error(), and Uniform().

Referenced by Uniform().

◆ 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.

References simlib3::_Norm2D::_Norm2D(), and UnitVector().

Referenced by UnitVector(), and UnitVector().

◆ 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.

References simlib3::_Norm3D::_Norm3D(), and UnitVector().

◆ Weibul()

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

Weibul distribution generator.

Parameters
lambda

param alfa

Definition at line 94 of file random2.cc.

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

Referenced by Weibul().

◆ WU_print()

void simlib3::WU_print ( )

Definition at line 75 of file waitunti.cc.

◆ 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::_XYpart(), simlib3::_XYpart::x, and Xpart().

Referenced by Xpart(), and Xpart().

◆ 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::_XYZpart(), simlib3::_XYZpart::x, and Xpart().

◆ 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::_XYpart(), simlib3::_XYpart::y, and Ypart().

Referenced by Ypart(), and Ypart().

◆ 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::_XYZpart(), simlib3::_XYZpart::y, and Ypart().

◆ 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::_XYZpart(), simlib3::_XYZpart::z, and Zpart().

Referenced by Zpart().

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") ( "abm4" ,
"rkf5"  )

Adams-Bashforth-Moulton, 4th order.

◆ 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

◆ atexit_array

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

Definition at line 23 of file atexit.cc.

Referenced by SIMLIB_atexit(), and SIMLIB_atexit_call().

◆ COEF_PAR

const double simlib3::COEF_PAR = 1.5

◆ counter

int simlib3::counter = 0
static

◆ Current

Entity *const & simlib3::Current = SIMLIB_Current

pointer to active (now running) entity

Definition at line 54 of file run.cc.

Referenced by simlib3::Barrier::Enter(), simlib3::Store::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 Run(), and SIMLIB_Init().

◆ euler

EULER simlib3::euler("euler") ( "euler" )

Euler method.

◆ flag

bool simlib3::flag = false
static

◆ fw

FW simlib3::fw("fw") ( "fw" )

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

◆ 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.

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

◆ LIST_MIN

const unsigned simlib3::LIST_MIN = LIST_MAX/2

Definition at line 537 of file calendar.cc.

Referenced by simlib3::CalendarQueue::Get(), and simlib3::CalendarQueue::GetFirst().

◆ 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

◆ 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.

◆ 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.

◆ MUL_PAR

const double simlib3::MUL_PAR = 1.0

◆ 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

◆ NextTime

◆ OptStep

const double & simlib3::OptStep =SIMLIB_OptStep

◆ OutFile

class simlib3::_FileWrap simlib3::OutFile

Referenced by _Print(), Error(), Print(), and SetOutput().

◆ P_Context

P_Context_t* volatile simlib3::P_Context = 0
static

temporary global process state

Definition at line 72 of file process.cc.

Referenced by simlib3::Process::_Run(), ALLOC_CONTEXT(), FREE_CONTEXT(), PROCESS_INTERRUPT_f(), and restore_context2().

◆ P_DispatcherStatusBuffer

jmp_buf simlib3::P_DispatcherStatusBuffer
static

setjmp() state before dispatch

Definition at line 68 of file process.cc.

Referenced by simlib3::Process::_Run(), and PROCESS_INTERRUPT_f().

◆ P_StackBase

char* volatile simlib3::P_StackBase = 0
static

global start of stack area

Definition at line 69 of file process.cc.

Referenced by simlib3::Process::_Run(), PROCESS_INTERRUPT_f(), and restore_context2().

◆ P_StackBase2

char* volatile simlib3::P_StackBase2 = 0
static

used for checking only

Definition at line 70 of file process.cc.

Referenced by simlib3::Process::_Run(), and restore_context().

◆ P_StackSize

volatile size_t simlib3::P_StackSize = 0
static

temporary global stack size

Definition at line 73 of file process.cc.

Referenced by simlib3::Process::_Run(), PROCESS_INTERRUPT_f(), and restore_context2().

◆ 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") ( "rke" )

Runge-Kutta-England, 4th order?

◆ rkf3

RKF3 simlib3::rkf3("rkf3") ( "rkf3" )

Runge-Kutta-Fehlberg, 3rd order.

◆ rkf5

RKF5 simlib3::rkf5("rkf5") ( "rkf5" )

Runge-Kutta-Fehlberg, 5th order.

◆ rkf8

RKF8 simlib3::rkf8("rkf8") ( "rkf8" )

Runge-Kutta-Fehlberg, 8th order.

◆ SIGNBIT

const myint32 simlib3::SIGNBIT = 0x80000000UL

Definition at line 53 of file random1.cc.

◆ SIMLIB_AbsoluteError

◆ SIMLIB_ConditionFlag

◆ SIMLIB_ContractStep

◆ SIMLIB_ContractStepFlag

◆ SIMLIB_Current

◆ SIMLIB_debug_flag

unsigned long simlib3::SIMLIB_debug_flag = 0UL

Definition at line 32 of file debug.cc.

Referenced by Debug().

◆ SIMLIB_DeltaTime

◆ SIMLIB_DynamicFlag

◆ 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.

Referenced by simlib3::Entity::Entity().

◆ SIMLIB_ERRNO

◆ 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) ( 0 )

dummy input with zero value

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

◆ SIMLIB_MaxStep

◆ SIMLIB_MAXTIME

◆ SIMLIB_MinStep

◆ SIMLIB_MINTIME

const double simlib3::SIMLIB_MINTIME = 0.0

minimal time value

Definition at line 152 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

◆ SIMLIB_Phase

◆ 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 RandomSeed(), and SIMLIB_RandomBase().

◆ SIMLIB_RelativeError

◆ 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::Integrator::CtrInit(), simlib3::Status::CtrInit(), simlib3::Integrator::Init(), simlib3::IntegrationMethod::Prepare(), Run(), simlib3::Integrator::Set(), and SIMLIB_DoConditions().

◆ SIMLIB_run_statistics

SIMLIB_statistics_t simlib3::SIMLIB_run_statistics
static

Definition at line 77 of file run.cc.

Referenced by Run().

◆ 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

interface to internal run-time statistics structure

Definition at line 78 of file run.cc.

◆ SIMLIB_StepSize

◆ 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.

Referenced by simlib3::SimObject::operator new(), and simlib3::SimObject::SimObject().

◆ StartTime

const double & simlib3::StartTime = SIMLIB_StartTime

time of simulation start

Definition at line 47 of file run.cc.

Referenced by Run(), and SIMLIB_Init().

◆ 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.

Referenced by Run(), and Stop().

◆ T

aContiBlock & simlib3::T = _T

simulation time block reference

model time (continuous block)

Examples
_test_.cc.

Definition at line 276 of file continuous.cc.

Referenced by Sample(), and Test::Test().

◆ Time

◆ Zero2D

Constant2D simlib3::Zero2D(0, 0) ( 0 ,
0  )
static

◆ Zero3D

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