- 3.0.2 optimal control module.
ct::optcon::PolicyHandler< POLICY, STATE_DIM, CONTROL_DIM, SCALAR > Class Template Reference

#include <PolicyHandler.h>

Public Member Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW PolicyHandler ()
 
virtual ~PolicyHandler ()
 
virtual void designWarmStartingPolicy (const SCALAR &delay, const SCALAR &TimeHorizon, POLICY &policy)
 design a warm-starting policy for the optimal control problem solver More...
 
virtual void truncateSolutionFront (const SCALAR &delay, POLICY &policy, SCALAR &effectivelyTruncated)
 a method required for additional post-truncation. More...
 
void setPolicy (const POLICY &newPolicy)
 set new policy to policy handler More...
 

Protected Attributes

POLICY initialPolicy_
 

Constructor & Destructor Documentation

◆ PolicyHandler()

template<typename POLICY , size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR >
ct::optcon::PolicyHandler< POLICY, STATE_DIM, CONTROL_DIM, SCALAR >::PolicyHandler ( )

◆ ~PolicyHandler()

template<typename POLICY , size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR >
ct::optcon::PolicyHandler< POLICY, STATE_DIM, CONTROL_DIM, SCALAR >::~PolicyHandler ( )
virtual

Member Function Documentation

◆ designWarmStartingPolicy()

template<typename POLICY, size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR >
void ct::optcon::PolicyHandler< POLICY, STATE_DIM, CONTROL_DIM, SCALAR >::designWarmStartingPolicy ( const SCALAR delay,
const SCALAR TimeHorizon,
POLICY &  policy 
)
virtual

design a warm-starting policy for the optimal control problem solver

Designs an initial guess for MPC (warm-start). An optimal strategy for warm-starting might be highly application/system dependent, thus the user can overload this method if desired. Straight-forward default implementations for common 'ct' solvers and policy types are provided in the folder "default". Note that the default policy handler simply performs "cold-starting" which means that the initially provided control policy is returned without modification.

Parameters
delaytime difference between nominal starting time of the current policy and when the warm-start policy should start
TimeHorizondesired overall policy time horizon (note: not covering the whole time-horizon may result in an error)
policythe current policy, to be overwritten with the warm start

◆ truncateSolutionFront()

template<typename POLICY, size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR >
void ct::optcon::PolicyHandler< POLICY, STATE_DIM, CONTROL_DIM, SCALAR >::truncateSolutionFront ( const SCALAR delay,
POLICY &  policy,
SCALAR effectivelyTruncated 
)
virtual

a method required for additional post-truncation.

post truncation may become relevant if the delay is underestimated or pre-integration is turned off.

Parameters
delaythe time to truncate away from the solution
policythe policy to be truncated
effectivelyTruncatedthe time which was truncated away

◆ setPolicy()

template<typename POLICY, size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR >
void ct::optcon::PolicyHandler< POLICY, STATE_DIM, CONTROL_DIM, SCALAR >::setPolicy ( const POLICY &  newPolicy)

set new policy to policy handler

Member Data Documentation

◆ initialPolicy_

template<typename POLICY, size_t STATE_DIM, size_t CONTROL_DIM, typename SCALAR = double>
POLICY ct::optcon::PolicyHandler< POLICY, STATE_DIM, CONTROL_DIM, SCALAR >::initialPolicy_
protected

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