source: src/main/java/agents/org/apache/commons/math/ode/package.html

Last change on this file was 1, checked in by Wouter Pasman, 7 years ago

Initial import : Genius 9.0.0

File size: 8.5 KB
Line 
1<html>
2<!--
3 Licensed to the Apache Software Foundation (ASF) under one or more
4 contributor license agreements. See the NOTICE file distributed with
5 this work for additional information regarding copyright ownership.
6 The ASF licenses this file to You under the Apache License, Version 2.0
7 (the "License"); you may not use this file except in compliance with
8 the License. You may obtain a copy of the License at
9
10 http://www.apache.org/licenses/LICENSE-2.0
11
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
17 -->
18 <!-- $Revision: 920131 $ -->
19<body>
20<p>
21This package provides classes to solve Ordinary Differential Equations problems.
22</p>
23
24<p>
25This package solves Initial Value Problems of the form
26<code>y'=f(t,y)</code> with <code>t<sub>0</sub></code> and
27<code>y(t<sub>0</sub>)=y<sub>0</sub></code> known. The provided
28integrators compute an estimate of <code>y(t)</code> from
29<code>t=t<sub>0</sub></code> to <code>t=t<sub>1</sub></code>.
30If in addition to <code>y(t)</code> users need to get the
31derivatives with respect to the initial state
32<code>dy(t)/dy(t<sub>0</sub>)</code> or the derivatives with
33respect to some ODE parameters <code>dy(t)/dp</code>, then the
34classes from the <a href="./jacobians/package-summary.html">
35org.apache.commons.math.ode.jacobians</a> package must be used
36instead of the classes in this package.
37</p>
38
39<p>
40All integrators provide dense output. This means that besides
41computing the state vector at discrete times, they also provide a
42cheap mean to get the state between the time steps. They do so through
43classes extending the {@link
44org.apache.commons.math.ode.sampling.StepInterpolator StepInterpolator}
45abstract class, which are made available to the user at the end of
46each step.
47</p>
48
49<p>
50All integrators handle multiple discrete events detection based on switching
51functions. This means that the integrator can be driven by user specified
52discrete events. The steps are shortened as needed to ensure the events occur
53at step boundaries (even if the integrator is a fixed-step
54integrator). When the events are triggered, integration can be stopped
55(this is called a G-stop facility), the state vector can be changed,
56or integration can simply go on. The latter case is useful to handle
57discontinuities in the differential equations gracefully and get
58accurate dense output even close to the discontinuity.
59</p>
60
61<p>
62The user should describe his problem in his own classes
63(<code>UserProblem</code> in the diagram below) which should implement
64the {@link org.apache.commons.math.ode.FirstOrderDifferentialEquations
65FirstOrderDifferentialEquations} interface. Then he should pass it to
66the integrator he prefers among all the classes that implement the
67{@link org.apache.commons.math.ode.FirstOrderIntegrator
68FirstOrderIntegrator} interface.
69</p>
70
71<p>
72The solution of the integration problem is provided by two means. The
73first one is aimed towards simple use: the state vector at the end of
74the integration process is copied in the <code>y</code> array of the
75{@link org.apache.commons.math.ode.FirstOrderIntegrator#integrate
76FirstOrderIntegrator.integrate} method. The second one should be used
77when more in-depth information is needed throughout the integration
78process. The user can register an object implementing the {@link
79org.apache.commons.math.ode.sampling.StepHandler StepHandler} interface or a
80{@link org.apache.commons.math.ode.sampling.StepNormalizer StepNormalizer}
81object wrapping a user-specified object implementing the {@link
82org.apache.commons.math.ode.sampling.FixedStepHandler FixedStepHandler}
83interface into the integrator before calling the {@link
84org.apache.commons.math.ode.FirstOrderIntegrator#integrate
85FirstOrderIntegrator.integrate} method. The user object will be called
86appropriately during the integration process, allowing the user to
87process intermediate results. The default step handler does nothing.
88</p>
89
90<p>
91{@link org.apache.commons.math.ode.ContinuousOutputModel
92ContinuousOutputModel} is a special-purpose step handler that is able
93to store all steps and to provide transparent access to any
94intermediate result once the integration is over. An important feature
95of this class is that it implements the <code>Serializable</code>
96interface. This means that a complete continuous model of the
97integrated function throughout the integration range can be serialized
98and reused later (if stored into a persistent medium like a filesystem
99or a database) or elsewhere (if sent to another application). Only the
100result of the integration is stored, there is no reference to the
101integrated problem by itself.
102</p>
103
104<p>
105Other default implementations of the {@link
106org.apache.commons.math.ode.sampling.StepHandler StepHandler} interface are
107available for general needs ({@link
108org.apache.commons.math.ode.sampling.DummyStepHandler DummyStepHandler}, {@link
109org.apache.commons.math.ode.sampling.StepNormalizer StepNormalizer}) and custom
110implementations can be developed for specific needs. As an example,
111if an application is to be completely driven by the integration
112process, then most of the application code will be run inside a step
113handler specific to this application.
114</p>
115
116<p>
117Some integrators (the simple ones) use fixed steps that are set at
118creation time. The more efficient integrators use variable steps that
119are handled internally in order to control the integration error with
120respect to a specified accuracy (these integrators extend the {@link
121org.apache.commons.math.ode.nonstiff.AdaptiveStepsizeIntegrator
122AdaptiveStepsizeIntegrator} abstract class). In this case, the step
123handler which is called after each successful step shows up the
124variable stepsize. The {@link
125org.apache.commons.math.ode.sampling.StepNormalizer StepNormalizer} class can
126be used to convert the variable stepsize into a fixed stepsize that
127can be handled by classes implementing the {@link
128org.apache.commons.math.ode.sampling.FixedStepHandler FixedStepHandler}
129interface. Adaptive stepsize integrators can automatically compute the
130initial stepsize by themselves, however the user can specify it if he
131prefers to retain full control over the integration or if the
132automatic guess is wrong.
133</p>
134
135<p>
136<table border="1" align="center">
137<tr BGCOLOR="#CCCCFF"><td colspan=2><font size="+2">Fixed Step Integrators</font></td></tr>
138<tr BGCOLOR="#EEEEFF"><font size="+1"><td>Name</td><td>Order</td></font></tr>
139<tr><td>{@link org.apache.commons.math.ode.nonstiff.EulerIntegrator Euler}</td><td>1</td></tr>
140<tr><td>{@link org.apache.commons.math.ode.nonstiff.MidpointIntegrator Midpoint}</td><td>2</td></tr>
141<tr><td>{@link org.apache.commons.math.ode.nonstiff.ClassicalRungeKuttaIntegrator Classical Runge-Kutta}</td><td>4</td></tr>
142<tr><td>{@link org.apache.commons.math.ode.nonstiff.GillIntegrator Gill}</td><td>4</td></tr>
143<tr><td>{@link org.apache.commons.math.ode.nonstiff.ThreeEighthesIntegrator 3/8}</td><td>4</td></tr>
144</table>
145</p>
146
147<table border="1" align="center">
148<tr BGCOLOR="#CCCCFF"><td colspan=3><font size="+2">Adaptive Stepsize Integrators</font></td></tr>
149<tr BGCOLOR="#EEEEFF"><font size="+1"><td>Name</td><td>Integration Order</td><td>Error Estimation Order</td></font></tr>
150<tr><td>{@link org.apache.commons.math.ode.nonstiff.HighamHall54Integrator Higham and Hall}</td><td>5</td><td>4</td></tr>
151<tr><td>{@link org.apache.commons.math.ode.nonstiff.DormandPrince54Integrator Dormand-Prince 5(4)}</td><td>5</td><td>4</td></tr>
152<tr><td>{@link org.apache.commons.math.ode.nonstiff.DormandPrince853Integrator Dormand-Prince 8(5,3)}</td><td>8</td><td>5 and 3</td></tr>
153<tr><td>{@link org.apache.commons.math.ode.nonstiff.GraggBulirschStoerIntegrator Gragg-Bulirsch-Stoer}</td><td>variable (up to 18 by default)</td><td>variable</td></tr>
154<tr><td>{@link org.apache.commons.math.ode.nonstiff.AdamsBashforthIntegrator Adams-Bashforth}</td><td>variable</td><td>variable</td></tr>
155<tr><td>{@link org.apache.commons.math.ode.nonstiff.AdamsMoultonIntegrator Adams-Moulton}</td><td>variable</td><td>variable</td></tr>
156</table>
157</p>
158
159<p>
160In the table above, the {@link org.apache.commons.math.ode.nonstiff.AdamsBashforthIntegrator
161Adams-Bashforth} and {@link org.apache.commons.math.ode.nonstiff.AdamsMoultonIntegrator
162Adams-Moulton} integrators appear as variable-step ones. This is an experimental extension
163to the classical algorithms using the Nordsieck vector representation.
164</p>
165
166</body>
167</html>
Note: See TracBrowser for help on using the repository browser.