Source code for amici.amici

# 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.


"""
Core C++ bindings
-----------------
This module encompasses the complete public C++ API of AMICI, which was
exposed via swig. All functions listed here are directly accessible in the
main amici package, i.e., :py:class:`amici.amici.ExpData` is available as
``amici.ExpData``.
Usage of functions and classes from the base ``amici`` package is
generally recommended as they often include convenience wrappers that avoid
common pitfalls when accessing C++ types from python and implement some
nonstandard type conversions.
"""

from typing import Iterable



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 _amici
else:
    import _amici

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__)


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__ = _amici.delete_SwigPyIterator

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[docs]class DoubleVector(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 _amici.DoubleVector_iterator(self) def __iter__(self): return self.iterator() def __nonzero__(self) -> "bool": return _amici.DoubleVector___nonzero__(self) def __bool__(self) -> "bool": return _amici.DoubleVector___bool__(self) def __len__(self) -> "std::vector< double >::size_type": return _amici.DoubleVector___len__(self) def __getslice__(self, i: "std::vector< double >::difference_type", j: "std::vector< double >::difference_type") -> "std::vector< double,std::allocator< double > > *": return _amici.DoubleVector___getslice__(self, i, j) def __setslice__(self, *args) -> "void": return _amici.DoubleVector___setslice__(self, *args) def __delslice__(self, i: "std::vector< double >::difference_type", j: "std::vector< double >::difference_type") -> "void": return _amici.DoubleVector___delslice__(self, i, j) def __delitem__(self, *args) -> "void": return _amici.DoubleVector___delitem__(self, *args) def __getitem__(self, *args) -> "std::vector< double >::value_type const &": return _amici.DoubleVector___getitem__(self, *args) def __setitem__(self, *args) -> "void": return _amici.DoubleVector___setitem__(self, *args) def pop(self) -> "std::vector< double >::value_type": return _amici.DoubleVector_pop(self) def append(self, x: "std::vector< double >::value_type const &") -> "void": return _amici.DoubleVector_append(self, x) def empty(self) -> "bool": return _amici.DoubleVector_empty(self) def size(self) -> "std::vector< double >::size_type": return _amici.DoubleVector_size(self) def swap(self, v: "DoubleVector") -> "void": return _amici.DoubleVector_swap(self, v) def begin(self) -> "std::vector< double >::iterator": return _amici.DoubleVector_begin(self) def end(self) -> "std::vector< double >::iterator": return _amici.DoubleVector_end(self) def rbegin(self) -> "std::vector< double >::reverse_iterator": return _amici.DoubleVector_rbegin(self) def rend(self) -> "std::vector< double >::reverse_iterator": return _amici.DoubleVector_rend(self) def clear(self) -> "void": return _amici.DoubleVector_clear(self) def get_allocator(self) -> "std::vector< double >::allocator_type": return _amici.DoubleVector_get_allocator(self) def pop_back(self) -> "void": return _amici.DoubleVector_pop_back(self) def erase(self, *args) -> "std::vector< double >::iterator": return _amici.DoubleVector_erase(self, *args) def __init__(self, *args): _amici.DoubleVector_swiginit(self, _amici.new_DoubleVector(*args)) def push_back(self, x: "std::vector< double >::value_type const &") -> "void": return _amici.DoubleVector_push_back(self, x) def front(self) -> "std::vector< double >::value_type const &": return _amici.DoubleVector_front(self) def back(self) -> "std::vector< double >::value_type const &": return _amici.DoubleVector_back(self) def assign(self, n: "std::vector< double >::size_type", x: "std::vector< double >::value_type const &") -> "void": return _amici.DoubleVector_assign(self, n, x) def resize(self, *args) -> "void": return _amici.DoubleVector_resize(self, *args) def insert(self, *args) -> "void": return _amici.DoubleVector_insert(self, *args) def reserve(self, n: "std::vector< double >::size_type") -> "void": return _amici.DoubleVector_reserve(self, n) def capacity(self) -> "std::vector< double >::size_type": return _amici.DoubleVector_capacity(self) __swig_destroy__ = _amici.delete_DoubleVector
# Register DoubleVector in _amici: _amici.DoubleVector_swigregister(DoubleVector)
[docs]class IntVector(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 _amici.IntVector_iterator(self) def __iter__(self): return self.iterator() def __nonzero__(self) -> "bool": return _amici.IntVector___nonzero__(self) def __bool__(self) -> "bool": return _amici.IntVector___bool__(self) def __len__(self) -> "std::vector< int >::size_type": return _amici.IntVector___len__(self) def __getslice__(self, i: "std::vector< int >::difference_type", j: "std::vector< int >::difference_type") -> "std::vector< int,std::allocator< int > > *": return _amici.IntVector___getslice__(self, i, j) def __setslice__(self, *args) -> "void": return _amici.IntVector___setslice__(self, *args) def __delslice__(self, i: "std::vector< int >::difference_type", j: "std::vector< int >::difference_type") -> "void": return _amici.IntVector___delslice__(self, i, j) def __delitem__(self, *args) -> "void": return _amici.IntVector___delitem__(self, *args) def __getitem__(self, *args) -> "std::vector< int >::value_type const &": return _amici.IntVector___getitem__(self, *args) def __setitem__(self, *args) -> "void": return _amici.IntVector___setitem__(self, *args) def pop(self) -> "std::vector< int >::value_type": return _amici.IntVector_pop(self) def append(self, x: "std::vector< int >::value_type const &") -> "void": return _amici.IntVector_append(self, x) def empty(self) -> "bool": return _amici.IntVector_empty(self) def size(self) -> "std::vector< int >::size_type": return _amici.IntVector_size(self) def swap(self, v: "IntVector") -> "void": return _amici.IntVector_swap(self, v) def begin(self) -> "std::vector< int >::iterator": return _amici.IntVector_begin(self) def end(self) -> "std::vector< int >::iterator": return _amici.IntVector_end(self) def rbegin(self) -> "std::vector< int >::reverse_iterator": return _amici.IntVector_rbegin(self) def rend(self) -> "std::vector< int >::reverse_iterator": return _amici.IntVector_rend(self) def clear(self) -> "void": return _amici.IntVector_clear(self) def get_allocator(self) -> "std::vector< int >::allocator_type": return _amici.IntVector_get_allocator(self) def pop_back(self) -> "void": return _amici.IntVector_pop_back(self) def erase(self, *args) -> "std::vector< int >::iterator": return _amici.IntVector_erase(self, *args) def __init__(self, *args): _amici.IntVector_swiginit(self, _amici.new_IntVector(*args)) def push_back(self, x: "std::vector< int >::value_type const &") -> "void": return _amici.IntVector_push_back(self, x) def front(self) -> "std::vector< int >::value_type const &": return _amici.IntVector_front(self) def back(self) -> "std::vector< int >::value_type const &": return _amici.IntVector_back(self) def assign(self, n: "std::vector< int >::size_type", x: "std::vector< int >::value_type const &") -> "void": return _amici.IntVector_assign(self, n, x) def resize(self, *args) -> "void": return _amici.IntVector_resize(self, *args) def insert(self, *args) -> "void": return _amici.IntVector_insert(self, *args) def reserve(self, n: "std::vector< int >::size_type") -> "void": return _amici.IntVector_reserve(self, n) def capacity(self) -> "std::vector< int >::size_type": return _amici.IntVector_capacity(self) __swig_destroy__ = _amici.delete_IntVector
# Register IntVector in _amici: _amici.IntVector_swigregister(IntVector)
[docs]class BoolVector(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 _amici.BoolVector_iterator(self) def __iter__(self): return self.iterator() def __nonzero__(self) -> "bool": return _amici.BoolVector___nonzero__(self) def __bool__(self) -> "bool": return _amici.BoolVector___bool__(self) def __len__(self) -> "std::vector< bool >::size_type": return _amici.BoolVector___len__(self) def __getslice__(self, i: "std::vector< bool >::difference_type", j: "std::vector< bool >::difference_type") -> "std::vector< bool,std::allocator< bool > > *": return _amici.BoolVector___getslice__(self, i, j) def __setslice__(self, *args) -> "void": return _amici.BoolVector___setslice__(self, *args) def __delslice__(self, i: "std::vector< bool >::difference_type", j: "std::vector< bool >::difference_type") -> "void": return _amici.BoolVector___delslice__(self, i, j) def __delitem__(self, *args) -> "void": return _amici.BoolVector___delitem__(self, *args) def __getitem__(self, *args) -> "std::vector< bool >::value_type": return _amici.BoolVector___getitem__(self, *args) def __setitem__(self, *args) -> "void": return _amici.BoolVector___setitem__(self, *args) def pop(self) -> "std::vector< bool >::value_type": return _amici.BoolVector_pop(self) def append(self, x: "std::vector< bool >::value_type") -> "void": return _amici.BoolVector_append(self, x) def empty(self) -> "bool": return _amici.BoolVector_empty(self) def size(self) -> "std::vector< bool >::size_type": return _amici.BoolVector_size(self) def swap(self, v: "BoolVector") -> "void": return _amici.BoolVector_swap(self, v) def begin(self) -> "std::vector< bool >::iterator": return _amici.BoolVector_begin(self) def end(self) -> "std::vector< bool >::iterator": return _amici.BoolVector_end(self) def rbegin(self) -> "std::vector< bool >::reverse_iterator": return _amici.BoolVector_rbegin(self) def rend(self) -> "std::vector< bool >::reverse_iterator": return _amici.BoolVector_rend(self) def clear(self) -> "void": return _amici.BoolVector_clear(self) def get_allocator(self) -> "std::vector< bool >::allocator_type": return _amici.BoolVector_get_allocator(self) def pop_back(self) -> "void": return _amici.BoolVector_pop_back(self) def erase(self, *args) -> "std::vector< bool >::iterator": return _amici.BoolVector_erase(self, *args) def __init__(self, *args): _amici.BoolVector_swiginit(self, _amici.new_BoolVector(*args)) def push_back(self, x: "std::vector< bool >::value_type") -> "void": return _amici.BoolVector_push_back(self, x) def front(self) -> "std::vector< bool >::value_type": return _amici.BoolVector_front(self) def back(self) -> "std::vector< bool >::value_type": return _amici.BoolVector_back(self) def assign(self, n: "std::vector< bool >::size_type", x: "std::vector< bool >::value_type") -> "void": return _amici.BoolVector_assign(self, n, x) def resize(self, *args) -> "void": return _amici.BoolVector_resize(self, *args) def insert(self, *args) -> "void": return _amici.BoolVector_insert(self, *args) def reserve(self, n: "std::vector< bool >::size_type") -> "void": return _amici.BoolVector_reserve(self, n) def capacity(self) -> "std::vector< bool >::size_type": return _amici.BoolVector_capacity(self) __swig_destroy__ = _amici.delete_BoolVector
# Register BoolVector in _amici: _amici.BoolVector_swigregister(BoolVector)
[docs]class StringVector(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 _amici.StringVector_iterator(self) def __iter__(self): return self.iterator() def __nonzero__(self) -> "bool": return _amici.StringVector___nonzero__(self) def __bool__(self) -> "bool": return _amici.StringVector___bool__(self) def __len__(self) -> "std::vector< std::string >::size_type": return _amici.StringVector___len__(self) def __getslice__(self, i: "std::vector< std::string >::difference_type", j: "std::vector< std::string >::difference_type") -> "std::vector< std::string,std::allocator< std::string > > *": return _amici.StringVector___getslice__(self, i, j) def __setslice__(self, *args) -> "void": return _amici.StringVector___setslice__(self, *args) def __delslice__(self, i: "std::vector< std::string >::difference_type", j: "std::vector< std::string >::difference_type") -> "void": return _amici.StringVector___delslice__(self, i, j) def __delitem__(self, *args) -> "void": return _amici.StringVector___delitem__(self, *args) def __getitem__(self, *args) -> "std::vector< std::string >::value_type const &": return _amici.StringVector___getitem__(self, *args) def __setitem__(self, *args) -> "void": return _amici.StringVector___setitem__(self, *args) def pop(self) -> "std::vector< std::string >::value_type": return _amici.StringVector_pop(self) def append(self, x: "std::vector< std::string >::value_type const &") -> "void": return _amici.StringVector_append(self, x) def empty(self) -> "bool": return _amici.StringVector_empty(self) def size(self) -> "std::vector< std::string >::size_type": return _amici.StringVector_size(self) def swap(self, v: "StringVector") -> "void": return _amici.StringVector_swap(self, v) def begin(self) -> "std::vector< std::string >::iterator": return _amici.StringVector_begin(self) def end(self) -> "std::vector< std::string >::iterator": return _amici.StringVector_end(self) def rbegin(self) -> "std::vector< std::string >::reverse_iterator": return _amici.StringVector_rbegin(self) def rend(self) -> "std::vector< std::string >::reverse_iterator": return _amici.StringVector_rend(self) def clear(self) -> "void": return _amici.StringVector_clear(self) def get_allocator(self) -> "std::vector< std::string >::allocator_type": return _amici.StringVector_get_allocator(self) def pop_back(self) -> "void": return _amici.StringVector_pop_back(self) def erase(self, *args) -> "std::vector< std::string >::iterator": return _amici.StringVector_erase(self, *args) def __init__(self, *args): _amici.StringVector_swiginit(self, _amici.new_StringVector(*args)) def push_back(self, x: "std::vector< std::string >::value_type const &") -> "void": return _amici.StringVector_push_back(self, x) def front(self) -> "std::vector< std::string >::value_type const &": return _amici.StringVector_front(self) def back(self) -> "std::vector< std::string >::value_type const &": return _amici.StringVector_back(self) def assign(self, n: "std::vector< std::string >::size_type", x: "std::vector< std::string >::value_type const &") -> "void": return _amici.StringVector_assign(self, n, x) def resize(self, *args) -> "void": return _amici.StringVector_resize(self, *args) def insert(self, *args) -> "void": return _amici.StringVector_insert(self, *args) def reserve(self, n: "std::vector< std::string >::size_type") -> "void": return _amici.StringVector_reserve(self, n) def capacity(self) -> "std::vector< std::string >::size_type": return _amici.StringVector_capacity(self) __swig_destroy__ = _amici.delete_StringVector
# Register StringVector in _amici: _amici.StringVector_swigregister(StringVector)
[docs]class StringDoubleMap(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 _amici.StringDoubleMap_iterator(self) def __iter__(self): return self.iterator() def __nonzero__(self) -> "bool": return _amici.StringDoubleMap___nonzero__(self) def __bool__(self) -> "bool": return _amici.StringDoubleMap___bool__(self) def __len__(self) -> "std::map< std::string,double >::size_type": return _amici.StringDoubleMap___len__(self) def __iter__(self): return self.key_iterator() def iterkeys(self): return self.key_iterator() def itervalues(self): return self.value_iterator() def iteritems(self): return self.iterator() def __getitem__(self, key: "std::map< std::string,double >::key_type const &") -> "std::map< std::string,double >::mapped_type const &": return _amici.StringDoubleMap___getitem__(self, key) def __delitem__(self, key: "std::map< std::string,double >::key_type const &") -> "void": return _amici.StringDoubleMap___delitem__(self, key) def has_key(self, key: "std::map< std::string,double >::key_type const &") -> "bool": return _amici.StringDoubleMap_has_key(self, key) def keys(self) -> "PyObject *": return _amici.StringDoubleMap_keys(self) def values(self) -> "PyObject *": return _amici.StringDoubleMap_values(self) def items(self) -> "PyObject *": return _amici.StringDoubleMap_items(self) def __contains__(self, key: "std::map< std::string,double >::key_type const &") -> "bool": return _amici.StringDoubleMap___contains__(self, key) def key_iterator(self) -> "swig::SwigPyIterator *": return _amici.StringDoubleMap_key_iterator(self) def value_iterator(self) -> "swig::SwigPyIterator *": return _amici.StringDoubleMap_value_iterator(self) def __setitem__(self, *args) -> "void": return _amici.StringDoubleMap___setitem__(self, *args) def asdict(self) -> "PyObject *": return _amici.StringDoubleMap_asdict(self) def __init__(self, *args): _amici.StringDoubleMap_swiginit(self, _amici.new_StringDoubleMap(*args)) def empty(self) -> "bool": return _amici.StringDoubleMap_empty(self) def size(self) -> "std::map< std::string,double >::size_type": return _amici.StringDoubleMap_size(self) def swap(self, v: "StringDoubleMap") -> "void": return _amici.StringDoubleMap_swap(self, v) def begin(self) -> "std::map< std::string,double >::iterator": return _amici.StringDoubleMap_begin(self) def end(self) -> "std::map< std::string,double >::iterator": return _amici.StringDoubleMap_end(self) def rbegin(self) -> "std::map< std::string,double >::reverse_iterator": return _amici.StringDoubleMap_rbegin(self) def rend(self) -> "std::map< std::string,double >::reverse_iterator": return _amici.StringDoubleMap_rend(self) def clear(self) -> "void": return _amici.StringDoubleMap_clear(self) def get_allocator(self) -> "std::map< std::string,double >::allocator_type": return _amici.StringDoubleMap_get_allocator(self) def count(self, x: "std::map< std::string,double >::key_type const &") -> "std::map< std::string,double >::size_type": return _amici.StringDoubleMap_count(self, x) def erase(self, *args) -> "void": return _amici.StringDoubleMap_erase(self, *args) def find(self, x: "std::map< std::string,double >::key_type const &") -> "std::map< std::string,double >::iterator": return _amici.StringDoubleMap_find(self, x) def lower_bound(self, x: "std::map< std::string,double >::key_type const &") -> "std::map< std::string,double >::iterator": return _amici.StringDoubleMap_lower_bound(self, x) def upper_bound(self, x: "std::map< std::string,double >::key_type const &") -> "std::map< std::string,double >::iterator": return _amici.StringDoubleMap_upper_bound(self, x) __swig_destroy__ = _amici.delete_StringDoubleMap
# Register StringDoubleMap in _amici: _amici.StringDoubleMap_swigregister(StringDoubleMap) def stdVec2ndarray(*args) -> "PyObject *": r""" *Overload 1:* Convert 1D array to *non-owning* numpy ndarray. :type vec: std::vector< double,std::allocator< double > > :param vec: :type dim1: int :param dim1: :rtype: PyObject :return: | *Overload 2:* Convert row-major flattened 2D array to *non-owning* numpy ndarray. :type vec: std::vector< double,std::allocator< double > > :param vec: :type dim1: int :param dim1: :type dim2: int :param dim2: :rtype: PyObject :return: | *Overload 3:* Convert row-major flattened 3D array to *non-owning* numpy ndarray. :type vec: std::vector< double,std::allocator< double > > :param vec: :type dim1: int :param dim1: :type dim2: int :param dim2: :type dim3: int :param dim3: :rtype: PyObject :return: | *Overload 4:* Convert row-major flattened 2D array to *non-owning* numpy ndarray. :type vec: std::vector< double,std::allocator< double > > :param vec: :type dim1: int :param dim1: :type dim2: int :param dim2: :type dim3: int :param dim3: :type dim4: int :param dim4: :rtype: PyObject :return: | *Overload 5:* Convert 1D array to *non-owning* numpy ndarray. :type vec: std::vector< int,std::allocator< int > > :param vec: :type dim1: int :param dim1: :rtype: PyObject :return: | *Overload 6:* Convert row-major flattened 2D array to *non-owning* numpy ndarray. :type vec: std::vector< int,std::allocator< int > > :param vec: :type dim1: int :param dim1: :type dim2: int :param dim2: :rtype: PyObject :return: | *Overload 7:* Convert row-major flattened 3D array to *non-owning* numpy ndarray. :type vec: std::vector< int,std::allocator< int > > :param vec: :type dim1: int :param dim1: :type dim2: int :param dim2: :type dim3: int :param dim3: :rtype: PyObject :return: | *Overload 8:* Convert row-major flattened 2D array to *non-owning* numpy ndarray. :type vec: std::vector< int,std::allocator< int > > :param vec: :type dim1: int :param dim1: :type dim2: int :param dim2: :type dim3: int :param dim3: :type dim4: int :param dim4: :rtype: PyObject :return: """ return _amici.stdVec2ndarray(*args)
[docs]class SolverPtr(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): _amici.SolverPtr_swiginit(self, _amici.new_SolverPtr(*args)) def __deref__(self) -> "std::unique_ptr< amici::Solver >::pointer": return _amici.SolverPtr___deref__(self) def release(self) -> "std::unique_ptr< amici::Solver >::pointer": return _amici.SolverPtr_release(self) def reset(self, *args) -> "void": return _amici.SolverPtr_reset(self, *args) def swap(self, __u: "SolverPtr") -> "void": return _amici.SolverPtr_swap(self, __u) def get(self) -> "std::unique_ptr< amici::Solver >::pointer": return _amici.SolverPtr_get(self) def __nonzero__(self): return _amici.SolverPtr___nonzero__(self) __bool__ = __nonzero__ __swig_destroy__ = _amici.delete_SolverPtr def clone(self) -> "amici::Solver *": r""" Clone this instance :rtype: :py:class:`Solver` :return: The clone """ return _amici.SolverPtr_clone(self) def getSensitivityMethod(self) -> "amici::SensitivityMethod": r""" Return current sensitivity method :rtype: int :return: method enum """ return _amici.SolverPtr_getSensitivityMethod(self) def setSensitivityMethod(self, sensi_meth: "amici::SensitivityMethod") -> "void": r""" Set sensitivity method :type sensi_meth: int :param sensi_meth: """ return _amici.SolverPtr_setSensitivityMethod(self, sensi_meth) def getSensitivityMethodPreequilibration(self) -> "amici::SensitivityMethod": r""" Return current sensitivity method during preequilibration :rtype: int :return: method enum """ return _amici.SolverPtr_getSensitivityMethodPreequilibration(self) def setSensitivityMethodPreequilibration(self, sensi_meth_preeq: "amici::SensitivityMethod") -> "void": r""" Set sensitivity method for preequilibration :type sensi_meth_preeq: int :param sensi_meth_preeq: """ return _amici.SolverPtr_setSensitivityMethodPreequilibration(self, sensi_meth_preeq) def switchForwardSensisOff(self) -> "void": r"""Disable forward sensitivity integration (used in steady state sim)""" return _amici.SolverPtr_switchForwardSensisOff(self) def getNewtonMaxSteps(self) -> "int": r""" Get maximum number of allowed Newton steps for steady state computation :rtype: int :return: """ return _amici.SolverPtr_getNewtonMaxSteps(self) def setNewtonMaxSteps(self, newton_maxsteps: "int") -> "void": r""" Set maximum number of allowed Newton steps for steady state computation :type newton_maxsteps: int :param newton_maxsteps: """ return _amici.SolverPtr_setNewtonMaxSteps(self, newton_maxsteps) def getPreequilibration(self) -> "bool": r""" Get if model preequilibration is enabled :rtype: boolean :return: """ return _amici.SolverPtr_getPreequilibration(self) def setPreequilibration(self, require_preequilibration: "bool") -> "void": r""" Enable/disable model preequilibration :type require_preequilibration: boolean :param require_preequilibration: """ return _amici.SolverPtr_setPreequilibration(self, require_preequilibration) def getNewtonMaxLinearSteps(self) -> "int": r""" Get maximum number of allowed linear steps per Newton step for steady state computation :rtype: int :return: """ return _amici.SolverPtr_getNewtonMaxLinearSteps(self) def setNewtonMaxLinearSteps(self, newton_maxlinsteps: "int") -> "void": r""" Set maximum number of allowed linear steps per Newton step for steady state computation :type newton_maxlinsteps: int :param newton_maxlinsteps: """ return _amici.SolverPtr_setNewtonMaxLinearSteps(self, newton_maxlinsteps) def getNewtonDampingFactorMode(self) -> "amici::NewtonDampingFactorMode": r""" Get a state of the damping factor used in the Newton solver :rtype: int :return: """ return _amici.SolverPtr_getNewtonDampingFactorMode(self) def setNewtonDampingFactorMode(self, dampingFactorMode: "amici::NewtonDampingFactorMode") -> "void": r""" Turn on/off a damping factor in the Newton method :type dampingFactorMode: int :param dampingFactorMode: """ return _amici.SolverPtr_setNewtonDampingFactorMode(self, dampingFactorMode) def getNewtonDampingFactorLowerBound(self) -> "double": r""" Get a lower bound of the damping factor used in the Newton solver :rtype: float :return: """ return _amici.SolverPtr_getNewtonDampingFactorLowerBound(self) def setNewtonDampingFactorLowerBound(self, dampingFactorLowerBound: "double") -> "void": r""" Set a lower bound of the damping factor in the Newton solver :type dampingFactorLowerBound: float :param dampingFactorLowerBound: """ return _amici.SolverPtr_setNewtonDampingFactorLowerBound(self, dampingFactorLowerBound) def getSensitivityOrder(self) -> "amici::SensitivityOrder": r""" Get sensitivity order :rtype: int :return: sensitivity order """ return _amici.SolverPtr_getSensitivityOrder(self) def setSensitivityOrder(self, sensi: "amici::SensitivityOrder") -> "void": r""" Set the sensitivity order :type sensi: int :param sensi: sensitivity order """ return _amici.SolverPtr_setSensitivityOrder(self, sensi) def getRelativeTolerance(self) -> "double": r""" Get the relative tolerances for the forward problem Same tolerance is used for the backward problem if not specified differently via setRelativeToleranceASA. :rtype: float :return: relative tolerances """ return _amici.SolverPtr_getRelativeTolerance(self) def setRelativeTolerance(self, rtol: "double") -> "void": r""" Sets the relative tolerances for the forward problem Same tolerance is used for the backward problem if not specified differently via setRelativeToleranceASA. :type rtol: float :param rtol: relative tolerance (non-negative number) """ return _amici.SolverPtr_setRelativeTolerance(self, rtol) def getAbsoluteTolerance(self) -> "double": r""" Get the absolute tolerances for the forward problem Same tolerance is used for the backward problem if not specified differently via setAbsoluteToleranceASA. :rtype: float :return: absolute tolerances """ return _amici.SolverPtr_getAbsoluteTolerance(self) def setAbsoluteTolerance(self, atol: "double") -> "void": r""" Sets the absolute tolerances for the forward problem Same tolerance is used for the backward problem if not specified differently via setAbsoluteToleranceASA. :type atol: float :param atol: absolute tolerance (non-negative number) """ return _amici.SolverPtr_setAbsoluteTolerance(self, atol) def getRelativeToleranceFSA(self) -> "double": r""" Returns the relative tolerances for the forward sensitivity problem :rtype: float :return: relative tolerances """ return _amici.SolverPtr_getRelativeToleranceFSA(self) def setRelativeToleranceFSA(self, rtol: "double") -> "void": r""" Sets the relative tolerances for the forward sensitivity problem :type rtol: float :param rtol: relative tolerance (non-negative number) """ return _amici.SolverPtr_setRelativeToleranceFSA(self, rtol) def getAbsoluteToleranceFSA(self) -> "double": r""" Returns the absolute tolerances for the forward sensitivity problem :rtype: float :return: absolute tolerances """ return _amici.SolverPtr_getAbsoluteToleranceFSA(self) def setAbsoluteToleranceFSA(self, atol: "double") -> "void": r""" Sets the absolute tolerances for the forward sensitivity problem :type atol: float :param atol: absolute tolerance (non-negative number) """ return _amici.SolverPtr_setAbsoluteToleranceFSA(self, atol) def getRelativeToleranceB(self) -> "double": r""" Returns the relative tolerances for the adjoint sensitivity problem :rtype: float :return: relative tolerances """ return _amici.SolverPtr_getRelativeToleranceB(self) def setRelativeToleranceB(self, rtol: "double") -> "void": r""" Sets the relative tolerances for the adjoint sensitivity problem :type rtol: float :param rtol: relative tolerance (non-negative number) """ return _amici.SolverPtr_setRelativeToleranceB(self, rtol) def getAbsoluteToleranceB(self) -> "double": r""" Returns the absolute tolerances for the backward problem for adjoint sensitivity analysis :rtype: float :return: absolute tolerances """ return _amici.SolverPtr_getAbsoluteToleranceB(self) def setAbsoluteToleranceB(self, atol: "double") -> "void": r""" Sets the absolute tolerances for the backward problem for adjoint sensitivity analysis :type atol: float :param atol: absolute tolerance (non-negative number) """ return _amici.SolverPtr_setAbsoluteToleranceB(self, atol) def getRelativeToleranceQuadratures(self) -> "double": r""" Returns the relative tolerance for the quadrature problem :rtype: float :return: relative tolerance """ return _amici.SolverPtr_getRelativeToleranceQuadratures(self) def setRelativeToleranceQuadratures(self, rtol: "double") -> "void": r""" sets the relative tolerance for the quadrature problem :type rtol: float :param rtol: relative tolerance (non-negative number) """ return _amici.SolverPtr_setRelativeToleranceQuadratures(self, rtol) def getAbsoluteToleranceQuadratures(self) -> "double": r""" returns the absolute tolerance for the quadrature problem :rtype: float :return: absolute tolerance """ return _amici.SolverPtr_getAbsoluteToleranceQuadratures(self) def setAbsoluteToleranceQuadratures(self, atol: "double") -> "void": r""" sets the absolute tolerance for the quadrature problem :type atol: float :param atol: absolute tolerance (non-negative number) """ return _amici.SolverPtr_setAbsoluteToleranceQuadratures(self, atol) def getRelativeToleranceSteadyState(self) -> "double": r""" returns the relative tolerance for the steady state problem :rtype: float :return: relative tolerance """ return _amici.SolverPtr_getRelativeToleranceSteadyState(self) def setRelativeToleranceSteadyState(self, rtol: "double") -> "void": r""" sets the relative tolerance for the steady state problem :type rtol: float :param rtol: relative tolerance (non-negative number) """ return _amici.SolverPtr_setRelativeToleranceSteadyState(self, rtol) def getAbsoluteToleranceSteadyState(self) -> "double": r""" returns the absolute tolerance for the steady state problem :rtype: float :return: absolute tolerance """ return _amici.SolverPtr_getAbsoluteToleranceSteadyState(self) def setAbsoluteToleranceSteadyState(self, atol: "double") -> "void": r""" sets the absolute tolerance for the steady state problem :type atol: float :param atol: absolute tolerance (non-negative number) """ return _amici.SolverPtr_setAbsoluteToleranceSteadyState(self, atol) def getRelativeToleranceSteadyStateSensi(self) -> "double": r""" returns the relative tolerance for the sensitivities of the steady state problem :rtype: float :return: relative tolerance """ return _amici.SolverPtr_getRelativeToleranceSteadyStateSensi(self) def setRelativeToleranceSteadyStateSensi(self, rtol: "double") -> "void": r""" sets the relative tolerance for the sensitivities of the steady state problem :type rtol: float :param rtol: relative tolerance (non-negative number) """ return _amici.SolverPtr_setRelativeToleranceSteadyStateSensi(self, rtol) def getAbsoluteToleranceSteadyStateSensi(self) -> "double": r""" returns the absolute tolerance for the sensitivities of the steady state problem :rtype: float :return: absolute tolerance """ return _amici.SolverPtr_getAbsoluteToleranceSteadyStateSensi(self) def setAbsoluteToleranceSteadyStateSensi(self, atol: "double") -> "void": r""" sets the absolute tolerance for the sensitivities of the steady state problem :type atol: float :param atol: absolute tolerance (non-negative number) """ return _amici.SolverPtr_setAbsoluteToleranceSteadyStateSensi(self, atol) def getMaxSteps(self) -> "long": r""" returns the maximum number of solver steps for the forward problem :rtype: int :return: maximum number of solver steps """ return _amici.SolverPtr_getMaxSteps(self) def setMaxSteps(self, maxsteps: "long") -> "void": r""" sets the maximum number of solver steps for the forward problem :type maxsteps: int :param maxsteps: maximum number of solver steps (positive number) """ return _amici.SolverPtr_setMaxSteps(self, maxsteps) def getMaxStepsBackwardProblem(self) -> "long": r""" returns the maximum number of solver steps for the backward problem :rtype: int :return: maximum number of solver steps """ return _amici.SolverPtr_getMaxStepsBackwardProblem(self) def setMaxStepsBackwardProblem(self, maxsteps: "long") -> "void": r""" sets the maximum number of solver steps for the backward problem :type maxsteps: int :param maxsteps: maximum number of solver steps (non-negative number) Notes: default behaviour (100 times the value for the forward problem) can be restored by passing maxsteps=0 """ return _amici.SolverPtr_setMaxStepsBackwardProblem(self, maxsteps) def getLinearMultistepMethod(self) -> "amici::LinearMultistepMethod": r""" returns the linear system multistep method :rtype: int :return: linear system multistep method """ return _amici.SolverPtr_getLinearMultistepMethod(self) def setLinearMultistepMethod(self, lmm: "amici::LinearMultistepMethod") -> "void": r""" sets the linear system multistep method :type lmm: int :param lmm: linear system multistep method """ return _amici.SolverPtr_setLinearMultistepMethod(self, lmm) def getNonlinearSolverIteration(self) -> "amici::NonlinearSolverIteration": r""" returns the nonlinear system solution method :rtype: int :return: """ return _amici.SolverPtr_getNonlinearSolverIteration(self) def setNonlinearSolverIteration(self, iter: "amici::NonlinearSolverIteration") -> "void": r""" sets the nonlinear system solution method :type iter: int :param iter: nonlinear system solution method """ return _amici.SolverPtr_setNonlinearSolverIteration(self, iter) def getInterpolationType(self) -> "amici::InterpolationType": r""" getInterpolationType :rtype: int :return: """ return _amici.SolverPtr_getInterpolationType(self) def setInterpolationType(self, interpType: "amici::InterpolationType") -> "void": r""" sets the interpolation of the forward solution that is used for the backwards problem :type interpType: int :param interpType: interpolation type """ return _amici.SolverPtr_setInterpolationType(self, interpType) def getStateOrdering(self) -> "int": r""" Gets KLU / SuperLUMT state ordering mode :rtype: int :return: State-ordering as integer according to SUNLinSolKLU::StateOrdering or SUNLinSolSuperLUMT::StateOrdering (which differ). """ return _amici.SolverPtr_getStateOrdering(self) def setStateOrdering(self, ordering: "int") -> "void": r""" Sets KLU / SuperLUMT state ordering mode This only applies when linsol is set to LinearSolver::KLU or LinearSolver::SuperLUMT. Mind the difference between SUNLinSolKLU::StateOrdering and SUNLinSolSuperLUMT::StateOrdering. :type ordering: int :param ordering: state ordering """ return _amici.SolverPtr_setStateOrdering(self, ordering) def getStabilityLimitFlag(self) -> "bool": r""" returns stability limit detection mode :rtype: boolean :return: stldet can be false (deactivated) or true (activated) """ return _amici.SolverPtr_getStabilityLimitFlag(self) def setStabilityLimitFlag(self, stldet: "bool") -> "void": r""" set stability limit detection mode :type stldet: boolean :param stldet: can be false (deactivated) or true (activated) """ return _amici.SolverPtr_setStabilityLimitFlag(self, stldet) def getLinearSolver(self) -> "amici::LinearSolver": r""" getLinearSolver :rtype: int :return: """ return _amici.SolverPtr_getLinearSolver(self) def setLinearSolver(self, linsol: "amici::LinearSolver") -> "void": r""" setLinearSolver :type linsol: int :param linsol: """ return _amici.SolverPtr_setLinearSolver(self, linsol) def getInternalSensitivityMethod(self) -> "amici::InternalSensitivityMethod": r""" returns the internal sensitivity method :rtype: int :return: internal sensitivity method """ return _amici.SolverPtr_getInternalSensitivityMethod(self) def setInternalSensitivityMethod(self, ism: "amici::InternalSensitivityMethod") -> "void": r""" sets the internal sensitivity method :type ism: int :param ism: internal sensitivity method """ return _amici.SolverPtr_setInternalSensitivityMethod(self, ism) def getReturnDataReportingMode(self) -> "amici::RDataReporting": r""" returns the ReturnData reporting mode :rtype: int :return: ReturnData reporting mode """ return _amici.SolverPtr_getReturnDataReportingMode(self) def setReturnDataReportingMode(self, rdrm: "amici::RDataReporting") -> "void": r""" sets the ReturnData reporting mode :type rdrm: int :param rdrm: ReturnData reporting mode """ return _amici.SolverPtr_setReturnDataReportingMode(self, rdrm) def gett(self) -> "amici::realtype": r""" current solver timepoint :rtype: float :return: t """ return _amici.SolverPtr_gett(self) def getCpuTime(self) -> "amici::realtype": r""" Reads out the CPU time needed for forward solve :rtype: float :return: cpu_time """ return _amici.SolverPtr_getCpuTime(self) def getCpuTimeB(self) -> "amici::realtype": r""" Reads out the CPU time needed for backward solve :rtype: float :return: cpu_timeB """ return _amici.SolverPtr_getCpuTimeB(self) def nx(self) -> "int": r""" number of states with which the solver was initialized :rtype: int :return: x.getLength() """ return _amici.SolverPtr_nx(self) def nplist(self) -> "int": r""" number of parameters with which the solver was initialized :rtype: int :return: sx.getLength() """ return _amici.SolverPtr_nplist(self) def nquad(self) -> "int": r""" number of quadratures with which the solver was initialized :rtype: int :return: xQB.getLength() """ return _amici.SolverPtr_nquad(self) def computingFSA(self) -> "bool": r""" check if FSA is being computed :rtype: boolean :return: flag """ return _amici.SolverPtr_computingFSA(self) def computingASA(self) -> "bool": r""" check if ASA is being computed :rtype: boolean :return: flag """ return _amici.SolverPtr_computingASA(self) def getNumSteps(self) -> "std::vector< int,std::allocator< int > > const &": r""" Accessor ns :rtype: std::vector< int,std::allocator< int > > :return: ns """ return _amici.SolverPtr_getNumSteps(self) def getNumStepsB(self) -> "std::vector< int,std::allocator< int > > const &": r""" Accessor nsB :rtype: std::vector< int,std::allocator< int > > :return: nsB """ return _amici.SolverPtr_getNumStepsB(self) def getNumRhsEvals(self) -> "std::vector< int,std::allocator< int > > const &": r""" Accessor nrhs :rtype: std::vector< int,std::allocator< int > > :return: nrhs """ return _amici.SolverPtr_getNumRhsEvals(self) def getNumRhsEvalsB(self) -> "std::vector< int,std::allocator< int > > const &": r""" Accessor nrhsB :rtype: std::vector< int,std::allocator< int > > :return: nrhsB """ return _amici.SolverPtr_getNumRhsEvalsB(self) def getNumErrTestFails(self) -> "std::vector< int,std::allocator< int > > const &": r""" Accessor netf :rtype: std::vector< int,std::allocator< int > > :return: netf """ return _amici.SolverPtr_getNumErrTestFails(self) def getNumErrTestFailsB(self) -> "std::vector< int,std::allocator< int > > const &": r""" Accessor netfB :rtype: std::vector< int,std::allocator< int > > :return: netfB """ return _amici.SolverPtr_getNumErrTestFailsB(self) def getNumNonlinSolvConvFails(self) -> "std::vector< int,std::allocator< int > > const &": r""" Accessor nnlscf :rtype: std::vector< int,std::allocator< int > > :return: nnlscf """ return _amici.SolverPtr_getNumNonlinSolvConvFails(self) def getNumNonlinSolvConvFailsB(self) -> "std::vector< int,std::allocator< int > > const &": r""" Accessor nnlscfB :rtype: std::vector< int,std::allocator< int > > :return: nnlscfB """ return _amici.SolverPtr_getNumNonlinSolvConvFailsB(self) def getLastOrder(self) -> "std::vector< int,std::allocator< int > > const &": r""" Accessor order :rtype: std::vector< int,std::allocator< int > > :return: order """ return _amici.SolverPtr_getLastOrder(self) app = property(_amici.SolverPtr_app_get, _amici.SolverPtr_app_set, doc=r""" AMICI context""")
# Register SolverPtr in _amici: _amici.SolverPtr_swigregister(SolverPtr)
[docs]class ReturnDataPtr(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): _amici.ReturnDataPtr_swiginit(self, _amici.new_ReturnDataPtr(*args)) def __deref__(self) -> "std::unique_ptr< amici::ReturnData >::pointer": return _amici.ReturnDataPtr___deref__(self) def release(self) -> "std::unique_ptr< amici::ReturnData >::pointer": return _amici.ReturnDataPtr_release(self) def reset(self, *args) -> "void": return _amici.ReturnDataPtr_reset(self, *args) def swap(self, __u: "ReturnDataPtr") -> "void": return _amici.ReturnDataPtr_swap(self, __u) def get(self) -> "std::unique_ptr< amici::ReturnData >::pointer": return _amici.ReturnDataPtr_get(self) def __nonzero__(self): return _amici.ReturnDataPtr___nonzero__(self) __bool__ = __nonzero__ __swig_destroy__ = _amici.delete_ReturnDataPtr ts = property(_amici.ReturnDataPtr_ts_get, _amici.ReturnDataPtr_ts_set, doc=r"""timepoints (shape `nt`)""") xdot = property(_amici.ReturnDataPtr_xdot_get, _amici.ReturnDataPtr_xdot_set, doc=r""" time derivative (shape `nx`)""") J = property(_amici.ReturnDataPtr_J_get, _amici.ReturnDataPtr_J_set, doc=r"""Jacobian of differential equation right hand side (shape `nx` x `nx`, row-major)""") w = property(_amici.ReturnDataPtr_w_get, _amici.ReturnDataPtr_w_set, doc=r""" w data from the model (recurring terms in xdot, for imported SBML models from python, this contains the flux vector) (shape `nt` x `nw`, row major) """) z = property(_amici.ReturnDataPtr_z_get, _amici.ReturnDataPtr_z_set, doc=r""" event output (shape `nmaxevent` x `nz`, row-major)""") sigmaz = property(_amici.ReturnDataPtr_sigmaz_get, _amici.ReturnDataPtr_sigmaz_set, doc=r"""event output sigma standard deviation (shape `nmaxevent` x `nz`, row-major)""") sz = property(_amici.ReturnDataPtr_sz_get, _amici.ReturnDataPtr_sz_set, doc=r"""parameter derivative of event output (shape `nmaxevent` x `nz`, row-major)""") ssigmaz = property(_amici.ReturnDataPtr_ssigmaz_get, _amici.ReturnDataPtr_ssigmaz_set, doc=r"""parameter derivative of event output standard deviation (shape `nmaxevent` x `nz`, row-major)""") rz = property(_amici.ReturnDataPtr_rz_get, _amici.ReturnDataPtr_rz_set, doc=r""" event trigger output (shape `nmaxevent` x `nz`, row-major)""") srz = property(_amici.ReturnDataPtr_srz_get, _amici.ReturnDataPtr_srz_set, doc=r"""parameter derivative of event trigger output (shape `nmaxevent` x `nz` x `nplist`, row-major)""") s2rz = property(_amici.ReturnDataPtr_s2rz_get, _amici.ReturnDataPtr_s2rz_set, doc=r""" second-order parameter derivative of event trigger output (shape `nmaxevent` x `nztrue` x `nplist` x `nplist`, row-major) """) x = property(_amici.ReturnDataPtr_x_get, _amici.ReturnDataPtr_x_set, doc=r""" state (shape `nt` x `nx`, row-major)""") sx = property(_amici.ReturnDataPtr_sx_get, _amici.ReturnDataPtr_sx_set, doc=r"""parameter derivative of state (shape `nt` x `nplist` x `nx`, row-major)""") y = property(_amici.ReturnDataPtr_y_get, _amici.ReturnDataPtr_y_set, doc=r""" observable (shape `nt` x `ny`, row-major)""") sigmay = property(_amici.ReturnDataPtr_sigmay_get, _amici.ReturnDataPtr_sigmay_set, doc=r""" observable standard deviation (shape `nt` x `ny`, row-major)""") sy = property(_amici.ReturnDataPtr_sy_get, _amici.ReturnDataPtr_sy_set, doc=r""" parameter derivative of observable (shape `nt` x `nplist` x `ny`, row-major) """) ssigmay = property(_amici.ReturnDataPtr_ssigmay_get, _amici.ReturnDataPtr_ssigmay_set, doc=r"""parameter derivative of observable standard deviation (shape `nt` x `nplist` x `ny`, row-major)""") res = property(_amici.ReturnDataPtr_res_get, _amici.ReturnDataPtr_res_set, doc=r""" observable (shape `nt*ny`, row-major)""") sres = property(_amici.ReturnDataPtr_sres_get, _amici.ReturnDataPtr_sres_set, doc=r"""parameter derivative of residual (shape `nt*ny` x `nplist`, row-major)""") FIM = property(_amici.ReturnDataPtr_FIM_get, _amici.ReturnDataPtr_FIM_set, doc=r""" fisher information matrix (shape `nplist` x `nplist`, row-major)""") numsteps = property(_amici.ReturnDataPtr_numsteps_get, _amici.ReturnDataPtr_numsteps_set, doc=r""" number of integration steps forward problem (shape `nt`)""") numstepsB = property(_amici.ReturnDataPtr_numstepsB_get, _amici.ReturnDataPtr_numstepsB_set, doc=r""" number of integration steps backward problem (shape `nt`)""") numrhsevals = property(_amici.ReturnDataPtr_numrhsevals_get, _amici.ReturnDataPtr_numrhsevals_set, doc=r""" number of right hand side evaluations forward problem (shape `nt`)""") numrhsevalsB = property(_amici.ReturnDataPtr_numrhsevalsB_get, _amici.ReturnDataPtr_numrhsevalsB_set, doc=r""" number of right hand side evaluations backward problem (shape `nt`)""") numerrtestfails = property(_amici.ReturnDataPtr_numerrtestfails_get, _amici.ReturnDataPtr_numerrtestfails_set, doc=r""" number of error test failures forward problem (shape `nt`)""") numerrtestfailsB = property(_amici.ReturnDataPtr_numerrtestfailsB_get, _amici.ReturnDataPtr_numerrtestfailsB_set, doc=r""" number of error test failures backward problem (shape `nt`)""") numnonlinsolvconvfails = property(_amici.ReturnDataPtr_numnonlinsolvconvfails_get, _amici.ReturnDataPtr_numnonlinsolvconvfails_set, doc=r"""number of linear solver convergence failures forward problem (shape `nt`)""") numnonlinsolvconvfailsB = property(_amici.ReturnDataPtr_numnonlinsolvconvfailsB_get, _amici.ReturnDataPtr_numnonlinsolvconvfailsB_set, doc=r"""number of linear solver convergence failures backward problem (shape `nt`)""") order = property(_amici.ReturnDataPtr_order_get, _amici.ReturnDataPtr_order_set, doc=r""" employed order forward problem (shape `nt`)""") cpu_time = property(_amici.ReturnDataPtr_cpu_time_get, _amici.ReturnDataPtr_cpu_time_set, doc=r""" computation time of forward solve [ms]""") cpu_timeB = property(_amici.ReturnDataPtr_cpu_timeB_get, _amici.ReturnDataPtr_cpu_timeB_set, doc=r""" computation time of backward solve [ms]""") preeq_status = property(_amici.ReturnDataPtr_preeq_status_get, _amici.ReturnDataPtr_preeq_status_set, doc=r""" flags indicating success of steady state solver (preequilibration)""") preeq_cpu_time = property(_amici.ReturnDataPtr_preeq_cpu_time_get, _amici.ReturnDataPtr_preeq_cpu_time_set, doc=r""" computation time of the steady state solver [ms] (preequilibration)""") preeq_cpu_timeB = property(_amici.ReturnDataPtr_preeq_cpu_timeB_get, _amici.ReturnDataPtr_preeq_cpu_timeB_set, doc=r""" computation time of the steady state solver of the backward problem [ms] (preequilibration) """) posteq_status = property(_amici.ReturnDataPtr_posteq_status_get, _amici.ReturnDataPtr_posteq_status_set, doc=r""" flags indicating success of steady state solver (postequilibration)""") posteq_cpu_time = property(_amici.ReturnDataPtr_posteq_cpu_time_get, _amici.ReturnDataPtr_posteq_cpu_time_set, doc=r""" computation time of the steady state solver [ms] (postequilibration)""") posteq_cpu_timeB = property(_amici.ReturnDataPtr_posteq_cpu_timeB_get, _amici.ReturnDataPtr_posteq_cpu_timeB_set, doc=r""" computation time of the steady state solver of the backward problem [ms] (postequilibration) """) preeq_numsteps = property(_amici.ReturnDataPtr_preeq_numsteps_get, _amici.ReturnDataPtr_preeq_numsteps_set, doc=r""" number of Newton steps for steady state problem (preequilibration) [newton, simulation, newton] (length = 3) """) preeq_numlinsteps = property(_amici.ReturnDataPtr_preeq_numlinsteps_get, _amici.ReturnDataPtr_preeq_numlinsteps_set, doc=r""" number of linear steps by Newton step for steady state problem. this will only be filled for iterative solvers (preequilibration) (shape `newton_maxsteps * 2`) """) preeq_numstepsB = property(_amici.ReturnDataPtr_preeq_numstepsB_get, _amici.ReturnDataPtr_preeq_numstepsB_set, doc=r""" number of simulation steps for adjoint steady state problem (preequilibration) [== 0 if analytical solution worked, > 0 otherwise] """) posteq_numsteps = property(_amici.ReturnDataPtr_posteq_numsteps_get, _amici.ReturnDataPtr_posteq_numsteps_set, doc=r""" number of Newton steps for steady state problem (preequilibration) [newton, simulation, newton] (shape `3`) (postequilibration) """) posteq_numlinsteps = property(_amici.ReturnDataPtr_posteq_numlinsteps_get, _amici.ReturnDataPtr_posteq_numlinsteps_set, doc=r""" number of linear steps by Newton step for steady state problem. this will only be filled for iterative solvers (postequilibration) (shape `newton_maxsteps * 2`) """) posteq_numstepsB = property(_amici.ReturnDataPtr_posteq_numstepsB_get, _amici.ReturnDataPtr_posteq_numstepsB_set, doc=r""" number of simulation steps for adjoint steady state problem (postequilibration) [== 0 if analytical solution worked, > 0 otherwise] """) preeq_t = property(_amici.ReturnDataPtr_preeq_t_get, _amici.ReturnDataPtr_preeq_t_set, doc=r"""time when steadystate was reached via simulation (preequilibration)""") preeq_wrms = property(_amici.ReturnDataPtr_preeq_wrms_get, _amici.ReturnDataPtr_preeq_wrms_set, doc=r""" weighted root-mean-square of the rhs when steadystate was reached (preequilibration) """) posteq_t = property(_amici.ReturnDataPtr_posteq_t_get, _amici.ReturnDataPtr_posteq_t_set, doc=r"""time when steadystate was reached via simulation (postequilibration)""") posteq_wrms = property(_amici.ReturnDataPtr_posteq_wrms_get, _amici.ReturnDataPtr_posteq_wrms_set, doc=r""" weighted root-mean-square of the rhs when steadystate was reached (postequilibration) """) x0 = property(_amici.ReturnDataPtr_x0_get, _amici.ReturnDataPtr_x0_set, doc=r""" initial state (shape `nx`)""") x_ss = property(_amici.ReturnDataPtr_x_ss_get, _amici.ReturnDataPtr_x_ss_set, doc=r""" preequilibration steady state found by Newton solver (shape `nx`)""") sx0 = property(_amici.ReturnDataPtr_sx0_get, _amici.ReturnDataPtr_sx0_set, doc=r""" initial sensitivities (shape `nplist` x `nx`, row-major)""") sx_ss = property(_amici.ReturnDataPtr_sx_ss_get, _amici.ReturnDataPtr_sx_ss_set, doc=r""" preequilibration sensitivities found by Newton solver (shape `nplist` x `nx`, row-major) """) llh = property(_amici.ReturnDataPtr_llh_get, _amici.ReturnDataPtr_llh_set, doc=r""" log-likelihood value""") chi2 = property(_amici.ReturnDataPtr_chi2_get, _amici.ReturnDataPtr_chi2_set, doc=r""" :math:`\chi^2` value""") sllh = property(_amici.ReturnDataPtr_sllh_get, _amici.ReturnDataPtr_sllh_set, doc=r""" parameter derivative of log-likelihood (shape `nplist`)""") s2llh = property(_amici.ReturnDataPtr_s2llh_get, _amici.ReturnDataPtr_s2llh_set, doc=r""" second-order parameter derivative of log-likelihood (shape `nJ-1` x `nplist`, row-major) """) status = property(_amici.ReturnDataPtr_status_get, _amici.ReturnDataPtr_status_set, doc=r""" status code""") nx = property(_amici.ReturnDataPtr_nx_get, _amici.ReturnDataPtr_nx_set, doc=r""" number of states (alias `nx_rdata`, kept for backward compatibility)""") nxtrue = property(_amici.ReturnDataPtr_nxtrue_get, _amici.ReturnDataPtr_nxtrue_set, doc=r""" number of states in the unaugmented system (alias nxtrue_rdata, kept for backward compatibility) """) nplist = property(_amici.ReturnDataPtr_nplist_get, _amici.ReturnDataPtr_nplist_set, doc=r""" number of parameter for which sensitivities were requested""") nmaxevent = property(_amici.ReturnDataPtr_nmaxevent_get, _amici.ReturnDataPtr_nmaxevent_set, doc=r""" maximal number of occurring events (for every event type)""") nt = property(_amici.ReturnDataPtr_nt_get, _amici.ReturnDataPtr_nt_set, doc=r""" number of considered timepoints""") newton_maxsteps = property(_amici.ReturnDataPtr_newton_maxsteps_get, _amici.ReturnDataPtr_newton_maxsteps_set, doc=r""" maximal number of newton iterations for steady state calculation""") pscale = property(_amici.ReturnDataPtr_pscale_get, _amici.ReturnDataPtr_pscale_set, doc=r""" scaling of parameterization""") o2mode = property(_amici.ReturnDataPtr_o2mode_get, _amici.ReturnDataPtr_o2mode_set, doc=r""" flag indicating whether second-order sensitivities were requested""") sensi = property(_amici.ReturnDataPtr_sensi_get, _amici.ReturnDataPtr_sensi_set, doc=r""" sensitivity order""") sensi_meth = property(_amici.ReturnDataPtr_sensi_meth_get, _amici.ReturnDataPtr_sensi_meth_set, doc=r""" sensitivity method""") rdata_reporting = property(_amici.ReturnDataPtr_rdata_reporting_get, _amici.ReturnDataPtr_rdata_reporting_set, doc=r""" reporting mode""") sigma_res = property(_amici.ReturnDataPtr_sigma_res_get, _amici.ReturnDataPtr_sigma_res_set, doc=r""" boolean indicating whether residuals for standard deviations have been added""") nx_rdata = property(_amici.ReturnDataPtr_nx_rdata_get, _amici.ReturnDataPtr_nx_rdata_set, doc=r""" Number of states""") nxtrue_rdata = property(_amici.ReturnDataPtr_nxtrue_rdata_get, _amici.ReturnDataPtr_nxtrue_rdata_set, doc=r""" Number of states in the unaugmented system""") nx_solver = property(_amici.ReturnDataPtr_nx_solver_get, _amici.ReturnDataPtr_nx_solver_set, doc=r""" Number of states with conservation laws applied""") nxtrue_solver = property(_amici.ReturnDataPtr_nxtrue_solver_get, _amici.ReturnDataPtr_nxtrue_solver_set, doc=r""" Number of states in the unaugmented system with conservation laws applied """) nx_solver_reinit = property(_amici.ReturnDataPtr_nx_solver_reinit_get, _amici.ReturnDataPtr_nx_solver_reinit_set, doc=r""" Number of solver states subject to reinitialization""") np = property(_amici.ReturnDataPtr_np_get, _amici.ReturnDataPtr_np_set, doc=r""" Number of parameters""") nk = property(_amici.ReturnDataPtr_nk_get, _amici.ReturnDataPtr_nk_set, doc=r""" Number of constants""") ny = property(_amici.ReturnDataPtr_ny_get, _amici.ReturnDataPtr_ny_set, doc=r""" Number of observables""") nytrue = property(_amici.ReturnDataPtr_nytrue_get, _amici.ReturnDataPtr_nytrue_set, doc=r""" Number of observables in the unaugmented system""") nz = property(_amici.ReturnDataPtr_nz_get, _amici.ReturnDataPtr_nz_set, doc=r""" Number of event outputs""") nztrue = property(_amici.ReturnDataPtr_nztrue_get, _amici.ReturnDataPtr_nztrue_set, doc=r""" Number of event outputs in the unaugmented system""") ne = property(_amici.ReturnDataPtr_ne_get, _amici.ReturnDataPtr_ne_set, doc=r""" Number of events""") nw = property(_amici.ReturnDataPtr_nw_get, _amici.ReturnDataPtr_nw_set, doc=r""" Number of common expressions""") ndwdx = property(_amici.ReturnDataPtr_ndwdx_get, _amici.ReturnDataPtr_ndwdx_set, doc=r""" Number of nonzero elements in the `x` derivative of the repeating elements """) ndwdp = property(_amici.ReturnDataPtr_ndwdp_get, _amici.ReturnDataPtr_ndwdp_set, doc=r""" Number of nonzero elements in the `p` derivative of the repeating elements """) ndwdw = property(_amici.ReturnDataPtr_ndwdw_get, _amici.ReturnDataPtr_ndwdw_set, doc=r""" Number of nonzero elements in the `w` derivative of the repeating elements """) ndxdotdw = property(_amici.ReturnDataPtr_ndxdotdw_get, _amici.ReturnDataPtr_ndxdotdw_set, doc=r""" Number of nonzero elements in the :math:`derivative of \f$xdot`""") ndJydy = property(_amici.ReturnDataPtr_ndJydy_get, _amici.ReturnDataPtr_ndJydy_set, doc=r"""Number of nonzero elements in the :math:`derivative of\f$dJy` (dimension `nytrue`)""") nnz = property(_amici.ReturnDataPtr_nnz_get, _amici.ReturnDataPtr_nnz_set, doc=r""" Number of nonzero entries in Jacobian""") nJ = property(_amici.ReturnDataPtr_nJ_get, _amici.ReturnDataPtr_nJ_set, doc=r""" Dimension of the augmented objective function for 2nd order ASA""") ubw = property(_amici.ReturnDataPtr_ubw_get, _amici.ReturnDataPtr_ubw_set, doc=r""" Upper bandwidth of the Jacobian""") lbw = property(_amici.ReturnDataPtr_lbw_get, _amici.ReturnDataPtr_lbw_set, doc=r""" Lower bandwidth of the Jacobian""")
# Register ReturnDataPtr in _amici: _amici.ReturnDataPtr_swigregister(ReturnDataPtr)
[docs]class ModelPtr(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): _amici.ModelPtr_swiginit(self, _amici.new_ModelPtr(*args)) def __deref__(self) -> "std::unique_ptr< amici::Model >::pointer": return _amici.ModelPtr___deref__(self) def release(self) -> "std::unique_ptr< amici::Model >::pointer": return _amici.ModelPtr_release(self) def reset(self, *args) -> "void": return _amici.ModelPtr_reset(self, *args) def swap(self, __u: "ModelPtr") -> "void": return _amici.ModelPtr_swap(self, __u) def get(self) -> "std::unique_ptr< amici::Model >::pointer": return _amici.ModelPtr_get(self) def __nonzero__(self): return _amici.ModelPtr___nonzero__(self) __bool__ = __nonzero__ __swig_destroy__ = _amici.delete_ModelPtr def clone(self) -> "amici::Model *": r""" Clone this instance. :rtype: :py:class:`Model` :return: The clone """ return _amici.ModelPtr_clone(self) def nplist(self) -> "int": r""" Get number of parameters wrt to which sensitivities are computed. :rtype: int :return: Length of sensitivity index vector """ return _amici.ModelPtr_nplist(self) def np(self) -> "int": r""" Get total number of model parameters. :rtype: int :return: Length of parameter vector """ return _amici.ModelPtr_np(self) def nk(self) -> "int": r""" Get number of constants :rtype: int :return: Length of constant vector """ return _amici.ModelPtr_nk(self) def ncl(self) -> "int": r""" Get number of conservation laws. :rtype: int :return: Number of conservation laws (i.e., difference between `nx_rdata` and `nx_solver`). """ return _amici.ModelPtr_ncl(self) def nx_reinit(self) -> "int": r""" Get number of solver states subject to reinitialization. :rtype: int :return: Model member `nx_solver_reinit` """ return _amici.ModelPtr_nx_reinit(self) def k(self) -> "double const *": r""" Get fixed parameters. :rtype: float :return: Pointer to constants array """ return _amici.ModelPtr_k(self) def nMaxEvent(self) -> "int": r""" Get maximum number of events that may occur for each type. :rtype: int :return: Maximum number of events that may occur for each type """ return _amici.ModelPtr_nMaxEvent(self) def setNMaxEvent(self, nmaxevent: "int") -> "void": r""" Set maximum number of events that may occur for each type. :type nmaxevent: int :param nmaxevent: Maximum number of events that may occur for each type """ return _amici.ModelPtr_setNMaxEvent(self, nmaxevent) def nt(self) -> "int": r""" Get number of timepoints. :rtype: int :return: Number of timepoints """ return _amici.ModelPtr_nt(self) def getParameterScale(self) -> "std::vector< amici::ParameterScaling,std::allocator< amici::ParameterScaling > > const &": r""" Get parameter scale for each parameter. :rtype: std::vector< amici::ParameterScaling,std::allocator< amici::ParameterScaling > > :return: Vector of parameter scales """ return _amici.ModelPtr_getParameterScale(self) def setParameterScale(self, *args) -> "void": r""" *Overload 1:* Set parameter scale for each parameter. NOTE: Resets initial state sensitivities. :type pscale: int :param pscale: Scalar parameter scale to be set for all parameters | *Overload 2:* Set parameter scale for each parameter. NOTE: Resets initial state sensitivities. :type pscaleVec: std::vector< amici::ParameterScaling,std::allocator< amici::ParameterScaling > > :param pscaleVec: Vector of parameter scales """ return _amici.ModelPtr_setParameterScale(self, *args) def getUnscaledParameters(self) -> "std::vector< amici::realtype,std::allocator< amici::realtype > > const &": r""" Get parameters with transformation according to parameter scale applied. :rtype: std::vector< amici::realtype,std::allocator< amici::realtype > > :return: Unscaled parameters """ return _amici.ModelPtr_getUnscaledParameters(self) def getParameters(self) -> "std::vector< amici::realtype,std::allocator< amici::realtype > > const &": r""" Get parameter vector. :rtype: std::vector< amici::realtype,std::allocator< amici::realtype > > :return: The user-set parameters (see also `Model::getUnscaledParameters`) """ return _amici.ModelPtr_getParameters(self) def getParameterById(self, par_id: "std::string const &") -> "amici::realtype": r""" Get value of first model parameter with the specified ID. :type par_id: string :param par_id: Parameter ID :rtype: float :return: Parameter value """ return _amici.ModelPtr_getParameterById(self, par_id) def getParameterByName(self, par_name: "std::string const &") -> "amici::realtype": r""" Get value of first model parameter with the specified name. :type par_name: string :param par_name: Parameter name :rtype: float :return: Parameter value """ return _amici.ModelPtr_getParameterByName(self, par_name) def setParameters(self, p: "DoubleVector") -> "void": r""" Set the parameter vector. :type p: std::vector< amici::realtype,std::allocator< amici::realtype > > :param p: Vector of parameters """ return _amici.ModelPtr_setParameters(self, p) def setParameterById(self, *args) -> "void": r""" *Overload 1:* Set model parameters according to the parameter IDs and mapped values. :type p: std::map< std::string,amici::realtype,std::less< std::string >,std::allocator< std::pair< std::string const,amici::realtype > > > :param p: Map of parameters IDs and values :type ignoreErrors: boolean, optional :param ignoreErrors: Ignore errors such as parameter IDs in p which are not model parameters | *Overload 2:* Set value of first model parameter with the specified ID. :type par_id: string :param par_id: Parameter ID :type value: float :param value: Parameter value """ return _amici.ModelPtr_setParameterById(self, *args) def setParametersByIdRegex(self, par_id_regex: "std::string const &", value: "amici::realtype") -> "int": r""" Set all values of model parameters with IDs matching the specified regular expression. :type par_id_regex: string :param par_id_regex: Parameter ID regex :type value: float :param value: Parameter value :rtype: int :return: Number of parameter IDs that matched the regex """ return _amici.ModelPtr_setParametersByIdRegex(self, par_id_regex, value) def setParameterByName(self, *args) -> "void": r""" *Overload 1:* Set value of first model parameter with the specified name. :type par_name: string :param par_name: Parameter name :type value: float :param value: Parameter value | *Overload 2:* Set model parameters according to the parameter name and mapped values. :type p: std::map< std::string,amici::realtype,std::less< std::string >,std::allocator< std::pair< std::string const,amici::realtype > > > :param p: Map of parameters names and values :type ignoreErrors: boolean, optional :param ignoreErrors: Ignore errors such as parameter names in p which are not model parameters | *Overload 3:* Set model parameters according to the parameter name and mapped values. :type p: std::map< std::string,amici::realtype,std::less< std::string >,std::allocator< std::pair< std::string const,amici::realtype > > > :param p: Map of parameters names and values :param ignoreErrors: Ignore errors such as parameter names in p which are not model parameters """ return _amici.ModelPtr_setParameterByName(self, *args) def setParametersByNameRegex(self, par_name_regex: "std::string const &", value: "amici::realtype") -> "int": r""" Set all values of all model parameters with names matching the specified regex. :type par_name_regex: string :param par_name_regex: Parameter name regex :type value: float :param value: Parameter value :rtype: int :return: Number of fixed parameter names that matched the regex """ return _amici.ModelPtr_setParametersByNameRegex(self, par_name_regex, value) def getFixedParameters(self) -> "std::vector< amici::realtype,std::allocator< amici::realtype > > const &": r""" Get values of fixed parameters. :rtype: std::vector< amici::realtype,std::allocator< amici::realtype > > :return: Vector of fixed parameters with same ordering as in Model::getFixedParameterIds """ return _amici.ModelPtr_getFixedParameters(self) def getFixedParameterById(self, par_id: "std::string const &") -> "amici::realtype": r""" Get value of fixed parameter with the specified ID. :type par_id: string :param par_id: Parameter ID :rtype: float :return: Parameter value """ return _amici.ModelPtr_getFixedParameterById(self, par_id) def getFixedParameterByName(self, par_name: "std::string const &") -> "amici::realtype": r""" Get value of fixed parameter with the specified name. If multiple parameters have the same name, the first parameter with matching name is returned. :type par_name: string :param par_name: Parameter name :rtype: float :return: Parameter value """ return _amici.ModelPtr_getFixedParameterByName(self, par_name) def setFixedParameters(self, k: "DoubleVector") -> "void": r""" Set values for constants. :type k: std::vector< amici::realtype,std::allocator< amici::realtype > > :param k: Vector of fixed parameters """ return _amici.ModelPtr_setFixedParameters(self, k) def setFixedParameterById(self, par_id: "std::string const &", value: "amici::realtype") -> "void": r""" Set value of first fixed parameter with the specified ID. :type par_id: string :param par_id: Fixed parameter id :type value: float :param value: Fixed parameter value """ return _amici.ModelPtr_setFixedParameterById(self, par_id, value) def setFixedParametersByIdRegex(self, par_id_regex: "std::string const &", value: "amici::realtype") -> "int": r""" Set values of all fixed parameters with the ID matching the specified regex. :type par_id_regex: string :param par_id_regex: Fixed parameter name regex :type value: float :param value: Fixed parameter value :rtype: int :return: Number of fixed parameter IDs that matched the regex """ return _amici.ModelPtr_setFixedParametersByIdRegex(self, par_id_regex, value) def setFixedParameterByName(self, par_name: "std::string const &", value: "amici::realtype") -> "void": r""" Set value of first fixed parameter with the specified name. :type par_name: string :param par_name: Fixed parameter ID :type value: float :param value: Fixed parameter value """ return _amici.ModelPtr_setFixedParameterByName(self, par_name, value) def setFixedParametersByNameRegex(self, par_name_regex: "std::string const &", value: "amici::realtype") -> "int": r""" Set value of all fixed parameters with name matching the specified regex. :type par_name_regex: string :param par_name_regex: Fixed parameter name regex :type value: float :param value: Fixed parameter value :rtype: int :return: Number of fixed parameter names that matched the regex """ return _amici.ModelPtr_setFixedParametersByNameRegex(self, par_name_regex, value) def getName(self) -> "std::string": r""" Get the model name. :rtype: string :return: Model name """ return _amici.ModelPtr_getName(self) def hasParameterNames(self) -> "bool": r""" Report whether the model has parameter names set. :rtype: boolean :return: Boolean indicating whether parameter names were set. Also returns `true` if the number of corresponding variables is just zero. """ return _amici.ModelPtr_hasParameterNames(self) def getParameterNames(self) -> "std::vector< std::string,std::allocator< std::string > >": r""" Get names of the model parameters. :rtype: std::vector< std::string,std::allocator< std::string > > :return: The parameter names """ return _amici.ModelPtr_getParameterNames(self) def hasStateNames(self) -> "bool": r""" Report whether the model has state names set. :rtype: boolean :return: Boolean indicating whether state names were set. Also returns `true` if the number of corresponding variables is just zero. """ return _amici.ModelPtr_hasStateNames(self) def getStateNames(self) -> "std::vector< std::string,std::allocator< std::string > >": r""" Get names of the model states. :rtype: std::vector< std::string,std::allocator< std::string > > :return: State names """ return _amici.ModelPtr_getStateNames(self) def hasFixedParameterNames(self) -> "bool": r""" Report whether the model has fixed parameter names set. :rtype: boolean :return: Boolean indicating whether fixed parameter names were set. Also returns `true` if the number of corresponding variables is just zero. """ return _amici.ModelPtr_hasFixedParameterNames(self) def getFixedParameterNames(self) -> "std::vector< std::string,std::allocator< std::string > >": r""" Get names of the fixed model parameters. :rtype: std::vector< std::string,std::allocator< std::string > > :return: Fixed parameter names """ return _amici.ModelPtr_getFixedParameterNames(self) def hasObservableNames(self) -> "bool": r""" Report whether the model has observable names set. :rtype: boolean :return: Boolean indicating whether observable names were set. Also returns `true` if the number of corresponding variables is just zero. """ return _amici.ModelPtr_hasObservableNames(self) def getObservableNames(self) -> "std::vector< std::string,std::allocator< std::string > >": r""" Get names of the observables. :rtype: std::vector< std::string,std::allocator< std::string > > :return: Observable names """ return _amici.ModelPtr_getObservableNames(self) def hasExpressionNames(self) -> "bool": r""" Report whether the model has expression names set. :rtype: boolean :return: Boolean indicating whether expression names were set. Also returns `true` if the number of corresponding variables is just zero. """ return _amici.ModelPtr_hasExpressionNames(self) def getExpressionNames(self) -> "std::vector< std::string,std::allocator< std::string > >": r""" Get names of the expressions. :rtype: std::vector< std::string,std::allocator< std::string > > :return: Expression names """ return _amici.ModelPtr_getExpressionNames(self) def hasParameterIds(self) -> "bool": r""" Report whether the model has parameter IDs set. :rtype: boolean :return: Boolean indicating whether parameter IDs were set. Also returns `true` if the number of corresponding variables is just zero. """ return _amici.ModelPtr_hasParameterIds(self) def getParameterIds(self) -> "std::vector< std::string,std::allocator< std::string > >": r""" Get IDs of the model parameters. :rtype: std::vector< std::string,std::allocator< std::string > > :return: Parameter IDs """ return _amici.ModelPtr_getParameterIds(self) def hasStateIds(self) -> "bool": r""" Report whether the model has state IDs set. :rtype: boolean :return: Boolean indicating whether state IDs were set. Also returns `true` if the number of corresponding variables is just zero. """ return _amici.ModelPtr_hasStateIds(self) def getStateIds(self) -> "std::vector< std::string,std::allocator< std::string > >": r""" Get IDs of the model states. :rtype: std::vector< std::string,std::allocator< std::string > > :return: Sate IDs """ return _amici.ModelPtr_getStateIds(self) def hasFixedParameterIds(self) -> "bool": r""" Report whether the model has fixed parameter IDs set. :rtype: boolean :return: Boolean indicating whether fixed parameter IDs were set. Also returns `true` if the number of corresponding variables is just zero. """ return _amici.ModelPtr_hasFixedParameterIds(self) def getFixedParameterIds(self) -> "std::vector< std::string,std::allocator< std::string > >": r""" Get IDs of the fixed model parameters. :rtype: std::vector< std::string,std::allocator< std::string > > :return: Fixed parameter IDs """ return _amici.ModelPtr_getFixedParameterIds(self) def hasObservableIds(self) -> "bool": r""" Report whether the model has observable IDs set. :rtype: boolean :return: Boolean indicating whether observable ids were set. Also returns `true` if the number of corresponding variables is just zero. """ return _amici.ModelPtr_hasObservableIds(self) def getObservableIds(self) -> "std::vector< std::string,std::allocator< std::string > >": r""" Get IDs of the observables. :rtype: std::vector< std::string,std::allocator< std::string > > :return: Observable IDs """ return _amici.ModelPtr_getObservableIds(self) def hasExpressionIds(self) -> "bool": r""" Report whether the model has expression IDs set. :rtype: boolean :return: Boolean indicating whether expression ids were set. Also returns `true` if the number of corresponding variables is just zero. """ return _amici.ModelPtr_hasExpressionIds(self) def getExpressionIds(self) -> "std::vector< std::string,std::allocator< std::string > >": r""" Get IDs of the expression. :rtype: std::vector< std::string,std::allocator< std::string > > :return: Expression IDs """ return _amici.ModelPtr_getExpressionIds(self) def hasQuadraticLLH(self) -> "bool": r""" Checks whether the defined noise model is gaussian, i.e., the nllh is quadratic :rtype: boolean :return: boolean flag """ return _amici.ModelPtr_hasQuadraticLLH(self) def getTimepoints(self) -> "std::vector< amici::realtype,std::allocator< amici::realtype > > const &": r""" Get the timepoint vector. :rtype: std::vector< amici::realtype,std::allocator< amici::realtype > > :return: Timepoint vector """ return _amici.ModelPtr_getTimepoints(self) def getTimepoint(self, it: "int") -> "amici::realtype": r""" Get simulation timepoint for time index `it`. :type it: int :param it: Time index :rtype: float :return: Timepoint """ return _amici.ModelPtr_getTimepoint(self, it) def setTimepoints(self, ts: "DoubleVector") -> "void": r""" Set the timepoint vector. :type ts: std::vector< amici::realtype,std::allocator< amici::realtype > > :param ts: New timepoint vector """ return _amici.ModelPtr_setTimepoints(self, ts) def t0(self) -> "double": r""" Get simulation start time. :rtype: float :return: Simulation start time """ return _amici.ModelPtr_t0(self) def setT0(self, t0: "double") -> "void": r""" Set simulation start time. :type t0: float :param t0: Simulation start time """ return _amici.ModelPtr_setT0(self, t0) def getStateIsNonNegative(self) -> "std::vector< bool,std::allocator< bool > > const &": r""" Get flags indicating whether states should be treated as non-negative. :rtype: std::vector< bool,std::allocator< bool > > :return: Vector of flags """ return _amici.ModelPtr_getStateIsNonNegative(self) def setStateIsNonNegative(self, stateIsNonNegative: "BoolVector") -> "void": r""" Set flags indicating whether states should be treated as non-negative. :type stateIsNonNegative: std::vector< bool,std::allocator< bool > > :param stateIsNonNegative: Vector of flags """ return _amici.ModelPtr_setStateIsNonNegative(self, stateIsNonNegative) def setAllStatesNonNegative(self) -> "void": r""" Set flags indicating that all states should be treated as non-negative. """ return _amici.ModelPtr_setAllStatesNonNegative(self) def setMinimumSigmaResiduals(self, min_sigma: "double") -> "void": r""" Sets the estimated lower boundary for sigma_y. When :meth:`setAddSigmaResiduals` is activated, this lower boundary must ensure that log(sigma) + min_sigma > 0. :type min_sigma: float :param min_sigma: lower boundary """ return _amici.ModelPtr_setMinimumSigmaResiduals(self, min_sigma) def getMinimumSigmaResiduals(self) -> "amici::realtype": r""" Gets the specified estimated lower boundary for sigma_y. :rtype: float :return: lower boundary """ return _amici.ModelPtr_getMinimumSigmaResiduals(self) def setAddSigmaResiduals(self, sigma_res: "bool") -> "void": r""" Specifies whether residuals should be added to account for parameter dependent sigma. If set to true, additional residuals of the form :math:`\sqrt{\log(\sigma) + C}` will be added. This enables least-squares optimization for variables with Gaussian noise assumption and parameter dependent standard deviation sigma. The constant :math:`C` can be set via :meth:`setMinimumSigmaResiduals`. :type sigma_res: boolean :param sigma_res: if true, additional residuals are added """ return _amici.ModelPtr_setAddSigmaResiduals(self, sigma_res) def getAddSigmaResiduals(self) -> "bool": r""" Checks whether residuals should be added to account for parameter dependent sigma. :rtype: boolean :return: sigma_res """ return _amici.ModelPtr_getAddSigmaResiduals(self) def getParameterList(self) -> "std::vector< int,std::allocator< int > > const &": r""" Get the list of parameters for which sensitivities are computed. :rtype: std::vector< int,std::allocator< int > > :return: List of parameter indices """ return _amici.ModelPtr_getParameterList(self) def plist(self, pos: "int") -> "int": r""" Get entry in parameter list by index. :type pos: int :param pos: Index in sensitivity parameter list :rtype: int :return: Index in parameter list """ return _amici.ModelPtr_plist(self, pos) def setParameterList(self, plist: "IntVector") -> "void": r""" Set the list of parameters for which sensitivities are to be computed. NOTE: Resets initial state sensitivities. :type plist: std::vector< int,std::allocator< int > > :param plist: List of parameter indices """ return _amici.ModelPtr_setParameterList(self, plist) def getInitialStates(self) -> "std::vector< amici::realtype,std::allocator< amici::realtype > >": r""" Get the initial states. :rtype: std::vector< amici::realtype,std::allocator< amici::realtype > > :return: Initial state vector """ return _amici.ModelPtr_getInitialStates(self) def setInitialStates(self, x0: "DoubleVector") -> "void": r""" Set the initial states. :type x0: std::vector< amici::realtype,std::allocator< amici::realtype > > :param x0: Initial state vector """ return _amici.ModelPtr_setInitialStates(self, x0) def hasCustomInitialStates(self) -> "bool": r""" Return whether custom initial states have been set. :rtype: boolean :return: `true` if has custom initial states, otherwise `false` """ return _amici.ModelPtr_hasCustomInitialStates(self) def getInitialStateSensitivities(self) -> "std::vector< amici::realtype,std::allocator< amici::realtype > >": r""" Get the initial states sensitivities. :rtype: std::vector< amici::realtype,std::allocator< amici::realtype > > :return: vector of initial state sensitivities """ return _amici.ModelPtr_getInitialStateSensitivities(self) def setInitialStateSensitivities(self, sx0: "DoubleVector") -> "void": r""" Set the initial state sensitivities. :type sx0: std::vector< amici::realtype,std::allocator< amici::realtype > > :param sx0: vector of initial state sensitivities with chainrule applied. This could be a slice of ReturnData::sx or ReturnData::sx0 """ return _amici.ModelPtr_setInitialStateSensitivities(self, sx0) def hasCustomInitialStateSensitivities(self) -> "bool": r""" Return whether custom initial state sensitivities have been set. :rtype: boolean :return: `true` if has custom initial state sensitivities, otherwise `false`. """ return _amici.ModelPtr_hasCustomInitialStateSensitivities(self) def setUnscaledInitialStateSensitivities(self, sx0: "DoubleVector") -> "void": r""" Set the initial state sensitivities. :type sx0: std::vector< amici::realtype,std::allocator< amici::realtype > > :param sx0: Vector of initial state sensitivities without chainrule applied. This could be the readin from a `model.sx0data` saved to HDF5. """ return _amici.ModelPtr_setUnscaledInitialStateSensitivities(self, sx0) def setSteadyStateSensitivityMode(self, mode: "amici::SteadyStateSensitivityMode") -> "void": r""" Set the mode how sensitivities are computed in the steadystate simulation. :type mode: int :param mode: Steadystate sensitivity mode """ return _amici.ModelPtr_setSteadyStateSensitivityMode(self, mode) def getSteadyStateSensitivityMode(self) -> "amici::SteadyStateSensitivityMode": r""" Gets the mode how sensitivities are computed in the steadystate simulation. :rtype: int :return: Mode """ return _amici.ModelPtr_getSteadyStateSensitivityMode(self) def setReinitializeFixedParameterInitialStates(self, flag: "bool") -> "void": r""" Set whether initial states depending on fixed parameters are to be reinitialized after preequilibration and presimulation. :type flag: boolean :param flag: Fixed parameters reinitialized? """ return _amici.ModelPtr_setReinitializeFixedParameterInitialStates(self, flag) def getReinitializeFixedParameterInitialStates(self) -> "bool": r""" Get whether initial states depending on fixedParameters are to be reinitialized after preequilibration and presimulation. :rtype: boolean :return: flag `true` / `false` """ return _amici.ModelPtr_getReinitializeFixedParameterInitialStates(self) def requireSensitivitiesForAllParameters(self) -> "void": r""" Require computation of sensitivities for all parameters p [0..np[ in natural order. NOTE: Resets initial state sensitivities. """ return _amici.ModelPtr_requireSensitivitiesForAllParameters(self) def setAlwaysCheckFinite(self, alwaysCheck: "bool") -> "void": r""" Set whether the result of every call to `Model::f*` should be checked for finiteness. :type alwaysCheck: boolean :param alwaysCheck: """ return _amici.ModelPtr_setAlwaysCheckFinite(self, alwaysCheck) def getAlwaysCheckFinite(self) -> "bool": r""" Get setting of whether the result of every call to `Model::f*` should be checked for finiteness. :rtype: boolean :return: that """ return _amici.ModelPtr_getAlwaysCheckFinite(self) def setReinitializationStateIdxs(self, idxs: "IntVector") -> "void": r""" Set indices of states to be reinitialized based on provided constants / fixed parameters :type idxs: std::vector< int,std::allocator< int > > :param idxs: Array of state indices """ return _amici.ModelPtr_setReinitializationStateIdxs(self, idxs) def getReinitializationStateIdxs(self) -> "std::vector< int,std::allocator< int > > const &": r""" Return indices of states to be reinitialized based on provided constants / fixed parameters :rtype: std::vector< int,std::allocator< int > > :return: Those indices. """ return _amici.ModelPtr_getReinitializationStateIdxs(self) pythonGenerated = property(_amici.ModelPtr_pythonGenerated_get, _amici.ModelPtr_pythonGenerated_set, doc=r""" Flag indicating Matlab- or Python-based model generation""") o2mode = property(_amici.ModelPtr_o2mode_get, _amici.ModelPtr_o2mode_set, doc=r""" Flag indicating whether for `amici::Solver::sensi_` == `amici::SensitivityOrder::second` directional or full second order derivative will be computed """) idlist = property(_amici.ModelPtr_idlist_get, _amici.ModelPtr_idlist_set, doc=r""" Flag array for DAE equations""") app = property(_amici.ModelPtr_app_get, _amici.ModelPtr_app_set, doc=r""" AMICI application context""") def getSolver(self) -> "std::unique_ptr< amici::Solver >": r""" Retrieves the solver object :rtype: std::unique_ptr< amici::Solver > :return: The Solver instance """ return _amici.ModelPtr_getSolver(self) def getAmiciVersion(self) -> "std::string": r""" Returns the AMICI version that was used to generate the model :rtype: string :return: AMICI version string """ return _amici.ModelPtr_getAmiciVersion(self) def getAmiciCommit(self) -> "std::string": r""" Returns the AMICI commit that was used to generate the model :rtype: string :return: AMICI commit string """ return _amici.ModelPtr_getAmiciCommit(self) def isFixedParameterStateReinitializationAllowed(self) -> "bool": r""" Function indicating whether reinitialization of states depending on fixed parameters is permissible :rtype: boolean :return: flag indicating whether reinitialization of states depending on fixed parameters is permissible """ return _amici.ModelPtr_isFixedParameterStateReinitializationAllowed(self) nx_rdata = property(_amici.ModelPtr_nx_rdata_get, _amici.ModelPtr_nx_rdata_set, doc=r""" Number of states""") nxtrue_rdata = property(_amici.ModelPtr_nxtrue_rdata_get, _amici.ModelPtr_nxtrue_rdata_set, doc=r""" Number of states in the unaugmented system""") nx_solver = property(_amici.ModelPtr_nx_solver_get, _amici.ModelPtr_nx_solver_set, doc=r""" Number of states with conservation laws applied""") nxtrue_solver = property(_amici.ModelPtr_nxtrue_solver_get, _amici.ModelPtr_nxtrue_solver_set, doc=r""" Number of states in the unaugmented system with conservation laws applied """) nx_solver_reinit = property(_amici.ModelPtr_nx_solver_reinit_get, _amici.ModelPtr_nx_solver_reinit_set, doc=r""" Number of solver states subject to reinitialization""") ny = property(_amici.ModelPtr_ny_get, _amici.ModelPtr_ny_set, doc=r""" Number of observables""") nytrue = property(_amici.ModelPtr_nytrue_get, _amici.ModelPtr_nytrue_set, doc=r""" Number of observables in the unaugmented system""") nz = property(_amici.ModelPtr_nz_get, _amici.ModelPtr_nz_set, doc=r""" Number of event outputs""") nztrue = property(_amici.ModelPtr_nztrue_get, _amici.ModelPtr_nztrue_set, doc=r""" Number of event outputs in the unaugmented system""") ne = property(_amici.ModelPtr_ne_get, _amici.ModelPtr_ne_set, doc=r""" Number of events""") nw = property(_amici.ModelPtr_nw_get, _amici.ModelPtr_nw_set, doc=r""" Number of common expressions""") ndwdx = property(_amici.ModelPtr_ndwdx_get, _amici.ModelPtr_ndwdx_set, doc=r""" Number of nonzero elements in the `x` derivative of the repeating elements """) ndwdp = property(_amici.ModelPtr_ndwdp_get, _amici.ModelPtr_ndwdp_set, doc=r""" Number of nonzero elements in the `p` derivative of the repeating elements """) ndwdw = property(_amici.ModelPtr_ndwdw_get, _amici.ModelPtr_ndwdw_set, doc=r""" Number of nonzero elements in the `w` derivative of the repeating elements """) ndxdotdw = property(_amici.ModelPtr_ndxdotdw_get, _amici.ModelPtr_ndxdotdw_set, doc=r""" Number of nonzero elements in the :math:`derivative of \f$xdot`""") ndJydy = property(_amici.ModelPtr_ndJydy_get, _amici.ModelPtr_ndJydy_set, doc=r"""Number of nonzero elements in the :math:`derivative of\f$dJy` (dimension `nytrue`)""") nnz = property(_amici.ModelPtr_nnz_get, _amici.ModelPtr_nnz_set, doc=r""" Number of nonzero entries in Jacobian""") nJ = property(_amici.ModelPtr_nJ_get, _amici.ModelPtr_nJ_set, doc=r""" Dimension of the augmented objective function for 2nd order ASA""") ubw = property(_amici.ModelPtr_ubw_get, _amici.ModelPtr_ubw_set, doc=r""" Upper bandwidth of the Jacobian""") lbw = property(_amici.ModelPtr_lbw_get, _amici.ModelPtr_lbw_set, doc=r""" Lower bandwidth of the Jacobian""")
# Register ModelPtr in _amici: _amici.ModelPtr_swigregister(ModelPtr)
[docs]class ExpDataPtr(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): _amici.ExpDataPtr_swiginit(self, _amici.new_ExpDataPtr(*args)) def __deref__(self) -> "std::unique_ptr< amici::ExpData >::pointer": return _amici.ExpDataPtr___deref__(self) def release(self) -> "std::unique_ptr< amici::ExpData >::pointer": return _amici.ExpDataPtr_release(self) def reset(self, *args) -> "void": return _amici.ExpDataPtr_reset(self, *args) def swap(self, __u: "ExpDataPtr") -> "void": return _amici.ExpDataPtr_swap(self, __u) def get(self) -> "std::unique_ptr< amici::ExpData >::pointer": return _amici.ExpDataPtr_get(self) def __nonzero__(self): return _amici.ExpDataPtr___nonzero__(self) __bool__ = __nonzero__ __swig_destroy__ = _amici.delete_ExpDataPtr def nytrue(self) -> "int": r""" number of observables of the non-augmented model :rtype: int :return: number of observables of the non-augmented model """ return _amici.ExpDataPtr_nytrue(self) def nztrue(self) -> "int": r""" number of event observables of the non-augmented model :rtype: int :return: number of event observables of the non-augmented model """ return _amici.ExpDataPtr_nztrue(self) def nmaxevent(self) -> "int": r""" maximal number of events to track :rtype: int :return: maximal number of events to track """ return _amici.ExpDataPtr_nmaxevent(self) def nt(self) -> "int": r""" number of timepoints :rtype: int :return: number of timepoints """ return _amici.ExpDataPtr_nt(self) def setTimepoints(self, ts: "DoubleVector") -> "void": r""" Set function that copies data from input to ExpData::ts :type ts: std::vector< amici::realtype,std::allocator< amici::realtype > > :param ts: timepoints """ return _amici.ExpDataPtr_setTimepoints(self, ts) def getTimepoints(self) -> "std::vector< amici::realtype,std::allocator< amici::realtype > > const &": r""" get function that copies data from ExpData::ts to output :rtype: std::vector< amici::realtype,std::allocator< amici::realtype > > :return: ExpData::ts """ return _amici.ExpDataPtr_getTimepoints(self) def getTimepoint(self, it: "int") -> "amici::realtype": r""" get function that returns timepoint at index :type it: int :param it: timepoint index :rtype: float :return: timepoint timepoint at index """ return _amici.ExpDataPtr_getTimepoint(self, it) def setObservedData(self, *args) -> "void": r""" *Overload 1:* set function that copies data from input to ExpData::my :type observedData: std::vector< amici::realtype,std::allocator< amici::realtype > > :param observedData: observed data (dimension: nt x nytrue, row-major) | *Overload 2:* set function that copies observed data for specific observable :type observedData: std::vector< amici::realtype,std::allocator< amici::realtype > > :param observedData: observed data (dimension: nt) :type iy: int :param iy: observed data index """ return _amici.ExpDataPtr_setObservedData(self, *args) def isSetObservedData(self, it: "int", iy: "int") -> "bool": r""" get function that checks whether data at specified indices has been set :type it: int :param it: time index :type iy: int :param iy: observable index :rtype: boolean :return: boolean specifying if data was set """ return _amici.ExpDataPtr_isSetObservedData(self, it, iy) def getObservedData(self) -> "std::vector< amici::realtype,std::allocator< amici::realtype > > const &": r""" get function that copies data from ExpData::observedData to output :rtype: std::vector< amici::realtype,std::allocator< amici::realtype > > :return: observed data (dimension: nt x nytrue, row-major) """ return _amici.ExpDataPtr_getObservedData(self) def getObservedDataPtr(self, it: "int") -> "amici::realtype const *": r""" get function that returns a pointer to observed data at index :type it: int :param it: timepoint index :rtype: float :return: pointer to observed data at index (dimension: nytrue) """ return _amici.ExpDataPtr_getObservedDataPtr(self, it) def setObservedDataStdDev(self, *args) -> "void": r""" *Overload 1:* set function that copies data from input to ExpData::observedDataStdDev :type observedDataStdDev: std::vector< amici::realtype,std::allocator< amici::realtype > > :param observedDataStdDev: standard deviation of observed data (dimension: nt x nytrue, row-major) | *Overload 2:* set function that sets all ExpData::observedDataStdDev to the input value :type stdDev: float :param stdDev: standard deviation (dimension: scalar) | *Overload 3:* set function that copies standard deviation of observed data for specific observable :type observedDataStdDev: std::vector< amici::realtype,std::allocator< amici::realtype > > :param observedDataStdDev: standard deviation of observed data (dimension: nt) :type iy: int :param iy: observed data index | *Overload 4:* set function that sets all standard deviation of a specific observable to the input value :type stdDev: float :param stdDev: standard deviation (dimension: scalar) :type iy: int :param iy: observed data index """ return _amici.ExpDataPtr_setObservedDataStdDev(self, *args) def isSetObservedDataStdDev(self, it: "int", iy: "int") -> "bool": r""" get function that checks whether standard deviation of data at specified indices has been set :type it: int :param it: time index :type iy: int :param iy: observable index :rtype: boolean :return: boolean specifying if standard deviation of data was set """ return _amici.ExpDataPtr_isSetObservedDataStdDev(self, it, iy) def getObservedDataStdDev(self) -> "std::vector< amici::realtype,std::allocator< amici::realtype > > const &": r""" get function that copies data from ExpData::observedDataStdDev to output :rtype: std::vector< amici::realtype,std::allocator< amici::realtype > > :return: standard deviation of observed data """ return _amici.ExpDataPtr_getObservedDataStdDev(self) def getObservedDataStdDevPtr(self, it: "int") -> "amici::realtype const *": r""" get function that returns a pointer to standard deviation of observed data at index :type it: int :param it: timepoint index :rtype: float :return: pointer to standard deviation of observed data at index """ return _amici.ExpDataPtr_getObservedDataStdDevPtr(self, it) def setObservedEvents(self, *args) -> "void": r""" *Overload 1:* set function that copies observed event data from input to ExpData::observedEvents :type observedEvents: std::vector< amici::realtype,std::allocator< amici::realtype > > :param observedEvents: observed data (dimension: nmaxevent x nztrue, row-major) | *Overload 2:* set function that copies observed event data for specific event observable :type observedEvents: std::vector< amici::realtype,std::allocator< amici::realtype > > :param observedEvents: observed data (dimension: nmaxevent) :type iz: int :param iz: observed event data index """ return _amici.ExpDataPtr_setObservedEvents(self, *args) def isSetObservedEvents(self, ie: "int", iz: "int") -> "bool": r""" get function that checks whether event data at specified indices has been set :type ie: int :param ie: event index :type iz: int :param iz: event observable index :rtype: boolean :return: boolean specifying if data was set """ return _amici.ExpDataPtr_isSetObservedEvents(self, ie, iz) def getObservedEvents(self) -> "std::vector< amici::realtype,std::allocator< amici::realtype > > const &": r""" get function that copies data from ExpData::mz to output :rtype: std::vector< amici::realtype,std::allocator< amici::realtype > > :return: observed event data """ return _amici.ExpDataPtr_getObservedEvents(self) def getObservedEventsPtr(self, ie: "int") -> "amici::realtype const *": r""" get function that returns a pointer to observed data at ieth occurrence :type ie: int :param ie: event occurrence :rtype: float :return: pointer to observed event data at ieth occurrence """ return _amici.ExpDataPtr_getObservedEventsPtr(self, ie) def setObservedEventsStdDev(self, *args) -> "void": r""" *Overload 1:* set function that copies data from input to ExpData::observedEventsStdDev :type observedEventsStdDev: std::vector< amici::realtype,std::allocator< amici::realtype > > :param observedEventsStdDev: standard deviation of observed event data | *Overload 2:* set function that sets all ExpData::observedDataStdDev to the input value :type stdDev: float :param stdDev: standard deviation (dimension: scalar) | *Overload 3:* set function that copies standard deviation of observed data for specific observable :type observedEventsStdDev: std::vector< amici::realtype,std::allocator< amici::realtype > > :param observedEventsStdDev: standard deviation of observed data (dimension: nmaxevent) :type iz: int :param iz: observed data index | *Overload 4:* set function that sets all standard deviation of a specific observable to the input value :type stdDev: float :param stdDev: standard deviation (dimension: scalar) :type iz: int :param iz: observed data index """ return _amici.ExpDataPtr_setObservedEventsStdDev(self, *args) def isSetObservedEventsStdDev(self, ie: "int", iz: "int") -> "bool": r""" get function that checks whether standard deviation of even data at specified indices has been set :type ie: int :param ie: event index :type iz: int :param iz: event observable index :rtype: boolean :return: boolean specifying if standard deviation of event data was set """ return _amici.ExpDataPtr_isSetObservedEventsStdDev(self, ie, iz) def getObservedEventsStdDev(self) -> "std::vector< amici::realtype,std::allocator< amici::realtype > > const &": r""" get function that copies data from ExpData::observedEventsStdDev to output :rtype: std::vector< amici::realtype,std::allocator< amici::realtype > > :return: standard deviation of observed event data """ return _amici.ExpDataPtr_getObservedEventsStdDev(self) def getObservedEventsStdDevPtr(self, ie: "int") -> "amici::realtype const *": r""" get function that returns a pointer to standard deviation of observed event data at ie-th occurrence :type ie: int :param ie: event occurrence :rtype: float :return: pointer to standard deviation of observed event data at ie-th occurrence """ return _amici.ExpDataPtr_getObservedEventsStdDevPtr(self, ie) def reinitializeAllFixedParameterDependentInitialStatesForPresimulation(self, nx_rdata: "int") -> "void": r""" Set reinitialization of all states based on model constants for presimulation (only meaningful if preequilibration is performed). Convenience function to populate `reinitialization_state_idxs_presim` and `reinitialization_state_idxs_sim` :type nx_rdata: int :param nx_rdata: Number of states (Model::nx_rdata) """ return _amici.ExpDataPtr_reinitializeAllFixedParameterDependentInitialStatesForPresimulation(self, nx_rdata) def reinitializeAllFixedParameterDependentInitialStatesForSimulation(self, nx_rdata: "int") -> "void": r""" Set reinitialization of all states based on model constants for the 'main' simulation (only meaningful if presimulation or preequilibration is performed). Convenience function to populate `reinitialization_state_idxs_presim` and `reinitialization_state_idxs_sim` :type nx_rdata: int :param nx_rdata: Number of states (Model::nx_rdata) """ return _amici.ExpDataPtr_reinitializeAllFixedParameterDependentInitialStatesForSimulation(self, nx_rdata) def reinitializeAllFixedParameterDependentInitialStates(self, nx_rdata: "int") -> "void": r""" Set reinitialization of all states based on model constants for all simulation phases. Convenience function to populate `reinitialization_state_idxs_presim` and `reinitialization_state_idxs_sim` :type nx_rdata: int :param nx_rdata: Number of states (Model::nx_rdata) """ return _amici.ExpDataPtr_reinitializeAllFixedParameterDependentInitialStates(self, nx_rdata) fixedParameters = property(_amici.ExpDataPtr_fixedParameters_get, _amici.ExpDataPtr_fixedParameters_set, doc=r""" Model constants Vector of size Model::nk() or empty """) fixedParametersPreequilibration = property(_amici.ExpDataPtr_fixedParametersPreequilibration_get, _amici.ExpDataPtr_fixedParametersPreequilibration_set, doc=r""" Model constants for pre-equilibration Vector of size Model::nk() or empty. Overrides Solver::newton_preeq """) fixedParametersPresimulation = property(_amici.ExpDataPtr_fixedParametersPresimulation_get, _amici.ExpDataPtr_fixedParametersPresimulation_set, doc=r""" Model constants for pre-simulation Vector of size Model::nk() or empty. """) parameters = property(_amici.ExpDataPtr_parameters_get, _amici.ExpDataPtr_parameters_set, doc=r""" Model parameters Vector of size Model::np() or empty with parameter scaled according to SimulationParameter::pscale. """) x0 = property(_amici.ExpDataPtr_x0_get, _amici.ExpDataPtr_x0_set, doc=r""" Initial state Vector of size Model::nx() or empty """) sx0 = property(_amici.ExpDataPtr_sx0_get, _amici.ExpDataPtr_sx0_set, doc=r""" Initial state sensitivities Dimensions: Model::nx() * Model::nplist(), Model::nx() * ExpData::plist.size(), if ExpData::plist is not empty, or empty """) pscale = property(_amici.ExpDataPtr_pscale_get, _amici.ExpDataPtr_pscale_set, doc=r""" Parameter scales Vector of parameter scale of size Model::np(), indicating how/if each parameter is to be scaled. """) plist = property(_amici.ExpDataPtr_plist_get, _amici.ExpDataPtr_plist_set, doc=r"""Parameter indices w.r.t. which to compute sensitivities""") tstart_ = property(_amici.ExpDataPtr_tstart__get, _amici.ExpDataPtr_tstart__set, doc=r""" starting time""") t_presim = property(_amici.ExpDataPtr_t_presim_get, _amici.ExpDataPtr_t_presim_set, doc=r""" Duration of pre-simulation. If this is > 0, presimulation will be performed from (model->t0 - t_presim) to model->t0 using the fixedParameters in fixedParametersPresimulation """) ts_ = property(_amici.ExpDataPtr_ts__get, _amici.ExpDataPtr_ts__set, doc=r""" Timepoints for which model state/outputs/... are requested Vector of timepoints. """) reinitializeFixedParameterInitialStates = property(_amici.ExpDataPtr_reinitializeFixedParameterInitialStates_get, _amici.ExpDataPtr_reinitializeFixedParameterInitialStates_set, doc=r""" Flag indicating whether reinitialization of states depending on fixed parameters is activated """) reinitialization_state_idxs_presim = property(_amici.ExpDataPtr_reinitialization_state_idxs_presim_get, _amici.ExpDataPtr_reinitialization_state_idxs_presim_set, doc=r""" Indices of states to be reinitialized based on provided presimulation constants / fixed parameters. """) reinitialization_state_idxs_sim = property(_amici.ExpDataPtr_reinitialization_state_idxs_sim_get, _amici.ExpDataPtr_reinitialization_state_idxs_sim_set, doc=r""" Indices of states to be reinitialized based on provided constants / fixed parameters. """)
# Register ExpDataPtr in _amici: _amici.ExpDataPtr_swigregister(ExpDataPtr) M_E = _amici.M_E M_LOG2E = _amici.M_LOG2E M_LOG10E = _amici.M_LOG10E M_LN2 = _amici.M_LN2 M_LN10 = _amici.M_LN10 M_PI = _amici.M_PI M_PI_2 = _amici.M_PI_2 M_PI_4 = _amici.M_PI_4 M_1_PI = _amici.M_1_PI M_2_PI = _amici.M_2_PI M_2_SQRTPI = _amici.M_2_SQRTPI M_SQRT2 = _amici.M_SQRT2 M_SQRT1_2 = _amici.M_SQRT1_2 BLASLayout_rowMajor = _amici.BLASLayout_rowMajor BLASLayout_colMajor = _amici.BLASLayout_colMajor BLASTranspose_noTrans = _amici.BLASTranspose_noTrans BLASTranspose_trans = _amici.BLASTranspose_trans BLASTranspose_conjTrans = _amici.BLASTranspose_conjTrans ParameterScaling_none = _amici.ParameterScaling_none ParameterScaling_ln = _amici.ParameterScaling_ln ParameterScaling_log10 = _amici.ParameterScaling_log10 SecondOrderMode_none = _amici.SecondOrderMode_none SecondOrderMode_full = _amici.SecondOrderMode_full SecondOrderMode_directional = _amici.SecondOrderMode_directional SensitivityOrder_none = _amici.SensitivityOrder_none SensitivityOrder_first = _amici.SensitivityOrder_first SensitivityOrder_second = _amici.SensitivityOrder_second SensitivityMethod_none = _amici.SensitivityMethod_none SensitivityMethod_forward = _amici.SensitivityMethod_forward SensitivityMethod_adjoint = _amici.SensitivityMethod_adjoint LinearSolver_dense = _amici.LinearSolver_dense LinearSolver_band = _amici.LinearSolver_band LinearSolver_LAPACKDense = _amici.LinearSolver_LAPACKDense LinearSolver_LAPACKBand = _amici.LinearSolver_LAPACKBand LinearSolver_diag = _amici.LinearSolver_diag LinearSolver_SPGMR = _amici.LinearSolver_SPGMR LinearSolver_SPBCG = _amici.LinearSolver_SPBCG LinearSolver_SPTFQMR = _amici.LinearSolver_SPTFQMR LinearSolver_KLU = _amici.LinearSolver_KLU LinearSolver_SuperLUMT = _amici.LinearSolver_SuperLUMT InternalSensitivityMethod_simultaneous = _amici.InternalSensitivityMethod_simultaneous InternalSensitivityMethod_staggered = _amici.InternalSensitivityMethod_staggered InternalSensitivityMethod_staggered1 = _amici.InternalSensitivityMethod_staggered1 InterpolationType_hermite = _amici.InterpolationType_hermite InterpolationType_polynomial = _amici.InterpolationType_polynomial LinearMultistepMethod_adams = _amici.LinearMultistepMethod_adams LinearMultistepMethod_BDF = _amici.LinearMultistepMethod_BDF NonlinearSolverIteration_functional = _amici.NonlinearSolverIteration_functional NonlinearSolverIteration_fixedpoint = _amici.NonlinearSolverIteration_fixedpoint r""" deprecated""" NonlinearSolverIteration_newton = _amici.NonlinearSolverIteration_newton SteadyStateSensitivityMode_newtonOnly = _amici.SteadyStateSensitivityMode_newtonOnly SteadyStateSensitivityMode_simulationFSA = _amici.SteadyStateSensitivityMode_simulationFSA SteadyStateStatus_failed_too_long_simulation = _amici.SteadyStateStatus_failed_too_long_simulation SteadyStateStatus_failed_damping = _amici.SteadyStateStatus_failed_damping SteadyStateStatus_failed_factorization = _amici.SteadyStateStatus_failed_factorization SteadyStateStatus_failed_convergence = _amici.SteadyStateStatus_failed_convergence SteadyStateStatus_failed = _amici.SteadyStateStatus_failed SteadyStateStatus_not_run = _amici.SteadyStateStatus_not_run SteadyStateStatus_success = _amici.SteadyStateStatus_success SteadyStateContext_newtonSensi = _amici.SteadyStateContext_newtonSensi SteadyStateContext_sensiStorage = _amici.SteadyStateContext_sensiStorage SteadyStateContext_solverCreation = _amici.SteadyStateContext_solverCreation NewtonDampingFactorMode_off = _amici.NewtonDampingFactorMode_off NewtonDampingFactorMode_on = _amici.NewtonDampingFactorMode_on FixedParameterContext_simulation = _amici.FixedParameterContext_simulation FixedParameterContext_preequilibration = _amici.FixedParameterContext_preequilibration FixedParameterContext_presimulation = _amici.FixedParameterContext_presimulation RDataReporting_full = _amici.RDataReporting_full RDataReporting_residuals = _amici.RDataReporting_residuals RDataReporting_likelihood = _amici.RDataReporting_likelihood
[docs]class ModelDimensions(object): r""" Container for model dimensions. Holds number of states, observables, etc. """ thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr
[docs] def __init__(self, *args): r""" *Overload 1:* Default ctor | *Overload 2:* Constructor with model dimensions :type nx_rdata: int :param nx_rdata: Number of state variables :type nxtrue_rdata: int :param nxtrue_rdata: Number of state variables of the non-augmented model :type nx_solver: int :param nx_solver: Number of state variables with conservation laws applied :type nxtrue_solver: int :param nxtrue_solver: Number of state variables of the non-augmented model with conservation laws applied :type nx_solver_reinit: int :param nx_solver_reinit: Number of state variables with conservation laws subject to reinitialization :type np: int :param np: Number of parameters :type nk: int :param nk: Number of constants :type ny: int :param ny: Number of observables :type nytrue: int :param nytrue: Number of observables of the non-augmented model :type nz: int :param nz: Number of event observables :type nztrue: int :param nztrue: Number of event observables of the non-augmented model :type ne: int :param ne: Number of events :type nJ: int :param nJ: Number of objective functions :type nw: int :param nw: Number of repeating elements :type ndwdx: int :param ndwdx: Number of nonzero elements in the `x` derivative of the repeating elements :type ndwdp: int :param ndwdp: Number of nonzero elements in the `p` derivative of the repeating elements :type ndwdw: int :param ndwdw: Number of nonzero elements in the `w` derivative of the repeating elements :type ndxdotdw: int :param ndxdotdw: Number of nonzero elements in the :math:`w` derivative of :math:`xdot` :type ndJydy: std::vector< int,std::allocator< int > > :param ndJydy: Number of nonzero elements in the :math:`y` derivative of :math:`dJy` (shape `nytrue`) :type nnz: int :param nnz: Number of nonzero elements in Jacobian :type ubw: int :param ubw: Upper matrix bandwidth in the Jacobian :type lbw: int :param lbw: Lower matrix bandwidth in the Jacobian """ _amici.ModelDimensions_swiginit(self, _amici.new_ModelDimensions(*args))
nx_rdata = property(_amici.ModelDimensions_nx_rdata_get, _amici.ModelDimensions_nx_rdata_set, doc=r""" Number of states""") nxtrue_rdata = property(_amici.ModelDimensions_nxtrue_rdata_get, _amici.ModelDimensions_nxtrue_rdata_set, doc=r""" Number of states in the unaugmented system""") nx_solver = property(_amici.ModelDimensions_nx_solver_get, _amici.ModelDimensions_nx_solver_set, doc=r""" Number of states with conservation laws applied""") nxtrue_solver = property(_amici.ModelDimensions_nxtrue_solver_get, _amici.ModelDimensions_nxtrue_solver_set, doc=r""" Number of states in the unaugmented system with conservation laws applied """) nx_solver_reinit = property(_amici.ModelDimensions_nx_solver_reinit_get, _amici.ModelDimensions_nx_solver_reinit_set, doc=r""" Number of solver states subject to reinitialization""") np = property(_amici.ModelDimensions_np_get, _amici.ModelDimensions_np_set, doc=r""" Number of parameters""") nk = property(_amici.ModelDimensions_nk_get, _amici.ModelDimensions_nk_set, doc=r""" Number of constants""") ny = property(_amici.ModelDimensions_ny_get, _amici.ModelDimensions_ny_set, doc=r""" Number of observables""") nytrue = property(_amici.ModelDimensions_nytrue_get, _amici.ModelDimensions_nytrue_set, doc=r""" Number of observables in the unaugmented system""") nz = property(_amici.ModelDimensions_nz_get, _amici.ModelDimensions_nz_set, doc=r""" Number of event outputs""") nztrue = property(_amici.ModelDimensions_nztrue_get, _amici.ModelDimensions_nztrue_set, doc=r""" Number of event outputs in the unaugmented system""") ne = property(_amici.ModelDimensions_ne_get, _amici.ModelDimensions_ne_set, doc=r""" Number of events""") nw = property(_amici.ModelDimensions_nw_get, _amici.ModelDimensions_nw_set, doc=r""" Number of common expressions""") ndwdx = property(_amici.ModelDimensions_ndwdx_get, _amici.ModelDimensions_ndwdx_set, doc=r""" Number of nonzero elements in the `x` derivative of the repeating elements """) ndwdp = property(_amici.ModelDimensions_ndwdp_get, _amici.ModelDimensions_ndwdp_set, doc=r""" Number of nonzero elements in the `p` derivative of the repeating elements """) ndwdw = property(_amici.ModelDimensions_ndwdw_get, _amici.ModelDimensions_ndwdw_set, doc=r""" Number of nonzero elements in the `w` derivative of the repeating elements """) ndxdotdw = property(_amici.ModelDimensions_ndxdotdw_get, _amici.ModelDimensions_ndxdotdw_set, doc=r""" Number of nonzero elements in the :math:`derivative of \f$xdot`""") ndJydy = property(_amici.ModelDimensions_ndJydy_get, _amici.ModelDimensions_ndJydy_set, doc=r"""Number of nonzero elements in the :math:`derivative of\f$dJy` (dimension `nytrue`)""") nnz = property(_amici.ModelDimensions_nnz_get, _amici.ModelDimensions_nnz_set, doc=r""" Number of nonzero entries in Jacobian""") nJ = property(_amici.ModelDimensions_nJ_get, _amici.ModelDimensions_nJ_set, doc=r""" Dimension of the augmented objective function for 2nd order ASA""") ubw = property(_amici.ModelDimensions_ubw_get, _amici.ModelDimensions_ubw_set, doc=r""" Upper bandwidth of the Jacobian""") lbw = property(_amici.ModelDimensions_lbw_get, _amici.ModelDimensions_lbw_set, doc=r""" Lower bandwidth of the Jacobian""") __swig_destroy__ = _amici.delete_ModelDimensions
# Register ModelDimensions in _amici: _amici.ModelDimensions_swigregister(ModelDimensions) cvar = _amici.cvar pi = cvar.pi AMICI_ONEOUTPUT = cvar.AMICI_ONEOUTPUT AMICI_RECOVERABLE_ERROR = cvar.AMICI_RECOVERABLE_ERROR AMICI_UNRECOVERABLE_ERROR = cvar.AMICI_UNRECOVERABLE_ERROR AMICI_TOO_MUCH_WORK = cvar.AMICI_TOO_MUCH_WORK AMICI_TOO_MUCH_ACC = cvar.AMICI_TOO_MUCH_ACC AMICI_ERR_FAILURE = cvar.AMICI_ERR_FAILURE AMICI_CONV_FAILURE = cvar.AMICI_CONV_FAILURE AMICI_ILL_INPUT = cvar.AMICI_ILL_INPUT AMICI_ERROR = cvar.AMICI_ERROR AMICI_NO_STEADY_STATE = cvar.AMICI_NO_STEADY_STATE AMICI_DAMPING_FACTOR_ERROR = cvar.AMICI_DAMPING_FACTOR_ERROR AMICI_SINGULAR_JACOBIAN = cvar.AMICI_SINGULAR_JACOBIAN AMICI_NOT_IMPLEMENTED = cvar.AMICI_NOT_IMPLEMENTED AMICI_SUCCESS = cvar.AMICI_SUCCESS AMICI_DATA_RETURN = cvar.AMICI_DATA_RETURN AMICI_ROOT_RETURN = cvar.AMICI_ROOT_RETURN AMICI_NORMAL = cvar.AMICI_NORMAL AMICI_ONE_STEP = cvar.AMICI_ONE_STEP AMICI_PREEQUILIBRATE = cvar.AMICI_PREEQUILIBRATE
[docs]class SimulationParameters(object): r"""Container for various simulation parameters.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr
[docs] def __init__(self, *args): r""" *Overload 1:* Constructor :type timepoints: std::vector< amici::realtype,std::allocator< amici::realtype > > :param timepoints: Timepoints for which simulation results are requested | *Overload 2:* Constructor :type fixedParameters: std::vector< amici::realtype,std::allocator< amici::realtype > > :param fixedParameters: Model constants :type parameters: std::vector< amici::realtype,std::allocator< amici::realtype > > :param parameters: Model parameters | *Overload 3:* Constructor :type fixedParameters: std::vector< amici::realtype,std::allocator< amici::realtype > > :param fixedParameters: Model constants :type parameters: std::vector< amici::realtype,std::allocator< amici::realtype > > :param parameters: Model parameters :type plist: std::vector< int,std::allocator< int > > :param plist: Model parameter indices w.r.t. which sensitivities are to be computed | *Overload 4:* Constructor :type timepoints: std::vector< amici::realtype,std::allocator< amici::realtype > > :param timepoints: Timepoints for which simulation results are requested :type fixedParameters: std::vector< amici::realtype,std::allocator< amici::realtype > > :param fixedParameters: Model constants :type parameters: std::vector< amici::realtype,std::allocator< amici::realtype > > :param parameters: Model parameters """ _amici.SimulationParameters_swiginit(self, _amici.new_SimulationParameters(*args))
[docs] def reinitializeAllFixedParameterDependentInitialStatesForPresimulation(self, nx_rdata: "int") -> "void": r""" Set reinitialization of all states based on model constants for presimulation (only meaningful if preequilibration is performed). Convenience function to populate `reinitialization_state_idxs_presim` and `reinitialization_state_idxs_sim` :type nx_rdata: int :param nx_rdata: Number of states (Model::nx_rdata) """ return _amici.SimulationParameters_reinitializeAllFixedParameterDependentInitialStatesForPresimulation(self, nx_rdata)
[docs] def reinitializeAllFixedParameterDependentInitialStatesForSimulation(self, nx_rdata: "int") -> "void": r""" Set reinitialization of all states based on model constants for the 'main' simulation (only meaningful if presimulation or preequilibration is performed). Convenience function to populate `reinitialization_state_idxs_presim` and `reinitialization_state_idxs_sim` :type nx_rdata: int :param nx_rdata: Number of states (Model::nx_rdata) """ return _amici.SimulationParameters_reinitializeAllFixedParameterDependentInitialStatesForSimulation(self, nx_rdata)
[docs] def reinitializeAllFixedParameterDependentInitialStates(self, nx_rdata: "int") -> "void": r""" Set reinitialization of all states based on model constants for all simulation phases. Convenience function to populate `reinitialization_state_idxs_presim` and `reinitialization_state_idxs_sim` :type nx_rdata: int :param nx_rdata: Number of states (Model::nx_rdata) """ return _amici.SimulationParameters_reinitializeAllFixedParameterDependentInitialStates(self, nx_rdata)
fixedParameters = property(_amici.SimulationParameters_fixedParameters_get, _amici.SimulationParameters_fixedParameters_set, doc=r""" Model constants Vector of size Model::nk() or empty """) fixedParametersPreequilibration = property(_amici.SimulationParameters_fixedParametersPreequilibration_get, _amici.SimulationParameters_fixedParametersPreequilibration_set, doc=r""" Model constants for pre-equilibration Vector of size Model::nk() or empty. Overrides Solver::newton_preeq """) fixedParametersPresimulation = property(_amici.SimulationParameters_fixedParametersPresimulation_get, _amici.SimulationParameters_fixedParametersPresimulation_set, doc=r""" Model constants for pre-simulation Vector of size Model::nk() or empty. """) parameters = property(_amici.SimulationParameters_parameters_get, _amici.SimulationParameters_parameters_set, doc=r""" Model parameters Vector of size Model::np() or empty with parameter scaled according to SimulationParameter::pscale. """) x0 = property(_amici.SimulationParameters_x0_get, _amici.SimulationParameters_x0_set, doc=r""" Initial state Vector of size Model::nx() or empty """) sx0 = property(_amici.SimulationParameters_sx0_get, _amici.SimulationParameters_sx0_set, doc=r""" Initial state sensitivities Dimensions: Model::nx() * Model::nplist(), Model::nx() * ExpData::plist.size(), if ExpData::plist is not empty, or empty """) pscale = property(_amici.SimulationParameters_pscale_get, _amici.SimulationParameters_pscale_set, doc=r""" Parameter scales Vector of parameter scale of size Model::np(), indicating how/if each parameter is to be scaled. """) plist = property(_amici.SimulationParameters_plist_get, _amici.SimulationParameters_plist_set, doc=r"""Parameter indices w.r.t. which to compute sensitivities""") tstart_ = property(_amici.SimulationParameters_tstart__get, _amici.SimulationParameters_tstart__set, doc=r""" starting time""") t_presim = property(_amici.SimulationParameters_t_presim_get, _amici.SimulationParameters_t_presim_set, doc=r""" Duration of pre-simulation. If this is > 0, presimulation will be performed from (model->t0 - t_presim) to model->t0 using the fixedParameters in fixedParametersPresimulation """) ts_ = property(_amici.SimulationParameters_ts__get, _amici.SimulationParameters_ts__set, doc=r""" Timepoints for which model state/outputs/... are requested Vector of timepoints. """) reinitializeFixedParameterInitialStates = property(_amici.SimulationParameters_reinitializeFixedParameterInitialStates_get, _amici.SimulationParameters_reinitializeFixedParameterInitialStates_set, doc=r""" Flag indicating whether reinitialization of states depending on fixed parameters is activated """) reinitialization_state_idxs_presim = property(_amici.SimulationParameters_reinitialization_state_idxs_presim_get, _amici.SimulationParameters_reinitialization_state_idxs_presim_set, doc=r""" Indices of states to be reinitialized based on provided presimulation constants / fixed parameters. """) reinitialization_state_idxs_sim = property(_amici.SimulationParameters_reinitialization_state_idxs_sim_get, _amici.SimulationParameters_reinitialization_state_idxs_sim_set, doc=r""" Indices of states to be reinitialized based on provided constants / fixed parameters. """) __swig_destroy__ = _amici.delete_SimulationParameters
# Register SimulationParameters in _amici: _amici.SimulationParameters_swigregister(SimulationParameters) class AbstractModel(object): r""" Abstract base class of amici::Model defining functions that need to be implemented in an AMICI model. Some functions have empty default implementations or throw. This class shall not have any data members. """ 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__ = _amici.delete_AbstractModel def getSolver(self) -> "std::unique_ptr< amici::Solver >": r""" Retrieves the solver object :rtype: std::unique_ptr< amici::Solver > :return: The Solver instance """ return _amici.AbstractModel_getSolver(self) def getAmiciVersion(self) -> "std::string": r""" Returns the AMICI version that was used to generate the model :rtype: string :return: AMICI version string """ return _amici.AbstractModel_getAmiciVersion(self) def getAmiciCommit(self) -> "std::string": r""" Returns the AMICI commit that was used to generate the model :rtype: string :return: AMICI commit string """ return _amici.AbstractModel_getAmiciCommit(self) def isFixedParameterStateReinitializationAllowed(self) -> "bool": r""" Function indicating whether reinitialization of states depending on fixed parameters is permissible :rtype: boolean :return: flag indicating whether reinitialization of states depending on fixed parameters is permissible """ return _amici.AbstractModel_isFixedParameterStateReinitializationAllowed(self) # Register AbstractModel in _amici: _amici.AbstractModel_swigregister(AbstractModel)
[docs]def unscaleParameters(bufferScaled: "gsl::span< amici::realtype const >", pscale: "gsl::span< amici::ParameterScaling const >", bufferUnscaled: "gsl::span< amici::realtype >") -> "void": r""" Remove parameter scaling according to the parameter scaling in pscale All vectors must be of same length. :type bufferScaled: gsl::span< amici::realtype const > :param bufferScaled: scaled parameters :type pscale: gsl::span< amici::ParameterScaling const > :param pscale: parameter scaling :type bufferUnscaled: gsl::span< amici::realtype > :param bufferUnscaled: unscaled parameters are written to the array """ return _amici.unscaleParameters(bufferScaled, pscale, bufferUnscaled)
[docs]def getUnscaledParameter(scaledParameter: "double", scaling: "amici::ParameterScaling") -> "double": r""" Remove parameter scaling according to `scaling` :type scaledParameter: float :param scaledParameter: scaled parameter :type scaling: int :param scaling: parameter scaling :rtype: float :return: Unscaled parameter """ return _amici.getUnscaledParameter(scaledParameter, scaling)
[docs]def getScaledParameter(unscaledParameter: "double", scaling: "amici::ParameterScaling") -> "double": r""" Apply parameter scaling according to `scaling` :type unscaledParameter: float :param unscaledParameter: :type scaling: int :param scaling: parameter scaling :rtype: float :return: Scaled parameter """ return _amici.getScaledParameter(unscaledParameter, scaling)
[docs]def scaleParameters(bufferUnscaled: "gsl::span< amici::realtype const >", pscale: "gsl::span< amici::ParameterScaling const >", bufferScaled: "gsl::span< amici::realtype >") -> "void": r""" Apply parameter scaling according to `scaling` :type bufferUnscaled: gsl::span< amici::realtype const > :param bufferUnscaled: :type pscale: gsl::span< amici::ParameterScaling const > :param pscale: parameter scaling :type bufferScaled: gsl::span< amici::realtype > :param bufferScaled: destination """ return _amici.scaleParameters(bufferUnscaled, pscale, bufferScaled)
[docs]def backtraceString(maxFrames: "int") -> "std::string": r""" Returns the current backtrace as std::string :type maxFrames: int :param maxFrames: Number of frames to include :rtype: string :return: Backtrace """ return _amici.backtraceString(maxFrames)
[docs]class ExpData(SimulationParameters): r""" ExpData carries all information about experimental or condition-specific data """ thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr
[docs] def __init__(self, *args): r""" *Overload 1:* default constructor | *Overload 2:* Copy constructor, needs to be declared to be generated in swig | *Overload 3:* constructor that only initializes dimensions :type nytrue: int :param nytrue: Number of observables :type nztrue: int :param nztrue: Number of event outputs :type nmaxevent: int :param nmaxevent: Maximal number of events to track | *Overload 4:* constructor that initializes timepoints from vectors :type nytrue: int :param nytrue: Number of observables :type nztrue: int :param nztrue: Number of event outputs :type nmaxevent: int :param nmaxevent: Maximal number of events to track :type ts: std::vector< amici::realtype,std::allocator< amici::realtype > > :param ts: Timepoints (dimension: nt) | *Overload 5:* constructor that initializes timepoints and fixed parameters from vectors :type nytrue: int :param nytrue: Number of observables :type nztrue: int :param nztrue: Number of event outputs :type nmaxevent: int :param nmaxevent: Maximal number of events to track :type ts: std::vector< amici::realtype,std::allocator< amici::realtype > > :param ts: Timepoints (dimension: nt) :type fixedParameters: std::vector< amici::realtype,std::allocator< amici::realtype > > :param fixedParameters: Model constants (dimension: nk) | *Overload 6:* constructor that initializes timepoints and data from vectors :type nytrue: int :param nytrue: Number of observables :type nztrue: int :param nztrue: Number of event outputs :type nmaxevent: int :param nmaxevent: Maximal number of events to track :type ts: std::vector< amici::realtype,std::allocator< amici::realtype > > :param ts: Timepoints (dimension: nt) :type observedData: std::vector< amici::realtype,std::allocator< amici::realtype > > :param observedData: observed data (dimension: nt x nytrue, row-major) :type observedDataStdDev: std::vector< amici::realtype,std::allocator< amici::realtype > > :param observedDataStdDev: standard deviation of observed data (dimension: nt x nytrue, row-major) :type observedEvents: std::vector< amici::realtype,std::allocator< amici::realtype > > :param observedEvents: observed events (dimension: nmaxevents x nztrue, row-major) :type observedEventsStdDev: std::vector< amici::realtype,std::allocator< amici::realtype > > :param observedEventsStdDev: standard deviation of observed events/roots (dimension: nmaxevents x nztrue, row-major) | *Overload 7:* constructor that initializes with Model :type model: :py:class:`Model` :param model: pointer to model specification object | *Overload 8:* constructor that initializes with returnData, adds noise according to specified sigmas :type rdata: :py:class:`ReturnData` :param rdata: return data pointer with stored simulation results :type sigma_y: float :param sigma_y: scalar standard deviations for all observables :type sigma_z: float :param sigma_z: scalar standard deviations for all event observables | *Overload 9:* constructor that initializes with returnData, adds noise according to specified sigmas :type rdata: :py:class:`ReturnData` :param rdata: return data pointer with stored simulation results :type sigma_y: std::vector< amici::realtype,std::allocator< amici::realtype > > :param sigma_y: vector of standard deviations for observables (dimension: nytrue or nt x nytrue, row-major) :type sigma_z: std::vector< amici::realtype,std::allocator< amici::realtype > > :param sigma_z: vector of standard deviations for event observables (dimension: nztrue or nmaxevent x nztrue, row-major) """ _amici.ExpData_swiginit(self, _amici.new_ExpData(*args))
__swig_destroy__ = _amici.delete_ExpData
[docs] def nytrue(self) -> "int": r""" number of observables of the non-augmented model :rtype: int :return: number of observables of the non-augmented model """ return _amici.ExpData_nytrue(self)
[docs] def nztrue(self) -> "int": r""" number of event observables of the non-augmented model :rtype: int :return: number of event observables of the non-augmented model """ return _amici.ExpData_nztrue(self)
[docs] def nmaxevent(self) -> "int": r""" maximal number of events to track :rtype: int :return: maximal number of events to track """ return _amici.ExpData_nmaxevent(self)
[docs] def nt(self) -> "int": r""" number of timepoints :rtype: int :return: number of timepoints """ return _amici.ExpData_nt(self)
[docs] def setTimepoints(self, ts: "DoubleVector") -> "void": r""" Set function that copies data from input to ExpData::ts :type ts: std::vector< amici::realtype,std::allocator< amici::realtype > > :param ts: timepoints """ return _amici.ExpData_setTimepoints(self, ts)
[docs] def getTimepoints(self) -> "std::vector< amici::realtype,std::allocator< amici::realtype > > const &": r""" get function that copies data from ExpData::ts to output :rtype: std::vector< amici::realtype,std::allocator< amici::realtype > > :return: ExpData::ts """ return _amici.ExpData_getTimepoints(self)
[docs] def getTimepoint(self, it: "int") -> "amici::realtype": r""" get function that returns timepoint at index :type it: int :param it: timepoint index :rtype: float :return: timepoint timepoint at index """ return _amici.ExpData_getTimepoint(self, it)
[docs] def setObservedData(self, *args) -> "void": r""" *Overload 1:* set function that copies data from input to ExpData::my :type observedData: std::vector< amici::realtype,std::allocator< amici::realtype > > :param observedData: observed data (dimension: nt x nytrue, row-major) | *Overload 2:* set function that copies observed data for specific observable :type observedData: std::vector< amici::realtype,std::allocator< amici::realtype > > :param observedData: observed data (dimension: nt) :type iy: int :param iy: observed data index """ return _amici.ExpData_setObservedData(self, *args)
[docs] def isSetObservedData(self, it: "int", iy: "int") -> "bool": r""" get function that checks whether data at specified indices has been set :type it: int :param it: time index :type iy: int :param iy: observable index :rtype: boolean :return: boolean specifying if data was set """ return _amici.ExpData_isSetObservedData(self, it, iy)
[docs] def getObservedData(self) -> "std::vector< amici::realtype,std::allocator< amici::realtype > > const &": r""" get function that copies data from ExpData::observedData to output :rtype: std::vector< amici::realtype,std::allocator< amici::realtype > > :return: observed data (dimension: nt x nytrue, row-major) """ return _amici.ExpData_getObservedData(self)
[docs] def getObservedDataPtr(self, it: "int") -> "amici::realtype const *": r""" get function that returns a pointer to observed data at index :type it: int :param it: timepoint index :rtype: float :return: pointer to observed data at index (dimension: nytrue) """ return _amici.ExpData_getObservedDataPtr(self, it)
[docs] def setObservedDataStdDev(self, *args) -> "void": r""" *Overload 1:* set function that copies data from input to ExpData::observedDataStdDev :type observedDataStdDev: std::vector< amici::realtype,std::allocator< amici::realtype > > :param observedDataStdDev: standard deviation of observed data (dimension: nt x nytrue, row-major) | *Overload 2:* set function that sets all ExpData::observedDataStdDev to the input value :type stdDev: float :param stdDev: standard deviation (dimension: scalar) | *Overload 3:* set function that copies standard deviation of observed data for specific observable :type observedDataStdDev: std::vector< amici::realtype,std::allocator< amici::realtype > > :param observedDataStdDev: standard deviation of observed data (dimension: nt) :type iy: int :param iy: observed data index | *Overload 4:* set function that sets all standard deviation of a specific observable to the input value :type stdDev: float :param stdDev: standard deviation (dimension: scalar) :type iy: int :param iy: observed data index """ return _amici.ExpData_setObservedDataStdDev(self, *args)
[docs] def isSetObservedDataStdDev(self, it: "int", iy: "int") -> "bool": r""" get function that checks whether standard deviation of data at specified indices has been set :type it: int :param it: time index :type iy: int :param iy: observable index :rtype: boolean :return: boolean specifying if standard deviation of data was set """ return _amici.ExpData_isSetObservedDataStdDev(self, it, iy)
[docs] def getObservedDataStdDev(self) -> "std::vector< amici::realtype,std::allocator< amici::realtype > > const &": r""" get function that copies data from ExpData::observedDataStdDev to output :rtype: std::vector< amici::realtype,std::allocator< amici::realtype > > :return: standard deviation of observed data """ return _amici.ExpData_getObservedDataStdDev(self)
[docs] def getObservedDataStdDevPtr(self, it: "int") -> "amici::realtype const *": r""" get function that returns a pointer to standard deviation of observed data at index :type it: int :param it: timepoint index :rtype: float :return: pointer to standard deviation of observed data at index """ return _amici.ExpData_getObservedDataStdDevPtr(self, it)
[docs] def setObservedEvents(self, *args) -> "void": r""" *Overload 1:* set function that copies observed event data from input to ExpData::observedEvents :type observedEvents: std::vector< amici::realtype,std::allocator< amici::realtype > > :param observedEvents: observed data (dimension: nmaxevent x nztrue, row-major) | *Overload 2:* set function that copies observed event data for specific event observable :type observedEvents: std::vector< amici::realtype,std::allocator< amici::realtype > > :param observedEvents: observed data (dimension: nmaxevent) :type iz: int :param iz: observed event data index """ return _amici.ExpData_setObservedEvents(self, *args)
[docs] def isSetObservedEvents(self, ie: "int", iz: "int") -> "bool": r""" get function that checks whether event data at specified indices has been set :type ie: int :param ie: event index :type iz: int :param iz: event observable index :rtype: boolean :return: boolean specifying if data was set """ return _amici.ExpData_isSetObservedEvents(self, ie, iz)
[docs] def getObservedEvents(self) -> "std::vector< amici::realtype,std::allocator< amici::realtype > > const &": r""" get function that copies data from ExpData::mz to output :rtype: std::vector< amici::realtype,std::allocator< amici::realtype > > :return: observed event data """ return _amici.ExpData_getObservedEvents(self)
[docs] def getObservedEventsPtr(self, ie: "int") -> "amici::realtype const *": r""" get function that returns a pointer to observed data at ieth occurrence :type ie: int :param ie: event occurrence :rtype: float :return: pointer to observed event data at ieth occurrence """ return _amici.ExpData_getObservedEventsPtr(self, ie)
[docs] def setObservedEventsStdDev(self, *args) -> "void": r""" *Overload 1:* set function that copies data from input to ExpData::observedEventsStdDev :type observedEventsStdDev: std::vector< amici::realtype,std::allocator< amici::realtype > > :param observedEventsStdDev: standard deviation of observed event data | *Overload 2:* set function that sets all ExpData::observedDataStdDev to the input value :type stdDev: float :param stdDev: standard deviation (dimension: scalar) | *Overload 3:* set function that copies standard deviation of observed data for specific observable :type observedEventsStdDev: std::vector< amici::realtype,std::allocator< amici::realtype > > :param observedEventsStdDev: standard deviation of observed data (dimension: nmaxevent) :type iz: int :param iz: observed data index | *Overload 4:* set function that sets all standard deviation of a specific observable to the input value :type stdDev: float :param stdDev: standard deviation (dimension: scalar) :type iz: int :param iz: observed data index """ return _amici.ExpData_setObservedEventsStdDev(self, *args)
[docs] def isSetObservedEventsStdDev(self, ie: "int", iz: "int") -> "bool": r""" get function that checks whether standard deviation of even data at specified indices has been set :type ie: int :param ie: event index :type iz: int :param iz: event observable index :rtype: boolean :return: boolean specifying if standard deviation of event data was set """ return _amici.ExpData_isSetObservedEventsStdDev(self, ie, iz)
[docs] def getObservedEventsStdDev(self) -> "std::vector< amici::realtype,std::allocator< amici::realtype > > const &": r""" get function that copies data from ExpData::observedEventsStdDev to output :rtype: std::vector< amici::realtype,std::allocator< amici::realtype > > :return: standard deviation of observed event data """ return _amici.ExpData_getObservedEventsStdDev(self)
[docs] def getObservedEventsStdDevPtr(self, ie: "int") -> "amici::realtype const *": r""" get function that returns a pointer to standard deviation of observed event data at ie-th occurrence :type ie: int :param ie: event occurrence :rtype: float :return: pointer to standard deviation of observed event data at ie-th occurrence """ return _amici.ExpData_getObservedEventsStdDevPtr(self, ie)
# Register ExpData in _amici: _amici.ExpData_swigregister(ExpData) def checkSigmaPositivity(*args) -> "void": r""" *Overload 1:* checks input vector of sigmas for not strictly positive values :type sigmaVector: std::vector< amici::realtype,std::allocator< amici::realtype > > :param sigmaVector: vector input to be checked :type vectorName: string :param vectorName: name of the input | *Overload 2:* checks input scalar sigma for not strictly positive value :type sigma: float :param sigma: input to be checked :type sigmaName: string :param sigmaName: name of the input """ return _amici.checkSigmaPositivity(*args)
[docs]class Solver(object): r""" The Solver class provides a generic interface to CVODES and IDAS solvers, individual realizations are realized in the CVodeSolver and the IDASolver class. All transient private/protected members (CVODES/IDAS memory, interface variables and status flags) are specified as mutable and not included in serialization or equality checks. No solver setting parameter should be marked mutable. NOTE: Any changes in data members here must be propagated to copy ctor, equality operator, serialization functions in serialization.h, and amici::hdf5::readSolverSettingsFromHDF5 in hdf5.cpp. """ thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
[docs] def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined - class is abstract")
__repr__ = _swig_repr __swig_destroy__ = _amici.delete_Solver
[docs] def clone(self) -> "amici::Solver *": r""" Clone this instance :rtype: :py:class:`Solver` :return: The clone """ return _amici.Solver_clone(self)
[docs] def getSensitivityMethod(self) -> "amici::SensitivityMethod": r""" Return current sensitivity method :rtype: int :return: method enum """ return _amici.Solver_getSensitivityMethod(self)
[docs] def setSensitivityMethod(self, sensi_meth: "amici::SensitivityMethod") -> "void": r""" Set sensitivity method :type sensi_meth: int :param sensi_meth: """ return _amici.Solver_setSensitivityMethod(self, sensi_meth)
[docs] def getSensitivityMethodPreequilibration(self) -> "amici::SensitivityMethod": r""" Return current sensitivity method during preequilibration :rtype: int :return: method enum """ return _amici.Solver_getSensitivityMethodPreequilibration(self)
[docs] def setSensitivityMethodPreequilibration(self, sensi_meth_preeq: "amici::SensitivityMethod") -> "void": r""" Set sensitivity method for preequilibration :type sensi_meth_preeq: int :param sensi_meth_preeq: """ return _amici.Solver_setSensitivityMethodPreequilibration(self, sensi_meth_preeq)
[docs] def switchForwardSensisOff(self) -> "void": r"""Disable forward sensitivity integration (used in steady state sim)""" return _amici.Solver_switchForwardSensisOff(self)
[docs] def getNewtonMaxSteps(self) -> "int": r""" Get maximum number of allowed Newton steps for steady state computation :rtype: int :return: """ return _amici.Solver_getNewtonMaxSteps(self)
[docs] def setNewtonMaxSteps(self, newton_maxsteps: "int") -> "void": r""" Set maximum number of allowed Newton steps for steady state computation :type newton_maxsteps: int :param newton_maxsteps: """ return _amici.Solver_setNewtonMaxSteps(self, newton_maxsteps)
[docs] def getPreequilibration(self) -> "bool": r""" Get if model preequilibration is enabled :rtype: boolean :return: """ return _amici.Solver_getPreequilibration(self)
[docs] def setPreequilibration(self, require_preequilibration: "bool") -> "void": r""" Enable/disable model preequilibration :type require_preequilibration: boolean :param require_preequilibration: """ return _amici.Solver_setPreequilibration(self, require_preequilibration)
[docs] def getNewtonMaxLinearSteps(self) -> "int": r""" Get maximum number of allowed linear steps per Newton step for steady state computation :rtype: int :return: """ return _amici.Solver_getNewtonMaxLinearSteps(self)
[docs] def setNewtonMaxLinearSteps(self, newton_maxlinsteps: "int") -> "void": r""" Set maximum number of allowed linear steps per Newton step for steady state computation :type newton_maxlinsteps: int :param newton_maxlinsteps: """ return _amici.Solver_setNewtonMaxLinearSteps(self, newton_maxlinsteps)
[docs] def getNewtonDampingFactorMode(self) -> "amici::NewtonDampingFactorMode": r""" Get a state of the damping factor used in the Newton solver :rtype: int :return: """ return _amici.Solver_getNewtonDampingFactorMode(self)
[docs] def setNewtonDampingFactorMode(self, dampingFactorMode: "amici::NewtonDampingFactorMode") -> "void": r""" Turn on/off a damping factor in the Newton method :type dampingFactorMode: int :param dampingFactorMode: """ return _amici.Solver_setNewtonDampingFactorMode(self, dampingFactorMode)
[docs] def getNewtonDampingFactorLowerBound(self) -> "double": r""" Get a lower bound of the damping factor used in the Newton solver :rtype: float :return: """ return _amici.Solver_getNewtonDampingFactorLowerBound(self)
[docs] def setNewtonDampingFactorLowerBound(self, dampingFactorLowerBound: "double") -> "void": r""" Set a lower bound of the damping factor in the Newton solver :type dampingFactorLowerBound: float :param dampingFactorLowerBound: """ return _amici.Solver_setNewtonDampingFactorLowerBound(self, dampingFactorLowerBound)
[docs] def getSensitivityOrder(self) -> "amici::SensitivityOrder": r""" Get sensitivity order :rtype: int :return: sensitivity order """ return _amici.Solver_getSensitivityOrder(self)
[docs] def setSensitivityOrder(self, sensi: "amici::SensitivityOrder") -> "void": r""" Set the sensitivity order :type sensi: int :param sensi: sensitivity order """ return _amici.Solver_setSensitivityOrder(self, sensi)
[docs] def getRelativeTolerance(self) -> "double": r""" Get the relative tolerances for the forward problem Same tolerance is used for the backward problem if not specified differently via setRelativeToleranceASA. :rtype: float :return: relative tolerances """ return _amici.Solver_getRelativeTolerance(self)
[docs] def setRelativeTolerance(self, rtol: "double") -> "void": r""" Sets the relative tolerances for the forward problem Same tolerance is used for the backward problem if not specified differently via setRelativeToleranceASA. :type rtol: float :param rtol: relative tolerance (non-negative number) """ return _amici.Solver_setRelativeTolerance(self, rtol)
[docs] def getAbsoluteTolerance(self) -> "double": r""" Get the absolute tolerances for the forward problem Same tolerance is used for the backward problem if not specified differently via setAbsoluteToleranceASA. :rtype: float :return: absolute tolerances """ return _amici.Solver_getAbsoluteTolerance(self)
[docs] def setAbsoluteTolerance(self, atol: "double") -> "void": r""" Sets the absolute tolerances for the forward problem Same tolerance is used for the backward problem if not specified differently via setAbsoluteToleranceASA. :type atol: float :param atol: absolute tolerance (non-negative number) """ return _amici.Solver_setAbsoluteTolerance(self, atol)
[docs] def getRelativeToleranceFSA(self) -> "double": r""" Returns the relative tolerances for the forward sensitivity problem :rtype: float :return: relative tolerances """ return _amici.Solver_getRelativeToleranceFSA(self)
[docs] def setRelativeToleranceFSA(self, rtol: "double") -> "void": r""" Sets the relative tolerances for the forward sensitivity problem :type rtol: float :param rtol: relative tolerance (non-negative number) """ return _amici.Solver_setRelativeToleranceFSA(self, rtol)
[docs] def getAbsoluteToleranceFSA(self) -> "double": r""" Returns the absolute tolerances for the forward sensitivity problem :rtype: float :return: absolute tolerances """ return _amici.Solver_getAbsoluteToleranceFSA(self)
[docs] def setAbsoluteToleranceFSA(self, atol: "double") -> "void": r""" Sets the absolute tolerances for the forward sensitivity problem :type atol: float :param atol: absolute tolerance (non-negative number) """ return _amici.Solver_setAbsoluteToleranceFSA(self, atol)
[docs] def getRelativeToleranceB(self) -> "double": r""" Returns the relative tolerances for the adjoint sensitivity problem :rtype: float :return: relative tolerances """ return _amici.Solver_getRelativeToleranceB(self)
[docs] def setRelativeToleranceB(self, rtol: "double") -> "void": r""" Sets the relative tolerances for the adjoint sensitivity problem :type rtol: float :param rtol: relative tolerance (non-negative number) """ return _amici.Solver_setRelativeToleranceB(self, rtol)
[docs] def getAbsoluteToleranceB(self) -> "double": r""" Returns the absolute tolerances for the backward problem for adjoint sensitivity analysis :rtype: float :return: absolute tolerances """ return _amici.Solver_getAbsoluteToleranceB(self)
[docs] def setAbsoluteToleranceB(self, atol: "double") -> "void": r""" Sets the absolute tolerances for the backward problem for adjoint sensitivity analysis :type atol: float :param atol: absolute tolerance (non-negative number) """ return _amici.Solver_setAbsoluteToleranceB(self, atol)
[docs] def getRelativeToleranceQuadratures(self) -> "double": r""" Returns the relative tolerance for the quadrature problem :rtype: float :return: relative tolerance """ return _amici.Solver_getRelativeToleranceQuadratures(self)
[docs] def setRelativeToleranceQuadratures(self, rtol: "double") -> "void": r""" sets the relative tolerance for the quadrature problem :type rtol: float :param rtol: relative tolerance (non-negative number) """ return _amici.Solver_setRelativeToleranceQuadratures(self, rtol)
[docs] def getAbsoluteToleranceQuadratures(self) -> "double": r""" returns the absolute tolerance for the quadrature problem :rtype: float :return: absolute tolerance """ return _amici.Solver_getAbsoluteToleranceQuadratures(self)
[docs] def setAbsoluteToleranceQuadratures(self, atol: "double") -> "void": r""" sets the absolute tolerance for the quadrature problem :type atol: float :param atol: absolute tolerance (non-negative number) """ return _amici.Solver_setAbsoluteToleranceQuadratures(self, atol)
[docs] def getRelativeToleranceSteadyState(self) -> "double": r""" returns the relative tolerance for the steady state problem :rtype: float :return: relative tolerance """ return _amici.Solver_getRelativeToleranceSteadyState(self)
[docs] def setRelativeToleranceSteadyState(self, rtol: "double") -> "void": r""" sets the relative tolerance for the steady state problem :type rtol: float :param rtol: relative tolerance (non-negative number) """ return _amici.Solver_setRelativeToleranceSteadyState(self, rtol)
[docs] def getAbsoluteToleranceSteadyState(self) -> "double": r""" returns the absolute tolerance for the steady state problem :rtype: float :return: absolute tolerance """ return _amici.Solver_getAbsoluteToleranceSteadyState(self)
[docs] def setAbsoluteToleranceSteadyState(self, atol: "double") -> "void": r""" sets the absolute tolerance for the steady state problem :type atol: float :param atol: absolute tolerance (non-negative number) """ return _amici.Solver_setAbsoluteToleranceSteadyState(self, atol)
[docs] def getRelativeToleranceSteadyStateSensi(self) -> "double": r""" returns the relative tolerance for the sensitivities of the steady state problem :rtype: float :return: relative tolerance """ return _amici.Solver_getRelativeToleranceSteadyStateSensi(self)
[docs] def setRelativeToleranceSteadyStateSensi(self, rtol: "double") -> "void": r""" sets the relative tolerance for the sensitivities of the steady state problem :type rtol: float :param rtol: relative tolerance (non-negative number) """ return _amici.Solver_setRelativeToleranceSteadyStateSensi(self, rtol)
[docs] def getAbsoluteToleranceSteadyStateSensi(self) -> "double": r""" returns the absolute tolerance for the sensitivities of the steady state problem :rtype: float :return: absolute tolerance """ return _amici.Solver_getAbsoluteToleranceSteadyStateSensi(self)
[docs] def setAbsoluteToleranceSteadyStateSensi(self, atol: "double") -> "void": r""" sets the absolute tolerance for the sensitivities of the steady state problem :type atol: float :param atol: absolute tolerance (non-negative number) """ return _amici.Solver_setAbsoluteToleranceSteadyStateSensi(self, atol)
[docs] def getMaxSteps(self) -> "long": r""" returns the maximum number of solver steps for the forward problem :rtype: int :return: maximum number of solver steps """ return _amici.Solver_getMaxSteps(self)
[docs] def setMaxSteps(self, maxsteps: "long") -> "void": r""" sets the maximum number of solver steps for the forward problem :type maxsteps: int :param maxsteps: maximum number of solver steps (positive number) """ return _amici.Solver_setMaxSteps(self, maxsteps)
[docs] def getMaxStepsBackwardProblem(self) -> "long": r""" returns the maximum number of solver steps for the backward problem :rtype: int :return: maximum number of solver steps """ return _amici.Solver_getMaxStepsBackwardProblem(self)
[docs] def setMaxStepsBackwardProblem(self, maxsteps: "long") -> "void": r""" sets the maximum number of solver steps for the backward problem :type maxsteps: int :param maxsteps: maximum number of solver steps (non-negative number) Notes: default behaviour (100 times the value for the forward problem) can be restored by passing maxsteps=0 """ return _amici.Solver_setMaxStepsBackwardProblem(self, maxsteps)
[docs] def getLinearMultistepMethod(self) -> "amici::LinearMultistepMethod": r""" returns the linear system multistep method :rtype: int :return: linear system multistep method """ return _amici.Solver_getLinearMultistepMethod(self)
[docs] def setLinearMultistepMethod(self, lmm: "amici::LinearMultistepMethod") -> "void": r""" sets the linear system multistep method :type lmm: int :param lmm: linear system multistep method """ return _amici.Solver_setLinearMultistepMethod(self, lmm)
[docs] def getNonlinearSolverIteration(self) -> "amici::NonlinearSolverIteration": r""" returns the nonlinear system solution method :rtype: int :return: """ return _amici.Solver_getNonlinearSolverIteration(self)
[docs] def setNonlinearSolverIteration(self, iter: "amici::NonlinearSolverIteration") -> "void": r""" sets the nonlinear system solution method :type iter: int :param iter: nonlinear system solution method """ return _amici.Solver_setNonlinearSolverIteration(self, iter)
[docs] def getInterpolationType(self) -> "amici::InterpolationType": r""" getInterpolationType :rtype: int :return: """ return _amici.Solver_getInterpolationType(self)
[docs] def setInterpolationType(self, interpType: "amici::InterpolationType") -> "void": r""" sets the interpolation of the forward solution that is used for the backwards problem :type interpType: int :param interpType: interpolation type """ return _amici.Solver_setInterpolationType(self, interpType)
[docs] def getStateOrdering(self) -> "int": r""" Gets KLU / SuperLUMT state ordering mode :rtype: int :return: State-ordering as integer according to SUNLinSolKLU::StateOrdering or SUNLinSolSuperLUMT::StateOrdering (which differ). """ return _amici.Solver_getStateOrdering(self)
[docs] def setStateOrdering(self, ordering: "int") -> "void": r""" Sets KLU / SuperLUMT state ordering mode This only applies when linsol is set to LinearSolver::KLU or LinearSolver::SuperLUMT. Mind the difference between SUNLinSolKLU::StateOrdering and SUNLinSolSuperLUMT::StateOrdering. :type ordering: int :param ordering: state ordering """ return _amici.Solver_setStateOrdering(self, ordering)
[docs] def getStabilityLimitFlag(self) -> "bool": r""" returns stability limit detection mode :rtype: boolean :return: stldet can be false (deactivated) or true (activated) """ return _amici.Solver_getStabilityLimitFlag(self)
[docs] def setStabilityLimitFlag(self, stldet: "bool") -> "void": r""" set stability limit detection mode :type stldet: boolean :param stldet: can be false (deactivated) or true (activated) """ return _amici.Solver_setStabilityLimitFlag(self, stldet)
[docs] def getLinearSolver(self) -> "amici::LinearSolver": r""" getLinearSolver :rtype: int :return: """ return _amici.Solver_getLinearSolver(self)
[docs] def setLinearSolver(self, linsol: "amici::LinearSolver") -> "void": r""" setLinearSolver :type linsol: int :param linsol: """ return _amici.Solver_setLinearSolver(self, linsol)
[docs] def getInternalSensitivityMethod(self) -> "amici::InternalSensitivityMethod": r""" returns the internal sensitivity method :rtype: int :return: internal sensitivity method """ return _amici.Solver_getInternalSensitivityMethod(self)
[docs] def setInternalSensitivityMethod(self, ism: "amici::InternalSensitivityMethod") -> "void": r""" sets the internal sensitivity method :type ism: int :param ism: internal sensitivity method """ return _amici.Solver_setInternalSensitivityMethod(self, ism)
[docs] def getReturnDataReportingMode(self) -> "amici::RDataReporting": r""" returns the ReturnData reporting mode :rtype: int :return: ReturnData reporting mode """ return _amici.Solver_getReturnDataReportingMode(self)
[docs] def setReturnDataReportingMode(self, rdrm: "amici::RDataReporting") -> "void": r""" sets the ReturnData reporting mode :type rdrm: int :param rdrm: ReturnData reporting mode """ return _amici.Solver_setReturnDataReportingMode(self, rdrm)
[docs] def gett(self) -> "amici::realtype": r""" current solver timepoint :rtype: float :return: t """ return _amici.Solver_gett(self)
[docs] def getCpuTime(self) -> "amici::realtype": r""" Reads out the CPU time needed for forward solve :rtype: float :return: cpu_time """ return _amici.Solver_getCpuTime(self)
[docs] def getCpuTimeB(self) -> "amici::realtype": r""" Reads out the CPU time needed for backward solve :rtype: float :return: cpu_timeB """ return _amici.Solver_getCpuTimeB(self)
[docs] def nx(self) -> "int": r""" number of states with which the solver was initialized :rtype: int :return: x.getLength() """ return _amici.Solver_nx(self)
[docs] def nplist(self) -> "int": r""" number of parameters with which the solver was initialized :rtype: int :return: sx.getLength() """ return _amici.Solver_nplist(self)
[docs] def nquad(self) -> "int": r""" number of quadratures with which the solver was initialized :rtype: int :return: xQB.getLength() """ return _amici.Solver_nquad(self)
[docs] def computingFSA(self) -> "bool": r""" check if FSA is being computed :rtype: boolean :return: flag """ return _amici.Solver_computingFSA(self)
[docs] def computingASA(self) -> "bool": r""" check if ASA is being computed :rtype: boolean :return: flag """ return _amici.Solver_computingASA(self)
[docs] def getNumSteps(self) -> "std::vector< int,std::allocator< int > > const &": r""" Accessor ns :rtype: std::vector< int,std::allocator< int > > :return: ns """ return _amici.Solver_getNumSteps(self)
[docs] def getNumStepsB(self) -> "std::vector< int,std::allocator< int > > const &": r""" Accessor nsB :rtype: std::vector< int,std::allocator< int > > :return: nsB """ return _amici.Solver_getNumStepsB(self)
[docs] def getNumRhsEvals(self) -> "std::vector< int,std::allocator< int > > const &": r""" Accessor nrhs :rtype: std::vector< int,std::allocator< int > > :return: nrhs """ return _amici.Solver_getNumRhsEvals(self)
[docs] def getNumRhsEvalsB(self) -> "std::vector< int,std::allocator< int > > const &": r""" Accessor nrhsB :rtype: std::vector< int,std::allocator< int > > :return: nrhsB """ return _amici.Solver_getNumRhsEvalsB(self)
[docs] def getNumErrTestFails(self) -> "std::vector< int,std::allocator< int > > const &": r""" Accessor netf :rtype: std::vector< int,std::allocator< int > > :return: netf """ return _amici.Solver_getNumErrTestFails(self)
[docs] def getNumErrTestFailsB(self) -> "std::vector< int,std::allocator< int > > const &": r""" Accessor netfB :rtype: std::vector< int,std::allocator< int > > :return: netfB """ return _amici.Solver_getNumErrTestFailsB(self)
[docs] def getNumNonlinSolvConvFails(self) -> "std::vector< int,std::allocator< int > > const &": r""" Accessor nnlscf :rtype: std::vector< int,std::allocator< int > > :return: nnlscf """ return _amici.Solver_getNumNonlinSolvConvFails(self)
[docs] def getNumNonlinSolvConvFailsB(self) -> "std::vector< int,std::allocator< int > > const &": r""" Accessor nnlscfB :rtype: std::vector< int,std::allocator< int > > :return: nnlscfB """ return _amici.Solver_getNumNonlinSolvConvFailsB(self)
[docs] def getLastOrder(self) -> "std::vector< int,std::allocator< int > > const &": r""" Accessor order :rtype: std::vector< int,std::allocator< int > > :return: order """ return _amici.Solver_getLastOrder(self)
app = property(_amici.Solver_app_get, _amici.Solver_app_set, doc=r""" AMICI context""")
# Register Solver in _amici: _amici.Solver_swigregister(Solver) def wrapErrHandlerFn(error_code: "int", module: "char const *", function: "char const *", msg: "char *", eh_data: "void *") -> "void": r""" Extracts diagnosis information from solver memory block and passes them to the specified output function :type error_code: int :param error_code: error identifier :type module: string :param module: name of the module in which the error occurred :type function: string :param function: name of the function in which the error occurred :type msg: string :param msg: error message :type eh_data: void :param eh_data: amici::Solver as void* """ return _amici.wrapErrHandlerFn(error_code, module, function, msg, eh_data) class IDASolver(Solver): r"""The IDASolver class is a wrapper around the SUNDIALS IDAS solver.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr __swig_destroy__ = _amici.delete_IDASolver def clone(self) -> "amici::Solver *": r""" Clone this instance :rtype: :py:class:`Solver` :return: The clone """ return _amici.IDASolver_clone(self) def reInitPostProcessF(self, tnext: "amici::realtype") -> "void": return _amici.IDASolver_reInitPostProcessF(self, tnext) def reInitPostProcessB(self, tnext: "amici::realtype") -> "void": return _amici.IDASolver_reInitPostProcessB(self, tnext) def quadSStolerancesB(self, which: "int", reltolQB: "amici::realtype", abstolQB: "amici::realtype") -> "void": return _amici.IDASolver_quadSStolerancesB(self, which, reltolQB, abstolQB) def quadSStolerances(self, reltolQ: "amici::realtype", abstolQ: "amici::realtype") -> "void": return _amici.IDASolver_quadSStolerances(self, reltolQ, abstolQ) def solve(self, tout: "amici::realtype", itask: "int") -> "int": return _amici.IDASolver_solve(self, tout, itask) def solveF(self, tout: "amici::realtype", itask: "int", ncheckPtr: "int *") -> "int": return _amici.IDASolver_solveF(self, tout, itask, ncheckPtr) def getDky(self, t: "amici::realtype", k: "int") -> "void": return _amici.IDASolver_getDky(self, t, k) def getSens(self) -> "void": return _amici.IDASolver_getSens(self) def getSensDky(self, t: "amici::realtype", k: "int") -> "void": return _amici.IDASolver_getSensDky(self, t, k) def getB(self, which: "int") -> "void": return _amici.IDASolver_getB(self, which) def getDkyB(self, t: "amici::realtype", k: "int", which: "int") -> "void": return _amici.IDASolver_getDkyB(self, t, k, which) def getQuadB(self, which: "int") -> "void": return _amici.IDASolver_getQuadB(self, which) def getQuadDkyB(self, t: "amici::realtype", k: "int", which: "int") -> "void": return _amici.IDASolver_getQuadDkyB(self, t, k, which) def getQuad(self, t: "amici::realtype &") -> "void": return _amici.IDASolver_getQuad(self, t) def getQuadDky(self, t: "amici::realtype", k: "int") -> "void": return _amici.IDASolver_getQuadDky(self, t, k) def setStopTime(self, tstop: "amici::realtype") -> "void": return _amici.IDASolver_setStopTime(self, tstop) def getModel(self) -> "amici::Model const *": return _amici.IDASolver_getModel(self) def setLinearSolver(self) -> "void": return _amici.IDASolver_setLinearSolver(self) def setLinearSolverB(self, which: "int") -> "void": return _amici.IDASolver_setLinearSolverB(self, which) def setNonLinearSolver(self) -> "void": return _amici.IDASolver_setNonLinearSolver(self) def setNonLinearSolverSens(self) -> "void": return _amici.IDASolver_setNonLinearSolverSens(self) def setNonLinearSolverB(self, which: "int") -> "void": return _amici.IDASolver_setNonLinearSolverB(self, which) def __init__(self): _amici.IDASolver_swiginit(self, _amici.new_IDASolver()) # Register IDASolver in _amici: _amici.IDASolver_swigregister(IDASolver) class CVodeSolver(Solver): r"""The CVodeSolver class is a wrapper around the SUNDIALS CVODES solver.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr __swig_destroy__ = _amici.delete_CVodeSolver def clone(self) -> "amici::Solver *": r""" Clone this instance :rtype: :py:class:`Solver` :return: The clone """ return _amici.CVodeSolver_clone(self) def solve(self, tout: "amici::realtype", itask: "int") -> "int": return _amici.CVodeSolver_solve(self, tout, itask) def solveF(self, tout: "amici::realtype", itask: "int", ncheckPtr: "int *") -> "int": return _amici.CVodeSolver_solveF(self, tout, itask, ncheckPtr) def getDky(self, t: "amici::realtype", k: "int") -> "void": return _amici.CVodeSolver_getDky(self, t, k) def getSensDky(self, t: "amici::realtype", k: "int") -> "void": return _amici.CVodeSolver_getSensDky(self, t, k) def getQuadDkyB(self, t: "amici::realtype", k: "int", which: "int") -> "void": return _amici.CVodeSolver_getQuadDkyB(self, t, k, which) def getDkyB(self, t: "amici::realtype", k: "int", which: "int") -> "void": return _amici.CVodeSolver_getDkyB(self, t, k, which) def setStopTime(self, tstop: "amici::realtype") -> "void": return _amici.CVodeSolver_setStopTime(self, tstop) def getModel(self) -> "amici::Model const *": return _amici.CVodeSolver_getModel(self) def setLinearSolver(self, *args) -> "void": return _amici.CVodeSolver_setLinearSolver(self, *args) def setLinearSolverB(self, which: "int") -> "void": return _amici.CVodeSolver_setLinearSolverB(self, which) def setNonLinearSolver(self) -> "void": return _amici.CVodeSolver_setNonLinearSolver(self) def setNonLinearSolverSens(self) -> "void": return _amici.CVodeSolver_setNonLinearSolverSens(self) def setNonLinearSolverB(self, which: "int") -> "void": return _amici.CVodeSolver_setNonLinearSolverB(self, which) def __init__(self): _amici.CVodeSolver_swiginit(self, _amici.new_CVodeSolver()) # Register CVodeSolver in _amici: _amici.CVodeSolver_swigregister(CVodeSolver)
[docs]class Model(AbstractModel, ModelDimensions): r""" The Model class represents an AMICI ODE/DAE model. The model can compute various model related quantities based on symbolically generated code. """ thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
[docs] def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined - class is abstract")
__repr__ = _swig_repr __swig_destroy__ = _amici.delete_Model
[docs] def clone(self) -> "amici::Model *": r""" Clone this instance. :rtype: :py:class:`Model` :return: The clone """ return _amici.Model_clone(self)
[docs] def nplist(self) -> "int": r""" Get number of parameters wrt to which sensitivities are computed. :rtype: int :return: Length of sensitivity index vector """ return _amici.Model_nplist(self)
[docs] def np(self) -> "int": r""" Get total number of model parameters. :rtype: int :return: Length of parameter vector """ return _amici.Model_np(self)
[docs] def nk(self) -> "int": r""" Get number of constants :rtype: int :return: Length of constant vector """ return _amici.Model_nk(self)
[docs] def ncl(self) -> "int": r""" Get number of conservation laws. :rtype: int :return: Number of conservation laws (i.e., difference between `nx_rdata` and `nx_solver`). """ return _amici.Model_ncl(self)
[docs] def nx_reinit(self) -> "int": r""" Get number of solver states subject to reinitialization. :rtype: int :return: Model member `nx_solver_reinit` """ return _amici.Model_nx_reinit(self)
[docs] def k(self) -> "double const *": r""" Get fixed parameters. :rtype: float :return: Pointer to constants array """ return _amici.Model_k(self)
[docs] def nMaxEvent(self) -> "int": r""" Get maximum number of events that may occur for each type. :rtype: int :return: Maximum number of events that may occur for each type """ return _amici.Model_nMaxEvent(self)
[docs] def setNMaxEvent(self, nmaxevent: "int") -> "void": r""" Set maximum number of events that may occur for each type. :type nmaxevent: int :param nmaxevent: Maximum number of events that may occur for each type """ return _amici.Model_setNMaxEvent(self, nmaxevent)
[docs] def nt(self) -> "int": r""" Get number of timepoints. :rtype: int :return: Number of timepoints """ return _amici.Model_nt(self)
[docs] def getParameterScale(self) -> "std::vector< amici::ParameterScaling,std::allocator< amici::ParameterScaling > > const &": r""" Get parameter scale for each parameter. :rtype: std::vector< amici::ParameterScaling,std::allocator< amici::ParameterScaling > > :return: Vector of parameter scales """ return _amici.Model_getParameterScale(self)
[docs] def setParameterScale(self, *args) -> "void": r""" *Overload 1:* Set parameter scale for each parameter. NOTE: Resets initial state sensitivities. :type pscale: int :param pscale: Scalar parameter scale to be set for all parameters | *Overload 2:* Set parameter scale for each parameter. NOTE: Resets initial state sensitivities. :type pscaleVec: std::vector< amici::ParameterScaling,std::allocator< amici::ParameterScaling > > :param pscaleVec: Vector of parameter scales """ return _amici.Model_setParameterScale(self, *args)
[docs] def getUnscaledParameters(self) -> "std::vector< amici::realtype,std::allocator< amici::realtype > > const &": r""" Get parameters with transformation according to parameter scale applied. :rtype: std::vector< amici::realtype,std::allocator< amici::realtype > > :return: Unscaled parameters """ return _amici.Model_getUnscaledParameters(self)
[docs] def getParameters(self) -> "std::vector< amici::realtype,std::allocator< amici::realtype > > const &": r""" Get parameter vector. :rtype: std::vector< amici::realtype,std::allocator< amici::realtype > > :return: The user-set parameters (see also `Model::getUnscaledParameters`) """ return _amici.Model_getParameters(self)
[docs] def getParameterById(self, par_id: "std::string const &") -> "amici::realtype": r""" Get value of first model parameter with the specified ID. :type par_id: string :param par_id: Parameter ID :rtype: float :return: Parameter value """ return _amici.Model_getParameterById(self, par_id)
[docs] def getParameterByName(self, par_name: "std::string const &") -> "amici::realtype": r""" Get value of first model parameter with the specified name. :type par_name: string :param par_name: Parameter name :rtype: float :return: Parameter value """ return _amici.Model_getParameterByName(self, par_name)
[docs] def setParameters(self, p: "DoubleVector") -> "void": r""" Set the parameter vector. :type p: std::vector< amici::realtype,std::allocator< amici::realtype > > :param p: Vector of parameters """ return _amici.Model_setParameters(self, p)
[docs] def setParameterById(self, *args) -> "void": r""" *Overload 1:* Set model parameters according to the parameter IDs and mapped values. :type p: std::map< std::string,amici::realtype,std::less< std::string >,std::allocator< std::pair< std::string const,amici::realtype > > > :param p: Map of parameters IDs and values :type ignoreErrors: boolean, optional :param ignoreErrors: Ignore errors such as parameter IDs in p which are not model parameters | *Overload 2:* Set value of first model parameter with the specified ID. :type par_id: string :param par_id: Parameter ID :type value: float :param value: Parameter value """ return _amici.Model_setParameterById(self, *args)
[docs] def setParametersByIdRegex(self, par_id_regex: "std::string const &", value: "amici::realtype") -> "int": r""" Set all values of model parameters with IDs matching the specified regular expression. :type par_id_regex: string :param par_id_regex: Parameter ID regex :type value: float :param value: Parameter value :rtype: int :return: Number of parameter IDs that matched the regex """ return _amici.Model_setParametersByIdRegex(self, par_id_regex, value)
[docs] def setParameterByName(self, *args) -> "void": r""" *Overload 1:* Set value of first model parameter with the specified name. :type par_name: string :param par_name: Parameter name :type value: float :param value: Parameter value | *Overload 2:* Set model parameters according to the parameter name and mapped values. :type p: std::map< std::string,amici::realtype,std::less< std::string >,std::allocator< std::pair< std::string const,amici::realtype > > > :param p: Map of parameters names and values :type ignoreErrors: boolean, optional :param ignoreErrors: Ignore errors such as parameter names in p which are not model parameters | *Overload 3:* Set model parameters according to the parameter name and mapped values. :type p: std::map< std::string,amici::realtype,std::less< std::string >,std::allocator< std::pair< std::string const,amici::realtype > > > :param p: Map of parameters names and values :param ignoreErrors: Ignore errors such as parameter names in p which are not model parameters """ return _amici.Model_setParameterByName(self, *args)
[docs] def setParametersByNameRegex(self, par_name_regex: "std::string const &", value: "amici::realtype") -> "int": r""" Set all values of all model parameters with names matching the specified regex. :type par_name_regex: string :param par_name_regex: Parameter name regex :type value: float :param value: Parameter value :rtype: int :return: Number of fixed parameter names that matched the regex """ return _amici.Model_setParametersByNameRegex(self, par_name_regex, value)
[docs] def getFixedParameters(self) -> "std::vector< amici::realtype,std::allocator< amici::realtype > > const &": r""" Get values of fixed parameters. :rtype: std::vector< amici::realtype,std::allocator< amici::realtype > > :return: Vector of fixed parameters with same ordering as in Model::getFixedParameterIds """ return _amici.Model_getFixedParameters(self)
[docs] def getFixedParameterById(self, par_id: "std::string const &") -> "amici::realtype": r""" Get value of fixed parameter with the specified ID. :type par_id: string :param par_id: Parameter ID :rtype: float :return: Parameter value """ return _amici.Model_getFixedParameterById(self, par_id)
[docs] def getFixedParameterByName(self, par_name: "std::string const &") -> "amici::realtype": r""" Get value of fixed parameter with the specified name. If multiple parameters have the same name, the first parameter with matching name is returned. :type par_name: string :param par_name: Parameter name :rtype: float :return: Parameter value """ return _amici.Model_getFixedParameterByName(self, par_name)
[docs] def setFixedParameters(self, k: "DoubleVector") -> "void": r""" Set values for constants. :type k: std::vector< amici::realtype,std::allocator< amici::realtype > > :param k: Vector of fixed parameters """ return _amici.Model_setFixedParameters(self, k)
[docs] def setFixedParameterById(self, par_id: "std::string const &", value: "amici::realtype") -> "void": r""" Set value of first fixed parameter with the specified ID. :type par_id: string :param par_id: Fixed parameter id :type value: float :param value: Fixed parameter value """ return _amici.Model_setFixedParameterById(self, par_id, value)
[docs] def setFixedParametersByIdRegex(self, par_id_regex: "std::string const &", value: "amici::realtype") -> "int": r""" Set values of all fixed parameters with the ID matching the specified regex. :type par_id_regex: string :param par_id_regex: Fixed parameter name regex :type value: float :param value: Fixed parameter value :rtype: int :return: Number of fixed parameter IDs that matched the regex """ return _amici.Model_setFixedParametersByIdRegex(self, par_id_regex, value)
[docs] def setFixedParameterByName(self, par_name: "std::string const &", value: "amici::realtype") -> "void": r""" Set value of first fixed parameter with the specified name. :type par_name: string :param par_name: Fixed parameter ID :type value: float :param value: Fixed parameter value """ return _amici.Model_setFixedParameterByName(self, par_name, value)
[docs] def setFixedParametersByNameRegex(self, par_name_regex: "std::string const &", value: "amici::realtype") -> "int": r""" Set value of all fixed parameters with name matching the specified regex. :type par_name_regex: string :param par_name_regex: Fixed parameter name regex :type value: float :param value: Fixed parameter value :rtype: int :return: Number of fixed parameter names that matched the regex """ return _amici.Model_setFixedParametersByNameRegex(self, par_name_regex, value)
[docs] def getName(self) -> "std::string": r""" Get the model name. :rtype: string :return: Model name """ return _amici.Model_getName(self)
[docs] def hasParameterNames(self) -> "bool": r""" Report whether the model has parameter names set. :rtype: boolean :return: Boolean indicating whether parameter names were set. Also returns `true` if the number of corresponding variables is just zero. """ return _amici.Model_hasParameterNames(self)
[docs] def getParameterNames(self) -> "std::vector< std::string,std::allocator< std::string > >": r""" Get names of the model parameters. :rtype: std::vector< std::string,std::allocator< std::string > > :return: The parameter names """ return _amici.Model_getParameterNames(self)
[docs] def hasStateNames(self) -> "bool": r""" Report whether the model has state names set. :rtype: boolean :return: Boolean indicating whether state names were set. Also returns `true` if the number of corresponding variables is just zero. """ return _amici.Model_hasStateNames(self)
[docs] def getStateNames(self) -> "std::vector< std::string,std::allocator< std::string > >": r""" Get names of the model states. :rtype: std::vector< std::string,std::allocator< std::string > > :return: State names """ return _amici.Model_getStateNames(self)
[docs] def hasFixedParameterNames(self) -> "bool": r""" Report whether the model has fixed parameter names set. :rtype: boolean :return: Boolean indicating whether fixed parameter names were set. Also returns `true` if the number of corresponding variables is just zero. """ return _amici.Model_hasFixedParameterNames(self)
[docs] def getFixedParameterNames(self) -> "std::vector< std::string,std::allocator< std::string > >": r""" Get names of the fixed model parameters. :rtype: std::vector< std::string,std::allocator< std::string > > :return: Fixed parameter names """ return _amici.Model_getFixedParameterNames(self)
[docs] def hasObservableNames(self) -> "bool": r""" Report whether the model has observable names set. :rtype: boolean :return: Boolean indicating whether observable names were set. Also returns `true` if the number of corresponding variables is just zero. """ return _amici.Model_hasObservableNames(self)
[docs] def getObservableNames(self) -> "std::vector< std::string,std::allocator< std::string > >": r""" Get names of the observables. :rtype: std::vector< std::string,std::allocator< std::string > > :return: Observable names """ return _amici.Model_getObservableNames(self)
[docs] def hasExpressionNames(self) -> "bool": r""" Report whether the model has expression names set. :rtype: boolean :return: Boolean indicating whether expression names were set. Also returns `true` if the number of corresponding variables is just zero. """ return _amici.Model_hasExpressionNames(self)
[docs] def getExpressionNames(self) -> "std::vector< std::string,std::allocator< std::string > >": r""" Get names of the expressions. :rtype: std::vector< std::string,std::allocator< std::string > > :return: Expression names """ return _amici.Model_getExpressionNames(self)
[docs] def hasParameterIds(self) -> "bool": r""" Report whether the model has parameter IDs set. :rtype: boolean :return: Boolean indicating whether parameter IDs were set. Also returns `true` if the number of corresponding variables is just zero. """ return _amici.Model_hasParameterIds(self)
[docs] def getParameterIds(self) -> "std::vector< std::string,std::allocator< std::string > >": r""" Get IDs of the model parameters. :rtype: std::vector< std::string,std::allocator< std::string > > :return: Parameter IDs """ return _amici.Model_getParameterIds(self)
[docs] def hasStateIds(self) -> "bool": r""" Report whether the model has state IDs set. :rtype: boolean :return: Boolean indicating whether state IDs were set. Also returns `true` if the number of corresponding variables is just zero. """ return _amici.Model_hasStateIds(self)
[docs] def getStateIds(self) -> "std::vector< std::string,std::allocator< std::string > >": r""" Get IDs of the model states. :rtype: std::vector< std::string,std::allocator< std::string > > :return: Sate IDs """ return _amici.Model_getStateIds(self)
[docs] def hasFixedParameterIds(self) -> "bool": r""" Report whether the model has fixed parameter IDs set. :rtype: boolean :return: Boolean indicating whether fixed parameter IDs were set. Also returns `true` if the number of corresponding variables is just zero. """ return _amici.Model_hasFixedParameterIds(self)
[docs] def getFixedParameterIds(self) -> "std::vector< std::string,std::allocator< std::string > >": r""" Get IDs of the fixed model parameters. :rtype: std::vector< std::string,std::allocator< std::string > > :return: Fixed parameter IDs """ return _amici.Model_getFixedParameterIds(self)
[docs] def hasObservableIds(self) -> "bool": r""" Report whether the model has observable IDs set. :rtype: boolean :return: Boolean indicating whether observable ids were set. Also returns `true` if the number of corresponding variables is just zero. """ return _amici.Model_hasObservableIds(self)
[docs] def getObservableIds(self) -> "std::vector< std::string,std::allocator< std::string > >": r""" Get IDs of the observables. :rtype: std::vector< std::string,std::allocator< std::string > > :return: Observable IDs """ return _amici.Model_getObservableIds(self)
[docs] def hasExpressionIds(self) -> "bool": r""" Report whether the model has expression IDs set. :rtype: boolean :return: Boolean indicating whether expression ids were set. Also returns `true` if the number of corresponding variables is just zero. """ return _amici.Model_hasExpressionIds(self)
[docs] def getExpressionIds(self) -> "std::vector< std::string,std::allocator< std::string > >": r""" Get IDs of the expression. :rtype: std::vector< std::string,std::allocator< std::string > > :return: Expression IDs """ return _amici.Model_getExpressionIds(self)
[docs] def hasQuadraticLLH(self) -> "bool": r""" Checks whether the defined noise model is gaussian, i.e., the nllh is quadratic :rtype: boolean :return: boolean flag """ return _amici.Model_hasQuadraticLLH(self)
[docs] def getTimepoints(self) -> "std::vector< amici::realtype,std::allocator< amici::realtype > > const &": r""" Get the timepoint vector. :rtype: std::vector< amici::realtype,std::allocator< amici::realtype > > :return: Timepoint vector """ return _amici.Model_getTimepoints(self)
[docs] def getTimepoint(self, it: "int") -> "amici::realtype": r""" Get simulation timepoint for time index `it`. :type it: int :param it: Time index :rtype: float :return: Timepoint """ return _amici.Model_getTimepoint(self, it)
[docs] def setTimepoints(self, ts: "DoubleVector") -> "void": r""" Set the timepoint vector. :type ts: std::vector< amici::realtype,std::allocator< amici::realtype > > :param ts: New timepoint vector """ return _amici.Model_setTimepoints(self, ts)
[docs] def t0(self) -> "double": r""" Get simulation start time. :rtype: float :return: Simulation start time """ return _amici.Model_t0(self)
[docs] def setT0(self, t0: "double") -> "void": r""" Set simulation start time. :type t0: float :param t0: Simulation start time """ return _amici.Model_setT0(self, t0)
[docs] def getStateIsNonNegative(self) -> "std::vector< bool,std::allocator< bool > > const &": r""" Get flags indicating whether states should be treated as non-negative. :rtype: std::vector< bool,std::allocator< bool > > :return: Vector of flags """ return _amici.Model_getStateIsNonNegative(self)
[docs] def setStateIsNonNegative(self, stateIsNonNegative: "BoolVector") -> "void": r""" Set flags indicating whether states should be treated as non-negative. :type stateIsNonNegative: std::vector< bool,std::allocator< bool > > :param stateIsNonNegative: Vector of flags """ return _amici.Model_setStateIsNonNegative(self, stateIsNonNegative)
[docs] def setAllStatesNonNegative(self) -> "void": r""" Set flags indicating that all states should be treated as non-negative. """ return _amici.Model_setAllStatesNonNegative(self)
[docs] def setMinimumSigmaResiduals(self, min_sigma: "double") -> "void": r""" Sets the estimated lower boundary for sigma_y. When :meth:`setAddSigmaResiduals` is activated, this lower boundary must ensure that log(sigma) + min_sigma > 0. :type min_sigma: float :param min_sigma: lower boundary """ return _amici.Model_setMinimumSigmaResiduals(self, min_sigma)
[docs] def getMinimumSigmaResiduals(self) -> "amici::realtype": r""" Gets the specified estimated lower boundary for sigma_y. :rtype: float :return: lower boundary """ return _amici.Model_getMinimumSigmaResiduals(self)
[docs] def setAddSigmaResiduals(self, sigma_res: "bool") -> "void": r""" Specifies whether residuals should be added to account for parameter dependent sigma. If set to true, additional residuals of the form :math:`\sqrt{\log(\sigma) + C}` will be added. This enables least-squares optimization for variables with Gaussian noise assumption and parameter dependent standard deviation sigma. The constant :math:`C` can be set via :meth:`setMinimumSigmaResiduals`. :type sigma_res: boolean :param sigma_res: if true, additional residuals are added """ return _amici.Model_setAddSigmaResiduals(self, sigma_res)
[docs] def getAddSigmaResiduals(self) -> "bool": r""" Checks whether residuals should be added to account for parameter dependent sigma. :rtype: boolean :return: sigma_res """ return _amici.Model_getAddSigmaResiduals(self)
[docs] def getParameterList(self) -> "std::vector< int,std::allocator< int > > const &": r""" Get the list of parameters for which sensitivities are computed. :rtype: std::vector< int,std::allocator< int > > :return: List of parameter indices """ return _amici.Model_getParameterList(self)
[docs] def plist(self, pos: "int") -> "int": r""" Get entry in parameter list by index. :type pos: int :param pos: Index in sensitivity parameter list :rtype: int :return: Index in parameter list """ return _amici.Model_plist(self, pos)
[docs] def setParameterList(self, plist: "IntVector") -> "void": r""" Set the list of parameters for which sensitivities are to be computed. NOTE: Resets initial state sensitivities. :type plist: std::vector< int,std::allocator< int > > :param plist: List of parameter indices """ return _amici.Model_setParameterList(self, plist)
[docs] def getInitialStates(self) -> "std::vector< amici::realtype,std::allocator< amici::realtype > >": r""" Get the initial states. :rtype: std::vector< amici::realtype,std::allocator< amici::realtype > > :return: Initial state vector """ return _amici.Model_getInitialStates(self)
[docs] def setInitialStates(self, x0: "DoubleVector") -> "void": r""" Set the initial states. :type x0: std::vector< amici::realtype,std::allocator< amici::realtype > > :param x0: Initial state vector """ return _amici.Model_setInitialStates(self, x0)
[docs] def hasCustomInitialStates(self) -> "bool": r""" Return whether custom initial states have been set. :rtype: boolean :return: `true` if has custom initial states, otherwise `false` """ return _amici.Model_hasCustomInitialStates(self)
[docs] def getInitialStateSensitivities(self) -> "std::vector< amici::realtype,std::allocator< amici::realtype > >": r""" Get the initial states sensitivities. :rtype: std::vector< amici::realtype,std::allocator< amici::realtype > > :return: vector of initial state sensitivities """ return _amici.Model_getInitialStateSensitivities(self)
[docs] def setInitialStateSensitivities(self, sx0: "DoubleVector") -> "void": r""" Set the initial state sensitivities. :type sx0: std::vector< amici::realtype,std::allocator< amici::realtype > > :param sx0: vector of initial state sensitivities with chainrule applied. This could be a slice of ReturnData::sx or ReturnData::sx0 """ return _amici.Model_setInitialStateSensitivities(self, sx0)
[docs] def hasCustomInitialStateSensitivities(self) -> "bool": r""" Return whether custom initial state sensitivities have been set. :rtype: boolean :return: `true` if has custom initial state sensitivities, otherwise `false`. """ return _amici.Model_hasCustomInitialStateSensitivities(self)
[docs] def setUnscaledInitialStateSensitivities(self, sx0: "DoubleVector") -> "void": r""" Set the initial state sensitivities. :type sx0: std::vector< amici::realtype,std::allocator< amici::realtype > > :param sx0: Vector of initial state sensitivities without chainrule applied. This could be the readin from a `model.sx0data` saved to HDF5. """ return _amici.Model_setUnscaledInitialStateSensitivities(self, sx0)
[docs] def setSteadyStateSensitivityMode(self, mode: "amici::SteadyStateSensitivityMode") -> "void": r""" Set the mode how sensitivities are computed in the steadystate simulation. :type mode: int :param mode: Steadystate sensitivity mode """ return _amici.Model_setSteadyStateSensitivityMode(self, mode)
[docs] def getSteadyStateSensitivityMode(self) -> "amici::SteadyStateSensitivityMode": r""" Gets the mode how sensitivities are computed in the steadystate simulation. :rtype: int :return: Mode """ return _amici.Model_getSteadyStateSensitivityMode(self)
[docs] def setReinitializeFixedParameterInitialStates(self, flag: "bool") -> "void": r""" Set whether initial states depending on fixed parameters are to be reinitialized after preequilibration and presimulation. :type flag: boolean :param flag: Fixed parameters reinitialized? """ return _amici.Model_setReinitializeFixedParameterInitialStates(self, flag)
[docs] def getReinitializeFixedParameterInitialStates(self) -> "bool": r""" Get whether initial states depending on fixedParameters are to be reinitialized after preequilibration and presimulation. :rtype: boolean :return: flag `true` / `false` """ return _amici.Model_getReinitializeFixedParameterInitialStates(self)
[docs] def requireSensitivitiesForAllParameters(self) -> "void": r""" Require computation of sensitivities for all parameters p [0..np[ in natural order. NOTE: Resets initial state sensitivities. """ return _amici.Model_requireSensitivitiesForAllParameters(self)
[docs] def setAlwaysCheckFinite(self, alwaysCheck: "bool") -> "void": r""" Set whether the result of every call to `Model::f*` should be checked for finiteness. :type alwaysCheck: boolean :param alwaysCheck: """ return _amici.Model_setAlwaysCheckFinite(self, alwaysCheck)
[docs] def getAlwaysCheckFinite(self) -> "bool": r""" Get setting of whether the result of every call to `Model::f*` should be checked for finiteness. :rtype: boolean :return: that """ return _amici.Model_getAlwaysCheckFinite(self)
[docs] def setReinitializationStateIdxs(self, idxs: "IntVector") -> "void": r""" Set indices of states to be reinitialized based on provided constants / fixed parameters :type idxs: std::vector< int,std::allocator< int > > :param idxs: Array of state indices """ return _amici.Model_setReinitializationStateIdxs(self, idxs)
[docs] def getReinitializationStateIdxs(self) -> "std::vector< int,std::allocator< int > > const &": r""" Return indices of states to be reinitialized based on provided constants / fixed parameters :rtype: std::vector< int,std::allocator< int > > :return: Those indices. """ return _amici.Model_getReinitializationStateIdxs(self)
pythonGenerated = property(_amici.Model_pythonGenerated_get, _amici.Model_pythonGenerated_set, doc=r""" Flag indicating Matlab- or Python-based model generation""") o2mode = property(_amici.Model_o2mode_get, _amici.Model_o2mode_set, doc=r""" Flag indicating whether for `amici::Solver::sensi_` == `amici::SensitivityOrder::second` directional or full second order derivative will be computed """) idlist = property(_amici.Model_idlist_get, _amici.Model_idlist_set, doc=r""" Flag array for DAE equations""") app = property(_amici.Model_app_get, _amici.Model_app_set, doc=r""" AMICI application context""")
# Register Model in _amici: _amici.Model_swigregister(Model) def equals(*args) -> "bool": r""" *Overload 1:* Check equality of data members excluding solver memory :type a: :py:class:`Solver` :param a: :type b: :py:class:`Solver` :param b: :rtype: boolean :return: | *Overload 2:* Equality operator :type a: :py:class:`CVodeSolver` :param a: :type b: :py:class:`CVodeSolver` :param b: :rtype: boolean :return: Whether a and b are equal | *Overload 3:* Check equality of data members. :type a: :py:class:`Model` :param a: First model instance :type b: :py:class:`Model` :param b: Second model instance :rtype: boolean :return: Equality """ return _amici.equals(*args) def __eq__(*args) -> "bool": return _amici.__eq__(*args) class Model_ODE(Model): r""" The Model class represents an AMICI ODE model. The model does not contain any data, but represents the state of the model at a specific time t. The states must not always be in sync, but may be updated asynchronously. """ 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 def getSolver(self) -> "std::unique_ptr< amici::Solver >": return _amici.Model_ODE_getSolver(self) __swig_destroy__ = _amici.delete_Model_ODE # Register Model_ODE in _amici: _amici.Model_ODE_swigregister(Model_ODE) class Model_DAE(Model): r""" The Model class represents an AMICI DAE model. The model does not contain any data, but represents the state of the model at a specific time t. The states must not always be in sync, but may be updated asynchronously. """ 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 def getSolver(self) -> "std::unique_ptr< amici::Solver >": return _amici.Model_DAE_getSolver(self) __swig_destroy__ = _amici.delete_Model_DAE # Register Model_DAE in _amici: _amici.Model_DAE_swigregister(Model_DAE)
[docs]class ReturnData(ModelDimensions): r""" Stores all data to be returned by amici::runAmiciSimulation. NOTE: multi-dimensional arrays are stored in row-major order (C-style) """ thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr
[docs] def __init__(self, *args): r""" *Overload 1:* Default constructor | *Overload 2:* Constructor :type ts: std::vector< amici::realtype,std::allocator< amici::realtype > > :param ts: see amici::SimulationParameters::ts :type model_dimensions: :py:class:`ModelDimensions` :param model_dimensions: Model dimensions :type nplist: int :param nplist: see amici::ModelDimensions::nplist :type nmaxevent: int :param nmaxevent: see amici::ModelDimensions::nmaxevent :type nt: int :param nt: see amici::ModelDimensions::nt :type newton_maxsteps: int :param newton_maxsteps: see amici::Solver::newton_maxsteps :type pscale: std::vector< amici::ParameterScaling,std::allocator< amici::ParameterScaling > > :param pscale: see amici::SimulationParameters::pscale :type o2mode: int :param o2mode: see amici::SimulationParameters::o2mode :type sensi: int :param sensi: see amici::Solver::sensi :type sensi_meth: int :param sensi_meth: see amici::Solver::sensi_meth :type rdrm: int :param rdrm: see amici::Solver::rdata_reporting :type quadratic_llh: boolean :param quadratic_llh: whether model defines a quadratic nllh and computing res, sres and FIM makes sense :type sigma_res: boolean :param sigma_res: indicates whether additional residuals are to be added for each sigma :type sigma_offset: float :param sigma_offset: offset to ensure real-valuedness of sigma residuals | *Overload 3:* constructor that uses information from model and solver to appropriately initialize fields :type solver: :py:class:`Solver` :param solver: solver instance :type model: :py:class:`Model` :param model: model instance """ _amici.ReturnData_swiginit(self, _amici.new_ReturnData(*args))
__swig_destroy__ = _amici.delete_ReturnData ts = property(_amici.ReturnData_ts_get, _amici.ReturnData_ts_set, doc=r"""timepoints (shape `nt`)""") xdot = property(_amici.ReturnData_xdot_get, _amici.ReturnData_xdot_set, doc=r""" time derivative (shape `nx`)""") J = property(_amici.ReturnData_J_get, _amici.ReturnData_J_set, doc=r"""Jacobian of differential equation right hand side (shape `nx` x `nx`, row-major)""") w = property(_amici.ReturnData_w_get, _amici.ReturnData_w_set, doc=r""" w data from the model (recurring terms in xdot, for imported SBML models from python, this contains the flux vector) (shape `nt` x `nw`, row major) """) z = property(_amici.ReturnData_z_get, _amici.ReturnData_z_set, doc=r""" event output (shape `nmaxevent` x `nz`, row-major)""") sigmaz = property(_amici.ReturnData_sigmaz_get, _amici.ReturnData_sigmaz_set, doc=r"""event output sigma standard deviation (shape `nmaxevent` x `nz`, row-major)""") sz = property(_amici.ReturnData_sz_get, _amici.ReturnData_sz_set, doc=r"""parameter derivative of event output (shape `nmaxevent` x `nz`, row-major)""") ssigmaz = property(_amici.ReturnData_ssigmaz_get, _amici.ReturnData_ssigmaz_set, doc=r"""parameter derivative of event output standard deviation (shape `nmaxevent` x `nz`, row-major)""") rz = property(_amici.ReturnData_rz_get, _amici.ReturnData_rz_set, doc=r""" event trigger output (shape `nmaxevent` x `nz`, row-major)""") srz = property(_amici.ReturnData_srz_get, _amici.ReturnData_srz_set, doc=r"""parameter derivative of event trigger output (shape `nmaxevent` x `nz` x `nplist`, row-major)""") s2rz = property(_amici.ReturnData_s2rz_get, _amici.ReturnData_s2rz_set, doc=r""" second-order parameter derivative of event trigger output (shape `nmaxevent` x `nztrue` x `nplist` x `nplist`, row-major) """) x = property(_amici.ReturnData_x_get, _amici.ReturnData_x_set, doc=r""" state (shape `nt` x `nx`, row-major)""") sx = property(_amici.ReturnData_sx_get, _amici.ReturnData_sx_set, doc=r"""parameter derivative of state (shape `nt` x `nplist` x `nx`, row-major)""") y = property(_amici.ReturnData_y_get, _amici.ReturnData_y_set, doc=r""" observable (shape `nt` x `ny`, row-major)""") sigmay = property(_amici.ReturnData_sigmay_get, _amici.ReturnData_sigmay_set, doc=r""" observable standard deviation (shape `nt` x `ny`, row-major)""") sy = property(_amici.ReturnData_sy_get, _amici.ReturnData_sy_set, doc=r""" parameter derivative of observable (shape `nt` x `nplist` x `ny`, row-major) """) ssigmay = property(_amici.ReturnData_ssigmay_get, _amici.ReturnData_ssigmay_set, doc=r"""parameter derivative of observable standard deviation (shape `nt` x `nplist` x `ny`, row-major)""") res = property(_amici.ReturnData_res_get, _amici.ReturnData_res_set, doc=r""" observable (shape `nt*ny`, row-major)""") sres = property(_amici.ReturnData_sres_get, _amici.ReturnData_sres_set, doc=r"""parameter derivative of residual (shape `nt*ny` x `nplist`, row-major)""") FIM = property(_amici.ReturnData_FIM_get, _amici.ReturnData_FIM_set, doc=r""" fisher information matrix (shape `nplist` x `nplist`, row-major)""") numsteps = property(_amici.ReturnData_numsteps_get, _amici.ReturnData_numsteps_set, doc=r""" number of integration steps forward problem (shape `nt`)""") numstepsB = property(_amici.ReturnData_numstepsB_get, _amici.ReturnData_numstepsB_set, doc=r""" number of integration steps backward problem (shape `nt`)""") numrhsevals = property(_amici.ReturnData_numrhsevals_get, _amici.ReturnData_numrhsevals_set, doc=r""" number of right hand side evaluations forward problem (shape `nt`)""") numrhsevalsB = property(_amici.ReturnData_numrhsevalsB_get, _amici.ReturnData_numrhsevalsB_set, doc=r""" number of right hand side evaluations backward problem (shape `nt`)""") numerrtestfails = property(_amici.ReturnData_numerrtestfails_get, _amici.ReturnData_numerrtestfails_set, doc=r""" number of error test failures forward problem (shape `nt`)""") numerrtestfailsB = property(_amici.ReturnData_numerrtestfailsB_get, _amici.ReturnData_numerrtestfailsB_set, doc=r""" number of error test failures backward problem (shape `nt`)""") numnonlinsolvconvfails = property(_amici.ReturnData_numnonlinsolvconvfails_get, _amici.ReturnData_numnonlinsolvconvfails_set, doc=r"""number of linear solver convergence failures forward problem (shape `nt`)""") numnonlinsolvconvfailsB = property(_amici.ReturnData_numnonlinsolvconvfailsB_get, _amici.ReturnData_numnonlinsolvconvfailsB_set, doc=r"""number of linear solver convergence failures backward problem (shape `nt`)""") order = property(_amici.ReturnData_order_get, _amici.ReturnData_order_set, doc=r""" employed order forward problem (shape `nt`)""") cpu_time = property(_amici.ReturnData_cpu_time_get, _amici.ReturnData_cpu_time_set, doc=r""" computation time of forward solve [ms]""") cpu_timeB = property(_amici.ReturnData_cpu_timeB_get, _amici.ReturnData_cpu_timeB_set, doc=r""" computation time of backward solve [ms]""") preeq_status = property(_amici.ReturnData_preeq_status_get, _amici.ReturnData_preeq_status_set, doc=r""" flags indicating success of steady state solver (preequilibration)""") preeq_cpu_time = property(_amici.ReturnData_preeq_cpu_time_get, _amici.ReturnData_preeq_cpu_time_set, doc=r""" computation time of the steady state solver [ms] (preequilibration)""") preeq_cpu_timeB = property(_amici.ReturnData_preeq_cpu_timeB_get, _amici.ReturnData_preeq_cpu_timeB_set, doc=r""" computation time of the steady state solver of the backward problem [ms] (preequilibration) """) posteq_status = property(_amici.ReturnData_posteq_status_get, _amici.ReturnData_posteq_status_set, doc=r""" flags indicating success of steady state solver (postequilibration)""") posteq_cpu_time = property(_amici.ReturnData_posteq_cpu_time_get, _amici.ReturnData_posteq_cpu_time_set, doc=r""" computation time of the steady state solver [ms] (postequilibration)""") posteq_cpu_timeB = property(_amici.ReturnData_posteq_cpu_timeB_get, _amici.ReturnData_posteq_cpu_timeB_set, doc=r""" computation time of the steady state solver of the backward problem [ms] (postequilibration) """) preeq_numsteps = property(_amici.ReturnData_preeq_numsteps_get, _amici.ReturnData_preeq_numsteps_set, doc=r""" number of Newton steps for steady state problem (preequilibration) [newton, simulation, newton] (length = 3) """) preeq_numlinsteps = property(_amici.ReturnData_preeq_numlinsteps_get, _amici.ReturnData_preeq_numlinsteps_set, doc=r""" number of linear steps by Newton step for steady state problem. this will only be filled for iterative solvers (preequilibration) (shape `newton_maxsteps * 2`) """) preeq_numstepsB = property(_amici.ReturnData_preeq_numstepsB_get, _amici.ReturnData_preeq_numstepsB_set, doc=r""" number of simulation steps for adjoint steady state problem (preequilibration) [== 0 if analytical solution worked, > 0 otherwise] """) posteq_numsteps = property(_amici.ReturnData_posteq_numsteps_get, _amici.ReturnData_posteq_numsteps_set, doc=r""" number of Newton steps for steady state problem (preequilibration) [newton, simulation, newton] (shape `3`) (postequilibration) """) posteq_numlinsteps = property(_amici.ReturnData_posteq_numlinsteps_get, _amici.ReturnData_posteq_numlinsteps_set, doc=r""" number of linear steps by Newton step for steady state problem. this will only be filled for iterative solvers (postequilibration) (shape `newton_maxsteps * 2`) """) posteq_numstepsB = property(_amici.ReturnData_posteq_numstepsB_get, _amici.ReturnData_posteq_numstepsB_set, doc=r""" number of simulation steps for adjoint steady state problem (postequilibration) [== 0 if analytical solution worked, > 0 otherwise] """) preeq_t = property(_amici.ReturnData_preeq_t_get, _amici.ReturnData_preeq_t_set, doc=r"""time when steadystate was reached via simulation (preequilibration)""") preeq_wrms = property(_amici.ReturnData_preeq_wrms_get, _amici.ReturnData_preeq_wrms_set, doc=r""" weighted root-mean-square of the rhs when steadystate was reached (preequilibration) """) posteq_t = property(_amici.ReturnData_posteq_t_get, _amici.ReturnData_posteq_t_set, doc=r"""time when steadystate was reached via simulation (postequilibration)""") posteq_wrms = property(_amici.ReturnData_posteq_wrms_get, _amici.ReturnData_posteq_wrms_set, doc=r""" weighted root-mean-square of the rhs when steadystate was reached (postequilibration) """) x0 = property(_amici.ReturnData_x0_get, _amici.ReturnData_x0_set, doc=r""" initial state (shape `nx`)""") x_ss = property(_amici.ReturnData_x_ss_get, _amici.ReturnData_x_ss_set, doc=r""" preequilibration steady state found by Newton solver (shape `nx`)""") sx0 = property(_amici.ReturnData_sx0_get, _amici.ReturnData_sx0_set, doc=r""" initial sensitivities (shape `nplist` x `nx`, row-major)""") sx_ss = property(_amici.ReturnData_sx_ss_get, _amici.ReturnData_sx_ss_set, doc=r""" preequilibration sensitivities found by Newton solver (shape `nplist` x `nx`, row-major) """) llh = property(_amici.ReturnData_llh_get, _amici.ReturnData_llh_set, doc=r""" log-likelihood value""") chi2 = property(_amici.ReturnData_chi2_get, _amici.ReturnData_chi2_set, doc=r""" :math:`\chi^2` value""") sllh = property(_amici.ReturnData_sllh_get, _amici.ReturnData_sllh_set, doc=r""" parameter derivative of log-likelihood (shape `nplist`)""") s2llh = property(_amici.ReturnData_s2llh_get, _amici.ReturnData_s2llh_set, doc=r""" second-order parameter derivative of log-likelihood (shape `nJ-1` x `nplist`, row-major) """) status = property(_amici.ReturnData_status_get, _amici.ReturnData_status_set, doc=r""" status code""") nx = property(_amici.ReturnData_nx_get, _amici.ReturnData_nx_set, doc=r""" number of states (alias `nx_rdata`, kept for backward compatibility)""") nxtrue = property(_amici.ReturnData_nxtrue_get, _amici.ReturnData_nxtrue_set, doc=r""" number of states in the unaugmented system (alias nxtrue_rdata, kept for backward compatibility) """) nplist = property(_amici.ReturnData_nplist_get, _amici.ReturnData_nplist_set, doc=r""" number of parameter for which sensitivities were requested""") nmaxevent = property(_amici.ReturnData_nmaxevent_get, _amici.ReturnData_nmaxevent_set, doc=r""" maximal number of occurring events (for every event type)""") nt = property(_amici.ReturnData_nt_get, _amici.ReturnData_nt_set, doc=r""" number of considered timepoints""") newton_maxsteps = property(_amici.ReturnData_newton_maxsteps_get, _amici.ReturnData_newton_maxsteps_set, doc=r""" maximal number of newton iterations for steady state calculation""") pscale = property(_amici.ReturnData_pscale_get, _amici.ReturnData_pscale_set, doc=r""" scaling of parameterization""") o2mode = property(_amici.ReturnData_o2mode_get, _amici.ReturnData_o2mode_set, doc=r""" flag indicating whether second-order sensitivities were requested""") sensi = property(_amici.ReturnData_sensi_get, _amici.ReturnData_sensi_set, doc=r""" sensitivity order""") sensi_meth = property(_amici.ReturnData_sensi_meth_get, _amici.ReturnData_sensi_meth_set, doc=r""" sensitivity method""") rdata_reporting = property(_amici.ReturnData_rdata_reporting_get, _amici.ReturnData_rdata_reporting_set, doc=r""" reporting mode""") sigma_res = property(_amici.ReturnData_sigma_res_get, _amici.ReturnData_sigma_res_set, doc=r""" boolean indicating whether residuals for standard deviations have been added""")
# Register ReturnData in _amici: _amici.ReturnData_swigregister(ReturnData) def printErrMsgIdAndTxt(id: "std::string const &", message: "std::string const &") -> "void": r""" Prints a specified error message associated with the specified identifier :type id: string :param id: error identifier :type message: string :param message: error message """ return _amici.printErrMsgIdAndTxt(id, message) def printWarnMsgIdAndTxt(id: "std::string const &", message: "std::string const &") -> "void": r""" Prints a specified warning message associated with the specified identifier :type id: string :param id: warning identifier :type message: string :param message: warning message """ return _amici.printWarnMsgIdAndTxt(id, message) class AmiciApplication(object): r""" Main class for making calls to AMICI. This class is used to provide separate AMICI contexts, for example, for use in multi-threaded applications where different threads want to use AMICI with different settings, such custom logging functions. NOTE: For this moment, the context object needs to be set manually to any Model and Solver object. If not set, they will use the default output channel. """ thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr def __init__(self): _amici.AmiciApplication_swiginit(self, _amici.new_AmiciApplication()) def runAmiciSimulation(self, solver: "Solver", edata: "ExpData", model: "Model", rethrow: "bool"=False) -> "std::unique_ptr< amici::ReturnData >": r""" Core integration routine. Initializes the solver and runs the forward and backward problem. :type solver: :py:class:`Solver` :param solver: Solver instance :type edata: :py:class:`ExpData` :param edata: pointer to experimental data object :type model: :py:class:`Model` :param model: model specification object :type rethrow: boolean, optional :param rethrow: rethrow integration exceptions? :rtype: std::unique_ptr< amici::ReturnData > :return: rdata pointer to return data object """ return _amici.AmiciApplication_runAmiciSimulation(self, solver, edata, model, rethrow) def runAmiciSimulations(self, solver: "Solver", edatas: "ExpDataPtrVector", model: "Model", failfast: "bool", num_threads: "int") -> "std::vector< std::unique_ptr< amici::ReturnData >,std::allocator< std::unique_ptr< amici::ReturnData > > >": r""" Same as runAmiciSimulation, but for multiple ExpData instances. :type solver: :py:class:`Solver` :param solver: Solver instance :type edatas: std::vector< amici::ExpData *,std::allocator< amici::ExpData * > > :param edatas: experimental data objects :type model: :py:class:`Model` :param model: model specification object :type failfast: boolean :param failfast: flag to allow early termination :type num_threads: int :param num_threads: number of threads for parallel execution :rtype: std::vector< std::unique_ptr< amici::ReturnData >,std::allocator< std::unique_ptr< amici::ReturnData > > > :return: vector of pointers to return data objects """ return _amici.AmiciApplication_runAmiciSimulations(self, solver, edatas, model, failfast, num_threads) warning = property(_amici.AmiciApplication_warning_get, _amici.AmiciApplication_warning_set, doc=r""" Function to process warnings""") error = property(_amici.AmiciApplication_error_get, _amici.AmiciApplication_error_set, doc=r""" Function to process errors""") __swig_destroy__ = _amici.delete_AmiciApplication # Register AmiciApplication in _amici: _amici.AmiciApplication_swigregister(AmiciApplication)
[docs]def runAmiciSimulation(solver: "Solver", edata: "ExpData", model: "Model", rethrow: "bool"=False) -> "std::unique_ptr< amici::ReturnData >": r""" Core integration routine. Initializes the solver and runs the forward and backward problem. :type solver: :py:class:`Solver` :param solver: Solver instance :type edata: :py:class:`ExpData` :param edata: pointer to experimental data object :type model: :py:class:`Model` :param model: model specification object :type rethrow: boolean, optional :param rethrow: rethrow integration exceptions? :rtype: std::unique_ptr< amici::ReturnData > :return: rdata pointer to return data object """ return _amici.runAmiciSimulation(solver, edata, model, rethrow)
[docs]def runAmiciSimulations(solver: "Solver", edatas: "ExpDataPtrVector", model: "Model", failfast: "bool", num_threads: "int") -> "std::vector< std::unique_ptr< amici::ReturnData >,std::allocator< std::unique_ptr< amici::ReturnData > > >": r""" Same as runAmiciSimulation, but for multiple ExpData instances. When compiled with OpenMP support, this function runs multi-threaded. :type solver: :py:class:`Solver` :param solver: Solver instance :type edatas: std::vector< amici::ExpData *,std::allocator< amici::ExpData * > > :param edatas: experimental data objects :type model: :py:class:`Model` :param model: model specification object :type failfast: boolean :param failfast: flag to allow early termination :type num_threads: int :param num_threads: number of threads for parallel execution :rtype: std::vector< std::unique_ptr< amici::ReturnData >,std::allocator< std::unique_ptr< amici::ReturnData > > > :return: vector of pointers to return data objects """ return _amici.runAmiciSimulations(solver, edatas, model, failfast, num_threads)
[docs]class ExpDataPtrVector(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 _amici.ExpDataPtrVector_iterator(self) def __iter__(self): return self.iterator() def __nonzero__(self) -> "bool": return _amici.ExpDataPtrVector___nonzero__(self) def __bool__(self) -> "bool": return _amici.ExpDataPtrVector___bool__(self) def __len__(self) -> "std::vector< amici::ExpData * >::size_type": return _amici.ExpDataPtrVector___len__(self) def __getslice__(self, i: "std::vector< amici::ExpData * >::difference_type", j: "std::vector< amici::ExpData * >::difference_type") -> "std::vector< amici::ExpData *,std::allocator< amici::ExpData * > > *": return _amici.ExpDataPtrVector___getslice__(self, i, j) def __setslice__(self, *args) -> "void": return _amici.ExpDataPtrVector___setslice__(self, *args) def __delslice__(self, i: "std::vector< amici::ExpData * >::difference_type", j: "std::vector< amici::ExpData * >::difference_type") -> "void": return _amici.ExpDataPtrVector___delslice__(self, i, j) def __delitem__(self, *args) -> "void": return _amici.ExpDataPtrVector___delitem__(self, *args) def __getitem__(self, *args) -> "std::vector< amici::ExpData * >::value_type": return _amici.ExpDataPtrVector___getitem__(self, *args) def __setitem__(self, *args) -> "void": return _amici.ExpDataPtrVector___setitem__(self, *args) def pop(self) -> "std::vector< amici::ExpData * >::value_type": return _amici.ExpDataPtrVector_pop(self) def append(self, x: "ExpData") -> "void": return _amici.ExpDataPtrVector_append(self, x) def empty(self) -> "bool": return _amici.ExpDataPtrVector_empty(self) def size(self) -> "std::vector< amici::ExpData * >::size_type": return _amici.ExpDataPtrVector_size(self) def swap(self, v: "ExpDataPtrVector") -> "void": return _amici.ExpDataPtrVector_swap(self, v) def begin(self) -> "std::vector< amici::ExpData * >::iterator": return _amici.ExpDataPtrVector_begin(self) def end(self) -> "std::vector< amici::ExpData * >::iterator": return _amici.ExpDataPtrVector_end(self) def rbegin(self) -> "std::vector< amici::ExpData * >::reverse_iterator": return _amici.ExpDataPtrVector_rbegin(self) def rend(self) -> "std::vector< amici::ExpData * >::reverse_iterator": return _amici.ExpDataPtrVector_rend(self) def clear(self) -> "void": return _amici.ExpDataPtrVector_clear(self) def get_allocator(self) -> "std::vector< amici::ExpData * >::allocator_type": return _amici.ExpDataPtrVector_get_allocator(self) def pop_back(self) -> "void": return _amici.ExpDataPtrVector_pop_back(self) def erase(self, *args) -> "std::vector< amici::ExpData * >::iterator": return _amici.ExpDataPtrVector_erase(self, *args) def __init__(self, *args): _amici.ExpDataPtrVector_swiginit(self, _amici.new_ExpDataPtrVector(*args)) def push_back(self, x: "ExpData") -> "void": return _amici.ExpDataPtrVector_push_back(self, x) def front(self) -> "std::vector< amici::ExpData * >::value_type": return _amici.ExpDataPtrVector_front(self) def back(self) -> "std::vector< amici::ExpData * >::value_type": return _amici.ExpDataPtrVector_back(self) def assign(self, n: "std::vector< amici::ExpData * >::size_type", x: "ExpData") -> "void": return _amici.ExpDataPtrVector_assign(self, n, x) def resize(self, *args) -> "void": return _amici.ExpDataPtrVector_resize(self, *args) def insert(self, *args) -> "void": return _amici.ExpDataPtrVector_insert(self, *args) def reserve(self, n: "std::vector< amici::ExpData * >::size_type") -> "void": return _amici.ExpDataPtrVector_reserve(self, n) def capacity(self) -> "std::vector< amici::ExpData * >::size_type": return _amici.ExpDataPtrVector_capacity(self) __swig_destroy__ = _amici.delete_ExpDataPtrVector
# Register ExpDataPtrVector in _amici: _amici.ExpDataPtrVector_swigregister(ExpDataPtrVector)
[docs]def parameterScalingFromIntVector(intVec: "IntVector") -> "std::vector< amici::ParameterScaling,std::allocator< amici::ParameterScaling > >": return _amici.parameterScalingFromIntVector(intVec)
[docs]class ParameterScalingVector(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 _amici.ParameterScalingVector_iterator(self) def __iter__(self): return self.iterator() def __nonzero__(self) -> "bool": return _amici.ParameterScalingVector___nonzero__(self) def __bool__(self) -> "bool": return _amici.ParameterScalingVector___bool__(self) def __len__(self) -> "std::vector< enum amici::ParameterScaling >::size_type": return _amici.ParameterScalingVector___len__(self) def __getslice__(self, i: "std::vector< enum amici::ParameterScaling >::difference_type", j: "std::vector< enum amici::ParameterScaling >::difference_type") -> "std::vector< amici::ParameterScaling,std::allocator< amici::ParameterScaling > > *": return _amici.ParameterScalingVector___getslice__(self, i, j) def __setslice__(self, *args) -> "void": return _amici.ParameterScalingVector___setslice__(self, *args) def __delslice__(self, i: "std::vector< enum amici::ParameterScaling >::difference_type", j: "std::vector< enum amici::ParameterScaling >::difference_type") -> "void": return _amici.ParameterScalingVector___delslice__(self, i, j) def __delitem__(self, *args) -> "void": return _amici.ParameterScalingVector___delitem__(self, *args) def __getitem__(self, *args) -> "std::vector< enum amici::ParameterScaling >::value_type const &": return _amici.ParameterScalingVector___getitem__(self, *args) def __setitem__(self, *args) -> "void": return _amici.ParameterScalingVector___setitem__(self, *args) def pop(self) -> "std::vector< enum amici::ParameterScaling >::value_type": return _amici.ParameterScalingVector_pop(self) def append(self, x: "std::vector< enum amici::ParameterScaling >::value_type const &") -> "void": return _amici.ParameterScalingVector_append(self, x) def empty(self) -> "bool": return _amici.ParameterScalingVector_empty(self) def size(self) -> "std::vector< enum amici::ParameterScaling >::size_type": return _amici.ParameterScalingVector_size(self) def swap(self, v: "ParameterScalingVector") -> "void": return _amici.ParameterScalingVector_swap(self, v) def begin(self) -> "std::vector< enum amici::ParameterScaling >::iterator": return _amici.ParameterScalingVector_begin(self) def end(self) -> "std::vector< enum amici::ParameterScaling >::iterator": return _amici.ParameterScalingVector_end(self) def rbegin(self) -> "std::vector< enum amici::ParameterScaling >::reverse_iterator": return _amici.ParameterScalingVector_rbegin(self) def rend(self) -> "std::vector< enum amici::ParameterScaling >::reverse_iterator": return _amici.ParameterScalingVector_rend(self) def clear(self) -> "void": return _amici.ParameterScalingVector_clear(self) def get_allocator(self) -> "std::vector< enum amici::ParameterScaling >::allocator_type": return _amici.ParameterScalingVector_get_allocator(self) def pop_back(self) -> "void": return _amici.ParameterScalingVector_pop_back(self) def erase(self, *args) -> "std::vector< enum amici::ParameterScaling >::iterator": return _amici.ParameterScalingVector_erase(self, *args) def __init__(self, *args): _amici.ParameterScalingVector_swiginit(self, _amici.new_ParameterScalingVector(*args)) def push_back(self, x: "std::vector< enum amici::ParameterScaling >::value_type const &") -> "void": return _amici.ParameterScalingVector_push_back(self, x) def front(self) -> "std::vector< enum amici::ParameterScaling >::value_type const &": return _amici.ParameterScalingVector_front(self) def back(self) -> "std::vector< enum amici::ParameterScaling >::value_type const &": return _amici.ParameterScalingVector_back(self) def assign(self, n: "std::vector< enum amici::ParameterScaling >::size_type", x: "std::vector< enum amici::ParameterScaling >::value_type const &") -> "void": return _amici.ParameterScalingVector_assign(self, n, x) def resize(self, *args) -> "void": return _amici.ParameterScalingVector_resize(self, *args) def insert(self, *args) -> "void": return _amici.ParameterScalingVector_insert(self, *args) def reserve(self, n: "std::vector< enum amici::ParameterScaling >::size_type") -> "void": return _amici.ParameterScalingVector_reserve(self, n) def capacity(self) -> "std::vector< enum amici::ParameterScaling >::size_type": return _amici.ParameterScalingVector_capacity(self) __swig_destroy__ = _amici.delete_ParameterScalingVector
# Register ParameterScalingVector in _amici: _amici.ParameterScalingVector_swigregister(ParameterScalingVector)
[docs]def compiledWithOpenMP() -> "bool": return _amici.compiledWithOpenMP()
from enum import IntEnum
[docs]def enum(prefix): values = {k:v for k,v in globals().items() if k.startswith(prefix + '_')} values = {k[len(prefix)+1:]:v for k,v in values.items()} return IntEnum(prefix, values)
ParameterScaling = enum('ParameterScaling') SecondOrderMode = enum('SecondOrderMode') SensitivityOrder = enum('SensitivityOrder') SensitivityMethod = enum('SensitivityMethod') LinearSolver = enum('LinearSolver') InternalSensitivityMethod = enum('InternalSensitivityMethod') InterpolationType = enum('InterpolationType') LinearMultistepMethod = enum('LinearMultistepMethod') NonlinearSolverIteration = enum('NonlinearSolverIteration') SteadyStateSensitivityMode = enum('SteadyStateSensitivityMode') SteadyStateStatus = enum('SteadyStateStatus') NewtonDampingFactorMode = enum('NewtonDampingFactorMode') FixedParameterContext = enum('FixedParameterContext') RDataReporting = enum('RDataReporting')
[docs]class SteadyStateStatusVector(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 _amici.SteadyStateStatusVector_iterator(self) def __iter__(self): return self.iterator() def __nonzero__(self) -> "bool": return _amici.SteadyStateStatusVector___nonzero__(self) def __bool__(self) -> "bool": return _amici.SteadyStateStatusVector___bool__(self) def __len__(self) -> "std::vector< enum amici::SteadyStateStatus >::size_type": return _amici.SteadyStateStatusVector___len__(self) def __getslice__(self, i: "std::vector< enum amici::SteadyStateStatus >::difference_type", j: "std::vector< enum amici::SteadyStateStatus >::difference_type") -> "std::vector< amici::SteadyStateStatus,std::allocator< amici::SteadyStateStatus > > *": return _amici.SteadyStateStatusVector___getslice__(self, i, j) def __setslice__(self, *args) -> "void": return _amici.SteadyStateStatusVector___setslice__(self, *args) def __delslice__(self, i: "std::vector< enum amici::SteadyStateStatus >::difference_type", j: "std::vector< enum amici::SteadyStateStatus >::difference_type") -> "void": return _amici.SteadyStateStatusVector___delslice__(self, i, j) def __delitem__(self, *args) -> "void": return _amici.SteadyStateStatusVector___delitem__(self, *args) def __getitem__(self, *args) -> "std::vector< enum amici::SteadyStateStatus >::value_type const &": return _amici.SteadyStateStatusVector___getitem__(self, *args) def __setitem__(self, *args) -> "void": return _amici.SteadyStateStatusVector___setitem__(self, *args) def pop(self) -> "std::vector< enum amici::SteadyStateStatus >::value_type": return _amici.SteadyStateStatusVector_pop(self) def append(self, x: "std::vector< enum amici::SteadyStateStatus >::value_type const &") -> "void": return _amici.SteadyStateStatusVector_append(self, x) def empty(self) -> "bool": return _amici.SteadyStateStatusVector_empty(self) def size(self) -> "std::vector< enum amici::SteadyStateStatus >::size_type": return _amici.SteadyStateStatusVector_size(self) def swap(self, v: "SteadyStateStatusVector") -> "void": return _amici.SteadyStateStatusVector_swap(self, v) def begin(self) -> "std::vector< enum amici::SteadyStateStatus >::iterator": return _amici.SteadyStateStatusVector_begin(self) def end(self) -> "std::vector< enum amici::SteadyStateStatus >::iterator": return _amici.SteadyStateStatusVector_end(self) def rbegin(self) -> "std::vector< enum amici::SteadyStateStatus >::reverse_iterator": return _amici.SteadyStateStatusVector_rbegin(self) def rend(self) -> "std::vector< enum amici::SteadyStateStatus >::reverse_iterator": return _amici.SteadyStateStatusVector_rend(self) def clear(self) -> "void": return _amici.SteadyStateStatusVector_clear(self) def get_allocator(self) -> "std::vector< enum amici::SteadyStateStatus >::allocator_type": return _amici.SteadyStateStatusVector_get_allocator(self) def pop_back(self) -> "void": return _amici.SteadyStateStatusVector_pop_back(self) def erase(self, *args) -> "std::vector< enum amici::SteadyStateStatus >::iterator": return _amici.SteadyStateStatusVector_erase(self, *args) def __init__(self, *args): _amici.SteadyStateStatusVector_swiginit(self, _amici.new_SteadyStateStatusVector(*args)) def push_back(self, x: "std::vector< enum amici::SteadyStateStatus >::value_type const &") -> "void": return _amici.SteadyStateStatusVector_push_back(self, x) def front(self) -> "std::vector< enum amici::SteadyStateStatus >::value_type const &": return _amici.SteadyStateStatusVector_front(self) def back(self) -> "std::vector< enum amici::SteadyStateStatus >::value_type const &": return _amici.SteadyStateStatusVector_back(self) def assign(self, n: "std::vector< enum amici::SteadyStateStatus >::size_type", x: "std::vector< enum amici::SteadyStateStatus >::value_type const &") -> "void": return _amici.SteadyStateStatusVector_assign(self, n, x) def resize(self, *args) -> "void": return _amici.SteadyStateStatusVector_resize(self, *args) def insert(self, *args) -> "void": return _amici.SteadyStateStatusVector_insert(self, *args) def reserve(self, n: "std::vector< enum amici::SteadyStateStatus >::size_type") -> "void": return _amici.SteadyStateStatusVector_reserve(self, n) def capacity(self) -> "std::vector< enum amici::SteadyStateStatus >::size_type": return _amici.SteadyStateStatusVector_capacity(self) __swig_destroy__ = _amici.delete_SteadyStateStatusVector
# Register SteadyStateStatusVector in _amici: _amici.SteadyStateStatusVector_swigregister(SteadyStateStatusVector)