Core (mappy_ds)#

The top-level package. All names below are importable directly from mappy_ds.

mappy_ds.__version__: str#

Version string of the installed mappy-ds distribution ("0+unknown" when running from a source tree that is not installed).

System functions#

Decorators that turn a plain Python function f(y, params) into a SystemFunction whose Jacobian and Hessian are derived symbolically. See Jacobian and Hessian tensor.

vector_field(dim)

Declare the right-hand side of an ODE \(\dot y = f(y, p)\).

mapping(dom_dim[, cod_dim])

Declare a discrete map \(y \mapsto f(y, p)\).

border(dim[, direction, name])

Declare a border (section) \(b(y, p) = 0\) of a continuous mode.

SystemFunction(fun, dom_dim, cod_dim[, ...])

A vector-valued function \(f(y, p)\) with symbolic derivatives.

Modes#

The smooth building blocks of a hybrid system. See Concept of modes.

Mode(name, fun, in_trajectory)

Abstract base class of all modes.

ContinuousMode(name, fun[, borders, ...])

A mode whose evolution follows an autonomous ODE until a border is hit.

DiscreteMode(name, fun[, in_trajectory])

A mode whose evolution is a single application of a map.

StepResult(y[, jac, hes, jac_p, hes_p, ...])

Result of Mode.step().

Maps#

Map()

Abstract base class of maps built from modes.

PoincareMap(modes, transitions, initial_mode)

Poincaré map of a hybrid system described by modes and transitions.

Diffeomorphism(fun[, name])

A discrete map \(y \mapsto f(y, p)\) on \(\mathbb{R}^n\).

MapResult(y[, jac, hes, jac_p, hes_p, ...])

Image of a point under a Map with derivatives.

mappy_ds.Transitions#

Type of the transition rules accepted by PoincareMap: Mapping[str, str | Sequence[str]]. Each key is a mode name; the value is the name of the next mode, or for a continuous mode one next mode per border (in the order of ContinuousMode.borders).

Trajectories#

Trajectory([segments])

A trajectory as a sequence of TrajectorySegment.

TrajectorySegment(mode, kind, y[, t])

The part of a trajectory spent in a single mode.

Exceptions#

All exceptions raised deliberately by the package derive from MappyError.

MappyError

Base class of all errors raised by mappy_ds.

SymbolicEvaluationError

A system function could not be evaluated with symbolic arguments.

UnknownModeError(name)

A mode name does not appear in the mode set of a Poincaré map.

TransitionError(mode[, border, reason])

The transition rules of a Poincaré map are inconsistent.

ModeNotTerminatedError(mode, max_interval)

A continuous mode reached max_interval without hitting a border.