149 Dprintf((
"\n ********************* STOP *********************\n"));
161 Dprintf((
"\n ********************* ABORT *********************\n"));
180 Dprintf((
"\n\t ************************* Init(%g,%g) #%lu \n",
184 Dprintf((
"\n SIMLIB library version %x.%02x ",
186 Dprintf((
" SIMLIB header version %x.%02x \n",
187 version >> 8, version & 0xFF));
229 Dprintf((
"\n\t ********** Run() --- START \n"));
315 Dprintf((
"\n\t ********** Run() --- END \n"));
continuous signal delay block
abstract base class for active entities (Process, Event) instances of derived classes provide Behavio...
virtual void _Run() noexcept=0
run the Behavior() function
static void IntegrationDone(void)
static void StepSim(void)
step of numerical integration method
void InstallBreak(void(*f)())
InstallBreak — set function for checking if user breaks simulation.
Internal header file for SIMLIB/C++.
#define SIMLIB_internal_error()
#define DEFINE_HOOK(name)
#define _SetTime(t, x)
macro for simple assignement to internal time variables
#define INSTALL_HOOK(name, function)
Entity * GetFirst()
remove entity with minimum activation time
void Clear()
remove all scheduled entities
bool Empty()
empty calendar predicate
Implementation of class CalendarList interface is static - using global functions in SQS namespace.
const double & Time
model time (is NOT the block)
const double & StepSize
actual integration step
void Stop()
stop current simulation run
static SIMLIB_statistics_t SIMLIB_run_statistics
void SIMLIB_ContinueInit()
const double & NextTime
next-event time
void Abort()
end simulation program
const double & StartTime
time of simulation start
const unsigned SIMLIB_version
library version
void SIMLIB_error(const enum _ErrEnum N)
print error message and abort program
const SIMLIB_Phase_t & Phase
This variable contains the current phase of experiment (used for internal checking)
SIMLIB_Phase_t
values indicate current phase of experiment
const double & EndTime
time of simulation end
bool SIMLIB_ResetStatus
flag set if there is a need for integration method restart
void SIMLIB_DoConditions()
unsigned long SIMLIB_experiment_no
const double SIMLIB_MINTIME
minimal time value
void Run()
run simulation experiment
SIMLIB_Phase_t SIMLIB_Phase
void SIMLIB_Init(double T0, double T1, unsigned version)
const double SIMLIB_MAXTIME
maximum time (1e30 works for float, too)
Entity *const & Current
pointer to active (now running) entity
const SIMLIB_statistics_t & SIMLIB_statistics
interface to internal run-time statistics structure
Main SIMLIB/C++ interface.
internal statistics structure contains basic statistics of simulator execution
SIMLIB_statistics_t()
constructor runs SIMLIB_statistics_t::Init()
void Init()
initialize - used at the start of each Run()