类 ContinuousOutputModel
- 所有已实现的接口:
-
Serializable
,ODEStepHandler
This class act as a step handler from the integrator point of view. It is called iteratively during the integration process and stores a copy of all steps information in a sorted collection for later use. Once the integration process is over, the user can use the setInterpolatedTime
and getInterpolatedState
to retrieve this information at any time. It is important to wait for the integration to be over before attempting to call setInterpolatedTime
because some internal variables are set only once the last step has been handled.
This is useful for example if the main loop of the user application should remain independent from the integration process or if one needs to mimic the behaviour of an analytical model despite a numerical model is used (i.e. one needs the ability to get the model value at any time or to navigate through the data).
If problem modeling is done with several separate integration phases for contiguous intervals, the same ContinuousOutputModel can be used as step handler for all integration phases as long as they are performed in order and in the same direction. As an example, one can extrapolate the trajectory of a satellite with one model (i.e. one set of differential equations) up to the beginning of a maneuver, use another more complex model including thrusters modeling and accurate attitude control during the maneuver, and revert to the first model after the end of the maneuver. If the same continuous output model handles the steps of all integration phases, the user do not need to bother when the maneuver begins or ends, he has all the data available in a transparent manner.
An important feature of this class is that it implements the Serializable
interface. This means that the result of an integration can be serialized and reused later (if stored into a persistent medium like a filesystem or a database) or elsewhere (if sent to another application). Only the result of the integration is stored, there is no reference to the integrated problem by itself.
One should be aware that the amount of data stored in a ContinuousOutputModel instance can be important if the state vector is large, if the integration interval is long or if the steps are small (which can result from small tolerance settings in 自适应步长积分器
).
- 另请参阅:
-
构造器概要
-
方法概要
修饰符和类型方法说明double[]
已过时。获取插值点状态向量的导数。double[]
getInterpolatedSecondaryDerivatives
(int secondaryStateIndex) 已过时。获取与次要方程对应的插值次要导数。double[]
getInterpolatedSecondaryState
(int secondaryStateIndex) 已过时。获取与次要方程对应的插值次要状态。double[]
已过时。获取插值点的状态向量。double
已过时。获取插值点的时间。void
setInterpolatedTime
(double time) 已过时。设置插值点的时间。从类继承的方法 org.hipparchus.ode.DenseOutputModel
append, finish, getFinalTime, getInitialTime, getInterpolatedState, handleStep, init
-
构造器详细资料
-
ContinuousOutputModel
public ContinuousOutputModel()已过时。空构造函数。这个构造函数并非必需,但可以防止在 JDK 18 及更高版本中出现虚假的 javadoc 警告。
- 从以下版本开始:
- 3.0
-
-
方法详细资料
-
setInterpolatedTime
public void setInterpolatedTime(double time) 已过时。设置插值点的时间。在整合结束之前不应调用此方法,因为一些内部变量仅在处理最后一个步骤时设置。
现在允许在整合区间之外设置时间,但应谨慎使用,因为插值器的精度在远离此区间时可能非常差。这个允许性已添加以简化在区间端点附近实现搜索算法。
请注意,每次调用此方法时,
getInterpolatedState()
、getInterpolatedDerivatives()
和getInterpolatedSecondaryState(int)
中返回的内部数组将被覆盖。因此,如果它们的内容必须在多次调用之间保留,用户必须复制它们。- 参数:
-
time
- 插值点的时间 - 另请参阅:
-
getInterpolatedTime
public double getInterpolatedTime()已过时。获取插值点的时间。如果未调用setInterpolatedTime(double)
,则返回最终整合时间。- 返回:
- 插值点时间
-
getInterpolatedState
已过时。获取插值点的状态向量。返回的向量是一个重用的数组的引用,因此不应修改它,如果需要在多次调用相关的
setInterpolatedTime(double)
方法时保留它,应进行复制。- 返回:
-
时间为
getInterpolatedTime()
时的状态向量 - 抛出:
-
MathIllegalStateException
- 如果超过函数评估次数 - 另请参阅:
-
getInterpolatedDerivatives
已过时。获取插值点的状态向量的导数。返回的向量是一个重用的数组的引用,因此不应修改它,如果需要在多次调用相关的
setInterpolatedTime(double)
方法时保留它,应进行复制。- 返回:
-
时间为
getInterpolatedTime()
时的状态向量的导数 - 抛出:
-
MathIllegalStateException
- 如果超过函数评估次数 - 另请参阅:
-
getInterpolatedSecondaryState
public double[] getInterpolatedSecondaryState(int secondaryStateIndex) throws MathIllegalStateException 已过时。获取与次要方程对应的插值次要状态。返回的向量是一个重用的数组的引用,因此不应修改它,如果需要在多次调用相关的
setInterpolatedTime(double)
方法时保留它,应进行复制。- 参数:
-
secondaryStateIndex
- 次要集合的索引,由ExpandableODE.addSecondaryEquations(secondary)
返回 - 返回:
- 当前插值日期的插值次要状态
- 抛出:
-
MathIllegalStateException
- 如果超过函数评估的次数 - 另请参阅:
-
getInterpolatedSecondaryDerivatives
public double[] getInterpolatedSecondaryDerivatives(int secondaryStateIndex) throws MathIllegalStateException 已过时。获取与次要方程对应的插值次要导数。返回的向量是对重用数组的引用,因此不应修改它,如果需要在关联的
setInterpolatedTime(double)
方法的多次调用之间保留它,则应复制它。- 参数:
-
secondaryStateIndex
- 次要集合的索引,由ExpandableODE.addSecondaryEquations(secondary)
返回 - 返回:
- 当前插值日期的插值次要导数
- 抛出:
-
MathIllegalStateException
- 如果超过函数评估的次数 - 另请参阅:
-
DenseOutputModel