|
bitsim
Model, simulate, estimate and control robots in C++
|
The subsystems of a co-simulation, their sizes, and which output feeds which input. More...
#include <coupling.h>
Public Member Functions | |
| uint_t | add (const std::string &name, uint_t n_inputs, uint_t n_outputs) |
| Add a subsystem; its index is the number of subsystems before it. | |
| void | connect (const std::string &from, uint_t output, const std::string &to, uint_t input) |
| void | validate () const |
| uint_t | size () const noexcept |
| uint_t | index (const std::string &name) const |
| const std::string & | name (uint_t i) const |
| uint_t | n_inputs (uint_t i) const |
| uint_t | n_outputs (uint_t i) const |
| const std::vector< Connection > & | connections () const noexcept |
| std::vector< std::vector< real_t > > | inputs_from (const std::vector< std::vector< real_t > > &outputs) const |
| The inputs of every subsystem that the outputs of every subsystem give. | |
| std::vector< std::vector< real_t > > | zero_inputs () const |
| Every subsystem's inputs, all 0. | |
The subsystems of a co-simulation, their sizes, and which output feeds which input.
Every input must be fed by exactly one output. The subsystems are numbered in the order they were added; that order is the order of Gauss-Seidel. Every participant of a distributed co-simulation builds the same layout.
| uint_t bitsim::cosim::CouplingLayout::add | ( | const std::string & | name, |
| uint_t | n_inputs, | ||
| uint_t | n_outputs ) |
Add a subsystem; its index is the number of subsystems before it.
| void bitsim::cosim::CouplingLayout::connect | ( | const std::string & | from, |
| uint_t | output, | ||
| const std::string & | to, | ||
| uint_t | input ) |
|
inlinenoexcept |
| uint_t bitsim::cosim::CouplingLayout::index | ( | const std::string & | name | ) | const |
| std::vector< std::vector< real_t > > bitsim::cosim::CouplingLayout::inputs_from | ( | const std::vector< std::vector< real_t > > & | outputs | ) | const |
The inputs of every subsystem that the outputs of every subsystem give.
|
inline |
|
inlinenoexcept |
| void bitsim::cosim::CouplingLayout::validate | ( | ) | const |
| std::logic_error | if an input is fed by no output, or by more than one |
| std::vector< std::vector< real_t > > bitsim::cosim::CouplingLayout::zero_inputs | ( | ) | const |
Every subsystem's inputs, all 0.