source_localization.population_dynamique module

class source_localization.population_dynamique.PopulationDynamicModel(*args: Any, **kwargs: Any)[source]

Bases: LinearOperator

Class containing the operator of a population dynamic model \(\partial p(x,y,t)=-\gamma(x,y,t) p(x,y,t)\) with \(p\) the density of insect, \(\gamma\) the constant death rate, and a non-zeros constant emission rate \(q\). As the quantity of pheromone emitted by the insects is \(s=pq\), this leads to \(\partial s(x,y,t)=-\gamma s(x,y,t)\).

The implementation of this linear operator is a subclass of the LinearOperator class.

msh

The geometry of the domain.

Type:

MeshRect2D

death_rate

The death rate of the population dynamic model \(\gamma(x,y,t)\).

Type:

dtype

shape

Shape of the matrix of the linear operator. The shape is (msh.t_array.size-1 * msh.y.size * msh.x.size, msh.t_array.size * msh.y.size * msh.x.size).

Type:

tuple of int

dtype

Data type of the elements of the matrix of the linear operator. The type is float64.

Type:

dtype

__init__(msh, death_rate=0.1)[source]

Constructor method

Parameters:
  • msh (MeshRect2D) – The geometry of the domain.

  • death_rate (dtype, optional, float or None, default: 0.1) – The death rate of the population dynamic model \(\gamma(x,y,t)\). If None, set to 0. If float, set to constante.

_matvec(x_out)[source]

Compute the image (matrix-vector product) of the population dynamic model operator \(\mathcal{M}:s\mapsto\partial_ts+\gamma s\) for a given quantity of pheromone emitted \(s(x,y,t)\).

Parameters:

x_out (ndarray) – The quantity of pheromone emitted \(s(x,y,t)\) raveled into a vector.

Returns:

Array containing the image \(s\mapsto\mathcal{M}(s)\).

Return type:

ndarray

_rmatvec(x_out)[source]

Compute the image (matrix-vector product) of the population dynamic model adjoint operator \(\mathcal{M}^*:\phi\mapsto-\partial_t\phi+\gamma\phi\) with \(\phi(t=0)=\phi(t=T)=0\) for a given element \(\phi(x,y,t)\).

Parameters:

x_out (ndarray) – The element \(\phi(x,y,t)\) raveled into a vector.

Returns:

Array containing the image \(\phi\mapsto\mathcal{M}^*(\phi)\).

Return type:

ndarray

class source_localization.population_dynamique.StationnaryPopulationDynamicModel(*args: Any, **kwargs: Any)[source]

Bases: LinearOperator

Class containing the operator of a stationary population dynamic model \(\partial p(x,y,t)=0\) with \(p\) the density of insect and a non-zeros constant emission rate \(q\). As the quantity of pheromone emitted by the insects is \(s=pq\), this leads to \(\partial_ts(x,y,t)=0\).

The implementation of this linear operator is a subclass of the LinearOperator class.

msh

The geometry of the domain.

Type:

MeshRect2D

shape

Shape of the matrix of the linear operator. The shape is (msh.t_array.size-1 * msh.y.size * msh.x.size, msh.t_array.size * msh.y.size * msh.x.size).

Type:

tuple of int

dtype

Data type of the elements of the matrix of the linear operator. The type is float64

Type:

dtype

__init__(msh)[source]

Constructor method

Parameters:

msh (MeshRect2D) – The geometry of the domain.

_matvec(x_out)[source]

Compute the image (matrix-vector product) of the stationnary population dynamic model operator \(\mathcal{M}:s\mapsto\partial_ts\) for a given quantity of pheromone emitted \(s(x,y,t)\).

Parameters:

x_out (ndarray) – The quantity of pheromone emitted \(s(x,y,t)\) raveled into a vector.

Returns:

Array containing the image \(s\mapsto\mathcal{M}(s)\).

Return type:

ndarray

_rmatvec(x_out)[source]

Compute the image (matrix-vector product) of the stationnary population dynamic model adjoint operator \(\mathcal{M}^*:\phi\mapsto-\partial_t\phi\) with \(\phi(t=0)=\phi(t=T)=0\) for a given element \(\phi(x,y,t)\).

Parameters:

x_out (ndarray) – The element \(\phi(x,y,t)\) raveled into a vector.

Returns:

Array containing the image \(\phi\mapsto\mathcal{M}^*(\phi)\).

Return type:

ndarray