72#include <fhsim/simobject/SimObject.h>
79 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
85 void OdeFcn(
const double dT,
const double*
const adX,
double*
const adXDot)
const;
87 bool HasJacobians()
const override;
88 void OdeJacobian(
double T,
const double* X,
double* J,
int nStates)
override;
89 int GetJacobianSparsity(
int nStates,
int* rowPtr,
int* colIdx)
override;
91 bool HasPortJacobians()
const override;
92 void OutputPortJacobian(
const std::string& portName,
double T,
const double* X,
93 double* dPort_dX,
int portSize,
int nStates,
int index = -1)
override;
94 void InputPortJacobian(
const std::string& portName,
double T,
const double* X,
95 double* dF_dInput,
int portSize,
int nStates)
override;
98 const double*
Output(
const double T,
const double*
const X);
104 Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic>
A;
107 Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic>
B;
110 Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic>
C;
113 Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic>
D;
Definition CLinearSystem.h:77
EIGEN_MAKE_ALIGNED_OPERATOR_NEW CLinearSystem(std::string sSimObjectName, ISimObjectCreator *pCreator)
Constructor.
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > D
The direct feedthrough matrix.
Definition CLinearSystem.h:113
std::vector< double > m_InitialState
Initial state handed to AddState (zeros; the engine copies it).
Definition CLinearSystem.h:119
void OdeFcn(const double dT, const double *const adX, double *const adXDot) const
Calculates the state derivatives.
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > B
The gain matrix.
Definition CLinearSystem.h:107
const double * Output(const double T, const double *const X)
The output of the system equation Y=C*x+D*u.
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > C
The output matrix.
Definition CLinearSystem.h:110
std::vector< double > m_Output
The output y, one value per row of C.
Definition CLinearSystem.h:122
ISignalPort * m_Input
Input port.
Definition CLinearSystem.h:116
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > A
The system matrix.
Definition CLinearSystem.h:104