SIMLIB/C++
3.07
|
Internal header file for SIMLIB/C++. More...
#include "errors.h"
Go to the source code of this file.
Classes | |
class | simlib3::SIMLIB_module |
Class for internal registration of modules. More... | |
class | simlib3::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... | |
Namespaces | |
simlib3 | |
Implementation of class CalendarList interface is static - using global functions in SQS namespace. | |
simlib3::SQS | |
Special namespace for calendar implementation. | |
Macros | |
#define | DEBUG_INFO "/debug" |
#define | Dprintf(f) |
#define | DEBUG(c, f) |
#define | DBG_ALL ~0UL |
#define | DBG_NEW (1UL) |
#define | DBG_CTR (1UL<<1) |
#define | DBG_INIT (1UL<<2) |
#define | DBG_CHG (1UL<<3) |
#define | DBG_STEP (1UL<<4) |
#define | DBG_CONTI (1UL<<5) |
#define | DBG_FACSTO (1UL<<6) |
#define | DBG_PROCESS (1UL<<7) |
#define | DBG_QUEUE (1UL<<8) |
#define | DBG_CALENDAR (1UL<<9) |
#define | DBG_SIMULATOR (1UL<<10) |
#define | DBG_BEXPR (1UL<<11) |
#define | DBG_WU (1UL<<12) |
#define | DBG_NUMINT (1UL<<13) |
#define | DBG_THREAD (1UL<<14) |
#define | DBG_MODULE (1UL<<15) |
#define | DBG_ATEXIT (1UL<<16) |
#define | SIMLIB_IMPLEMENTATION |
internal module identification More... | |
#define | SIMLIB_internal_error() SIMLIB_error(__FILE__, __LINE__) |
#define | _SetTime(t, x) (SIMLIB_##t = x) |
macro for simple assignement to internal time variables More... | |
#define | HOOK_PTR_NAME(id) SIMLIB_Hook_Ptr_##id |
#define | HOOK_INST_NAME(id) SIMLIB_Install_hook_##id |
#define | INSTALL_HOOK(name, function) |
#define | DEFINE_HOOK(name) |
#define | CALL_HOOK(name) if( HOOK_PTR_NAME(name) ) HOOK_PTR_NAME(name) () |
Typedefs | |
typedef void(* | simlib3::SIMLIB_atexit_function_t) () |
typedef void(* | simlib3::VoidFunctionPtr) () |
Functions | |
void | simlib3::SIMLIB_atexit (SIMLIB_atexit_function_t p) |
const char * | simlib3::_ErrMsg (enum _ErrEnum N) |
void | simlib3::SIMLIB_error (const enum _ErrEnum N) |
print error message and abort program More... | |
void | simlib3::SIMLIB_error (const char *fmt,...) |
print error message and abort program More... | |
void | simlib3::SIMLIB_error (const char *filename, const int linenum) |
print error message and abort program More... | |
void | simlib3::SIMLIB_warning (const enum _ErrEnum N) |
print warning message and continue More... | |
void | simlib3::SIMLIB_warning (const char *fmt,...) |
print warning message and continue More... | |
void | simlib3::SQS::ScheduleAt (Entity *e, double t) |
schedule entity e at given time t using scheduling priority from e More... | |
Entity * | simlib3::SQS::GetFirst () |
remove entity with minimum activation time More... | |
void | simlib3::SQS::Get (Entity *e) |
remove selected entity activation record from calendar More... | |
bool | simlib3::SQS::Empty () |
empty calendar predicate More... | |
void | simlib3::SQS::Clear () |
remove all scheduled entities More... | |
int | simlib3::SQS::debug_print () |
void | simlib3::SIMLIB_Dynamic () |
performs evaluation of integrators and status blocks More... | |
void | simlib3::SIMLIB_DoActions () |
void | simlib3::SIMLIB_ContinueInit () |
void | simlib3::SIMLIB_DoConditions () |
void | simlib3::SIMLIB_WUClear () |
double | simlib3::min (double a, double b) |
double | simlib3::max (double a, double b) |
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 More... | |
Variables | |
static SIMLIB_module | simlib3::SIMLIB_module_id |
Create single global registration object in each SIMLIB module. More... | |
const SIMLIB_Phase_t & | simlib3::Phase = SIMLIB_Phase |
This variable contains the current phase of experiment (used for internal checking) More... | |
double | simlib3::SIMLIB_Time |
bool | simlib3::SIMLIB_DynamicFlag = false |
in dynamic section More... | |
bool | simlib3::SIMLIB_ResetStatus = false |
flag set if there is a need for integration method restart More... | |
SIMLIB_Phase_t | simlib3::SIMLIB_Phase = START |
Entity * | simlib3::SIMLIB_Current = NULL |
int | simlib3::SIMLIB_ERRNO =0 |
bool | simlib3::SIMLIB_ContractStepFlag = false |
requests shorter step More... | |
double | simlib3::SIMLIB_ContractStep = SIMLIB_MAXTIME |
requested step size More... | |
double | simlib3::SIMLIB_StepStartTime |
last step time More... | |
double | simlib3::SIMLIB_DeltaTime |
Time-SIMLIB_StepStartTime. More... | |
double | simlib3::SIMLIB_OptStep |
optimal step More... | |
double | simlib3::SIMLIB_MinStep =1e-10 |
minimal step More... | |
double | simlib3::SIMLIB_MaxStep =1 |
max. step More... | |
double | simlib3::SIMLIB_StepSize |
actual step More... | |
double | simlib3::SIMLIB_AbsoluteError =0 |
absolute error More... | |
double | simlib3::SIMLIB_RelativeError =0.001 |
relative error More... | |
double | simlib3::SIMLIB_StartTime |
double | simlib3::SIMLIB_NextTime |
double | simlib3::SIMLIB_EndTime |
Internal header file for SIMLIB/C++.
Definition in file internal.h.
macro for simple assignement to internal time variables
Definition at line 228 of file internal.h.
Referenced by simlib3::SQS::Clear(), simlib3::IntegrationMethod::FunCall(), simlib3::SQS::Get(), simlib3::SQS::GetFirst(), simlib3::RKF3::Integrate(), simlib3::RKF5::Integrate(), simlib3::RKF8::Integrate(), simlib3::EULER::Integrate(), simlib3::RKE::Integrate(), simlib3::FW::Integrate(), simlib3::ABM4::Integrate(), simlib3::IntegrationMethod::Iterate(), simlib3::StatusMethod::RestoreState(), simlib3::Run(), simlib3::SQS::ScheduleAt(), simlib3::SIMLIB_Init(), and simlib3::IntegrationMethod::Summarize().
#define CALL_HOOK | ( | name | ) | if( HOOK_PTR_NAME(name) ) HOOK_PTR_NAME(name) () |
Definition at line 278 of file internal.h.
Referenced by simlib3::Run(), simlib3::SampleDelays(), simlib3::SIMLIB_DoActions(), simlib3::SIMLIB_Init(), and simlib3::SIMLIB_WUClear().
#define DBG_ALL ~0UL |
Definition at line 111 of file internal.h.
#define DBG_ATEXIT (1UL<<16) |
Definition at line 128 of file internal.h.
Referenced by simlib3::SIMLIB_atexit(), and simlib3::SIMLIB_atexit_call().
#define DBG_BEXPR (1UL<<11) |
Definition at line 123 of file internal.h.
#define DBG_CALENDAR (1UL<<9) |
Definition at line 121 of file internal.h.
#define DBG_CHG (1UL<<3) |
Definition at line 115 of file internal.h.
#define DBG_CONTI (1UL<<5) |
Definition at line 117 of file internal.h.
#define DBG_CTR (1UL<<1) |
Definition at line 113 of file internal.h.
#define DBG_FACSTO (1UL<<6) |
Definition at line 118 of file internal.h.
#define DBG_INIT (1UL<<2) |
Definition at line 114 of file internal.h.
#define DBG_MODULE (1UL<<15) |
Definition at line 127 of file internal.h.
Referenced by simlib3::SIMLIB_module::SIMLIB_module(), and simlib3::SIMLIB_module::~SIMLIB_module().
#define DBG_NEW (1UL) |
Definition at line 112 of file internal.h.
#define DBG_NUMINT (1UL<<13) |
Definition at line 125 of file internal.h.
#define DBG_PROCESS (1UL<<7) |
Definition at line 119 of file internal.h.
#define DBG_QUEUE (1UL<<8) |
Definition at line 120 of file internal.h.
#define DBG_SIMULATOR (1UL<<10) |
Definition at line 122 of file internal.h.
#define DBG_STEP (1UL<<4) |
Definition at line 116 of file internal.h.
#define DBG_THREAD (1UL<<14) |
Definition at line 126 of file internal.h.
Referenced by simlib3::Process::_Run().
#define DBG_WU (1UL<<12) |
Definition at line 124 of file internal.h.
#define DEBUG | ( | c, | |
f | |||
) |
Definition at line 105 of file internal.h.
Referenced by simlib3::Process::_Run(), simlib3::SIMLIB_atexit(), simlib3::SIMLIB_atexit_call(), simlib3::SIMLIB_module::SIMLIB_module(), and simlib3::SIMLIB_module::~SIMLIB_module().
#define DEBUG_INFO "/debug" |
Definition at line 98 of file internal.h.
#define DEFINE_HOOK | ( | name | ) |
Definition at line 267 of file internal.h.
#define Dprintf | ( | f | ) |
Definition at line 100 of file internal.h.
Referenced by simlib3::_Add::_Add(), simlib3::_Add2D::_Add2D(), simlib3::_Add3D::_Add3D(), simlib3::_Div::_Div(), simlib3::_Div2D::_Div2D(), simlib3::_Div3D::_Div3D(), simlib3::_Mul::_Mul(), simlib3::_Mul2D1D::_Mul2D1D(), simlib3::_Mul3D::_Mul3D(), simlib3::_Mul3D1D::_Mul3D1D(), simlib3::Process::_Run(), simlib3::_Sub::_Sub(), simlib3::_Sub2D::_Sub2D(), simlib3::_Sub3D::_Sub3D(), simlib3::_UMinus::_UMinus(), simlib3::_UMinus2D::_UMinus2D(), simlib3::_UMinus3D::_UMinus3D(), simlib3::Process::_WaitUntil(), simlib3::Abort(), simlib3::aContiBlock2D::aContiBlock2D(), simlib3::aContiBlock3D::aContiBlock3D(), simlib3::Process::Activate(), simlib3::Event::Activate(), simlib3::Barrier::Barrier(), simlib3::Sampler::Behavior(), simlib3::Blash::Blash(), simlib3::CalendarList::CalendarList(), simlib3::CalendarQueue::CalendarQueue(), simlib3::Barrier::ChangeHeight(), simlib3::CalendarList::clear(), simlib3::CalendarQueue::clear(), simlib3::TStat::Clear(), simlib3::Queue::clear(), simlib3::Histogram::Clear(), simlib3::Facility::Clear(), simlib3::Store::Clear(), simlib3::Semaphore::Clear(), simlib3::Barrier::Clear(), simlib3::StatusContainer::ClearAllValueOK(), simlib3::CalendarList::create(), simlib3::CalendarQueue::create(), simlib3::Status::CtrInit(), simlib3::Delay::Delay(), simlib3::Calendar::delete_instance(), simlib3::Store::Enter(), simlib3::Barrier::Enter(), simlib3::Entity::Entity(), simlib3::IntegratorContainer::Erase(), simlib3::StatusContainer::Erase(), simlib3::CalendarQueue::estimate_bucket_width(), simlib3::IntegratorContainer::EvaluateAll(), simlib3::StatusContainer::EvaluateAll(), simlib3::Event::Event(), simlib3::Facility::Facility(), simlib3::Frict::Frict(), simlib3::Function1::Function1(), simlib3::Function2::Function2(), simlib3::Queue::Get(), simlib3::WaitUntilList::GetCurrent(), simlib3::Queue::GetFirst(), simlib3::Queue::GetLast(), simlib3::MultiStepMethod::GetStarter(), simlib3::Histogram::Histogram(), simlib3::Hyst::Hyst(), simlib3::ZDelay::Init(), simlib3::Histogram::Init(), simlib3::Barrier::Init(), simlib3::IntegratorContainer::InitAll(), simlib3::StatusContainer::InitAll(), simlib3::Queue::Insert(), simlib3::IntegratorContainer::Insert(), simlib3::StatusContainer::Insert(), simlib3::WaitUntilList::InsertCurrent(), simlib3::Queue::InsFirst(), simlib3::Queue::InsLast(), simlib3::IntegratorContainer::Instance(), simlib3::StatusContainer::Instance(), simlib3::Insv::Insv(), simlib3::RKF3::Integrate(), simlib3::RKF5::Integrate(), simlib3::EULER::Integrate(), simlib3::RKF8::Integrate(), simlib3::RKE::Integrate(), simlib3::FW::Integrate(), simlib3::ABM4::Integrate(), simlib3::IntegrationMethod::IntegrationMethod(), simlib3::Integrator::Integrator(), simlib3::Process::Interrupt(), simlib3::IntegrationMethod::Iterate(), simlib3::Store::Leave(), simlib3::Lim::Lim(), simlib3::List::List(), simlib3::IntegratorContainer::LtoN(), simlib3::StatusContainer::LtoN(), simlib3::MultiStepMethod::MultiStepMethod(), simlib3::IntegratorContainer::NtoL(), simlib3::StatusContainer::NtoL(), simlib3::Semaphore::P(), simlib3::Process::Passivate(), simlib3::Queue::PostIns(), simlib3::Queue::PredIns(), simlib3::IntegrationMethod::Prepare(), simlib3::FW::PrepareStep(), simlib3::ABM4::PrepareStep(), simlib3::IntegrationMethod::PrepareStep(), simlib3::MultiStepMethod::PrepareStep(), simlib3::StatusMethod::PrepareStep(), simlib3::Process::Process(), simlib3::Qntzr::Qntzr(), simlib3::Queue::Queue(), simlib3::Facility::QueueIn(), simlib3::Store::QueueIn(), simlib3::Facility::QueueIn2(), simlib3::Relay::Relay(), simlib3::Facility::Release(), simlib3::WaitUntilList::Remove(), simlib3::CalendarQueue::Resize(), simlib3::IntegrationMethod::Memory::Resize(), simlib3::IntegrationMethod::Resize(), simlib3::Rline::Rline(), simlib3::Run(), simlib3::Delay::Sample(), simlib3::ZDelay::SampleIn(), simlib3::ZDelay::SampleOut(), simlib3::Sampler::Sampler(), simlib3::CalendarQueue::ScheduleAt(), simlib3::IntegrationMethod::SearchMethod(), simlib3::Facility::Seize(), simlib3::Semaphore::Semaphore(), simlib3::SetAccuracy(), simlib3::IntegrationMethod::SetMethod(), simlib3::MultiStepMethod::SetStarter(), simlib3::SetStep(), simlib3::SIMLIB_Init(), simlib3::Stat::Stat(), simlib3::IntegrationMethod::StateCond(), simlib3::StatusMethod::StatusMethod(), simlib3::StatusMethod::StatusResize(), simlib3::IntegrationMethod::StepSim(), simlib3::Stop(), simlib3::Store::Store(), simlib3::IntegrationMethod::Summarize(), simlib3::Entity::Terminate(), simlib3::Process::Terminate(), simlib3::Event::Terminate(), simlib3::TStat::TStat(), simlib3::IntegrationMethod::TurnOff(), simlib3::MultiStepMethod::TurnOff(), simlib3::StatusMethod::TurnOff(), simlib3::Semaphore::V(), simlib3::Delay::Value(), simlib3::ZDelay::Value(), simlib3::Process::Wait(), simlib3::Barrier::Wait(), simlib3::WaitUntilList::WaitUntilList(), simlib3::WaitUntilList::WU_hook(), simlib3::ZDelay::ZDelay(), simlib3::_Add::~_Add(), simlib3::_Div::~_Div(), simlib3::_Mul::~_Mul(), simlib3::_Sub::~_Sub(), simlib3::_UMinus::~_UMinus(), simlib3::aContiBlock2D::~aContiBlock2D(), simlib3::aContiBlock3D::~aContiBlock3D(), simlib3::Barrier::~Barrier(), simlib3::CalendarList::~CalendarList(), simlib3::CalendarQueue::~CalendarQueue(), simlib3::Delay::~Delay(), simlib3::Entity::~Entity(), simlib3::Event::~Event(), simlib3::Facility::~Facility(), simlib3::Histogram::~Histogram(), simlib3::IntegrationMethod::~IntegrationMethod(), simlib3::Integrator::~Integrator(), simlib3::List::~List(), simlib3::MultiStepMethod::~MultiStepMethod(), simlib3::Process::~Process(), simlib3::Queue::~Queue(), simlib3::Rline::~Rline(), simlib3::Sampler::~Sampler(), simlib3::Semaphore::~Semaphore(), simlib3::Stat::~Stat(), simlib3::Status::~Status(), simlib3::Store::~Store(), simlib3::TStat::~TStat(), simlib3::WaitUntilList::~WaitUntilList(), and simlib3::ZDelay::~ZDelay().
#define HOOK_INST_NAME | ( | id | ) | SIMLIB_Install_hook_##id |
Definition at line 247 of file internal.h.
#define HOOK_PTR_NAME | ( | id | ) | SIMLIB_Hook_Ptr_##id |
Definition at line 246 of file internal.h.
#define INSTALL_HOOK | ( | name, | |
function | |||
) |
Definition at line 255 of file internal.h.
Referenced by simlib3::WaitUntilList::clear(), simlib3::WaitUntilList::create(), simlib3::SIMLIB_ZDelayTimer::Destroy(), simlib3::SIMLIB_Delay::Destroy(), simlib3::WaitUntilList::GetCurrent(), simlib3::SIMLIB_Delay::Initialize(), simlib3::SIMLIB_ZDelayTimer::Initialize(), simlib3::WaitUntilList::InsertCurrent(), simlib3::InstallBreak(), simlib3::Sampler::Sampler(), and simlib3::Sampler::~Sampler().
#define SIMLIB_IMPLEMENTATION |
internal module identification
Definition at line 135 of file internal.h.
#define SIMLIB_internal_error | ( | ) | SIMLIB_error(__FILE__, __LINE__) |
Definition at line 167 of file internal.h.
Referenced by simlib3::Process::_WaitUntil(), simlib3::WaitUntilList::clear(), simlib3::WaitUntilList::create(), simlib3::List::InsFirst(), simlib3::List::InsLast(), simlib3::List::PostIns(), simlib3::Queue::PostIns(), simlib3::List::PredIns(), simlib3::IntegrationMethod::Memory::Resize(), simlib3::Run(), simlib3::SIMLIB_atexit(), simlib3::Integrator2D::special_input::Value(), simlib3::Integrator3D::special_input::Value(), simlib3::_XYpart::Value(), simlib3::_XYZpart::Value(), simlib3::WaitUntilList::WU_hook(), simlib3::ZDelay::ZDelay(), and simlib3::IntegrationMethod::~IntegrationMethod().