24 void add(std::unique_ptr<ControlElement> element);
26 [[nodiscard]] std::string
getType()
const override {
return "ControlPath"; }
34 std::vector<std::unique_ptr<ControlElement>> elements_;
Abstract base for every control element (P, I, D, PT1, ...).
void initialize(double dt) override
Reset internal state for a simulation run at sample time dt.
double calculate(double u, double dt) override
Advance one sample: feed input u, return output.
int optimizeGetNumParameters() const override
Number of tunable parameters this element consumes.
void optimizeSetParameters(const std::vector< double > ¶ms, int startIdx) override
Load parameters from params starting at startIdx.
void add(std::unique_ptr< ControlElement > element)
Append an element to the chain (takes ownership).
std::string getType() const override
Short type tag, e.g. "P", "PT1", "ControlLoop".
double getLowestTimeConstant() const override
Lowest time constant of the element, or -1 if it has none.