motulator_export.native
=======================

.. py:module:: motulator_export.native

.. autoapi-nested-parse::

   
   Native simulation of motulator systems.

   `Simulation` simulates a system built in motulator in C, with the interface and the
   results of the simulation of motulator.















   ..
       !! processed by numpydoc !!


Classes
-------

.. autoapisummary::

   motulator_export.native.Simulation


Package Contents
----------------

.. py:class:: Simulation(mdl, ctrl, show_progress = True, cfg = None, t_start = None)

   
   Native simulation.

   Simulates the system model and the control system built in motulator in C, with
   the interface and the results of `motulator.common.model.Simulation`. As in
   motulator, the results are also stored in the time series of `mdl` and `ctrl`,
   and the states of `mdl` are updated. The control system runs in C from its
   initial state, so the states of `ctrl` are not used or updated.

   The parameters are read at the first call of `simulate`, and the references and
   the load torque at each call. They can be constants, `StepSignal` objects
   (fastest), or functions of time.

   :param mdl: Continuous-time system model.
   :type mdl: Model
   :param ctrl: Discrete-time control system.
   :type ctrl: ControlSystem
   :param show_progress: Show progress during simulation, defaults to True.
   :type show_progress: bool, optional
   :param cfg: Solver configuration parameters. Only the method "RK45" is supported.
   :type cfg: SolverCfg, optional
   :param t_start: First sampling instant (s) of the control system, defaults to the initial
                   time of the model.
   :type t_start: float, optional















   ..
       !! processed by numpydoc !!

   .. py:method:: simulate(t_stop = 1.0, N_eval = 0)

      
      Simulate the system.

      The simulation runs until the first sampling instant after `t_stop`. A
      subsequent call continues the simulation.

      :param t_stop: Simulation stop time, defaults to 1.
      :type t_stop: float, optional
      :param N_eval: Number of evenly spaced data points to be returned by the solver for each
                     integration interval, i.e., for each interval between the sampling and
                     switching instants. Defaults to 0, in which case the number and spacing of
                     points is selected by the solver.
      :type N_eval: int, optional















      ..
          !! processed by numpydoc !!


