pathsim.optim.booster module

class pathsim.optim.booster.ConnectionBooster(connection)[source]

Bases: object

Wraps a Connection instance and injects a fixed point accelerator.

This class is part of the solver structure and intended to improve the algebraic loop solver of the simulation.

Parameters:

connection (Connection) – connection instance to be boosted with an algebraic loop accelerator

accelerator

internal fixed point accelerator instance

Type:

Anderson

history

history, previous evaliation of the connection value

Type:

float | int | array_like

get()[source]

Return the output values of the source block that is referenced in the connection.

Returns:

out – output values of source, referenced in connection

Return type:

float | int | array_like

set(val)[source]

Set targets input values.

Parameters:

val (float | int | array_like) – input values to set at inputs of the targets, referenced by the connection

reset()[source]

Reset the internal fixed point accelerator and update the history to the most recent value

update()[source]

Wraps the Connection.update method for data transfer from source to targets and injects a solver step of the fixed point accelerator, updates the history required for the next solver step, returns the fixed point residual.

Returns:

res – fixed point residual of internal lixed point accelerator

Return type:

float