1/*2* Licensed to the Apache Software Foundation (ASF) under one or more3* contributor license agreements. See the NOTICE file distributed with4* this work for additional information regarding copyright ownership.5* The ASF licenses this file to You under the Apache License, Version 2.06* (the "License"); you may not use this file except in compliance with7* the License. You may obtain a copy of the License at8*9* http://www.apache.org/licenses/LICENSE-2.010*11* Unless required by applicable law or agreed to in writing, software12* distributed under the License is distributed on an "AS IS" BASIS,13* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.14* See the License for the specific language governing permissions and15* limitations under the License.16*/17 18/*19* This is not the original file distributed by the Apache Software Foundation20* It has been modified by the Hipparchus project21*/22 23packageorg.hipparchus.migration.ode; 24 25importorg.hipparchus.exception.MathIllegalArgumentException; 26importorg.hipparchus.exception.MathIllegalStateException; 27importorg.hipparchus.ode.SecondaryODE; 28 29/**30* This interface allows users to add secondary differential equations to a primary31* set of differential equations.32* <p>33* In some cases users may need to integrate some problem-specific equations along34* with a primary set of differential equations. One example is optimal control where35* adjoined parameters linked to the minimized hamiltonian must be integrated.36* </p>37* <p>38* This interface allows users to add such equations to a primary set of {@link39* FirstOrderDifferentialEquations first order differential equations}40* thanks to the {@link41* org.hipparchus.ode.ExpandableODE#addSecondaryEquations(SecondaryODE)}42* method.43* </p>44* @see org.hipparchus.ode.ExpandableODE45* @deprecated as of 1.0, replaced with {@link SecondaryODE}46*/47 @Deprecated 48publicinterfaceSecondaryEquationsextendsSecondaryODE { 49 50/** Compute the derivatives related to the secondary state parameters.51* <p>52* The default implementation calls {@link #computeDerivatives(double, double[],53* double[], double[], double[])}.54* </p>55* @param t current value of the independent <I>time</I> variable56* @param primary array containing the current value of the primary state vector57* @param primaryDot array containing the derivative of the primary state vector58* @param secondary array containing the current value of the secondary state vector59* @return derivative of the secondary state vector60* @exception MathIllegalStateException if the number of functions evaluations is exceeded61* @exception MathIllegalArgumentException if arrays dimensions do not match equations settings62*/63 @Override 64defaultdouble[] computeDerivatives(finaldoublet,finaldouble[] primary,finaldouble[] primaryDot, 65finaldouble[] secondary) 66throwsMathIllegalArgumentException, MathIllegalStateException { 67finaldouble[] secondaryDot =newdouble[secondary.length]; 68 computeDerivatives(t, primary, primaryDot, secondary, secondaryDot); 69returnsecondaryDot; 70 } 71 72/** Compute the derivatives related to the secondary state parameters.73* @param t current value of the independent <I>time</I> variable74* @param primary array containing the current value of the primary state vector75* @param primaryDot array containing the derivative of the primary state vector76* @param secondary array containing the current value of the secondary state vector77* @param secondaryDot placeholder array where to put the derivative of the secondary state vector78* @exception MathIllegalStateException if the number of functions evaluations is exceeded79* @exception MathIllegalArgumentException if arrays dimensions do not match equations settings80*/81voidcomputeDerivatives(doublet,double[] primary,double[] primaryDot, 82double[] secondary,double[] secondaryDot) 83throwsMathIllegalArgumentException, MathIllegalStateException; 84 85 }