MIMPC++
A fast typesafe Mixed Integer MPC C++ library
Public Types | Public Member Functions | List of all members
mimpc::MPC< SystemType, SolverType > Class Template Reference

#include <MPC.hpp>

Public Types

using SYSTEM_TYPE = SystemType
 
using SOLVER_TYPE = SolverType
 

Public Member Functions

 MPC (SolverType &solver)
 
SOLVER_RETURN control (const SystemType::StateVec &state, SystemType::InputVec &input, std::string &stats)
 

Detailed Description

template<class SystemType, class SolverType>
class mimpc::MPC< SystemType, SolverType >

This class provides a highlevel mpc interface.

Template Parameters
SystemTypethe system type which shall be controlled by the mpc must be of type System
SolverTypethe underlying solver which solves the optimization problem, must be of type Solver

Constructor & Destructor Documentation

◆ MPC()

template<class SystemType , class SolverType >
mimpc::MPC< SystemType, SolverType >::MPC ( SolverType &  solver)
explicit

Instantiates the MPC.

Parameters
solvera reference to the instance of the underlying optimization problem. The optimization problem needs to be configured via the low level interface.

Member Function Documentation

◆ control()

template<class SystemType , class SolverType >
SOLVER_RETURN mimpc::MPC< SystemType, SolverType >::control ( const SystemType::StateVec &  state,
SystemType::InputVec &  input,
std::string &  stats 
)

Starts the solving process based on the current state and returns the optimal input.

Parameters
statethe current system state
inputthe optimal input
statsstatistics about the solving process
returnsthe solver status even though no solutions are already handled by this class by using the old predictions

The documentation for this class was generated from the following file: