# 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 _pysimulation
else:
import _pysimulation
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__ = _pysimulation.delete_SwigPyIterator
def value(self) -> "PyObject *":
return _pysimulation.SwigPyIterator_value(self)
def incr(self, n: "size_t"=1) -> "swig::SwigPyIterator *":
return _pysimulation.SwigPyIterator_incr(self, n)
def decr(self, n: "size_t"=1) -> "swig::SwigPyIterator *":
return _pysimulation.SwigPyIterator_decr(self, n)
def distance(self, x: "SwigPyIterator") -> "ptrdiff_t":
return _pysimulation.SwigPyIterator_distance(self, x)
def equal(self, x: "SwigPyIterator") -> "bool":
return _pysimulation.SwigPyIterator_equal(self, x)
def copy(self) -> "swig::SwigPyIterator *":
return _pysimulation.SwigPyIterator_copy(self)
def next(self) -> "PyObject *":
return _pysimulation.SwigPyIterator_next(self)
def __next__(self) -> "PyObject *":
return _pysimulation.SwigPyIterator___next__(self)
def previous(self) -> "PyObject *":
return _pysimulation.SwigPyIterator_previous(self)
def advance(self, n: "ptrdiff_t") -> "swig::SwigPyIterator *":
return _pysimulation.SwigPyIterator_advance(self, n)
def __eq__(self, x: "SwigPyIterator") -> "bool":
return _pysimulation.SwigPyIterator___eq__(self, x)
def __ne__(self, x: "SwigPyIterator") -> "bool":
return _pysimulation.SwigPyIterator___ne__(self, x)
def __iadd__(self, n: "ptrdiff_t") -> "swig::SwigPyIterator &":
return _pysimulation.SwigPyIterator___iadd__(self, n)
def __isub__(self, n: "ptrdiff_t") -> "swig::SwigPyIterator &":
return _pysimulation.SwigPyIterator___isub__(self, n)
def __add__(self, n: "ptrdiff_t") -> "swig::SwigPyIterator *":
return _pysimulation.SwigPyIterator___add__(self, n)
def __sub__(self, *args) -> "ptrdiff_t":
return _pysimulation.SwigPyIterator___sub__(self, *args)
def __iter__(self):
return self
# Register SwigPyIterator in _pysimulation:
_pysimulation.SwigPyIterator_swigregister(SwigPyIterator)
SHARED_PTR_DISOWN = _pysimulation.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 _pysimulation.nullDeleter___call__(self, arg2)
__swig_destroy__ = _pysimulation.delete_nullDeleter
# Register nullDeleter in _pysimulation:
_pysimulation.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 _pysimulation.VectorOfVectors_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self) -> "bool":
return _pysimulation.VectorOfVectors___nonzero__(self)
def __bool__(self) -> "bool":
return _pysimulation.VectorOfVectors___bool__(self)
def __len__(self) -> "std::vector< std::shared_ptr< SiconosVector > >::size_type":
return _pysimulation.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 _pysimulation.VectorOfVectors___getslice__(self, i, j)
def __setslice__(self, *args) -> "void":
return _pysimulation.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 _pysimulation.VectorOfVectors___delslice__(self, i, j)
def __delitem__(self, *args) -> "void":
return _pysimulation.VectorOfVectors___delitem__(self, *args)
def __getitem__(self, *args) -> "std::vector< std::shared_ptr< SiconosVector > >::value_type const &":
return _pysimulation.VectorOfVectors___getitem__(self, *args)
def __setitem__(self, *args) -> "void":
return _pysimulation.VectorOfVectors___setitem__(self, *args)
def pop(self) -> "std::vector< std::shared_ptr< SiconosVector > >::value_type":
return _pysimulation.VectorOfVectors_pop(self)
def append(self, x: "std::vector< std::shared_ptr< SiconosVector > >::value_type const &") -> "void":
return _pysimulation.VectorOfVectors_append(self, x)
def empty(self) -> "bool":
return _pysimulation.VectorOfVectors_empty(self)
def size(self) -> "std::vector< std::shared_ptr< SiconosVector > >::size_type":
return _pysimulation.VectorOfVectors_size(self)
def swap(self, v: "VectorOfVectors") -> "void":
return _pysimulation.VectorOfVectors_swap(self, v)
def begin(self) -> "std::vector< std::shared_ptr< SiconosVector > >::iterator":
return _pysimulation.VectorOfVectors_begin(self)
def end(self) -> "std::vector< std::shared_ptr< SiconosVector > >::iterator":
return _pysimulation.VectorOfVectors_end(self)
def rbegin(self) -> "std::vector< std::shared_ptr< SiconosVector > >::reverse_iterator":
return _pysimulation.VectorOfVectors_rbegin(self)
def rend(self) -> "std::vector< std::shared_ptr< SiconosVector > >::reverse_iterator":
return _pysimulation.VectorOfVectors_rend(self)
def clear(self) -> "void":
return _pysimulation.VectorOfVectors_clear(self)
def get_allocator(self) -> "std::vector< std::shared_ptr< SiconosVector > >::allocator_type":
return _pysimulation.VectorOfVectors_get_allocator(self)
def pop_back(self) -> "void":
return _pysimulation.VectorOfVectors_pop_back(self)
def erase(self, *args) -> "std::vector< std::shared_ptr< SiconosVector > >::iterator":
return _pysimulation.VectorOfVectors_erase(self, *args)
def __init__(self, *args):
_pysimulation.VectorOfVectors_swiginit(self, _pysimulation.new_VectorOfVectors(*args))
def push_back(self, x: "std::vector< std::shared_ptr< SiconosVector > >::value_type const &") -> "void":
return _pysimulation.VectorOfVectors_push_back(self, x)
def front(self) -> "std::vector< std::shared_ptr< SiconosVector > >::value_type const &":
return _pysimulation.VectorOfVectors_front(self)
def back(self) -> "std::vector< std::shared_ptr< SiconosVector > >::value_type const &":
return _pysimulation.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 _pysimulation.VectorOfVectors_assign(self, n, x)
def resize(self, *args) -> "void":
return _pysimulation.VectorOfVectors_resize(self, *args)
def insert(self, *args) -> "void":
return _pysimulation.VectorOfVectors_insert(self, *args)
def reserve(self, n: "std::vector< std::shared_ptr< SiconosVector > >::size_type") -> "void":
return _pysimulation.VectorOfVectors_reserve(self, n)
def capacity(self) -> "std::vector< std::shared_ptr< SiconosVector > >::size_type":
return _pysimulation.VectorOfVectors_capacity(self)
__swig_destroy__ = _pysimulation.delete_VectorOfVectors
# Register VectorOfVectors in _pysimulation:
_pysimulation.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 _pysimulation.VectorOfBlockVectors_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self) -> "bool":
return _pysimulation.VectorOfBlockVectors___nonzero__(self)
def __bool__(self) -> "bool":
return _pysimulation.VectorOfBlockVectors___bool__(self)
def __len__(self) -> "std::vector< std::shared_ptr< BlockVector > >::size_type":
return _pysimulation.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 _pysimulation.VectorOfBlockVectors___getslice__(self, i, j)
def __setslice__(self, *args) -> "void":
return _pysimulation.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 _pysimulation.VectorOfBlockVectors___delslice__(self, i, j)
def __delitem__(self, *args) -> "void":
return _pysimulation.VectorOfBlockVectors___delitem__(self, *args)
def __getitem__(self, *args) -> "std::vector< std::shared_ptr< BlockVector > >::value_type const &":
return _pysimulation.VectorOfBlockVectors___getitem__(self, *args)
def __setitem__(self, *args) -> "void":
return _pysimulation.VectorOfBlockVectors___setitem__(self, *args)
def pop(self) -> "std::vector< std::shared_ptr< BlockVector > >::value_type":
return _pysimulation.VectorOfBlockVectors_pop(self)
def append(self, x: "std::vector< std::shared_ptr< BlockVector > >::value_type const &") -> "void":
return _pysimulation.VectorOfBlockVectors_append(self, x)
def empty(self) -> "bool":
return _pysimulation.VectorOfBlockVectors_empty(self)
def size(self) -> "std::vector< std::shared_ptr< BlockVector > >::size_type":
return _pysimulation.VectorOfBlockVectors_size(self)
def swap(self, v: "VectorOfBlockVectors") -> "void":
return _pysimulation.VectorOfBlockVectors_swap(self, v)
def begin(self) -> "std::vector< std::shared_ptr< BlockVector > >::iterator":
return _pysimulation.VectorOfBlockVectors_begin(self)
def end(self) -> "std::vector< std::shared_ptr< BlockVector > >::iterator":
return _pysimulation.VectorOfBlockVectors_end(self)
def rbegin(self) -> "std::vector< std::shared_ptr< BlockVector > >::reverse_iterator":
return _pysimulation.VectorOfBlockVectors_rbegin(self)
def rend(self) -> "std::vector< std::shared_ptr< BlockVector > >::reverse_iterator":
return _pysimulation.VectorOfBlockVectors_rend(self)
def clear(self) -> "void":
return _pysimulation.VectorOfBlockVectors_clear(self)
def get_allocator(self) -> "std::vector< std::shared_ptr< BlockVector > >::allocator_type":
return _pysimulation.VectorOfBlockVectors_get_allocator(self)
def pop_back(self) -> "void":
return _pysimulation.VectorOfBlockVectors_pop_back(self)
def erase(self, *args) -> "std::vector< std::shared_ptr< BlockVector > >::iterator":
return _pysimulation.VectorOfBlockVectors_erase(self, *args)
def __init__(self, *args):
_pysimulation.VectorOfBlockVectors_swiginit(self, _pysimulation.new_VectorOfBlockVectors(*args))
def push_back(self, x: "std::vector< std::shared_ptr< BlockVector > >::value_type const &") -> "void":
return _pysimulation.VectorOfBlockVectors_push_back(self, x)
def front(self) -> "std::vector< std::shared_ptr< BlockVector > >::value_type const &":
return _pysimulation.VectorOfBlockVectors_front(self)
def back(self) -> "std::vector< std::shared_ptr< BlockVector > >::value_type const &":
return _pysimulation.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 _pysimulation.VectorOfBlockVectors_assign(self, n, x)
def resize(self, *args) -> "void":
return _pysimulation.VectorOfBlockVectors_resize(self, *args)
def insert(self, *args) -> "void":
return _pysimulation.VectorOfBlockVectors_insert(self, *args)
def reserve(self, n: "std::vector< std::shared_ptr< BlockVector > >::size_type") -> "void":
return _pysimulation.VectorOfBlockVectors_reserve(self, n)
def capacity(self) -> "std::vector< std::shared_ptr< BlockVector > >::size_type":
return _pysimulation.VectorOfBlockVectors_capacity(self)
__swig_destroy__ = _pysimulation.delete_VectorOfBlockVectors
# Register VectorOfBlockVectors in _pysimulation:
_pysimulation.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 _pysimulation.VectorOfMatrices_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self) -> "bool":
return _pysimulation.VectorOfMatrices___nonzero__(self)
def __bool__(self) -> "bool":
return _pysimulation.VectorOfMatrices___bool__(self)
def __len__(self) -> "std::vector< std::shared_ptr< SiconosMatrix > >::size_type":
return _pysimulation.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 _pysimulation.VectorOfMatrices___getslice__(self, i, j)
def __setslice__(self, *args) -> "void":
return _pysimulation.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 _pysimulation.VectorOfMatrices___delslice__(self, i, j)
def __delitem__(self, *args) -> "void":
return _pysimulation.VectorOfMatrices___delitem__(self, *args)
def __getitem__(self, *args) -> "std::vector< std::shared_ptr< SiconosMatrix > >::value_type const &":
return _pysimulation.VectorOfMatrices___getitem__(self, *args)
def __setitem__(self, *args) -> "void":
return _pysimulation.VectorOfMatrices___setitem__(self, *args)
def pop(self) -> "std::vector< std::shared_ptr< SiconosMatrix > >::value_type":
return _pysimulation.VectorOfMatrices_pop(self)
def append(self, x: "std::vector< std::shared_ptr< SiconosMatrix > >::value_type const &") -> "void":
return _pysimulation.VectorOfMatrices_append(self, x)
def empty(self) -> "bool":
return _pysimulation.VectorOfMatrices_empty(self)
def size(self) -> "std::vector< std::shared_ptr< SiconosMatrix > >::size_type":
return _pysimulation.VectorOfMatrices_size(self)
def swap(self, v: "VectorOfMatrices") -> "void":
return _pysimulation.VectorOfMatrices_swap(self, v)
def begin(self) -> "std::vector< std::shared_ptr< SiconosMatrix > >::iterator":
return _pysimulation.VectorOfMatrices_begin(self)
def end(self) -> "std::vector< std::shared_ptr< SiconosMatrix > >::iterator":
return _pysimulation.VectorOfMatrices_end(self)
def rbegin(self) -> "std::vector< std::shared_ptr< SiconosMatrix > >::reverse_iterator":
return _pysimulation.VectorOfMatrices_rbegin(self)
def rend(self) -> "std::vector< std::shared_ptr< SiconosMatrix > >::reverse_iterator":
return _pysimulation.VectorOfMatrices_rend(self)
def clear(self) -> "void":
return _pysimulation.VectorOfMatrices_clear(self)
def get_allocator(self) -> "std::vector< std::shared_ptr< SiconosMatrix > >::allocator_type":
return _pysimulation.VectorOfMatrices_get_allocator(self)
def pop_back(self) -> "void":
return _pysimulation.VectorOfMatrices_pop_back(self)
def erase(self, *args) -> "std::vector< std::shared_ptr< SiconosMatrix > >::iterator":
return _pysimulation.VectorOfMatrices_erase(self, *args)
def __init__(self, *args):
_pysimulation.VectorOfMatrices_swiginit(self, _pysimulation.new_VectorOfMatrices(*args))
def push_back(self, x: "std::vector< std::shared_ptr< SiconosMatrix > >::value_type const &") -> "void":
return _pysimulation.VectorOfMatrices_push_back(self, x)
def front(self) -> "std::vector< std::shared_ptr< SiconosMatrix > >::value_type const &":
return _pysimulation.VectorOfMatrices_front(self)
def back(self) -> "std::vector< std::shared_ptr< SiconosMatrix > >::value_type const &":
return _pysimulation.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 _pysimulation.VectorOfMatrices_assign(self, n, x)
def resize(self, *args) -> "void":
return _pysimulation.VectorOfMatrices_resize(self, *args)
def insert(self, *args) -> "void":
return _pysimulation.VectorOfMatrices_insert(self, *args)
def reserve(self, n: "std::vector< std::shared_ptr< SiconosMatrix > >::size_type") -> "void":
return _pysimulation.VectorOfMatrices_reserve(self, n)
def capacity(self) -> "std::vector< std::shared_ptr< SiconosMatrix > >::size_type":
return _pysimulation.VectorOfMatrices_capacity(self)
__swig_destroy__ = _pysimulation.delete_VectorOfMatrices
# Register VectorOfMatrices in _pysimulation:
_pysimulation.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 _pysimulation.VectorOfSMatrices_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self) -> "bool":
return _pysimulation.VectorOfSMatrices___nonzero__(self)
def __bool__(self) -> "bool":
return _pysimulation.VectorOfSMatrices___bool__(self)
def __len__(self) -> "std::vector< std::shared_ptr< SimpleMatrix > >::size_type":
return _pysimulation.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 _pysimulation.VectorOfSMatrices___getslice__(self, i, j)
def __setslice__(self, *args) -> "void":
return _pysimulation.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 _pysimulation.VectorOfSMatrices___delslice__(self, i, j)
def __delitem__(self, *args) -> "void":
return _pysimulation.VectorOfSMatrices___delitem__(self, *args)
def __getitem__(self, *args) -> "std::vector< std::shared_ptr< SimpleMatrix > >::value_type const &":
return _pysimulation.VectorOfSMatrices___getitem__(self, *args)
def __setitem__(self, *args) -> "void":
return _pysimulation.VectorOfSMatrices___setitem__(self, *args)
def pop(self) -> "std::vector< std::shared_ptr< SimpleMatrix > >::value_type":
return _pysimulation.VectorOfSMatrices_pop(self)
def append(self, x: "std::vector< std::shared_ptr< SimpleMatrix > >::value_type const &") -> "void":
return _pysimulation.VectorOfSMatrices_append(self, x)
def empty(self) -> "bool":
return _pysimulation.VectorOfSMatrices_empty(self)
def size(self) -> "std::vector< std::shared_ptr< SimpleMatrix > >::size_type":
return _pysimulation.VectorOfSMatrices_size(self)
def swap(self, v: "VectorOfSMatrices") -> "void":
return _pysimulation.VectorOfSMatrices_swap(self, v)
def begin(self) -> "std::vector< std::shared_ptr< SimpleMatrix > >::iterator":
return _pysimulation.VectorOfSMatrices_begin(self)
def end(self) -> "std::vector< std::shared_ptr< SimpleMatrix > >::iterator":
return _pysimulation.VectorOfSMatrices_end(self)
def rbegin(self) -> "std::vector< std::shared_ptr< SimpleMatrix > >::reverse_iterator":
return _pysimulation.VectorOfSMatrices_rbegin(self)
def rend(self) -> "std::vector< std::shared_ptr< SimpleMatrix > >::reverse_iterator":
return _pysimulation.VectorOfSMatrices_rend(self)
def clear(self) -> "void":
return _pysimulation.VectorOfSMatrices_clear(self)
def get_allocator(self) -> "std::vector< std::shared_ptr< SimpleMatrix > >::allocator_type":
return _pysimulation.VectorOfSMatrices_get_allocator(self)
def pop_back(self) -> "void":
return _pysimulation.VectorOfSMatrices_pop_back(self)
def erase(self, *args) -> "std::vector< std::shared_ptr< SimpleMatrix > >::iterator":
return _pysimulation.VectorOfSMatrices_erase(self, *args)
def __init__(self, *args):
_pysimulation.VectorOfSMatrices_swiginit(self, _pysimulation.new_VectorOfSMatrices(*args))
def push_back(self, x: "std::vector< std::shared_ptr< SimpleMatrix > >::value_type const &") -> "void":
return _pysimulation.VectorOfSMatrices_push_back(self, x)
def front(self) -> "std::vector< std::shared_ptr< SimpleMatrix > >::value_type const &":
return _pysimulation.VectorOfSMatrices_front(self)
def back(self) -> "std::vector< std::shared_ptr< SimpleMatrix > >::value_type const &":
return _pysimulation.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 _pysimulation.VectorOfSMatrices_assign(self, n, x)
def resize(self, *args) -> "void":
return _pysimulation.VectorOfSMatrices_resize(self, *args)
def insert(self, *args) -> "void":
return _pysimulation.VectorOfSMatrices_insert(self, *args)
def reserve(self, n: "std::vector< std::shared_ptr< SimpleMatrix > >::size_type") -> "void":
return _pysimulation.VectorOfSMatrices_reserve(self, n)
def capacity(self) -> "std::vector< std::shared_ptr< SimpleMatrix > >::size_type":
return _pysimulation.VectorOfSMatrices_capacity(self)
__swig_destroy__ = _pysimulation.delete_VectorOfSMatrices
# Register VectorOfSMatrices in _pysimulation:
_pysimulation.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 _pysimulation.VectorOfMemories_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self) -> "bool":
return _pysimulation.VectorOfMemories___nonzero__(self)
def __bool__(self) -> "bool":
return _pysimulation.VectorOfMemories___bool__(self)
def __len__(self) -> "std::vector< SiconosMemory >::size_type":
return _pysimulation.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 _pysimulation.VectorOfMemories___getslice__(self, i, j)
def __setslice__(self, *args) -> "void":
return _pysimulation.VectorOfMemories___setslice__(self, *args)
def __delslice__(self, i: "std::vector< SiconosMemory >::difference_type", j: "std::vector< SiconosMemory >::difference_type") -> "void":
return _pysimulation.VectorOfMemories___delslice__(self, i, j)
def __delitem__(self, *args) -> "void":
return _pysimulation.VectorOfMemories___delitem__(self, *args)
def __getitem__(self, *args) -> "std::vector< SiconosMemory >::value_type const &":
return _pysimulation.VectorOfMemories___getitem__(self, *args)
def __setitem__(self, *args) -> "void":
return _pysimulation.VectorOfMemories___setitem__(self, *args)
def pop(self) -> "std::vector< SiconosMemory >::value_type":
return _pysimulation.VectorOfMemories_pop(self)
def append(self, x: "SiconosMemory") -> "void":
return _pysimulation.VectorOfMemories_append(self, x)
def empty(self) -> "bool":
return _pysimulation.VectorOfMemories_empty(self)
def size(self) -> "std::vector< SiconosMemory >::size_type":
return _pysimulation.VectorOfMemories_size(self)
def swap(self, v: "VectorOfMemories") -> "void":
return _pysimulation.VectorOfMemories_swap(self, v)
def begin(self) -> "std::vector< SiconosMemory >::iterator":
return _pysimulation.VectorOfMemories_begin(self)
def end(self) -> "std::vector< SiconosMemory >::iterator":
return _pysimulation.VectorOfMemories_end(self)
def rbegin(self) -> "std::vector< SiconosMemory >::reverse_iterator":
return _pysimulation.VectorOfMemories_rbegin(self)
def rend(self) -> "std::vector< SiconosMemory >::reverse_iterator":
return _pysimulation.VectorOfMemories_rend(self)
def clear(self) -> "void":
return _pysimulation.VectorOfMemories_clear(self)
def get_allocator(self) -> "std::vector< SiconosMemory >::allocator_type":
return _pysimulation.VectorOfMemories_get_allocator(self)
def pop_back(self) -> "void":
return _pysimulation.VectorOfMemories_pop_back(self)
def erase(self, *args) -> "std::vector< SiconosMemory >::iterator":
return _pysimulation.VectorOfMemories_erase(self, *args)
def __init__(self, *args):
_pysimulation.VectorOfMemories_swiginit(self, _pysimulation.new_VectorOfMemories(*args))
def push_back(self, x: "SiconosMemory") -> "void":
return _pysimulation.VectorOfMemories_push_back(self, x)
def front(self) -> "std::vector< SiconosMemory >::value_type const &":
return _pysimulation.VectorOfMemories_front(self)
def back(self) -> "std::vector< SiconosMemory >::value_type const &":
return _pysimulation.VectorOfMemories_back(self)
def assign(self, n: "std::vector< SiconosMemory >::size_type", x: "SiconosMemory") -> "void":
return _pysimulation.VectorOfMemories_assign(self, n, x)
def resize(self, *args) -> "void":
return _pysimulation.VectorOfMemories_resize(self, *args)
def insert(self, *args) -> "void":
return _pysimulation.VectorOfMemories_insert(self, *args)
def reserve(self, n: "std::vector< SiconosMemory >::size_type") -> "void":
return _pysimulation.VectorOfMemories_reserve(self, n)
def capacity(self) -> "std::vector< SiconosMemory >::size_type":
return _pysimulation.VectorOfMemories_capacity(self)
__swig_destroy__ = _pysimulation.delete_VectorOfMemories
# Register VectorOfMemories in _pysimulation:
_pysimulation.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 _pysimulation.UnsignedIntVector_iterator(self)
def __iter__(self):
return self.iterator()
def __nonzero__(self) -> "bool":
return _pysimulation.UnsignedIntVector___nonzero__(self)
def __bool__(self) -> "bool":
return _pysimulation.UnsignedIntVector___bool__(self)
def __len__(self) -> "std::vector< unsigned int >::size_type":
return _pysimulation.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 _pysimulation.UnsignedIntVector___getslice__(self, i, j)
def __setslice__(self, *args) -> "void":
return _pysimulation.UnsignedIntVector___setslice__(self, *args)
def __delslice__(self, i: "std::vector< unsigned int >::difference_type", j: "std::vector< unsigned int >::difference_type") -> "void":
return _pysimulation.UnsignedIntVector___delslice__(self, i, j)
def __delitem__(self, *args) -> "void":
return _pysimulation.UnsignedIntVector___delitem__(self, *args)
def __getitem__(self, *args) -> "std::vector< unsigned int >::value_type const &":
return _pysimulation.UnsignedIntVector___getitem__(self, *args)
def __setitem__(self, *args) -> "void":
return _pysimulation.UnsignedIntVector___setitem__(self, *args)
def pop(self) -> "std::vector< unsigned int >::value_type":
return _pysimulation.UnsignedIntVector_pop(self)
def append(self, x: "std::vector< unsigned int >::value_type const &") -> "void":
return _pysimulation.UnsignedIntVector_append(self, x)
def empty(self) -> "bool":
return _pysimulation.UnsignedIntVector_empty(self)
def size(self) -> "std::vector< unsigned int >::size_type":
return _pysimulation.UnsignedIntVector_size(self)
def swap(self, v: "UnsignedIntVector") -> "void":
return _pysimulation.UnsignedIntVector_swap(self, v)
def begin(self) -> "std::vector< unsigned int >::iterator":
return _pysimulation.UnsignedIntVector_begin(self)
def end(self) -> "std::vector< unsigned int >::iterator":
return _pysimulation.UnsignedIntVector_end(self)
def rbegin(self) -> "std::vector< unsigned int >::reverse_iterator":
return _pysimulation.UnsignedIntVector_rbegin(self)
def rend(self) -> "std::vector< unsigned int >::reverse_iterator":
return _pysimulation.UnsignedIntVector_rend(self)
def clear(self) -> "void":
return _pysimulation.UnsignedIntVector_clear(self)
def get_allocator(self) -> "std::vector< unsigned int >::allocator_type":
return _pysimulation.UnsignedIntVector_get_allocator(self)
def pop_back(self) -> "void":
return _pysimulation.UnsignedIntVector_pop_back(self)
def erase(self, *args) -> "std::vector< unsigned int >::iterator":
return _pysimulation.UnsignedIntVector_erase(self, *args)
def __init__(self, *args):
_pysimulation.UnsignedIntVector_swiginit(self, _pysimulation.new_UnsignedIntVector(*args))
def push_back(self, x: "std::vector< unsigned int >::value_type const &") -> "void":
return _pysimulation.UnsignedIntVector_push_back(self, x)
def front(self) -> "std::vector< unsigned int >::value_type const &":
return _pysimulation.UnsignedIntVector_front(self)
def back(self) -> "std::vector< unsigned int >::value_type const &":
return _pysimulation.UnsignedIntVector_back(self)
def assign(self, n: "std::vector< unsigned int >::size_type", x: "std::vector< unsigned int >::value_type const &") -> "void":
return _pysimulation.UnsignedIntVector_assign(self, n, x)
def resize(self, *args) -> "void":
return _pysimulation.UnsignedIntVector_resize(self, *args)
def insert(self, *args) -> "void":
return _pysimulation.UnsignedIntVector_insert(self, *args)
def reserve(self, n: "std::vector< unsigned int >::size_type") -> "void":
return _pysimulation.UnsignedIntVector_reserve(self, n)
def capacity(self) -> "std::vector< unsigned int >::size_type":
return _pysimulation.UnsignedIntVector_capacity(self)
__swig_destroy__ = _pysimulation.delete_UnsignedIntVector
# Register UnsignedIntVector in _pysimulation:
_pysimulation.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
_pysimulation.ControlSimulation_swiginit(self, _pysimulation.new_ControlSimulation(_self, *args))
_t0 = property(_pysimulation.ControlSimulation__t0_get, _pysimulation.ControlSimulation__t0_set, doc=r""" Starting time""")
_T = property(_pysimulation.ControlSimulation__T_get, _pysimulation.ControlSimulation__T_set, doc=r""" End time""")
_h = property(_pysimulation.ControlSimulation__h_get, _pysimulation.ControlSimulation__h_set, doc=r""" Simulation step""")
_theta = property(_pysimulation.ControlSimulation__theta_get, _pysimulation.ControlSimulation__theta_set, doc=r""" Theta for MoreauJeanOSI""")
_elapsedTime = property(_pysimulation.ControlSimulation__elapsedTime_get, _pysimulation.ControlSimulation__elapsedTime_set, doc=r""" Time spent computing""")
_N = property(_pysimulation.ControlSimulation__N_get, _pysimulation.ControlSimulation__N_set, doc=r""" rough estimation of the number of points to save""")
_nDim = property(_pysimulation.ControlSimulation__nDim_get, _pysimulation.ControlSimulation__nDim_set, doc=r""" Dimension of the state space""")
_saveOnlyMainSimulation = property(_pysimulation.ControlSimulation__saveOnlyMainSimulation_get, _pysimulation.ControlSimulation__saveOnlyMainSimulation_set, doc=r""" Save only the data in the main Simulation""")
_silent = property(_pysimulation.ControlSimulation__silent_get, _pysimulation.ControlSimulation__silent_set, doc=r""" If true, do not show progress of the simulation""")
_dataM = property(_pysimulation.ControlSimulation__dataM_get, _pysimulation.ControlSimulation__dataM_set, doc=r""" Matrix for saving result""")
_dataLegend = property(_pysimulation.ControlSimulation__dataLegend_get, _pysimulation.ControlSimulation__dataLegend_set, doc=r""" Legend for the columns in the matrix _dataM""")
_nsds = property(_pysimulation.ControlSimulation__nsds_get, _pysimulation.ControlSimulation__nsds_set, doc=r""" NonSmoothDynamicalSystem""")
_processTD = property(_pysimulation.ControlSimulation__processTD_get, _pysimulation.ControlSimulation__processTD_set, doc=r""" TimeDiscretisation for the simulation""")
_processSimulation = property(_pysimulation.ControlSimulation__processSimulation_get, _pysimulation.ControlSimulation__processSimulation_set, doc=r""" The Simulation""")
_processIntegrator = property(_pysimulation.ControlSimulation__processIntegrator_get, _pysimulation.ControlSimulation__processIntegrator_set, doc=r""" The integrator""")
_CM = property(_pysimulation.ControlSimulation__CM_get, _pysimulation.ControlSimulation__CM_set, doc=r""" the ControlManager""")
_DSG0 = property(_pysimulation.ControlSimulation__DSG0_get, _pysimulation.ControlSimulation__DSG0_set, doc=r""" DynamicalSystemsGraph (for convenience)""")
_IG0 = property(_pysimulation.ControlSimulation__IG0_get, _pysimulation.ControlSimulation__IG0_set, doc=r""" InteractionsGraph (for convenience)""")
__swig_destroy__ = _pysimulation.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 _pysimulation.ControlSimulation_setTheta(self, newTheta)
def initialize(self) -> "void":
r""" Initialize the ControlSimulation, instantiate all objects"""
return _pysimulation.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 _pysimulation.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 _pysimulation.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 _pysimulation.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 _pysimulation.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 _pysimulation.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 _pysimulation.ControlSimulation_simulation(self)
def integrator(self) -> "SP::OneStepIntegrator":
r"""
Return the OneStepIntegrator
:rtype: :py:class:`OneStepIntegrator`
:return: the Integrator
"""
return _pysimulation.ControlSimulation_integrator(self)
def model(self) -> "SP::NonSmoothDynamicalSystem":
r"""
Return the NonSmoothDynamicalSystem
:rtype: :py:class:`NonSmoothDynamicalSystem`
:return: the NonSmoothDynamicalSystem
"""
return _pysimulation.ControlSimulation_model(self)
def data(self) -> "SP::SimpleMatrix":
r"""
Return the data matrix
:rtype: :py:class:`SimpleMatrix`
:return: the data matrix
"""
return _pysimulation.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 _pysimulation.ControlSimulation_dataLegend(self)
def elapsedTime(self) -> "double":
r"""
:rtype: float
:return: the elapsed time computing in seconds
"""
return _pysimulation.ControlSimulation_elapsedTime(self)
def CM(self) -> "SP::ControlManager":
r"""
Return the ControlManager
:rtype: :py:class:`ControlManager`
:return: the ControlManager
"""
return _pysimulation.ControlSimulation_CM(self)
def setSaveOnlyMainSimulation(self, v: "bool") -> "void":
r"""
Set the value of _saveOnlyMainSimulation
:type v: boolean
:param v: a boolean
"""
return _pysimulation.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 _pysimulation.ControlSimulation_silent(self, s)
def run(self) -> "void":
r""" Run the simulation"""
return _pysimulation.ControlSimulation_run(self)
def __disown__(self):
self.this.disown()
_pysimulation.disown_ControlSimulation(self)
return weakref.proxy(self)
# Register ControlSimulation in _pysimulation:
_pysimulation.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
_pysimulation.ControlLsodarSimulation_swiginit(self, _pysimulation.new_ControlLsodarSimulation(_self, t0, T, h))
def run(self) -> "void":
return _pysimulation.ControlLsodarSimulation_run(self)
__swig_destroy__ = _pysimulation.delete_ControlLsodarSimulation
def __disown__(self):
self.this.disown()
_pysimulation.disown_ControlLsodarSimulation(self)
return weakref.proxy(self)
# Register ControlLsodarSimulation in _pysimulation:
_pysimulation.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
_pysimulation.ControlZOHSimulation_swiginit(self, _pysimulation.new_ControlZOHSimulation(_self, t0, T, h))
def run(self) -> "void":
return _pysimulation.ControlZOHSimulation_run(self)
__swig_destroy__ = _pysimulation.delete_ControlZOHSimulation
def __disown__(self):
self.this.disown()
_pysimulation.disown_ControlZOHSimulation(self)
return weakref.proxy(self)
# Register ControlZOHSimulation in _pysimulation:
_pysimulation.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(_pysimulation.ControlManager__allSensors_get, _pysimulation.ControlManager__allSensors_set, doc=r""" A list of Sensors""")
_allActuators = property(_pysimulation.ControlManager__allActuators_get, _pysimulation.ControlManager__allActuators_set, doc=r""" A list of Actuators""")
_allObservers = property(_pysimulation.ControlManager__allObservers_get, _pysimulation.ControlManager__allObservers_set, doc=r""" A list of Observers""")
_sim = property(_pysimulation.ControlManager__sim_get, _pysimulation.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 _pysimulation.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 _pysimulation.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 _pysimulation.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
_pysimulation.ControlManager_swiginit(self, _pysimulation.new_ControlManager(_self, *args))
__swig_destroy__ = _pysimulation.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 _pysimulation.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 _pysimulation.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 _pysimulation.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 _pysimulation.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 _pysimulation.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 _pysimulation.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 _pysimulation.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 _pysimulation.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 _pysimulation.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 _pysimulation.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 _pysimulation.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 _pysimulation.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 _pysimulation.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 _pysimulation.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 _pysimulation.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 _pysimulation.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 _pysimulation.ControlManager_initialize(self, nsds)
[docs] def display(self) -> "void":
r""" display the data of the ControlManager on the standard output"""
return _pysimulation.ControlManager_display(self)
def __disown__(self):
self.this.disown()
_pysimulation.disown_ControlManager(self)
return weakref.proxy(self)
# Register ControlManager in _pysimulation:
_pysimulation.ControlManager_swigregister(ControlManager)