52 Dprintf((
"Lim::Lim(in,l=%g,h=%g,tga=%g)", l, h, tga));
84 :
aContiBlock1(in), low(l), high(h), tgalpha(tga), tgbeta(tgb)
88 Dprintf((
"Insv::Insv(in,l=%g,h=%g,tga=%g,tgb=%g)", l, h, tga, tgb));
123 Dprintf((
"Qntzr::Qntzr(in,step=%g)", p));
134 double zn = (x > 0) ? 1 : ((x < 0) ? -1 : 0);
135 double k = zn * floor((fabs(x) -
step / 2) /
step + 1);
156 Dprintf((
"Frict::Frict(in,l=%g,h=%g,tga=%g)", l, h, tga));
187 :
Status(i), p1(_p1), p2(_p2), y1(_y1), y2(_y2), tga(_tga)
189 Dprintf((
"Hyst::Hyst(in,%g,%g,%g,%g,tga=%g)",
p1,
p2,
y1,
y2,
tga));
198 double yn2 = (x -
p2) *
tga;
199 double yn1 = (x -
p1) *
tga;
222 :
Status(i), p1(_p1), p2(_p2), p3(_p3), p4(_p4), y1(_y1), y2(_y2)
225 Dprintf((
"Relay::Relay(in,%g,%g,%g,%g,y1=%g,y2=%g)",
263 :
Status(i), p1(_p1), p2(_p2), tga(_tga)
273 double yn1 = (x -
p1) *
tga;
274 double yn2 = (x -
p2) *
tga;
275 double y =
max(yn2, ys);
300 Dprintf((
"Rline::Rline(in,%i,X[],Y[])",
n));
312 memcpy(
tableX, X,
n *
sizeof(
double));
313 memcpy(
tableY, Y,
n *
sizeof(
double));
314 for (
int i = 1; i <
n; i++)
344 for (i = 1; x >
tableX[i]; i++) { }
class for algebraic loop detection AlgLoopDetector object should be used in Value() method only it ch...
Blash(Input i, double p1, double p2, double tga)
blash constructor
virtual void Eval() override
evaluate without loop detection
virtual void _Eval() override
evaluate block (with loop detection)
virtual double Value() override
get block output value this method should be defined in classes derived from aContiBlock
Frict(Input in, double l, double h, double tga=1.0)
friction constructor
virtual void Eval() override
evaluate without loop detection
Hyst(Input i, double p1, double p2, double y1, double y2, double tga)
hysteresis constructor
virtual void _Eval() override
evaluate block (with loop detection)
Insv(Input in, double l, double h, double tga=1.0, double tgb=1.0)
dead space
virtual double Value() override
get block output value this method should be defined in classes derived from aContiBlock
virtual void _Eval() override
evaluate block (with loop detection)
virtual double Value() override
get block output value this method should be defined in classes derived from aContiBlock
Lim(Input in, double l, double h, double tga=1.0)
constructor of limitation block
virtual void _Eval() override
evaluate block (with loop detection)
Qntzr(Input in, double qstep=1.0)
quantizer constructor
virtual double Value() override
get block output value this method should be defined in classes derived from aContiBlock
Relay(Input i, double p1, double p2, double p3, double p4, double y1, double y2)
relay constructor
virtual void Eval() override
block evaluation
virtual double Value() override
get block output value this method should be defined in classes derived from aContiBlock
virtual void _Eval() override
evaluate block (with loop detection)
Rline(Input in, int num, double *X, double *Y)
constructor of class Rline implements table-defined function (linear interpolation)
virtual std::string Name() const
get object name
State variables (memory) base for blocks with internal state (Relay, ...)
double stl
status from previous step
base for continuous blocks with single input and algebraic loop check
Internal header file for SIMLIB/C++.
Implementation of class CalendarList interface is static - using global functions in SQS namespace.
void SIMLIB_error(const enum _ErrEnum N)
print error message and abort program
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 ...
double min(double a, double b)
double max(double a, double b)
void ContractStep()
contract step of integration
Main SIMLIB/C++ interface.