API Reference¶
This is the API documentation for the Common Optimization Interfaces.
This documentation lists every function and every class, including every method, that is stably supported by this project. It has been written in such a way as to support both browsing and targeted lookups. Nonetheless, new readers might feel more comfortable reading the User Guide first.
The documentation is sorted thematically. It begins by listing the
Core Classes of This Package, which are what users are expected to interact with most
of the time. This includes SingleOptimizable
and gymnasium.Env
, the
base classes from which most user classes should derive. After that
comes The Problem Registry, which is what users need to use both in order
to publish their optimization problems, and to instantiate them. The
next section covers The Configurable Interface, a mechanism through which an
optimization problem may declare which parts of it can be configured via
a graphical application.
After these topics of general interest, the documentation covers more specialized tools and conveniences provided by this package. The Cancellation API is a method through which optimization problems may wait for incoming data in a way that can still be interrupted by the user in a safe manner. Problem Checkers allow authors of optimization problems to test their classes for compliance with certain restrictions and assumptions that we place on the more general Gymnasium API. After that, we list Additional Interfaces, which contains useful but less commonly used interfaces. The Intersection Interfaces provide useful classes for when you want implement two interfaces at once or want to assert that a class does so. Finally, for all users of static type checking, a large number of Typeguards is provided to narrow this package’s interfaces as necessary.
The last two sections document implementation details of this package. We don’t expect the general user to read or even acknowledge them; rather, they are provided for the curious and for contributors who want to become more familiar with this package. The Common Optimization Interfaces document the pure protocols upon which the core classes are built. The Internal Machinery describes in detail the internal classes that make the package work the way it does.
- Core Classes of This Package
- The Problem Registry
- Exceptions Raised by the Problem Registry
AmbiguousNamespaceWarning
ApiCompatError
DeprecatedEnv
EntryPointError
EnvImportError
EnvOutOfDateWarning
EnvSpecExistsWarning
EnvUpgradedWarning
GymDeprecationWarning
HumanRenderingError
HumanRenderingWarning
NameNotFoundError
NamespaceNotFoundError
NotFoundError
PluginWarning
RegistrationError
RegistryError
RegistryWarning
RenderModeWarning
UnversionedExistsError
VersionNotFoundError
VersionedExistsError
WrapperClassError
WrapperError
WrapperMismatchError
WrapperUnexpectedError
- The Configurable Interface
- The Cancellation API
- Problem Checkers
- Additional Interfaces
- Intersection Interfaces
- Typeguards
AnyOptimizable
is_optimizable()
is_optimizable_class()
is_single_optimizable()
is_single_optimizable_class()
is_function_optimizable()
is_function_optimizable_class()
is_env()
is_env_class()
is_goal_env()
is_goal_env_class()
is_separable_env()
is_separable_env_class()
is_separable_goal_env()
is_separable_goal_env_class()
is_problem()
is_problem_class()
is_configurable()
is_configurable_class()
is_custom_optimizer_provider()
is_custom_optimizer_provider_class()
- Common Optimization Interfaces
- The Internal Machinery