pymloc.solver_container.factory¶
Classes
Factory class for solver containers. |
-
class
pymloc.solver_container.factory.SolverContainerFactory¶ Bases:
objectFactory class for solver containers.
Maintains the mapping between models (Solvables) and Containers of solvers.
-
static
get_instance()¶
-
get_solver_container(problem_instance)¶ - Parameters
problem_instance (pymloc.model.solvable.Solvable) –
- Return type
-
register_solver(problem, solver, default=False, creator_function=None)¶ “Registers a solver for the given problem.
- Parameters
problem (The solvable) –
solver (A solver compliant with the solvable) –
default (Whether this solver should be the default solver for problem.) –
creator_function (A method of Solvable, that can be used to create another solvable for) – which other types of solvers exist. This is most suitable for higher level abstraction. E.g., optimal control problems
pymloc.model.optimization.LQOptimalControlcan be solved in multiple ways. One approach is via necessary conditions, which itself constitute apymloc.model.dynamical_system.boundary_value_problem.BoundaryValueProblem. Hence, solverpymloc.solvers.dynamical_systems.multiple_shooting.MultipleShootingcan bes used to solvepymloc.model.optimization.LQOptimalControlwith the creator_function :method:`pymloc.model.optimization.LQOptimalControl.get_bvp`.
-
static