Source code for siconos.control.simulation

# This file was automatically generated by SWIG (http://www.swig.org).
# Version 4.0.2
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.

from sys import version_info as _swig_python_version_info
if _swig_python_version_info < (2, 7, 0):
    raise RuntimeError("Python 2.7 or later required")

# Import the low-level C/C++ module
if __package__ or "." in __name__:
    from . import _sicpysimulation
else:
    import _sicpysimulation

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

def _swig_repr(self):
    try:
        strthis = "proxy of " + self.this.__repr__()
    except __builtin__.Exception:
        strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)


def _swig_setattr_nondynamic_instance_variable(set):
    def set_instance_attr(self, name, value):
        if name == "thisown":
            self.this.own(value)
        elif name == "this":
            set(self, name, value)
        elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
            set(self, name, value)
        else:
            raise AttributeError("You cannot add instance attributes to %s" % self)
    return set_instance_attr


def _swig_setattr_nondynamic_class_variable(set):
    def set_class_attr(cls, name, value):
        if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
            set(cls, name, value)
        else:
            raise AttributeError("You cannot add class attributes to %s" % cls)
    return set_class_attr


def _swig_add_metaclass(metaclass):
    """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
    def wrapper(cls):
        return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
    return wrapper


class _SwigNonDynamicMeta(type):
    """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
    __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)


import weakref

class SwigPyIterator(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    __swig_destroy__ = _sicpysimulation.delete_SwigPyIterator

    def value(self) -> "PyObject *":
        return _sicpysimulation.SwigPyIterator_value(self)

    def incr(self, n: "size_t"=1) -> "swig::SwigPyIterator *":
        return _sicpysimulation.SwigPyIterator_incr(self, n)

    def decr(self, n: "size_t"=1) -> "swig::SwigPyIterator *":
        return _sicpysimulation.SwigPyIterator_decr(self, n)

    def distance(self, x: "SwigPyIterator") -> "ptrdiff_t":
        return _sicpysimulation.SwigPyIterator_distance(self, x)

    def equal(self, x: "SwigPyIterator") -> "bool":
        return _sicpysimulation.SwigPyIterator_equal(self, x)

    def copy(self) -> "swig::SwigPyIterator *":
        return _sicpysimulation.SwigPyIterator_copy(self)

    def next(self) -> "PyObject *":
        return _sicpysimulation.SwigPyIterator_next(self)

    def __next__(self) -> "PyObject *":
        return _sicpysimulation.SwigPyIterator___next__(self)

    def previous(self) -> "PyObject *":
        return _sicpysimulation.SwigPyIterator_previous(self)

    def advance(self, n: "ptrdiff_t") -> "swig::SwigPyIterator *":
        return _sicpysimulation.SwigPyIterator_advance(self, n)

    def __eq__(self, x: "SwigPyIterator") -> "bool":
        return _sicpysimulation.SwigPyIterator___eq__(self, x)

    def __ne__(self, x: "SwigPyIterator") -> "bool":
        return _sicpysimulation.SwigPyIterator___ne__(self, x)

    def __iadd__(self, n: "ptrdiff_t") -> "swig::SwigPyIterator &":
        return _sicpysimulation.SwigPyIterator___iadd__(self, n)

    def __isub__(self, n: "ptrdiff_t") -> "swig::SwigPyIterator &":
        return _sicpysimulation.SwigPyIterator___isub__(self, n)

    def __add__(self, n: "ptrdiff_t") -> "swig::SwigPyIterator *":
        return _sicpysimulation.SwigPyIterator___add__(self, n)

    def __sub__(self, *args) -> "ptrdiff_t":
        return _sicpysimulation.SwigPyIterator___sub__(self, *args)
    def __iter__(self):
        return self

# Register SwigPyIterator in _sicpysimulation:
_sicpysimulation.SwigPyIterator_swigregister(SwigPyIterator)

SHARED_PTR_DISOWN = _sicpysimulation.SHARED_PTR_DISOWN
[docs] class nullDeleter(object): r""" Using a shared_ptr to hold a pointer to a statically allocated object use create<type>SPtr(<type> &x) cf http://www.boost.org/doc/ """ thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def __call__(self, arg2: "void const *") -> "void": return _sicpysimulation.nullDeleter___call__(self, arg2) __swig_destroy__ = _sicpysimulation.delete_nullDeleter
# Register nullDeleter in _sicpysimulation: _sicpysimulation.nullDeleter_swigregister(nullDeleter) class VectorOfVectors(object): thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr def iterator(self) -> "swig::SwigPyIterator *": return _sicpysimulation.VectorOfVectors_iterator(self) def __iter__(self): return self.iterator() def __nonzero__(self) -> "bool": return _sicpysimulation.VectorOfVectors___nonzero__(self) def __bool__(self) -> "bool": return _sicpysimulation.VectorOfVectors___bool__(self) def __len__(self) -> "std::vector< std::shared_ptr< SiconosVector > >::size_type": return _sicpysimulation.VectorOfVectors___len__(self) def __getslice__(self, i: "std::vector< std::shared_ptr< SiconosVector > >::difference_type", j: "std::vector< std::shared_ptr< SiconosVector > >::difference_type") -> "std::vector< std::shared_ptr< SiconosVector >,std::allocator< std::shared_ptr< SiconosVector > > > *": return _sicpysimulation.VectorOfVectors___getslice__(self, i, j) def __setslice__(self, *args) -> "void": return _sicpysimulation.VectorOfVectors___setslice__(self, *args) def __delslice__(self, i: "std::vector< std::shared_ptr< SiconosVector > >::difference_type", j: "std::vector< std::shared_ptr< SiconosVector > >::difference_type") -> "void": return _sicpysimulation.VectorOfVectors___delslice__(self, i, j) def __delitem__(self, *args) -> "void": return _sicpysimulation.VectorOfVectors___delitem__(self, *args) def __getitem__(self, *args) -> "std::vector< std::shared_ptr< SiconosVector > >::value_type const &": return _sicpysimulation.VectorOfVectors___getitem__(self, *args) def __setitem__(self, *args) -> "void": return _sicpysimulation.VectorOfVectors___setitem__(self, *args) def pop(self) -> "std::vector< std::shared_ptr< SiconosVector > >::value_type": return _sicpysimulation.VectorOfVectors_pop(self) def append(self, x: "std::vector< std::shared_ptr< SiconosVector > >::value_type const &") -> "void": return _sicpysimulation.VectorOfVectors_append(self, x) def empty(self) -> "bool": return _sicpysimulation.VectorOfVectors_empty(self) def size(self) -> "std::vector< std::shared_ptr< SiconosVector > >::size_type": return _sicpysimulation.VectorOfVectors_size(self) def swap(self, v: "VectorOfVectors") -> "void": return _sicpysimulation.VectorOfVectors_swap(self, v) def begin(self) -> "std::vector< std::shared_ptr< SiconosVector > >::iterator": return _sicpysimulation.VectorOfVectors_begin(self) def end(self) -> "std::vector< std::shared_ptr< SiconosVector > >::iterator": return _sicpysimulation.VectorOfVectors_end(self) def rbegin(self) -> "std::vector< std::shared_ptr< SiconosVector > >::reverse_iterator": return _sicpysimulation.VectorOfVectors_rbegin(self) def rend(self) -> "std::vector< std::shared_ptr< SiconosVector > >::reverse_iterator": return _sicpysimulation.VectorOfVectors_rend(self) def clear(self) -> "void": return _sicpysimulation.VectorOfVectors_clear(self) def get_allocator(self) -> "std::vector< std::shared_ptr< SiconosVector > >::allocator_type": return _sicpysimulation.VectorOfVectors_get_allocator(self) def pop_back(self) -> "void": return _sicpysimulation.VectorOfVectors_pop_back(self) def erase(self, *args) -> "std::vector< std::shared_ptr< SiconosVector > >::iterator": return _sicpysimulation.VectorOfVectors_erase(self, *args) def __init__(self, *args): _sicpysimulation.VectorOfVectors_swiginit(self, _sicpysimulation.new_VectorOfVectors(*args)) def push_back(self, x: "std::vector< std::shared_ptr< SiconosVector > >::value_type const &") -> "void": return _sicpysimulation.VectorOfVectors_push_back(self, x) def front(self) -> "std::vector< std::shared_ptr< SiconosVector > >::value_type const &": return _sicpysimulation.VectorOfVectors_front(self) def back(self) -> "std::vector< std::shared_ptr< SiconosVector > >::value_type const &": return _sicpysimulation.VectorOfVectors_back(self) def assign(self, n: "std::vector< std::shared_ptr< SiconosVector > >::size_type", x: "std::vector< std::shared_ptr< SiconosVector > >::value_type const &") -> "void": return _sicpysimulation.VectorOfVectors_assign(self, n, x) def resize(self, *args) -> "void": return _sicpysimulation.VectorOfVectors_resize(self, *args) def insert(self, *args) -> "void": return _sicpysimulation.VectorOfVectors_insert(self, *args) def reserve(self, n: "std::vector< std::shared_ptr< SiconosVector > >::size_type") -> "void": return _sicpysimulation.VectorOfVectors_reserve(self, n) def capacity(self) -> "std::vector< std::shared_ptr< SiconosVector > >::size_type": return _sicpysimulation.VectorOfVectors_capacity(self) __swig_destroy__ = _sicpysimulation.delete_VectorOfVectors # Register VectorOfVectors in _sicpysimulation: _sicpysimulation.VectorOfVectors_swigregister(VectorOfVectors) class VectorOfBlockVectors(object): thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr def iterator(self) -> "swig::SwigPyIterator *": return _sicpysimulation.VectorOfBlockVectors_iterator(self) def __iter__(self): return self.iterator() def __nonzero__(self) -> "bool": return _sicpysimulation.VectorOfBlockVectors___nonzero__(self) def __bool__(self) -> "bool": return _sicpysimulation.VectorOfBlockVectors___bool__(self) def __len__(self) -> "std::vector< std::shared_ptr< BlockVector > >::size_type": return _sicpysimulation.VectorOfBlockVectors___len__(self) def __getslice__(self, i: "std::vector< std::shared_ptr< BlockVector > >::difference_type", j: "std::vector< std::shared_ptr< BlockVector > >::difference_type") -> "std::vector< std::shared_ptr< BlockVector >,std::allocator< std::shared_ptr< BlockVector > > > *": return _sicpysimulation.VectorOfBlockVectors___getslice__(self, i, j) def __setslice__(self, *args) -> "void": return _sicpysimulation.VectorOfBlockVectors___setslice__(self, *args) def __delslice__(self, i: "std::vector< std::shared_ptr< BlockVector > >::difference_type", j: "std::vector< std::shared_ptr< BlockVector > >::difference_type") -> "void": return _sicpysimulation.VectorOfBlockVectors___delslice__(self, i, j) def __delitem__(self, *args) -> "void": return _sicpysimulation.VectorOfBlockVectors___delitem__(self, *args) def __getitem__(self, *args) -> "std::vector< std::shared_ptr< BlockVector > >::value_type const &": return _sicpysimulation.VectorOfBlockVectors___getitem__(self, *args) def __setitem__(self, *args) -> "void": return _sicpysimulation.VectorOfBlockVectors___setitem__(self, *args) def pop(self) -> "std::vector< std::shared_ptr< BlockVector > >::value_type": return _sicpysimulation.VectorOfBlockVectors_pop(self) def append(self, x: "std::vector< std::shared_ptr< BlockVector > >::value_type const &") -> "void": return _sicpysimulation.VectorOfBlockVectors_append(self, x) def empty(self) -> "bool": return _sicpysimulation.VectorOfBlockVectors_empty(self) def size(self) -> "std::vector< std::shared_ptr< BlockVector > >::size_type": return _sicpysimulation.VectorOfBlockVectors_size(self) def swap(self, v: "VectorOfBlockVectors") -> "void": return _sicpysimulation.VectorOfBlockVectors_swap(self, v) def begin(self) -> "std::vector< std::shared_ptr< BlockVector > >::iterator": return _sicpysimulation.VectorOfBlockVectors_begin(self) def end(self) -> "std::vector< std::shared_ptr< BlockVector > >::iterator": return _sicpysimulation.VectorOfBlockVectors_end(self) def rbegin(self) -> "std::vector< std::shared_ptr< BlockVector > >::reverse_iterator": return _sicpysimulation.VectorOfBlockVectors_rbegin(self) def rend(self) -> "std::vector< std::shared_ptr< BlockVector > >::reverse_iterator": return _sicpysimulation.VectorOfBlockVectors_rend(self) def clear(self) -> "void": return _sicpysimulation.VectorOfBlockVectors_clear(self) def get_allocator(self) -> "std::vector< std::shared_ptr< BlockVector > >::allocator_type": return _sicpysimulation.VectorOfBlockVectors_get_allocator(self) def pop_back(self) -> "void": return _sicpysimulation.VectorOfBlockVectors_pop_back(self) def erase(self, *args) -> "std::vector< std::shared_ptr< BlockVector > >::iterator": return _sicpysimulation.VectorOfBlockVectors_erase(self, *args) def __init__(self, *args): _sicpysimulation.VectorOfBlockVectors_swiginit(self, _sicpysimulation.new_VectorOfBlockVectors(*args)) def push_back(self, x: "std::vector< std::shared_ptr< BlockVector > >::value_type const &") -> "void": return _sicpysimulation.VectorOfBlockVectors_push_back(self, x) def front(self) -> "std::vector< std::shared_ptr< BlockVector > >::value_type const &": return _sicpysimulation.VectorOfBlockVectors_front(self) def back(self) -> "std::vector< std::shared_ptr< BlockVector > >::value_type const &": return _sicpysimulation.VectorOfBlockVectors_back(self) def assign(self, n: "std::vector< std::shared_ptr< BlockVector > >::size_type", x: "std::vector< std::shared_ptr< BlockVector > >::value_type const &") -> "void": return _sicpysimulation.VectorOfBlockVectors_assign(self, n, x) def resize(self, *args) -> "void": return _sicpysimulation.VectorOfBlockVectors_resize(self, *args) def insert(self, *args) -> "void": return _sicpysimulation.VectorOfBlockVectors_insert(self, *args) def reserve(self, n: "std::vector< std::shared_ptr< BlockVector > >::size_type") -> "void": return _sicpysimulation.VectorOfBlockVectors_reserve(self, n) def capacity(self) -> "std::vector< std::shared_ptr< BlockVector > >::size_type": return _sicpysimulation.VectorOfBlockVectors_capacity(self) __swig_destroy__ = _sicpysimulation.delete_VectorOfBlockVectors # Register VectorOfBlockVectors in _sicpysimulation: _sicpysimulation.VectorOfBlockVectors_swigregister(VectorOfBlockVectors) class VectorOfMatrices(object): thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr def iterator(self) -> "swig::SwigPyIterator *": return _sicpysimulation.VectorOfMatrices_iterator(self) def __iter__(self): return self.iterator() def __nonzero__(self) -> "bool": return _sicpysimulation.VectorOfMatrices___nonzero__(self) def __bool__(self) -> "bool": return _sicpysimulation.VectorOfMatrices___bool__(self) def __len__(self) -> "std::vector< std::shared_ptr< SiconosMatrix > >::size_type": return _sicpysimulation.VectorOfMatrices___len__(self) def __getslice__(self, i: "std::vector< std::shared_ptr< SiconosMatrix > >::difference_type", j: "std::vector< std::shared_ptr< SiconosMatrix > >::difference_type") -> "std::vector< std::shared_ptr< SiconosMatrix >,std::allocator< std::shared_ptr< SiconosMatrix > > > *": return _sicpysimulation.VectorOfMatrices___getslice__(self, i, j) def __setslice__(self, *args) -> "void": return _sicpysimulation.VectorOfMatrices___setslice__(self, *args) def __delslice__(self, i: "std::vector< std::shared_ptr< SiconosMatrix > >::difference_type", j: "std::vector< std::shared_ptr< SiconosMatrix > >::difference_type") -> "void": return _sicpysimulation.VectorOfMatrices___delslice__(self, i, j) def __delitem__(self, *args) -> "void": return _sicpysimulation.VectorOfMatrices___delitem__(self, *args) def __getitem__(self, *args) -> "std::vector< std::shared_ptr< SiconosMatrix > >::value_type const &": return _sicpysimulation.VectorOfMatrices___getitem__(self, *args) def __setitem__(self, *args) -> "void": return _sicpysimulation.VectorOfMatrices___setitem__(self, *args) def pop(self) -> "std::vector< std::shared_ptr< SiconosMatrix > >::value_type": return _sicpysimulation.VectorOfMatrices_pop(self) def append(self, x: "std::vector< std::shared_ptr< SiconosMatrix > >::value_type const &") -> "void": return _sicpysimulation.VectorOfMatrices_append(self, x) def empty(self) -> "bool": return _sicpysimulation.VectorOfMatrices_empty(self) def size(self) -> "std::vector< std::shared_ptr< SiconosMatrix > >::size_type": return _sicpysimulation.VectorOfMatrices_size(self) def swap(self, v: "VectorOfMatrices") -> "void": return _sicpysimulation.VectorOfMatrices_swap(self, v) def begin(self) -> "std::vector< std::shared_ptr< SiconosMatrix > >::iterator": return _sicpysimulation.VectorOfMatrices_begin(self) def end(self) -> "std::vector< std::shared_ptr< SiconosMatrix > >::iterator": return _sicpysimulation.VectorOfMatrices_end(self) def rbegin(self) -> "std::vector< std::shared_ptr< SiconosMatrix > >::reverse_iterator": return _sicpysimulation.VectorOfMatrices_rbegin(self) def rend(self) -> "std::vector< std::shared_ptr< SiconosMatrix > >::reverse_iterator": return _sicpysimulation.VectorOfMatrices_rend(self) def clear(self) -> "void": return _sicpysimulation.VectorOfMatrices_clear(self) def get_allocator(self) -> "std::vector< std::shared_ptr< SiconosMatrix > >::allocator_type": return _sicpysimulation.VectorOfMatrices_get_allocator(self) def pop_back(self) -> "void": return _sicpysimulation.VectorOfMatrices_pop_back(self) def erase(self, *args) -> "std::vector< std::shared_ptr< SiconosMatrix > >::iterator": return _sicpysimulation.VectorOfMatrices_erase(self, *args) def __init__(self, *args): _sicpysimulation.VectorOfMatrices_swiginit(self, _sicpysimulation.new_VectorOfMatrices(*args)) def push_back(self, x: "std::vector< std::shared_ptr< SiconosMatrix > >::value_type const &") -> "void": return _sicpysimulation.VectorOfMatrices_push_back(self, x) def front(self) -> "std::vector< std::shared_ptr< SiconosMatrix > >::value_type const &": return _sicpysimulation.VectorOfMatrices_front(self) def back(self) -> "std::vector< std::shared_ptr< SiconosMatrix > >::value_type const &": return _sicpysimulation.VectorOfMatrices_back(self) def assign(self, n: "std::vector< std::shared_ptr< SiconosMatrix > >::size_type", x: "std::vector< std::shared_ptr< SiconosMatrix > >::value_type const &") -> "void": return _sicpysimulation.VectorOfMatrices_assign(self, n, x) def resize(self, *args) -> "void": return _sicpysimulation.VectorOfMatrices_resize(self, *args) def insert(self, *args) -> "void": return _sicpysimulation.VectorOfMatrices_insert(self, *args) def reserve(self, n: "std::vector< std::shared_ptr< SiconosMatrix > >::size_type") -> "void": return _sicpysimulation.VectorOfMatrices_reserve(self, n) def capacity(self) -> "std::vector< std::shared_ptr< SiconosMatrix > >::size_type": return _sicpysimulation.VectorOfMatrices_capacity(self) __swig_destroy__ = _sicpysimulation.delete_VectorOfMatrices # Register VectorOfMatrices in _sicpysimulation: _sicpysimulation.VectorOfMatrices_swigregister(VectorOfMatrices) class VectorOfSMatrices(object): thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr def iterator(self) -> "swig::SwigPyIterator *": return _sicpysimulation.VectorOfSMatrices_iterator(self) def __iter__(self): return self.iterator() def __nonzero__(self) -> "bool": return _sicpysimulation.VectorOfSMatrices___nonzero__(self) def __bool__(self) -> "bool": return _sicpysimulation.VectorOfSMatrices___bool__(self) def __len__(self) -> "std::vector< std::shared_ptr< SimpleMatrix > >::size_type": return _sicpysimulation.VectorOfSMatrices___len__(self) def __getslice__(self, i: "std::vector< std::shared_ptr< SimpleMatrix > >::difference_type", j: "std::vector< std::shared_ptr< SimpleMatrix > >::difference_type") -> "std::vector< std::shared_ptr< SimpleMatrix >,std::allocator< std::shared_ptr< SimpleMatrix > > > *": return _sicpysimulation.VectorOfSMatrices___getslice__(self, i, j) def __setslice__(self, *args) -> "void": return _sicpysimulation.VectorOfSMatrices___setslice__(self, *args) def __delslice__(self, i: "std::vector< std::shared_ptr< SimpleMatrix > >::difference_type", j: "std::vector< std::shared_ptr< SimpleMatrix > >::difference_type") -> "void": return _sicpysimulation.VectorOfSMatrices___delslice__(self, i, j) def __delitem__(self, *args) -> "void": return _sicpysimulation.VectorOfSMatrices___delitem__(self, *args) def __getitem__(self, *args) -> "std::vector< std::shared_ptr< SimpleMatrix > >::value_type const &": return _sicpysimulation.VectorOfSMatrices___getitem__(self, *args) def __setitem__(self, *args) -> "void": return _sicpysimulation.VectorOfSMatrices___setitem__(self, *args) def pop(self) -> "std::vector< std::shared_ptr< SimpleMatrix > >::value_type": return _sicpysimulation.VectorOfSMatrices_pop(self) def append(self, x: "std::vector< std::shared_ptr< SimpleMatrix > >::value_type const &") -> "void": return _sicpysimulation.VectorOfSMatrices_append(self, x) def empty(self) -> "bool": return _sicpysimulation.VectorOfSMatrices_empty(self) def size(self) -> "std::vector< std::shared_ptr< SimpleMatrix > >::size_type": return _sicpysimulation.VectorOfSMatrices_size(self) def swap(self, v: "VectorOfSMatrices") -> "void": return _sicpysimulation.VectorOfSMatrices_swap(self, v) def begin(self) -> "std::vector< std::shared_ptr< SimpleMatrix > >::iterator": return _sicpysimulation.VectorOfSMatrices_begin(self) def end(self) -> "std::vector< std::shared_ptr< SimpleMatrix > >::iterator": return _sicpysimulation.VectorOfSMatrices_end(self) def rbegin(self) -> "std::vector< std::shared_ptr< SimpleMatrix > >::reverse_iterator": return _sicpysimulation.VectorOfSMatrices_rbegin(self) def rend(self) -> "std::vector< std::shared_ptr< SimpleMatrix > >::reverse_iterator": return _sicpysimulation.VectorOfSMatrices_rend(self) def clear(self) -> "void": return _sicpysimulation.VectorOfSMatrices_clear(self) def get_allocator(self) -> "std::vector< std::shared_ptr< SimpleMatrix > >::allocator_type": return _sicpysimulation.VectorOfSMatrices_get_allocator(self) def pop_back(self) -> "void": return _sicpysimulation.VectorOfSMatrices_pop_back(self) def erase(self, *args) -> "std::vector< std::shared_ptr< SimpleMatrix > >::iterator": return _sicpysimulation.VectorOfSMatrices_erase(self, *args) def __init__(self, *args): _sicpysimulation.VectorOfSMatrices_swiginit(self, _sicpysimulation.new_VectorOfSMatrices(*args)) def push_back(self, x: "std::vector< std::shared_ptr< SimpleMatrix > >::value_type const &") -> "void": return _sicpysimulation.VectorOfSMatrices_push_back(self, x) def front(self) -> "std::vector< std::shared_ptr< SimpleMatrix > >::value_type const &": return _sicpysimulation.VectorOfSMatrices_front(self) def back(self) -> "std::vector< std::shared_ptr< SimpleMatrix > >::value_type const &": return _sicpysimulation.VectorOfSMatrices_back(self) def assign(self, n: "std::vector< std::shared_ptr< SimpleMatrix > >::size_type", x: "std::vector< std::shared_ptr< SimpleMatrix > >::value_type const &") -> "void": return _sicpysimulation.VectorOfSMatrices_assign(self, n, x) def resize(self, *args) -> "void": return _sicpysimulation.VectorOfSMatrices_resize(self, *args) def insert(self, *args) -> "void": return _sicpysimulation.VectorOfSMatrices_insert(self, *args) def reserve(self, n: "std::vector< std::shared_ptr< SimpleMatrix > >::size_type") -> "void": return _sicpysimulation.VectorOfSMatrices_reserve(self, n) def capacity(self) -> "std::vector< std::shared_ptr< SimpleMatrix > >::size_type": return _sicpysimulation.VectorOfSMatrices_capacity(self) __swig_destroy__ = _sicpysimulation.delete_VectorOfSMatrices # Register VectorOfSMatrices in _sicpysimulation: _sicpysimulation.VectorOfSMatrices_swigregister(VectorOfSMatrices) class VectorOfMemories(object): thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr def iterator(self) -> "swig::SwigPyIterator *": return _sicpysimulation.VectorOfMemories_iterator(self) def __iter__(self): return self.iterator() def __nonzero__(self) -> "bool": return _sicpysimulation.VectorOfMemories___nonzero__(self) def __bool__(self) -> "bool": return _sicpysimulation.VectorOfMemories___bool__(self) def __len__(self) -> "std::vector< SiconosMemory >::size_type": return _sicpysimulation.VectorOfMemories___len__(self) def __getslice__(self, i: "std::vector< SiconosMemory >::difference_type", j: "std::vector< SiconosMemory >::difference_type") -> "std::vector< SiconosMemory,std::allocator< SiconosMemory > > *": return _sicpysimulation.VectorOfMemories___getslice__(self, i, j) def __setslice__(self, *args) -> "void": return _sicpysimulation.VectorOfMemories___setslice__(self, *args) def __delslice__(self, i: "std::vector< SiconosMemory >::difference_type", j: "std::vector< SiconosMemory >::difference_type") -> "void": return _sicpysimulation.VectorOfMemories___delslice__(self, i, j) def __delitem__(self, *args) -> "void": return _sicpysimulation.VectorOfMemories___delitem__(self, *args) def __getitem__(self, *args) -> "std::vector< SiconosMemory >::value_type const &": return _sicpysimulation.VectorOfMemories___getitem__(self, *args) def __setitem__(self, *args) -> "void": return _sicpysimulation.VectorOfMemories___setitem__(self, *args) def pop(self) -> "std::vector< SiconosMemory >::value_type": return _sicpysimulation.VectorOfMemories_pop(self) def append(self, x: "SiconosMemory") -> "void": return _sicpysimulation.VectorOfMemories_append(self, x) def empty(self) -> "bool": return _sicpysimulation.VectorOfMemories_empty(self) def size(self) -> "std::vector< SiconosMemory >::size_type": return _sicpysimulation.VectorOfMemories_size(self) def swap(self, v: "VectorOfMemories") -> "void": return _sicpysimulation.VectorOfMemories_swap(self, v) def begin(self) -> "std::vector< SiconosMemory >::iterator": return _sicpysimulation.VectorOfMemories_begin(self) def end(self) -> "std::vector< SiconosMemory >::iterator": return _sicpysimulation.VectorOfMemories_end(self) def rbegin(self) -> "std::vector< SiconosMemory >::reverse_iterator": return _sicpysimulation.VectorOfMemories_rbegin(self) def rend(self) -> "std::vector< SiconosMemory >::reverse_iterator": return _sicpysimulation.VectorOfMemories_rend(self) def clear(self) -> "void": return _sicpysimulation.VectorOfMemories_clear(self) def get_allocator(self) -> "std::vector< SiconosMemory >::allocator_type": return _sicpysimulation.VectorOfMemories_get_allocator(self) def pop_back(self) -> "void": return _sicpysimulation.VectorOfMemories_pop_back(self) def erase(self, *args) -> "std::vector< SiconosMemory >::iterator": return _sicpysimulation.VectorOfMemories_erase(self, *args) def __init__(self, *args): _sicpysimulation.VectorOfMemories_swiginit(self, _sicpysimulation.new_VectorOfMemories(*args)) def push_back(self, x: "SiconosMemory") -> "void": return _sicpysimulation.VectorOfMemories_push_back(self, x) def front(self) -> "std::vector< SiconosMemory >::value_type const &": return _sicpysimulation.VectorOfMemories_front(self) def back(self) -> "std::vector< SiconosMemory >::value_type const &": return _sicpysimulation.VectorOfMemories_back(self) def assign(self, n: "std::vector< SiconosMemory >::size_type", x: "SiconosMemory") -> "void": return _sicpysimulation.VectorOfMemories_assign(self, n, x) def resize(self, *args) -> "void": return _sicpysimulation.VectorOfMemories_resize(self, *args) def insert(self, *args) -> "void": return _sicpysimulation.VectorOfMemories_insert(self, *args) def reserve(self, n: "std::vector< SiconosMemory >::size_type") -> "void": return _sicpysimulation.VectorOfMemories_reserve(self, n) def capacity(self) -> "std::vector< SiconosMemory >::size_type": return _sicpysimulation.VectorOfMemories_capacity(self) __swig_destroy__ = _sicpysimulation.delete_VectorOfMemories # Register VectorOfMemories in _sicpysimulation: _sicpysimulation.VectorOfMemories_swigregister(VectorOfMemories) class UnsignedIntVector(object): thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr def iterator(self) -> "swig::SwigPyIterator *": return _sicpysimulation.UnsignedIntVector_iterator(self) def __iter__(self): return self.iterator() def __nonzero__(self) -> "bool": return _sicpysimulation.UnsignedIntVector___nonzero__(self) def __bool__(self) -> "bool": return _sicpysimulation.UnsignedIntVector___bool__(self) def __len__(self) -> "std::vector< unsigned int >::size_type": return _sicpysimulation.UnsignedIntVector___len__(self) def __getslice__(self, i: "std::vector< unsigned int >::difference_type", j: "std::vector< unsigned int >::difference_type") -> "std::vector< unsigned int,std::allocator< unsigned int > > *": return _sicpysimulation.UnsignedIntVector___getslice__(self, i, j) def __setslice__(self, *args) -> "void": return _sicpysimulation.UnsignedIntVector___setslice__(self, *args) def __delslice__(self, i: "std::vector< unsigned int >::difference_type", j: "std::vector< unsigned int >::difference_type") -> "void": return _sicpysimulation.UnsignedIntVector___delslice__(self, i, j) def __delitem__(self, *args) -> "void": return _sicpysimulation.UnsignedIntVector___delitem__(self, *args) def __getitem__(self, *args) -> "std::vector< unsigned int >::value_type const &": return _sicpysimulation.UnsignedIntVector___getitem__(self, *args) def __setitem__(self, *args) -> "void": return _sicpysimulation.UnsignedIntVector___setitem__(self, *args) def pop(self) -> "std::vector< unsigned int >::value_type": return _sicpysimulation.UnsignedIntVector_pop(self) def append(self, x: "std::vector< unsigned int >::value_type const &") -> "void": return _sicpysimulation.UnsignedIntVector_append(self, x) def empty(self) -> "bool": return _sicpysimulation.UnsignedIntVector_empty(self) def size(self) -> "std::vector< unsigned int >::size_type": return _sicpysimulation.UnsignedIntVector_size(self) def swap(self, v: "UnsignedIntVector") -> "void": return _sicpysimulation.UnsignedIntVector_swap(self, v) def begin(self) -> "std::vector< unsigned int >::iterator": return _sicpysimulation.UnsignedIntVector_begin(self) def end(self) -> "std::vector< unsigned int >::iterator": return _sicpysimulation.UnsignedIntVector_end(self) def rbegin(self) -> "std::vector< unsigned int >::reverse_iterator": return _sicpysimulation.UnsignedIntVector_rbegin(self) def rend(self) -> "std::vector< unsigned int >::reverse_iterator": return _sicpysimulation.UnsignedIntVector_rend(self) def clear(self) -> "void": return _sicpysimulation.UnsignedIntVector_clear(self) def get_allocator(self) -> "std::vector< unsigned int >::allocator_type": return _sicpysimulation.UnsignedIntVector_get_allocator(self) def pop_back(self) -> "void": return _sicpysimulation.UnsignedIntVector_pop_back(self) def erase(self, *args) -> "std::vector< unsigned int >::iterator": return _sicpysimulation.UnsignedIntVector_erase(self, *args) def __init__(self, *args): _sicpysimulation.UnsignedIntVector_swiginit(self, _sicpysimulation.new_UnsignedIntVector(*args)) def push_back(self, x: "std::vector< unsigned int >::value_type const &") -> "void": return _sicpysimulation.UnsignedIntVector_push_back(self, x) def front(self) -> "std::vector< unsigned int >::value_type const &": return _sicpysimulation.UnsignedIntVector_front(self) def back(self) -> "std::vector< unsigned int >::value_type const &": return _sicpysimulation.UnsignedIntVector_back(self) def assign(self, n: "std::vector< unsigned int >::size_type", x: "std::vector< unsigned int >::value_type const &") -> "void": return _sicpysimulation.UnsignedIntVector_assign(self, n, x) def resize(self, *args) -> "void": return _sicpysimulation.UnsignedIntVector_resize(self, *args) def insert(self, *args) -> "void": return _sicpysimulation.UnsignedIntVector_insert(self, *args) def reserve(self, n: "std::vector< unsigned int >::size_type") -> "void": return _sicpysimulation.UnsignedIntVector_reserve(self, n) def capacity(self) -> "std::vector< unsigned int >::size_type": return _sicpysimulation.UnsignedIntVector_capacity(self) __swig_destroy__ = _sicpysimulation.delete_UnsignedIntVector # Register UnsignedIntVector in _sicpysimulation: _sicpysimulation.UnsignedIntVector_swigregister(UnsignedIntVector) import siconos.kernel class ControlSimulation(object): thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr def __init__(self, *args): r""" *Overload 1:* default constructor | *Overload 2:* Constructor with the minimal set of data :type t0: float :param t0: the starting time :math:`t_0` :type T: float :param T: the end time T :type h: float :param h: the simulation time step """ if self.__class__ == ControlSimulation: _self = None else: _self = self _sicpysimulation.ControlSimulation_swiginit(self, _sicpysimulation.new_ControlSimulation(_self, *args)) _t0 = property(_sicpysimulation.ControlSimulation__t0_get, _sicpysimulation.ControlSimulation__t0_set, doc=r""" Starting time""") _T = property(_sicpysimulation.ControlSimulation__T_get, _sicpysimulation.ControlSimulation__T_set, doc=r""" End time""") _h = property(_sicpysimulation.ControlSimulation__h_get, _sicpysimulation.ControlSimulation__h_set, doc=r""" Simulation step""") _theta = property(_sicpysimulation.ControlSimulation__theta_get, _sicpysimulation.ControlSimulation__theta_set, doc=r""" Theta for MoreauJeanOSI""") _elapsedTime = property(_sicpysimulation.ControlSimulation__elapsedTime_get, _sicpysimulation.ControlSimulation__elapsedTime_set, doc=r""" Time spent computing""") _N = property(_sicpysimulation.ControlSimulation__N_get, _sicpysimulation.ControlSimulation__N_set, doc=r""" rough estimation of the number of points to save""") _nDim = property(_sicpysimulation.ControlSimulation__nDim_get, _sicpysimulation.ControlSimulation__nDim_set, doc=r""" Dimension of the state space""") _saveOnlyMainSimulation = property(_sicpysimulation.ControlSimulation__saveOnlyMainSimulation_get, _sicpysimulation.ControlSimulation__saveOnlyMainSimulation_set, doc=r""" Save only the data in the main Simulation""") _silent = property(_sicpysimulation.ControlSimulation__silent_get, _sicpysimulation.ControlSimulation__silent_set, doc=r""" If true, do not show progress of the simulation""") _dataM = property(_sicpysimulation.ControlSimulation__dataM_get, _sicpysimulation.ControlSimulation__dataM_set, doc=r""" Matrix for saving result""") _dataLegend = property(_sicpysimulation.ControlSimulation__dataLegend_get, _sicpysimulation.ControlSimulation__dataLegend_set, doc=r""" Legend for the columns in the matrix _dataM""") _nsds = property(_sicpysimulation.ControlSimulation__nsds_get, _sicpysimulation.ControlSimulation__nsds_set, doc=r""" NonSmoothDynamicalSystem""") _processTD = property(_sicpysimulation.ControlSimulation__processTD_get, _sicpysimulation.ControlSimulation__processTD_set, doc=r""" TimeDiscretisation for the simulation""") _processSimulation = property(_sicpysimulation.ControlSimulation__processSimulation_get, _sicpysimulation.ControlSimulation__processSimulation_set, doc=r""" The Simulation""") _processIntegrator = property(_sicpysimulation.ControlSimulation__processIntegrator_get, _sicpysimulation.ControlSimulation__processIntegrator_set, doc=r""" The integrator""") _CM = property(_sicpysimulation.ControlSimulation__CM_get, _sicpysimulation.ControlSimulation__CM_set, doc=r""" the ControlManager""") _DSG0 = property(_sicpysimulation.ControlSimulation__DSG0_get, _sicpysimulation.ControlSimulation__DSG0_set, doc=r""" DynamicalSystemsGraph (for convenience)""") _IG0 = property(_sicpysimulation.ControlSimulation__IG0_get, _sicpysimulation.ControlSimulation__IG0_set, doc=r""" InteractionsGraph (for convenience)""") __swig_destroy__ = _sicpysimulation.delete_ControlSimulation def setTheta(self, newTheta: "unsigned int") -> "void": r""" Modify the value of theta (for MoreauJeanOSI) :type newTheta: int :param newTheta: the new value of theta """ return _sicpysimulation.ControlSimulation_setTheta(self, newTheta) def initialize(self) -> "void": r""" Initialize the ControlSimulation, instantiate all objects""" return _sicpysimulation.ControlSimulation_initialize(self) def addDynamicalSystem(self, *args) -> "void": r""" Add a DynamicalSystem :type ds: :py:class:`DynamicalSystem` :param ds: the DynamicalSystem to integrate :type name: string, optional :param name: of the ds (optional) """ return _sicpysimulation.ControlSimulation_addDynamicalSystem(self, *args) def addSensor(self, sensor: "SP::Sensor", h: "double const") -> "void": r""" Add a Sensor :type sensor: Sensor :param sensor: the sensor to be added :type h: float :param h: sampling period (or timestep) for the Sensor """ return _sicpysimulation.ControlSimulation_addSensor(self, sensor, h) def addActuator(self, actuator: "SP::Actuator", h: "double const") -> "void": r""" Add an Actuator :type actuator: Actuator :param actuator: the controller to be added :type h: float :param h: sampling period (or timestep) for the Actuator """ return _sicpysimulation.ControlSimulation_addActuator(self, actuator, h) def addObserver(self, observer: "SP::Observer", h: "double const") -> "void": r""" Add an Observer :type observer: Observer :param observer: the observer to be added :type h: float :param h: sampling period (or timestep) for the Observer """ return _sicpysimulation.ControlSimulation_addObserver(self, observer, h) def storeData(self, indx: "unsigned int") -> "void": r""" store the simulation data in a row of the matrix :type indx: int :param indx: the current row index """ return _sicpysimulation.ControlSimulation_storeData(self, indx) def simulation(self) -> "SP::Simulation": r""" Return the Simulation :rtype: :py:class:`Simulation` :return: the simulation for the main simulation """ return _sicpysimulation.ControlSimulation_simulation(self) def integrator(self) -> "SP::OneStepIntegrator": r""" Return the OneStepIntegrator :rtype: :py:class:`OneStepIntegrator` :return: the Integrator """ return _sicpysimulation.ControlSimulation_integrator(self) def model(self) -> "SP::NonSmoothDynamicalSystem": r""" Return the NonSmoothDynamicalSystem :rtype: :py:class:`NonSmoothDynamicalSystem` :return: the NonSmoothDynamicalSystem """ return _sicpysimulation.ControlSimulation_model(self) def data(self) -> "SP::SimpleMatrix": r""" Return the data matrix :rtype: :py:class:`SimpleMatrix` :return: the data matrix """ return _sicpysimulation.ControlSimulation_data(self) def dataLegend(self) -> "std::string": r""" get the legend for the matrix :rtype: string :return: legend as string of space seperated values """ return _sicpysimulation.ControlSimulation_dataLegend(self) def elapsedTime(self) -> "double": r""" :rtype: float :return: the elapsed time computing in seconds """ return _sicpysimulation.ControlSimulation_elapsedTime(self) def CM(self) -> "SP::ControlManager": r""" Return the ControlManager :rtype: :py:class:`ControlManager` :return: the ControlManager """ return _sicpysimulation.ControlSimulation_CM(self) def setSaveOnlyMainSimulation(self, v: "bool") -> "void": r""" Set the value of _saveOnlyMainSimulation :type v: boolean :param v: a boolean """ return _sicpysimulation.ControlSimulation_setSaveOnlyMainSimulation(self, v) def silent(self, s: "bool"=True) -> "void": r""" Set the simulation to be silent, e.g. do not show any progress bar :type s: boolean, optional :param s: is true is silent, else display progress bar """ return _sicpysimulation.ControlSimulation_silent(self, s) def run(self) -> "void": r""" Run the simulation""" return _sicpysimulation.ControlSimulation_run(self) def __disown__(self): self.this.disown() _sicpysimulation.disown_ControlSimulation(self) return weakref.proxy(self) # Register ControlSimulation in _sicpysimulation: _sicpysimulation.ControlSimulation_swigregister(ControlSimulation) class ControlLsodarSimulation(ControlSimulation): thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr def __init__(self, t0: "double", T: "double", h: "double"): if self.__class__ == ControlLsodarSimulation: _self = None else: _self = self _sicpysimulation.ControlLsodarSimulation_swiginit(self, _sicpysimulation.new_ControlLsodarSimulation(_self, t0, T, h)) def run(self) -> "void": return _sicpysimulation.ControlLsodarSimulation_run(self) __swig_destroy__ = _sicpysimulation.delete_ControlLsodarSimulation def __disown__(self): self.this.disown() _sicpysimulation.disown_ControlLsodarSimulation(self) return weakref.proxy(self) # Register ControlLsodarSimulation in _sicpysimulation: _sicpysimulation.ControlLsodarSimulation_swigregister(ControlLsodarSimulation) class ControlZOHSimulation(ControlSimulation): thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr def __init__(self, t0: "double", T: "double", h: "double"): if self.__class__ == ControlZOHSimulation: _self = None else: _self = self _sicpysimulation.ControlZOHSimulation_swiginit(self, _sicpysimulation.new_ControlZOHSimulation(_self, t0, T, h)) def run(self) -> "void": return _sicpysimulation.ControlZOHSimulation_run(self) __swig_destroy__ = _sicpysimulation.delete_ControlZOHSimulation def __disown__(self): self.this.disown() _sicpysimulation.disown_ControlZOHSimulation(self) return weakref.proxy(self) # Register ControlZOHSimulation in _sicpysimulation: _sicpysimulation.ControlZOHSimulation_swigregister(ControlZOHSimulation)
[docs] class ControlManager(object): r""" ControlManager Class: tools to provide control in a Simulation (Sensors, Actuators, Observers) This class is used to handle all the sensors and actuators declared by the user and to schedule them into the simulation. A ControlManager has: - a list of Sensor - a list of Actuator - a link to an existing Simulation The usual way to define control over a system is as follows: - declare a ControlManager and associate it with a Simulation - add some sensors and actuators into the ControlManager - initialize the ControlManager (which will result in the recording of all actuators and sensors into the list of events processed during the simulation) - optionally add some new sensor/actuator at any time but with a specific function: addAndRecord(...). A call to this function results in the creation of a Sensor/Actuator and in the insertion of the corresponding event into the simulation eventsManager. """ thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr _allSensors = property(_sicpysimulation.ControlManager__allSensors_get, _sicpysimulation.ControlManager__allSensors_set, doc=r""" A list of Sensors""") _allActuators = property(_sicpysimulation.ControlManager__allActuators_get, _sicpysimulation.ControlManager__allActuators_set, doc=r""" A list of Actuators""") _allObservers = property(_sicpysimulation.ControlManager__allObservers_get, _sicpysimulation.ControlManager__allObservers_set, doc=r""" A list of Observers""") _sim = property(_sicpysimulation.ControlManager__sim_get, _sicpysimulation.ControlManager__sim_set, doc=r""" The simulation linked to this ControlManager""")
[docs] def linkSensorSimulation(self, s: "SP::Sensor", td: "SP::TimeDiscretisation") -> "void": r""" Create associated Event and give the opportunity to get the TimeDiscretisation :type s: Sensor :param s: a Sensor :type td: :py:class:`TimeDiscretisation` :param td: a TimeDiscretisation asociated with this Sensor """ return _sicpysimulation.ControlManager_linkSensorSimulation(self, s, td)
[docs] def linkActuatorSimulation(self, act: "SP::Actuator", td: "SP::TimeDiscretisation") -> "void": r""" Create associated Event and give the opportunity to get the TimeDiscretisation :type act: Actuator :param act: a Sensor :type td: :py:class:`TimeDiscretisation` :param td: a TimeDiscretisation asociated with this Sensor """ return _sicpysimulation.ControlManager_linkActuatorSimulation(self, act, td)
[docs] def linkObserverSimulation(self, obs: "SP::Observer", td: "SP::TimeDiscretisation") -> "void": r""" Create associated Event and give the opportunity to get the TimeDiscretisation :type obs: Observer :param obs: a Sensor :type td: :py:class:`TimeDiscretisation` :param td: a TimeDiscretisation asociated with this Sensor """ return _sicpysimulation.ControlManager_linkObserverSimulation(self, obs, td)
def __init__(self, *args): r""" *Overload 1:* default constructor | *Overload 2:* Constructor with a Simulation, to which control will be applied. :type sim: :py:class:`Simulation` :param sim: the Simulation """ if self.__class__ == ControlManager: _self = None else: _self = self _sicpysimulation.ControlManager_swiginit(self, _sicpysimulation.new_ControlManager(_self, *args)) __swig_destroy__ = _sicpysimulation.delete_ControlManager
[docs] def simulation(self) -> "SP::Simulation": r""" get the Simulation linked to this ControlManager :rtype: :py:class:`Simulation` :return: a SP::Simulation """ return _sicpysimulation.ControlManager_simulation(self)
[docs] def getSensors(self) -> "Sensors const": r""" get the list of Sensors associated to this manager. :rtype: Sensors :return: a Sensors object. """ return _sicpysimulation.ControlManager_getSensors(self)
[docs] def getActuators(self) -> "Actuators const": r""" get the list of Actuators associated to this manager. :rtype: Actuators :return: a Actuators object. """ return _sicpysimulation.ControlManager_getActuators(self)
[docs] def getObservers(self) -> "Observers const": r""" get the list of Observers associated to this manager. :rtype: Observers :return: a Observers object. """ return _sicpysimulation.ControlManager_getObservers(self)
[docs] def addSensor(self, name: "int", td: "SP::TimeDiscretisation", ds: "SP::DynamicalSystem") -> "SP::Sensor": r""" To build and add a new Sensor in the Manager :type name: int :param name: the type of the Sensor :type td: :py:class:`TimeDiscretisation` :param td: the SP::TimeDiscretisation of the Sensor :type ds: :py:class:`DynamicalSystem` :param ds: the DynamicalSystem used in the Sensor :rtype: Sensor :return: a SP::Sensor to the added Sensor """ return _sicpysimulation.ControlManager_addSensor(self, name, td, ds)
[docs] def addAndRecordSensor(self, name: "int", td: "SP::TimeDiscretisation", ds: "SP::DynamicalSystem", nsds: "NonSmoothDynamicalSystem") -> "SP::Sensor": r""" To build, add, initialize a new Sensor in the Manager and record it in the simulation This function is only useful to add a new Sensor after the initialization of the manager else call addSensor() :type name: int :param name: the type (int) of the Sensor :type td: :py:class:`TimeDiscretisation` :param td: the SP::TimeDiscretisation of the Sensor :type ds: :py:class:`DynamicalSystem` :param ds: the DynamicalSystem used in the Sensor :type nsds: :py:class:`NonSmoothDynamicalSystem` :param nsds: the NonSmoothDynamicalSystem :rtype: Sensor :return: a SP::Sensor to the added Sensor """ return _sicpysimulation.ControlManager_addAndRecordSensor(self, name, td, ds, nsds)
[docs] def addSensorPtr(self, s: "SP::Sensor", td: "SP::TimeDiscretisation") -> "void": r""" Add an existing Sensor to the Manager :type s: Sensor :param s: a SP::Sensor to the Sensor we want to add :type td: :py:class:`TimeDiscretisation` :param td: the TimeDiscretisation used for the associated Event """ return _sicpysimulation.ControlManager_addSensorPtr(self, s, td)
[docs] def addAndRecordSensorPtr(self, s: "SP::Sensor", td: "SP::TimeDiscretisation", nsds: "NonSmoothDynamicalSystem") -> "void": r""" To add, initialize an existing Sensor in the manager and record it in the simulation This function is only useful to add a new Sensor after the initialization of the manager else call addSensor() :type s: Sensor :param s: a SP::Sensor to the Sensor we want to add :type td: :py:class:`TimeDiscretisation` :param td: the TimeDiscretisation used for the associated Event :type nsds: :py:class:`NonSmoothDynamicalSystem` :param nsds: current nonsmooth dynamical system """ return _sicpysimulation.ControlManager_addAndRecordSensorPtr(self, s, td, nsds)
[docs] def addActuator(self, name: "int", td: "SP::TimeDiscretisation", sensor: "SP::ControlSensor") -> "SP::Actuator": r""" To build and add a new Actuator in the Manager :type name: int :param name: the type of the Actuator :type td: :py:class:`TimeDiscretisation` :param td: the SP::TimeDiscretisation of the Actuator :type sensor: ControlSensor :param sensor: the ControlSensor used to feed the Actuator :rtype: Actuator :return: the added Actuator """ return _sicpysimulation.ControlManager_addActuator(self, name, td, sensor)
[docs] def addAndRecordActuator(self, name: "int", t: "SP::TimeDiscretisation", sensor: "SP::ControlSensor", nsds: "NonSmoothDynamicalSystem") -> "SP::Actuator": r""" To build, add, initialize a new Actuator in the manager and record it in the simulation This function is only useful to add a new Actuator after the initialization of the manager else call addActuator() :type name: int :param name: the type of the Actuator :type t: :py:class:`TimeDiscretisation` :param t: the SP::TimeDiscretisation of the Actuator :type sensor: ControlSensor :param sensor: the ControlSensor used to feed the Actuator :type nsds: :py:class:`NonSmoothDynamicalSystem` :param nsds: the NonSmoothDynamicalSystem :rtype: Actuator :return: a SP::Actuator to the added Actuator """ return _sicpysimulation.ControlManager_addAndRecordActuator(self, name, t, sensor, nsds)
[docs] def addActuatorPtr(self, act: "SP::Actuator", td: "SP::TimeDiscretisation") -> "void": r""" Add an existing Actuator to the manager :type act: Actuator :param act: a SP::Actuator to the Actuator we want to add :type td: :py:class:`TimeDiscretisation` :param td: the TimeDiscretisation used for the associated Event """ return _sicpysimulation.ControlManager_addActuatorPtr(self, act, td)
[docs] def addAndRecordActuatorPtr(self, act: "SP::Actuator", td: "SP::TimeDiscretisation", nsds: "NonSmoothDynamicalSystem") -> "void": r""" To add, initialize an existing Actuator in the manager and record it in the simulation This function is only useful to add a new Actuator after the initialization of the manager otherwise call addActuator() :type act: Actuator :param act: a SP::Actuator to the Actuator we want to add :type td: :py:class:`TimeDiscretisation` :param td: the TimeDiscretisation used for the associated Event :type nsds: :py:class:`NonSmoothDynamicalSystem` :param nsds: current nonsmooth dynamical system """ return _sicpysimulation.ControlManager_addAndRecordActuatorPtr(self, act, td, nsds)
[docs] def addObserver(self, name: "int", td: "SP::TimeDiscretisation", sensor: "SP::ControlSensor", xHat0: "SiconosVector") -> "SP::Observer": r""" To build and add a new Observer in the Manager :type name: int :param name: the type of the Observer :type td: :py:class:`TimeDiscretisation` :param td: the SP::TimeDiscretisation of the Observer :type sensor: ControlSensor :param sensor: the ControlSensor feeding the Observer :type xHat0: :py:class:`SiconosVector` :param xHat0: the initial guess for the state :rtype: Observer :return: a SP::ACtuator to the added Observer """ return _sicpysimulation.ControlManager_addObserver(self, name, td, sensor, xHat0)
[docs] def addAndRecordObserver(self, name: "int", td: "SP::TimeDiscretisation", sensor: "SP::ControlSensor", xHat0: "SiconosVector", nsds: "NonSmoothDynamicalSystem") -> "SP::Observer": r""" To build, add, initialize a new Observer in the manager and record it in the simulation This function is only useful to add a new Observer after the initialization of the manager else call addObserver() :type name: int :param name: the type of the Observer :type td: :py:class:`TimeDiscretisation` :param td: the SP::TimeDiscretisation of the Observer :type sensor: ControlSensor :param sensor: the ControlSensor feeding the Observer :type xHat0: :py:class:`SiconosVector` :param xHat0: the initial guess for the state :type nsds: :py:class:`NonSmoothDynamicalSystem` :param nsds: current nonsmooth dynamical system :rtype: Observer :return: the added Observer """ return _sicpysimulation.ControlManager_addAndRecordObserver(self, name, td, sensor, xHat0, nsds)
[docs] def addObserverPtr(self, obs: "SP::Observer", td: "SP::TimeDiscretisation") -> "void": r""" Add an existing Observer to the manager :type obs: Observer :param obs: a SP::Observer to the Observer we want to add :type td: :py:class:`TimeDiscretisation` :param td: the TimeDiscretisation used for the associated Event """ return _sicpysimulation.ControlManager_addObserverPtr(self, obs, td)
[docs] def addAndRecordObserverPtr(self, obs: "SP::Observer", td: "SP::TimeDiscretisation", nsds: "NonSmoothDynamicalSystem") -> "void": r""" To add, initialize an existing Observer in the manager and record it in the simulation This function is only useful to add a new Observer after the initialization of the manager otherwise call addObserver() :type obs: Observer :param obs: a SP::Observer to the Observer we want to add :type td: :py:class:`TimeDiscretisation` :param td: the TimeDiscretisation used for the associated Event :type nsds: :py:class:`NonSmoothDynamicalSystem` :param nsds: current nonsmooth dynamical system """ return _sicpysimulation.ControlManager_addAndRecordObserverPtr(self, obs, td, nsds)
[docs] def initialize(self, nsds: "NonSmoothDynamicalSystem") -> "void": r""" initialize all Sensors, Observers and Actuators. :type nsds: :py:class:`NonSmoothDynamicalSystem` :param nsds: current nonsmooth dynamical system """ return _sicpysimulation.ControlManager_initialize(self, nsds)
[docs] def display(self) -> "void": r""" display the data of the ControlManager on the standard output""" return _sicpysimulation.ControlManager_display(self)
def __disown__(self): self.this.disown() _sicpysimulation.disown_ControlManager(self) return weakref.proxy(self)
# Register ControlManager in _sicpysimulation: _sicpysimulation.ControlManager_swigregister(ControlManager)