SIMLIB/C++
3.07
|
Main SIMLIB/C++ interface. More...
#include <cstdlib>
#include <list>
#include <string>
Go to the source code of this file.
Classes | |
class | simlib3::SimObject |
Base class for almost all SIMLIB classes. More... | |
class | simlib3::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 | simlib3::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 | simlib3::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 | simlib3::Event |
abstract base class for events Event behavior is simple function (can not be interrupted) More... | |
class | simlib3::Sampler |
objects of this class call global function periodically (typicaly used for output of continuous model) More... | |
class | simlib3::Stat |
class for statistical information gathering More... | |
class | simlib3::TStat |
time dependent statistic More... | |
class | simlib3::List |
list of Link* items, uses data from Link More... | |
class | simlib3::List::iterator |
class | simlib3::Queue |
priority queue More... | |
class | simlib3::Histogram |
histogram statistics More... | |
class | simlib3::Facility |
(SOL-like) facility Facility with exclusive access and service priority More... | |
class | simlib3::Store |
(SOL-like) store store capacity can be changed dynamically More... | |
class | simlib3::aBlock |
abstract base class for all blocksblocks/SimObject have not copy semantics (TODO: add move semantics) More... | |
class | simlib3::aContiBlock |
abstract base for continuous blocks with single output suitable for expression-tree building and evaluation More... | |
class | simlib3::Constant |
block: constant (value can not be changed) More... | |
class | simlib3::Variable |
block: variable (value can be changed) More... | |
class | simlib3::Parameter |
block: parameter (can not be changed during simulation run) More... | |
class | simlib3::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 | simlib3::aContiBlock1 |
base for continuous blocks with single input and algebraic loop check More... | |
struct | simlib3::Expression |
reference to block expression This block can be used as handle for block expression trees More... | |
class | simlib3::aContiBlock2 |
base for continuous blocks with two inputs More... | |
class | simlib3::aContiBlock3 |
base for continuous blocks vith three inputs and algebraic loop check More... | |
class | simlib3::IntegratorContainer |
IntegratorContainer - internal container of integrators (singleton) More... | |
class | simlib3::StatusContainer |
StatusContainer - internal container of status variables (singleton) More... | |
class | simlib3::IntegrationMethod |
IntegrationMethod - Abstract base class for integration methods. More... | |
class | simlib3::IntegrationMethod::Memory |
class | simlib3::SingleStepMethod |
base for single-step integration methods More... | |
class | simlib3::MultiStepMethod |
base for multi-step integration method More... | |
class | simlib3::StatusMethod |
Abstract base class for integration methods with status auxiliary memories. More... | |
class | simlib3::StatusMethod::StatusMemory |
class | simlib3::Integrator |
block for numerical integration input is derivative, output is state More... | |
class | simlib3::Status |
State variables (memory) base for blocks with internal state (Relay, ...) More... | |
class | simlib3::Hyst |
nonlinear block - hysteresis More... | |
class | simlib3::Blash |
nonlinear block - backlash More... | |
class | simlib3::Relay |
Relay this implementation detects exact time of switch. More... | |
class | simlib3::Function1 |
block parametrized by function with single argument More... | |
class | simlib3::Function2 |
block parametrized by function with two arguments More... | |
class | simlib3::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 | simlib3::Condition |
change detector - Boolean version (int) More... | |
class | simlib3::ConditionUp |
detector of FALSE–>TRUE More... | |
class | simlib3::ConditionDown |
detector of TRUE–>FALSE More... | |
class | simlib3::Lim |
nonlinear block: limitation More... | |
class | simlib3::Insv |
nonlinear block: dead zone More... | |
class | simlib3::Qntzr |
nonlinear block: quantizer More... | |
class | simlib3::Frict |
nonlinear block: friction More... | |
class | simlib3::Rline |
nonlinear block: function defined by given table of values More... | |
class | simlib3::AlgLoop |
abstract base for algebraic loop solvers More... | |
class | simlib3::Iterations |
solve using iterations More... | |
class | simlib3::Bisect |
solve using bisection method More... | |
class | simlib3::RegulaFalsi |
solve using regula falsi method More... | |
class | simlib3::Newton |
solve using modified Newton's method More... | |
class | simlib3::Semaphore |
basic synchronization tool for processes simplified implementation More... | |
class | simlib3::Barrier |
synchronization tool for processes More... | |
struct | simlib3::SIMLIB_statistics_t |
internal statistics structure contains basic statistics of simulator execution More... | |
Namespaces | |
simlib3 | |
Implementation of class CalendarList interface is static - using global functions in SQS namespace. | |
Macros | |
#define | __SIMLIB__ 0x0308 |
#define | SIMLIB_VERSION "3.08" |
#define | SIMLIB_COPYRIGHT "(c) Petr Peringer, 1991-2021" |
#define | RegisterReference(aContiBlockPtr) |
#define | UnRegisterReference(aContiBlockPtr) |
Typedefs | |
typedef signed char | simlib3::EntityPriority_t |
Priority of the process/event. More... | |
typedef unsigned char | simlib3::ServicePriority_t |
Service priority (see Facility::Seize) More... | |
typedef Hyst | simlib3::Hysteresis |
typedef Blash | simlib3::Backlash |
typedef Lim | simlib3::Limitation |
typedef Insv | simlib3::DeadZone |
typedef Qntzr | simlib3::Quantizer |
typedef Frict | simlib3::Friction |
Enumerations | |
enum | { simlib3::LOWEST_PRIORITY = -127, simlib3::HIGHEST_PRIORITY = 127, simlib3::DEFAULT_PRIORITY = 0 } |
entity/process priority values (Warning: changed from 0..255 in SIMLIB v 3.03) More... | |
Functions | |
const char * | simlib3::SIMLIB_version_string () |
Get version of SIMLIB. More... | |
void | simlib3::DebugON () |
start debugging output More... | |
void | simlib3::DebugOFF () |
stop debugging output More... | |
unsigned long | simlib3::Debug (unsigned long mode) |
void | simlib3::Init (double t0, double t1=SIMLIB_MAXTIME) |
Initialize simulator and model time. More... | |
void | simlib3::SetCalendar (const char *name) |
choose calendar implementation default is list More... | |
void | simlib3::SetStep (double dtmin, double dtmax) |
Set integration step interval. More... | |
void | simlib3::SetStep (double dt) |
set fixed integration step More... | |
void | simlib3::SetAccuracy (double abserr, double relerr) |
set max. More... | |
void | simlib3::SetAccuracy (double relerr) |
set max. More... | |
void | simlib3::Run () |
run simulation experiment More... | |
void | simlib3::Stop () |
stop current simulation run More... | |
void | simlib3::Abort () |
end simulation program More... | |
void | simlib3::Error (const char *fmt,...) |
print message and terminate program More... | |
int | simlib3::Print (const char *fmt,...) |
for Output methods, can be redirected More... | |
int | simlib3::_Print (const char *fmt,...) |
output of messages to stdout, too More... | |
int | simlib3::Print (const double x) |
output single value More... | |
int | simlib3::Print (const double x, const double y) |
output 2 values More... | |
int | simlib3::Print (const double x, const double y, const double z) |
output 3 values More... | |
void | simlib3::SetOutput (const char *name) |
redirects Output(), Print() to file More... | |
void | simlib3::ContractStep () |
contract step of integration More... | |
void | simlib3::ContractStep (double time) |
contract step of integration to end step time More... | |
void | simlib3::RandomSeed (long seed) |
initialize random number seed More... | |
double | simlib3::Random () |
base uniform generator (range 0-0.999999...) the default implementation is simple LCG 32bit More... | |
void | simlib3::SetBaseRandomGenerator (double(*new_gen)()) |
set another random generator default Random() implementation can be replaced More... | |
double | simlib3::Beta (double th, double fi, double min, double max) |
Beta distribution generator. More... | |
double | simlib3::Erlang (double alfa, int beta) |
Erlang distribution generator. More... | |
double | simlib3::Exponential (double mv) |
Exponential distribution generator. More... | |
double | simlib3::Gamma (double alfa, double beta) |
Gamma distribution generator. More... | |
int | simlib3::Geom (double q) |
int | simlib3::HyperGeom (double p, int n, int m) |
double | simlib3::Logar (double mi, double delta) |
int | simlib3::NegBinM (double p, int m) |
int | simlib3::NegBin (double q, int k) |
double | simlib3::Normal (double mi, double sigma) |
Gauss distribution generator. More... | |
int | simlib3::Poisson (double lambda) |
Poisson distribution generator. More... | |
double | simlib3::Rayle (double delta) |
double | simlib3::Triag (double mod, double min, double max) |
double | simlib3::Uniform (double l, double h) |
Uniform distribution generator. More... | |
double | simlib3::Weibul (double lambda, double alfa) |
Weibul distribution generator. More... | |
void | simlib3::Activate (Entity *e) |
activate entity e More... | |
void | simlib3::Passivate (Entity *e) |
passivate entity e More... | |
void | simlib3::SetMethod (const char *name) |
select the integration method More... | |
const char * | simlib3::GetMethod (void) |
get the name of the method which is used More... | |
void | simlib3::SetStarter (const char *name, const char *slave_name) |
set the method which will be used to start given multistep method More... | |
void | simlib3::SetStarter (const char *slave_name) |
set the method which will be used to start currently used multistep method More... | |
const char * | simlib3::GetStarter (const char *name) |
get the name of the method which is used to start given multistep method More... | |
const char * | simlib3::GetStarter (void) |
get the name of the method which is used to start currently used multistep method More... | |
Input | simlib3::operator+ (Input a, Input b) |
block operator + More... | |
Input | simlib3::operator- (Input a, Input b) |
block operator - More... | |
Input | simlib3::operator* (Input a, Input b) |
block operator * More... | |
Input | simlib3::operator/ (Input a, Input b) |
block operator / More... | |
Input | simlib3::operator- (Input a) |
unary - block operator More... | |
Input | simlib3::Abs (Input x) |
Input | simlib3::Sin (Input x) |
Input | simlib3::Cos (Input x) |
Input | simlib3::Tan (Input x) |
Input | simlib3::ASin (Input x) |
Input | simlib3::ACos (Input x) |
Input | simlib3::ATan (Input x) |
Input | simlib3::ATan2 (Input y, Input x) |
Input | simlib3::Exp (Input x) |
Input | simlib3::Log10 (Input x) |
Input | simlib3::Ln (Input x) |
Input | simlib3::Pow (Input x, Input y) |
Input | simlib3::Sqr (Input x) |
square function More... | |
Input | simlib3::Sqrt (Input x) |
Input | simlib3::Min (Input x, Input y) |
Input | simlib3::Max (Input x, Input y) |
Input | simlib3::Sign (Input x) |
void | simlib3::SetName (SimObject &o, const std::string &name) |
assign name to object More... | |
void | simlib3::SetName (SimObject *o, const std::string &name) |
assign name to object More... | |
void | simlib3::RemoveName (SimObject &o) |
remove name More... | |
void | simlib3::RemoveName (SimObject *o) |
remove name More... | |
std::string | simlib3::GetName (SimObject &o) |
get name of object More... | |
std::string | simlib3::GetName (SimObject *o) |
get name of object More... | |
void | simlib3::InstallBreak (void(*f)()) |
InstallBreak — set function for checking if user breaks simulation. More... | |
Variables | |
const unsigned | simlib3::SIMLIB_version = __SIMLIB__ |
library version More... | |
const double | simlib3::SIMLIB_MINTIME = 0.0 |
minimal time value More... | |
const double | simlib3::SIMLIB_MAXTIME = 1.0e30 |
maximum time (1e30 works for float, too) More... | |
Main SIMLIB/C++ interface.
Definition in file simlib.h.
#define __SIMLIB__ 0x0308 |
Definition at line 8 of file simlib.h.
Referenced by simlib3::Init().
#define RegisterReference | ( | aContiBlockPtr | ) |
Definition at line 882 of file simlib.h.
Referenced by simlib3::Input::Input(), simlib3::Input::operator=(), and simlib3::Input::Set().
#define SIMLIB_VERSION "3.08" |
Definition at line 9 of file simlib.h.
Referenced by simlib3::SIMLIB_version_string().
#define UnRegisterReference | ( | aContiBlockPtr | ) |
Definition at line 883 of file simlib.h.
Referenced by simlib3::Input::operator=(), simlib3::Input::Set(), and simlib3::Input::~Input().