44 #ifndef ILQGAMES_DYNAMICS_MULTI_PLAYER_FLAT_SYSTEM_H 45 #define ILQGAMES_DYNAMICS_MULTI_PLAYER_FLAT_SYSTEM_H 47 #include <ilqgames/dynamics/multi_player_integrable_system.h> 48 #include <ilqgames/utils/linear_dynamics_approximation.h> 49 #include <ilqgames/utils/operating_point.h> 50 #include <ilqgames/utils/quadratic_cost_approximation.h> 51 #include <ilqgames/utils/strategy.h> 52 #include <ilqgames/utils/types.h> 63 virtual VectorXf Evaluate(
const VectorXf& x,
64 const std::vector<VectorXf>& us)
const = 0;
67 virtual MatrixXf InverseDecouplingMatrix(
const VectorXf& x)
const = 0;
68 virtual VectorXf AffineTerm(
const VectorXf& x)
const = 0;
69 virtual VectorXf LinearizingControl(
const VectorXf& x,
const VectorXf& v,
70 PlayerIndex player)
const = 0;
71 virtual std::vector<VectorXf> LinearizingControls(
72 const VectorXf& x,
const std::vector<VectorXf>& vs)
const = 0;
73 virtual VectorXf ToLinearSystemState(
const VectorXf& x)
const = 0;
74 virtual VectorXf FromLinearSystemState(
const VectorXf& xi)
const = 0;
77 virtual void ChangeCostCoordinates(
78 const VectorXf& xi, std::vector<QuadraticCostApproximation>* q)
const = 0;
79 virtual void ChangeControlCostCoordinates(
80 const VectorXf& xi, std::vector<QuadraticCostApproximation>* q)
const = 0;
83 virtual bool IsLinearSystemStateSingular(
const VectorXf& xi)
const = 0;
88 VectorXf Integrate(Time time_interval,
const VectorXf& xi0,
89 const std::vector<VectorXf>& vs)
const;
90 VectorXf Integrate(Time t0, Time time_interval,
const VectorXf& xi0,
91 const std::vector<VectorXf>& vs)
const {
92 return Integrate(time_interval, xi0, vs);
98 bool TreatAsLinear()
const {
return true; }
102 if (!discrete_linear_system_) ComputeLinearizedSystem();
103 return *discrete_linear_system_;
106 virtual Dimension UDim(PlayerIndex player_idx)
const = 0;
107 virtual PlayerIndex NumPlayers()
const = 0;
113 virtual void ComputeLinearizedSystem()
const = 0;
116 mutable std::unique_ptr<const LinearDynamicsApproximation>
117 discrete_linear_system_;
118 mutable std::unique_ptr<const LinearDynamicsApproximation>
119 continuous_linear_system_;