52 Dprintf((
"Lim::Lim(in,l=%g,h=%g,tga=%g)", l, h, tga));
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));
170 return (
high + x * tgalpha);
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;
225 Dprintf((
"Relay::Relay(in,%g,%g,%g,%g,y1=%g,y2=%g)",
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++) { }
345 return (
tableY[i] -
tableY[i - 1]) / (tableX[i] - tableX[i - 1])
346 * (x - tableX[i - 1]) +
tableY[i - 1];
Frict(Input in, double l, double h, double tga=1.0)
friction constructor
Relay(Input i, double p1, double p2, double p3, double p4, double y1, double y2)
relay constructor
void SIMLIB_error(const enum _ErrEnum N)
print error message and abort program
State variables (memory) base for blocks with internal state (Relay, ...)
double stl
status from previous step
virtual void _Eval() override
evaluate block (with loop detection)
void ContractStep()
contract step of integration
Lim(Input in, double l, double h, double tga=1.0)
constructor of limitation block
Implementation of class CalendarList interface is static - using global functions in SQS namespace...
double max(double a, double b)
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 ...
class for algebraic loop detection AlgLoopDetector object should be used in Value() method only it ch...
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 ...
Qntzr(Input in, double qstep=1.0)
quantizer constructor
virtual void Eval() override
evaluate without loop detection
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 void _Eval() override
evaluate block (with loop detection)
double min(double a, double b)
virtual double Value() override
get block output value this method should be defined in classes derived from aContiBlock ...
Rline(Input in, int num, double *X, double *Y)
constructor of class Rline implements table-defined function (linear interpolation) ...
Internal header file for SIMLIB/C++.
virtual void Eval() override
evaluate without loop detection
Main SIMLIB/C++ interface.
virtual std::string Name() const
get object name
base for continuous blocks with single input and algebraic loop check
virtual void Eval() override
block evaluation
Blash(Input i, double p1, double p2, double tga)
blash constructor
virtual double Value() override
get block output value this method should be defined in classes derived from aContiBlock ...
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 ...
Hyst(Input i, double p1, double p2, double y1, double y2, double tga)
hysteresis constructor
virtual void _Eval() override
evaluate block (with loop detection)