.. default-role:: code Modeling ======== This page provides an overview of the SDK's declarative modeling API. The functionality covered here is exported by the `opvious.modeling` module, which we recommend importing qualified: .. code-block:: python import opvious.modeling as om .. contents:: Table of contents :local: :backlinks: none Definitions *********** Each :class:`~opvious.modeling.Model` can be roughly thought of as a container for definitions. Its specification is generated by combining all its attributes which contain :class:`~opvious.modeling.Definition` instances. .. note:: Attributes starting with `_` are ignored when detecting a model's definitions. There are 6 categories of definitions, all described below. Dimensions ---------- .. autoclass:: opvious.modeling.Dimension :noindex: :show-inheritance: :members: Parameters and variables ------------------------ .. autoclass:: opvious.modeling.Parameter :noindex: :show-inheritance: :members: .. autoclass:: opvious.modeling.Variable :noindex: :show-inheritance: :members: Constraints ----------- .. autoclass:: opvious.modeling.Constraint :noindex: :show-inheritance: :members: .. autofunction:: opvious.modeling.constraint :noindex: Objectives ---------- .. autoclass:: opvious.modeling.Objective :noindex: :show-inheritance: :members: .. autofunction:: opvious.modeling.objective :noindex: Aliases ------- .. autofunction:: opvious.modeling.alias :noindex: Terms ***** Expressions ----------- .. autoclass:: opvious.modeling.Expression :noindex: :members: Quantifiers ----------- .. autoclass:: opvious.modeling.Quantifier :noindex: :members: Predicates ---------- .. autoclass:: opvious.modeling.Predicate :noindex: :members: Fragments ********* .. autoclass:: opvious.modeling.ModelFragment :noindex: :members: