|
bitsim
Model, simulate, estimate and control robots in C++
|
Classes | |
| class | CoSimulation |
| A co-simulation in one process: the master algorithm that steps coupled subsystems, each with its own solver, and passes the outputs of each to the inputs of the others. More... | |
| struct | CoSimParticipantConfig |
| The settings of CoSimParticipant. More... | |
| class | CoSimParticipant |
| One subsystem of a co-simulation, in a process or on a machine of its own. More... | |
| class | CoSimSubsystem |
| A part of a coupled system that a co-simulation steps on its own: a robot, a trailer, a motor, each with its own solver, coupled to the others only through its inputs and outputs. More... | |
| class | OdeSubsystem |
| A subsystem given by its equations: the state x moves with dx/dt = f(t, x, u), and the outputs are y = h(x, u). More... | |
| struct | Connection |
| Output output of subsystem from feeds input input of subsystem to. More... | |
| class | CouplingLayout |
| The subsystems of a co-simulation, their sizes, and which output feeds which input. More... | |
| struct | CouplingConfig |
| How a co-simulation couples its subsystems. More... | |
| struct | CouplingState |
| The inputs of every subsystem at the present time, and at the time before. More... | |
| struct | MacroStepResult |
| What one macro step did. More... | |
Typedefs | |
| using | try_step_type |
| The outputs of every subsystem at the end of try iteration of a macro step, the subsystems having stepped with their inputs moving from begin to end. | |
Enumerations | |
| enum class | CouplingScheme { JACOBI , GAUSS_SEIDEL } |
| The order in which the subsystems of a macro step take their inputs. More... | |
Functions | |
| MacroStepResult | jacobi_step (const CouplingLayout &layout, const CouplingConfig &config, CouplingState &state, const try_step_type &try_step) |
| One macro step of the Jacobi scheme, with as many tries as config allows. | |
| std::vector< std::vector< real_t > > | resolve_inputs (const CouplingLayout &layout, const std::function< std::vector< std::vector< real_t > >(const std::vector< std::vector< real_t > > &)> &outputs_of) |
| The inputs at the start: outputs_of(inputs) gives the outputs of every subsystem for the inputs, and resolve() feeds them back as many times as there are subsystems, which is enough unless the direct feedthroughs form a loop. | |
The outputs of every subsystem at the end of try iteration of a macro step, the subsystems having stepped with their inputs moving from begin to end.
|
strong |
The order in which the subsystems of a macro step take their inputs.
| MacroStepResult bitsim::cosim::jacobi_step | ( | const CouplingLayout & | layout, |
| const CouplingConfig & | config, | ||
| CouplingState & | state, | ||
| const try_step_type & | try_step ) |
One macro step of the Jacobi scheme, with as many tries as config allows.
try_step steps every subsystem, restoring its saved state first if iteration > 0, and returns the outputs of all of them. The next state of the inputs is what the outputs of the last try give.
| std::vector< std::vector< real_t > > bitsim::cosim::resolve_inputs | ( | const CouplingLayout & | layout, |
| const std::function< std::vector< std::vector< real_t > >(const std::vector< std::vector< real_t > > &)> & | outputs_of ) |
The inputs at the start: outputs_of(inputs) gives the outputs of every subsystem for the inputs, and resolve() feeds them back as many times as there are subsystems, which is enough unless the direct feedthroughs form a loop.