Class SemiExplicit

Inheritance Relationships

Base Type

  • public Indigo::DAE::System

Class Documentation

class SemiExplicit : public Indigo.DAE.System

Class container for a semi explicit system of ODEs/DAEs of the form:

\[ \mathbf{x}' = \mathbf{f}( \mathbf{x}, \mathbf{y}, \mathbf{v}, t ) = \mathbf{M}( \mathbf{x}, \mathbf{y}, \mathbf{v}, t )^{-1} \mathbf{f}( \mathbf{x}, \mathbf{y}, \mathbf{v}, t ) \]

or equivalently:

\[ \mathbf{F}( \mathbf{x}, \mathbf{x}', \mathbf{v}, t ) = \mathbf{x}' - \mathbf{f}( \mathbf{x}, \mathbf{x}, \mathbf{y}, \mathbf{v}, t ) = \mathbf{0} \]

with optional veils \( \mathbf{v}( \mathbf{x}, t ) \) of the form:

\[\begin{split} \mathbf{v}( \mathbf{x}, t ) = \left{\begin{array}{c} v_1( \mathbf{x}, t ) \\ v_2( \mathbf{x}, v_1, t ) \\ v_3( \mathbf{x}, v_1, v_2, t ) \\ \vdots \\ v_n( \mathbf{x}, v_1, \dots, v_{n-1}, t ) \end{array}\right. \end{split}\]

optional linear system for index-1 variables \mathbf{y} of the form:

\[ \mathbf{M}( \mathbf{x}, \mathbf{v}, t ) \mathbf{y} = \mathbf{f}( \mathbf{x}, \mathbf{v}, t ) \]

and optional invariants of the form:

\[ \mathbf{h}( \mathbf{x}, \mathbf{y}, \mathbf{v}, t ) = \mathbf{0} \]

where \( \mathbf{x} \) are the unknown functions (states) of the independent variable \( t \).

Public Functions

function SemiExplicit(t_name, t_num_eqns, t_num_sysy, t_num_veil, t_num_invs)

Class constructor for a semi-explicit system.

Parameters
  • t_name – The name of the system.

  • t_num_eqns – The number of equations of the system.

  • t_num_sysy – The number of linear index-1 variables of the system.

  • t_num_veil – The number of (user-defined) veils of the system.

  • t_num_invs – The number of invariants of the system.

function F(x, x_dot, y, v, t)

Evaluate the system function \( \mathbf{F} \).

Parameters
  • x – States \( \mathbf{x} \).

  • x_dot – States derivatives \( \mathbf{x}' \).

  • y – Linear index-1 variables \( \mathbf{y} \).

  • v – Veils \( \mathbf{v} \).

  • t – Independent variable \( t \).

Returns

The system function \( \mathbf{F} \).

function JF_x(x, x_dot, y, v, t)

Evaluate the Jacobian of the system function \( \mathbf{F} \) with respect to the states \( \mathbf{x} \):

\[ \mathbf{JF}_{\mathbf{x}}( \mathbf{x}, \mathbf{x}', \mathbf{v}, t ) = \dfrac{ \partial \mathbf{F}( \mathbf{x}, \mathbf{x}', \mathbf{v}, t ) }{ \partial \mathbf{x} }. \]
Parameters
  • x – States \( \mathbf{x} \).

  • x_dot – States derivatives \( \mathbf{x}' \).

  • y – Linear index-1 variables \( \mathbf{y} \).

  • v – Veils \( \mathbf{v} \).

  • t – Independent variable \( t \).

Returns

The Jacobian \( \mathbf{JF}_{\mathbf{x}} \).

function JF_x_dot()

Evaluate the Jacobian of the system function \( \mathbf{F} \) with respect to the states derivative \( \mathbf{x}' \):

\[ \mathbf{JF}_{\mathbf{x}'}( \mathbf{x}, \mathbf{x}', \mathbf{v}, t ) = \dfrac{ \partial \mathbf{F}( \mathbf{x}, \mathbf{x}', \mathbf{v}, t ) }{ \partial \mathbf{x}' }. \]
Parameters
  • x – States \( \mathbf{x} \).

  • x_dot – States derivatives \( \mathbf{x}' \).

  • y – Linear index-1 variables \( \mathbf{y} \).

  • v – Veils \( \mathbf{v} \).

  • t – Independent variable \( t \).

Returns

The Jacobian \( \mathbf{JF}_{\mathbf{x}'} \).

function JF_y(x, x_dot, v, t)

Evaluate the Jacobian of the system function \( \mathbf{F} \) with respect to the veils \( \mathbf{y} \):

\[ \mathbf{JF}_{\mathbf{y}}( \mathbf{x}, \mathbf{x}', \mathbf{v}, t ) = \dfrac{ \partial \mathbf{F}( \mathbf{x}, \mathbf{x}', \mathbf{v}, t ) }{ \partial \mathbf{y} }. \]
Parameters
  • x – States \( \mathbf{x} \).

  • x_dot – States derivatives \( \mathbf{x}' \).

  • v – Veils \( \mathbf{v} \).

  • t – Independent variable \( t \).

Returns

The Jacobian \( \mathbf{JF}_{\mathbf{y}} \).

function JF_v(x, x_dot, v, t)

Evaluate the Jacobian of the system function \( \mathbf{F} \) with respect to the veils \( \mathbf{v} \):

\[ \mathbf{JF}_{\mathbf{v}}( \mathbf{x}, \mathbf{x}', \mathbf{v}, t ) = \dfrac{ \partial \mathbf{F}( \mathbf{x}, \mathbf{x}', \mathbf{v}, t ) }{ \partial \mathbf{v} }. \]
Parameters
  • x – States \( \mathbf{x} \).

  • x_dot – States derivatives \( \mathbf{x}' \).

  • v – Veils \( \mathbf{v} \).

  • t – Independent variable \( t \).

Returns

The Jacobian \( \mathbf{JF}_{\mathbf{v}} \).

function f(x, v, y, t)

Evaluate the system function \( \mathbf{f} \) as:

\[ \mathbf{f}( \mathbf{x}, \mathbf{y}, \mathbf{v}, t ) = \mathbf{M}( \mathbf{x}, \mathbf{y}, \mathbf{v}, t )^{-1} \mathbf{f}( \mathbf{x}, \mathbf{y}, \mathbf{v}, t ) \]
Parameters
  • x – States \( \mathbf{x} \).

  • v – Veils \( \mathbf{v} \).

  • y – Linear index-1 variables \( \mathbf{y} \).

  • t – Independent variable \( t \).

Returns

The system function \( \mathbf{f} \).

function Jf_x(x, x_dot, y, v, t)

Evaluate the Jacobian of the system function \( \mathbf{f} \) with respect to the states \( \mathbf{x} \):

\[ \mathbf{Jf}_{\mathbf{x}}( \mathbf{x}, \mathbf{y}, \mathbf{v}, t ) = \dfrac{ \partial \mathbf{f}( \mathbf{x}, \mathbf{y}, \mathbf{v}, t ) }{ \partial \mathbf{x} } = \dfrac{ \partial \mathbf{M}^{-1} \mathbf{f} }{ \partial \mathbf{x} \]
Parameters
  • x – States \( \mathbf{x} \).

  • x_dot – States derivatives \( \mathbf{x}' \).

  • v – Veils \( \mathbf{v} \).

  • y – Linear index-1 variables \( \mathbf{y} \).

  • t – Independent variable \( t \).

Returns

The Jacobian \( \mathbf{Jf}_{\mathbf{x}} \)..

function Jf_y(x, x_dot, y, v, t)

Evaluate the Jacobian of the system function \( \mathbf{f} \) with respect to the states \( \mathbf{y} \):

\[ \mathbf{Jf}_{\mathbf{y}}( \mathbf{x}, \mathbf{y}, \mathbf{v}, t ) = \dfrac{ \partial \mathbf{f}( \mathbf{x}, \mathbf{y}, \mathbf{v}, t ) }{ \partial \mathbf{y} } = \dfrac{ \partial \mathbf{M}^{-1} \mathbf{f} }{ \partial \mathbf{v} \]
Parameters
  • x – States \( \mathbf{x} \).

  • x_dot – States derivatives \( \mathbf{x}' \).

  • y – Linear states \( \mathbf{y} \).

  • v – Veils \( \mathbf{v} \).

  • t – Independent variable \( t \).

Returns

The Jacobian \( \mathbf{Jf}_{\mathbf{y}} \)..

function Jf_v(x, x_dot, y, v, t)

Evaluate the Jacobian of the system function \( \mathbf{f} \) with respect to the states \( \mathbf{x} \):

\[ \mathbf{Jf}_{\mathbf{v}}( \mathbf{x}, \mathbf{y}, \mathbf{v}, t ) = \dfrac{ \partial \mathbf{f}( \mathbf{x}, \mathbf{y}, \mathbf{v}, t ) }{ \partial \mathbf{v} } = \dfrac{ \partial \mathbf{M}^{-1} \mathbf{f} }{ \partial \mathbf{v} \]
Parameters
  • x – States \( \mathbf{x} \).

  • x_dot – States derivatives \( \mathbf{x}' \).

  • y – Linear states \( \mathbf{y} \).

  • v – Veils \( \mathbf{v} \).

  • t – Independent variable \( t \).

Returns

The Jacobian \( \mathbf{Jf}_{\mathbf{v}} \)..

virtual function Ms(x, y, v, t)

Evaluate the sytem matrix \( \mathbf{M} \).

Parameters
  • x – States \( \mathbf{x} \).

  • y – Linear index-1 variables \( \mathbf{y} \).

  • v – Veils \( \mathbf{v} \).

  • t – Independent variable \( t \).

Returns

The system matrix \( \mathbf{M} \).

virtual function TMs_x(x, y, v, t)

Evaluate the tensor of the system matrix \( \mathbf{M} \) with respect to the states \( \mathbf{x} \):

\[ \mathbf{TM}_{\mathbf{x}}( \mathbf{x}, \mathbf{y}, \mathbf{v}, t ) = \dfrac{ \partial \mathbf{M}( \mathbf{x}, \mathbf{y}, \mathbf{v}, t ) }{ \partial \mathbf{x} }. \]
Parameters
  • x – States \( \mathbf{x} \).

  • y – Linear index-1 variables \( \mathbf{y} \).

  • v – Veils \( \mathbf{v} \).

  • t – Independent variable \( t \).

Returns

The tensor \( \mathbf{TM}_{\mathbf{x}} \).

virtual function TMs_y(x, y, v, t)

Evaluate the tensor of the system matrix \( \mathbf{M} \) with respect to the states \( \mathbf{x} \):

\[ \mathbf{TM}_{\mathbf{y}}( \mathbf{x}, \mathbf{y}, \mathbf{v}, t ) = \dfrac{ \partial \mathbf{M}( \mathbf{x}, \mathbf{y}, \mathbf{v}, t ) }{ \partial \mathbf{y} }. \]
Parameters
  • x – States \( \mathbf{x} \).

  • y – Linear index-1 variables \( \mathbf{y} \).

  • v – Veils \( \mathbf{v} \).

  • t – Independent variable \( t \).

Returns

The tensor \( \mathbf{TM}_{\mathbf{y}} \).

virtual function TMs_v(x, y, v, t)

Evaluate the tensor of the system matrix \( \mathbf{M} \) with respect to the states \( \mathbf{v} \):

\[ \mathbf{TM}_{\mathbf{y}}( \mathbf{x}, \mathbf{y}, \mathbf{v}, t ) = \dfrac{ \partial \mathbf{M}( \mathbf{x}, \mathbf{y}, \mathbf{v}, t ) }{ \partial \mathbf{v} }. \]
Parameters
  • x – States \( \mathbf{x} \).

  • y – Linear index-1 variables \( \mathbf{y} \).

  • v – Veils \( \mathbf{v} \).

  • t – Independent variable \( t \).

Returns

The tensor \( \mathbf{TM}_{\mathbf{v}} \).

virtual function fs(x, v, y, t)

Evaluate the sytem vector \( \mathbf{f} \).

Parameters
  • x – States \( \mathbf{x} \).

  • y – Linear index-1 variables \( \mathbf{y} \).

  • v – Veils \( \mathbf{v} \).

  • t – Independent variable \( t \).

Returns

The system vector \( \mathbf{f} \).

virtual function Jfs_x(x, v, y, t)

Evaluate the Jacobian of the system vector \( \mathbf{f} \) with respect to the states \( \mathbf{x} \):

\[ \mathbf{Jf}_{\mathbf{x}}( \mathbf{x}, \mathbf{y}, \mathbf{v}, t ) = \dfrac{ \partial \mathbf{f}( \mathbf{x}, \mathbf{y}, \mathbf{v}, t ) }{ \partial \mathbf{x} }. \]
Parameters
  • x – States \( \mathbf{x} \).

  • y – Linear index-1 variables \( \mathbf{y} \).

  • v – Veils \( \mathbf{v} \).

  • t – Independent variable \( t \).

Returns

The Jacobian \( \mathbf{Jf}_{\mathbf{x}} \)..

virtual function Jfs_y(x, v, y, t)

Evaluate the Jacobian of the system vector \( \mathbf{f} \) with respect to the veils \( \mathbf{y} \):

\[ \mathbf{Jf}_{\mathbf{y}}( \mathbf{x}, \mathbf{y}, \mathbf{v}, t ) = \dfrac{ \partial \mathbf{f}( \mathbf{x}, \mathbf{y}, \mathbf{v}, t ) }{ \partial \mathbf{y} }. \]
Parameters
  • x – States \( \mathbf{x} \).

  • y – Linear index-1 variables \( \mathbf{y} \).

  • v – Veils \( \mathbf{v} \).

  • t – Independent variable \( t \).

Returns

The Jacobian \( \mathbf{Jf}_{\mathbf{y}} \)..

virtual function Jfs_v(x, v, y, t)

Evaluate the Jacobian of the system vector \( \mathbf{f} \) with respect to the veils \( \mathbf{v} \):

\[ \mathbf{Jf}_{\mathbf{v}}( \mathbf{x}, \mathbf{y}, \mathbf{v}, t ) = \dfrac{ \partial \mathbf{f}( \mathbf{x}, \mathbf{y}, \mathbf{v}, t ) }{ \partial \mathbf{v} }. \]
Parameters
  • x – States \( \mathbf{x} \).

  • y – Linear index-1 variables \( \mathbf{y} \).

  • v – Veils \( \mathbf{v} \).

  • t – Independent variable \( t \).

Returns

The Jacobian \( \mathbf{Jf}_{\mathbf{v}} \)..

Public Static Functions

static function whattype()

Get the system type.

Returns

The system type.

static function is_explicit()

Check if the system is explicit.

Returns

True if the system is explicit, false otherwise.

static function is_semiexplicit()

Check if the system is semiexplicit.

Returns

True if the system is semiexplicit, false otherwise.

static function is_implicit()

Check if the system is implicit.

Returns

True if the system is implicit, false otherwise.