diff options
author | Raymond <siuchow@google.com> | 2015-04-02 10:43:13 -0700 |
---|---|---|
committer | Raymond <siuchow@google.com> | 2015-04-02 10:43:13 -0700 |
commit | dee0849a9704d532af0b550146cbafbaa6ee1d19 (patch) | |
tree | 8ccce3a046c214fb609977b7fc53c40cef7f9ea5 /src/main/java/org/apache/commons/math/ode/events/package.html | |
parent | 55b0a5efc929efa9615babd3e760547f94e3518e (diff) | |
download | apache-commons-math-marshmallow-dr1.6-release.tar.gz |
third party library: apache-commons-mathandroid-cts-6.0_r9android-cts-6.0_r8android-cts-6.0_r7android-cts-6.0_r6android-cts-6.0_r5android-cts-6.0_r4android-cts-6.0_r32android-cts-6.0_r31android-cts-6.0_r30android-cts-6.0_r3android-cts-6.0_r29android-cts-6.0_r28android-cts-6.0_r27android-cts-6.0_r26android-cts-6.0_r25android-cts-6.0_r24android-cts-6.0_r23android-cts-6.0_r22android-cts-6.0_r21android-cts-6.0_r20android-cts-6.0_r2android-cts-6.0_r19android-cts-6.0_r18android-cts-6.0_r17android-cts-6.0_r16android-cts-6.0_r15android-cts-6.0_r14android-cts-6.0_r13android-cts-6.0_r12android-cts-6.0_r1android-6.0.1_r9android-6.0.1_r81android-6.0.1_r80android-6.0.1_r8android-6.0.1_r79android-6.0.1_r78android-6.0.1_r77android-6.0.1_r74android-6.0.1_r73android-6.0.1_r72android-6.0.1_r70android-6.0.1_r7android-6.0.1_r69android-6.0.1_r68android-6.0.1_r67android-6.0.1_r66android-6.0.1_r65android-6.0.1_r63android-6.0.1_r62android-6.0.1_r61android-6.0.1_r60android-6.0.1_r59android-6.0.1_r58android-6.0.1_r57android-6.0.1_r56android-6.0.1_r55android-6.0.1_r54android-6.0.1_r53android-6.0.1_r52android-6.0.1_r51android-6.0.1_r50android-6.0.1_r5android-6.0.1_r49android-6.0.1_r48android-6.0.1_r47android-6.0.1_r46android-6.0.1_r45android-6.0.1_r43android-6.0.1_r42android-6.0.1_r41android-6.0.1_r40android-6.0.1_r4android-6.0.1_r33android-6.0.1_r32android-6.0.1_r31android-6.0.1_r30android-6.0.1_r3android-6.0.1_r28android-6.0.1_r27android-6.0.1_r26android-6.0.1_r25android-6.0.1_r24android-6.0.1_r22android-6.0.1_r21android-6.0.1_r20android-6.0.1_r18android-6.0.1_r17android-6.0.1_r16android-6.0.1_r13android-6.0.1_r12android-6.0.1_r11android-6.0.1_r10android-6.0.1_r1android-6.0.0_r7android-6.0.0_r6android-6.0.0_r5android-6.0.0_r41android-6.0.0_r4android-6.0.0_r3android-6.0.0_r26android-6.0.0_r25android-6.0.0_r24android-6.0.0_r23android-6.0.0_r2android-6.0.0_r13android-6.0.0_r12android-6.0.0_r11android-6.0.0_r1marshmallow-releasemarshmallow-mr3-releasemarshmallow-mr2-releasemarshmallow-mr1-releasemarshmallow-mr1-devmarshmallow-dr1.6-releasemarshmallow-dr1.5-releasemarshmallow-dr1.5-devmarshmallow-dr-releasemarshmallow-dr-dragon-releasemarshmallow-dr-devmarshmallow-devmarshmallow-cts-release
Change-Id: I52a325624a7f0dd652b362a9840626d6d9f3c42b
Diffstat (limited to 'src/main/java/org/apache/commons/math/ode/events/package.html')
-rw-r--r-- | src/main/java/org/apache/commons/math/ode/events/package.html | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/src/main/java/org/apache/commons/math/ode/events/package.html b/src/main/java/org/apache/commons/math/ode/events/package.html new file mode 100644 index 0000000..68dcd97 --- /dev/null +++ b/src/main/java/org/apache/commons/math/ode/events/package.html @@ -0,0 +1,96 @@ +<html> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <!-- $Revision: 613620 $ --> +<body> +<p> +This package provides classes to handle discrete events occurring during +Ordinary Differential Equations integration. +</p> + +<p> +Discrete events detection is based on switching functions. The user provides +a simple {@link org.apache.commons.math.ode.events.EventHandler#g g(t, y)} +function depending on the current time and state. The integrator will monitor +the value of the function throughout integration range and will trigger the +event when its sign changes. The magnitude of the value is almost irrelevant, +it should however be continuous (but not necessarily smooth) for the sake of +root finding. The steps are shortened as needed to ensure the events occur +at step boundaries (even if the integrator is a fixed-step integrator). +</p> + +<p> +When an event is triggered, several different options are available: +</p> +<ul> + <li>integration can be stopped (this is called a G-stop facility),</li> + <li>the state vector or the derivatives can be changed,</li> + <li>or integration can simply go on.</li> +</ul> + +<p> +The first case, G-stop, is the most common one. A typical use case is when an +ODE must be solved up to some target state is reached, with a known value of +the state but an unknown occurrence time. As an example, if we want to monitor +a chemical reaction up to some predefined concentration for the first substance, +we can use the following switching function setting: +<pre> + public double g(double t, double[] y) { + return y[0] - targetConcentration; + } + + public int eventOccurred(double t, double[] y) { + return STOP; + } +</pre> +</p> + +<p> +The second case, change state vector or derivatives is encountered when dealing +with discontinuous dynamical models. A typical case would be the motion of a +spacecraft when thrusters are fired for orbital maneuvers. The acceleration is +smooth as long as no maneuver are performed, depending only on gravity, drag, +third body attraction, radiation pressure. Firing a thruster introduces a +discontinuity that must be handled appropriately by the integrator. In such a case, +we would use a switching function setting similar to this: +<pre> + public double g(double t, double[] y) { + return (t - tManeuverStart) * (t - tManeuverStop); + } + + public int eventOccurred(double t, double[] y) { + return RESET_DERIVATIVES; + } +</pre> +</p> + +<p> +The third case is useful mainly for monitoring purposes, a simple example is: +<pre> + public double g(double t, double[] y) { + return y[0] - y[1]; + } + + public int eventOccurred(double t, double[] y) { + logger.log("y0(t) and y1(t) curves cross at t = " + t); + return CONTINUE; + } +</pre> +</p> + +</body> +</html> |