Class NLConstrainedEngine

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected double[] a
      On completion if exitStatus >= 0 a[] contains the latest (best) estimate of the solution point.
      private double a1div3
      DOCUMENT ME!
      protected double absoluteConvergence
      absolute convergence constant Used to test for convergence by the sum of squares being less than the absoluteConvergence squared.
      private double aDiff
      DOCUMENT ME!
      private double alfkm1
      DOCUMENT ME!
      private double alfkm2
      DOCUMENT ME!
      private double alfnoi
      DOCUMENT ME!
      private double alpha
      DOCUMENT ME!
      private double alphup
      DOCUMENT ME!
      protected boolean analyticalJacobian  
      private int[] aset
      1D integer array of length param containing a code which indicates whether an unknown is active or not aset[i] = 0 when a[i] is free = +1 when a[i] == bl[i] = -1 when a[i] == bu[i].
      private double aupkm1
      DOCUMENT ME!
      private int BARD  
      private int BEALE  
      private double bestpg
      DOCUMENT ME!
      private double beta
      scalar containing the norm of the orthogonal projection of residuals onto the space spanned by the columns of the Jacobian.
      private double betkm1
      DOCUMENT ME!
      private double betkm2
      DOCUMENT ME!
      private static double big
      DOCUMENT ME!
      private int BIGGS_EXP6  
      protected double[] bl
      DOCUMENT ME!
      private double bl0
      DOCUMENT ME!
      private double bn
      DOCUMENT ME!
      protected int bounds
      integer scalar code for assessing the bounds bounds = 0 means an unconstrained problem bounds = 1 means the same lower bounds for all unknowns and the same upper bounds for all unknowns.
      private int BOX_3D  
      private int BROWN_ALMOST_LINEAR  
      private int BROWN_AND_DENNIS  
      private int BROWN_BADLY_SCALED  
      private int BROYDEN_BANDED  
      private int BROYDEN_TRIDIAGONAL  
      protected double[] bu
      DOCUMENT ME!
      private double bu0
      DOCUMENT ME!
      private int CERES_CURVE_FITTING  
      private int CHEBYQUAD  
      private double cnorm
      DOCUMENT ME!
      private int constraintAct
      Number of active constraints.
      private int ctrl
      ctrl can have 3 different values on entry.
      protected int[] ctrlMat
      Wrapper for ctrl or lctrl communication with driver.
      private double d1km1
      DOCUMENT ME!
      private double d1sqs
      scalar containing the predicted reduction in the objective function if gn-direction is used.
      private double deltaMinrm
      DOCUMENT ME!
      private double[] diag
      1D double array of length param conatiaing the diagonal elements of the diagonal matrix D if internalScaling is true.
      private int DISCRETE_BOUNDARY_VALUE  
      private int DISCRETE_INTEGRAL  
      private int DRAPER24D  
      private double[] dx
      double working areas 1D array of length param containing the solution of J * dx = -residuals.
      private double dxnkm1
      DOCUMENT ME!
      private double dxnorm
      DOCUMENT ME!
      protected double[] dyda
      DOCUMENT ME!
      private double eps
      DOCUMENT ME!
      private double epsl
      DOCUMENT ME!
      private int EQUILIBRIUM_COMBUSTION  
      private int errorStatus
      DOCUMENT ME!
      private int eval
      DOCUMENT ME!
      private int exitStatus
      integer scalar that indicates why the return was taken.
      private double exp0p1  
      private double[] expap1  
      private int EXTENDED_POWELL_SINGULAR  
      private int EXTENDED_ROSENBROCK  
      private int FREUDENSTEIN_AND_ROTH  
      private double fsqkm1
      DOCUMENT ME!
      private double fsum
      DOCUMENT ME!
      private int funcEval
      integer scalar containing the total number of function evaluations done inside this routine.
      private double[] g
      1D array of length param containing the gradient of the objective at the current point.
      private int GAUSSIAN  
      private double[][] gmat
      param by param array If secondAllowed if false, gmat can be used as a singly subscripted array of dimension param by setting all second indices to 0.
      private boolean gndok
      DOCUMENT ME!
      private double gnorm
      scalar containing norm of the gradient divided by norm of Jacobian.
      protected double[] gues
      DOCUMENT ME!
      private int GULF_RESEARCH_AND_DEVELOPMENT  
      private int HATFLDB  
      private int HATFLDC  
      private int HELICAL_VALLEY  
      private int HOCK1  
      private int HOCK21_MODIFIED  
      private int HOCK25  
      private int HOCK3  
      private int HOCK4  
      private int icount
      Variables used for restart information.
      private int iev
      DOCUMENT ME!
      private int ifree
      DOCUMENT ME!
      private int imax
      Variables used for restart information.
      private int indic
      DOCUMENT ME!
      private int info
      Consistently use 1 base indexing rather than 0 based indexing
      protected boolean internalScaling
      If true, the columns of the Jacobian are scaled to have unit length.
      private int irank
      Variables used for restart information.
      protected int iters
      integer scalar containing the number of iterations until termination.
      private int itotal
      Variables used for restart information.
      private int ival
      Variables used for restart information.
      protected double[][] jacobian
      2D array of doubles of dimension nPts by max(4,param) containing the main part of the covariance matrix (Jtranspose * J)inverse, where J is the Jacobian matrix computed at a.
      private int jacobianEval
      integer scalar containing the number of function evaluations caused by computing Jacobians with difference methods.
      private int JENNRICH_AND_SAMPSON  
      private int kod
      DOCUMENT ME!
      private int kodkm1
      The suffices km2 and km1 in the names of the variables represent time step k-2 and k-1 respectively.
      private int kodkm2
      The suffices km2 and km1 in the names of the variables represent time step k-2 and k-1 respectively.
      private int KOWALIK_AND_OSBORNE  
      private int lattry
      Variables used for restart information.
      private int LEVMAR_ROSENBROCK  
      private int LINEAR_FULL_RANK  
      private int LINEAR_RANK1  
      private int LINEAR_RANK1_WITH_ZERO_COLUMNS_AND_ROWS  
      private int lineEval
      integer scalar containing the number of function evaluations caused by the linesearch algorithm.
      private int MADSEN  
      protected int maxIterations
      DOCUMENT ME!
      private int mdg
      Leading dimension of array gmat mdg must be >= param if secondAllowed is true.
      private int MEYER  
      private int MODIFIED_ROSENBROCK  
      private double noise
      DOCUMENT ME!
      protected int nPts
      integer scalar containing the number of data points.
      private int OSBORNE1  
      private int OSBORNE2  
      protected boolean outputMes  
      private double p1sqrtem5  
      protected int param
      variables integer scalar containing the number of unknowns.
      protected double parameterConvergence
      parameter convergence constant Used to test for convergence by the relative change in a[] being less than the parameterConvergence.
      private int PENALTY_FUNCTION_I  
      private int PENALTY_FUNCTION_II  
      private double pgb1
      DOCUMENT ME!
      private double pgb2
      DOCUMENT ME!
      private double phi
      double scalar containging the value of the objective function = (0.5 * chisquare) at the termination point a.
      private double phikp1
      DOCUMENT ME!
      private double philat
      DOCUMENT ME!
      private int[] pivit
      array of integers of dimension param containing the permutation matrix E in the decomposition QTranspose * J * D E = (R) (0) pivit[i] contains the index of the column that was moved into column i.
      private double pMinrm
      DOCUMENT ME!
      private int POWELL_2_PARAMETER  
      private int POWELL_BADLY_SCALED  
      private int POWELL_SINGULAR  
      private double predb
      DOCUMENT ME!
      private double prekm1
      scalar containing the predicted reduction in the objective if pseudoRank from previous step is used.
      private double qMinrm
      DOCUMENT ME!
      private double rabs
      DOCUMENT ME!
      protected double relativeConvergence
      relative convergence constant Used to test for convergence by reduction in objective function being less than relativeConvergence squared.
      protected double[] residuals
      1D array of doubles of dimension nPts containing the value of the residuals at the termination point a;.
      private boolean restart
      DOCUMENT ME!
      private double rlenb
      DOCUMENT ME!
      private double rmin
      DOCUMENT ME!
      private int rngkm1
      The suffices km2 and km1 in the names of the variables represent time step k-2 and k-1 respectively.
      private double rootsp
      DOCUMENT ME!
      private int ROSENBROCK  
      private double scv0v1
      DOCUMENT ME!
      private double scv0v2
      DOCUMENT ME!
      private double scv1v2
      DOCUMENT ME!
      private int secind
      DOCUMENT ME!
      protected boolean secondAllowed
      The method of Newton is allowed at the end of the iteration in some situations (large residuals).
      private int secondEval
      integer scalar containing the number of function evaluations caused by using second derivatives in the method of Newton.
      private double smax
      DOCUMENT ME!
      private double sn
      DOCUMENT ME!
      private double speed
      double scalar containing an estimate of the linear convergence factor.
      private double sqrt10  
      private double sqrt5  
      private double sqrtem5  
      private double srelpr
      single relative precision.
      protected double stdv
      DOCUMENT ME!
      private double stepb
      DOCUMENT ME!
      private int testCase  
      private boolean testMode  
      protected double tolerance
      pseudo rank tolerance constant used to determine the pseudo rank of the Jacobian J.
      private int TRIGONOMETRIC  
      private double[] v
      1D array of length nPts containing the orthogonal projection of residuals onto space spanned by the first pseudoRank linear independent columns of the Jacobian.
      private double v0norm
      DOCUMENT ME!
      private double v1norm
      DOCUMENT ME!
      private double v2norm
      DOCUMENT ME!
      private int VARIABLY_DIMENSIONED_FUNCTION  
      private double[] w0
      DOCUMENT ME!
      private double[] w1
      DOCUMENT ME!
      private double[] w2
      DOCUMENT ME!
      private double[] w3
      DOCUMENT ME!
      private int WATSON  
      private int WOOD  
      private double x1Minrm
      DOCUMENT ME!
      private double x2Minrm
      DOCUMENT ME!
      private double x3Minrm
      DOCUMENT ME!
      private double[] xSeries
      DOCUMENT ME!
      private double[] ySeries
      DOCUMENT ME!
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      private void analuc​(int[] prank)
      DOCUMENT ME!
      private void btrunc​(int[] prank, boolean internalScaling, double[] work)
      DOCUMENT ME!
      private void chder​(double dphize, int[] k, double[] alfk, double[] phik)
      DOCUMENT ME!
      private void choose​(double xmin, double[] v2, double[] root1, double[] root2, double[] proot2)
      DOCUMENT ME!
      private void covar()
      DOCUMENT ME!
      private void dimsub​(int[] prank, int[] rank)
      DOCUMENT ME!
      private double dnrm2​(int n, double[] x, int incx)
      DOCUMENT ME!
      void driver()
      driver.
      private void driverCalls()  
      void dumpTestResults()  
      private void evreuc​(int[] prank)
      DOCUMENT ME!
      private void fitTestModel()
      Creates a new Fit24DModel object.
      abstract void fitToFunction​(double[] a, double[] residuals, double[][] jacobian)
      fitToFunction communicates with 3 protected variables param, nPts, and ctrlMat ctrlMat is used as a wrapper for ctrl or lctrl.
      void fitToTestFunction​(double[] a, double[] residuals, double[][] jacobian)  
      private void fsumsq​(double alfk, double[] xnew, double[] fnew, double[] fn_val, int[] ctrl)
      DOCUMENT ME!
      private void gauc​(int[] k, double alfmin, double[] gmod, double dphize, double[] u, double[] phiu, double tau, double pmax)
      DOCUMENT ME!
      double getChiSquared()
      getChiSquared - accessor to chi-squared value (goodness-of-fit measure).
      int getExitStatus()  
      int getIterations()  
      double[] getParameters()
      getParameters accessor to function parameters.
      double[] getResiduals()
      DOCUMENT ME!
      private void gnavuc()
      DOCUMENT ME!
      private double gndunc​(boolean internalScaling, int[] prank, double[] work)
      DOCUMENT ME!
      private void hess()
      DOCUMENT ME!
      private void jacdif​(int[] ctrl)
      DOCUMENT ME!
      private void jtrj​(int nn)
      DOCUMENT ME!
      private void lineuc​(double[] gmod, double dphize, double alplow)
      DOCUMENT ME!
      private void linuc2​(double[] fnew, double alfk, double[] v2)
      DOCUMENT ME!
      private void lsunc()
      DOCUMENT ME!
      private void minrm​(double[] v2, double alfmin, double alfmax, double xmin, double[] x, double[] px, double[] y, double[] py)
      DOCUMENT ME!
      private void minrm1​(double[] v2)
      DOCUMENT ME!
      private void minrm2()
      DOCUMENT ME!
      private void minrn​(double x, double fx, double w, double fw, double v, double fv, double alfmin, double alfmax, double pmax, double[] u, double[] pu)
      DOCUMENT ME!
      private void newunc()
      DOCUMENT ME!
      private void oner​(double[] x)
      DOCUMENT ME!
      private void outuc()
      DOCUMENT ME!
      private void pivec​(double[] work)
      DOCUMENT ME!
      private double pol3​(double x)
      DOCUMENT ME!
      private double pol4​(double[] v2, double x)
      DOCUMENT ME!
      private void pregn​(double[] work, int mindim, int[] prank, int[] dim)
      DOCUMENT ME!
      private void presub​(double[] work, int[] prank, int[] rank)
      DOCUMENT ME!
      private void quamin​(double x, double fx, double w, double fw, double v, double fv, double[] u)
      DOCUMENT ME!
      private void reavuc()
      DOCUMENT ME!
      private void reduc​(double[] alf, double[] phialf, double alfk, double pk, double diff, double eta, double[] gmod, double[] fnew, int[] k, double[] phik, boolean[] reduce)
      DOCUMENT ME!
      private void releps()
      DOCUMENT ME!
      private void rtrw1​(int nn)
      DOCUMENT ME!
      private void scalv​(double[] v, double factor, int n)
      DOCUMENT ME!
      private void scaunc()
      DOCUMENT ME!
      private void schdc​(int nn, int[] jpvt, int job)
      DOCUMENT ME!
      private void secuc()
      DOCUMENT ME!
      private double shiftedChebyshev​(double x, int n)  
      private double shiftedChebyshevDerivative​(double x, int n)  
      private void soliuc​(double tau, int[] prank)
      DOCUMENT ME!
      private void sposl​(int nn)
      DOCUMENT ME!
      private void sqrdc​(double[][] x, int n, int p, double[] qraux, int[] jpvt, int job)
      DOCUMENT ME!
      private void sqrsl​(double[][] x, int n, int k, double[] qraux, double[] y, double[] qy, double[] qty, double[] b, double[] rsd, double[] xb, int job)
      DOCUMENT ME!
      void statusMessage​(int status)  
      private void stepuc​(int[] prank)
      DOCUMENT ME!
      private void strsl​(int[] prank, double[] b)
      DOCUMENT ME!
      private void subuc​(int[] prank, int[] rank)
      DOCUMENT ME!
      private void termuc​(int[] prank, double aNorm)
      DOCUMENT ME!
      private void triunc​(double tol, int constraintAct, int[] prank)
      DOCUMENT ME!
      private void twor()
      DOCUMENT ME!
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • a

        protected double[] a
        On completion if exitStatus >= 0 a[] contains the latest (best) estimate of the solution point.
      • absoluteConvergence

        protected double absoluteConvergence
        absolute convergence constant Used to test for convergence by the sum of squares being less than the absoluteConvergence squared.
      • bl

        protected double[] bl
        DOCUMENT ME!
      • bounds

        protected int bounds
        integer scalar code for assessing the bounds bounds = 0 means an unconstrained problem bounds = 1 means the same lower bounds for all unknowns and the same upper bounds for all unknowns. The lower and upper bound must be stored in bl[0] and bu[0] respectively. bounds = 2 means that the bounds must be supplied by the user in bl[i] and bu[i] for i = 0,1, param - 1.
      • bu

        protected double[] bu
        DOCUMENT ME!
      • jacobian

        protected double[][] jacobian
        2D array of doubles of dimension nPts by max(4,param) containing the main part of the covariance matrix (Jtranspose * J)inverse, where J is the Jacobian matrix computed at a.
      • ctrlMat

        protected int[] ctrlMat
        Wrapper for ctrl or lctrl communication with driver.
      • dyda

        protected double[] dyda
        DOCUMENT ME!
      • stdv

        protected double stdv
        DOCUMENT ME!
      • gues

        protected double[] gues
        DOCUMENT ME!
      • internalScaling

        protected boolean internalScaling
        If true, the columns of the Jacobian are scaled to have unit length. If false, internal scaling is not used to compute the Gauss-Newton search direction.
      • iters

        protected int iters
        integer scalar containing the number of iterations until termination.
      • maxIterations

        protected int maxIterations
        DOCUMENT ME!
      • nPts

        protected int nPts
        integer scalar containing the number of data points.
      • param

        protected int param
        variables integer scalar containing the number of unknowns.
      • parameterConvergence

        protected double parameterConvergence
        parameter convergence constant Used to test for convergence by the relative change in a[] being less than the parameterConvergence.
      • relativeConvergence

        protected double relativeConvergence
        relative convergence constant Used to test for convergence by reduction in objective function being less than relativeConvergence squared.
      • residuals

        protected double[] residuals
        1D array of doubles of dimension nPts containing the value of the residuals at the termination point a;.
      • secondAllowed

        protected boolean secondAllowed
        The method of Newton is allowed at the end of the iteration in some situations (large residuals). If true, the use of second derivatives is permitted
      • tolerance

        protected double tolerance
        pseudo rank tolerance constant used to determine the pseudo rank of the Jacobian J.
      • xSeries

        private double[] xSeries
        DOCUMENT ME!
      • ySeries

        private double[] ySeries
        DOCUMENT ME!
      • aDiff

        private double aDiff
        DOCUMENT ME!
      • alfnoi

        private double alfnoi
        DOCUMENT ME!
      • alpha

        private double alpha
        DOCUMENT ME!
      • alphup

        private double alphup
        DOCUMENT ME!
      • aset

        private int[] aset
        1D integer array of length param containing a code which indicates whether an unknown is active or not aset[i] = 0 when a[i] is free = +1 when a[i] == bl[i] = -1 when a[i] == bu[i].
      • beta

        private double beta
        scalar containing the norm of the orthogonal projection of residuals onto the space spanned by the columns of the Jacobian.
      • betkm2

        private double betkm2
        DOCUMENT ME!
      • alfkm2

        private double alfkm2
        DOCUMENT ME!
      • betkm1

        private double betkm1
        DOCUMENT ME!
      • d1km1

        private double d1km1
        DOCUMENT ME!
      • fsqkm1

        private double fsqkm1
        DOCUMENT ME!
      • dxnkm1

        private double dxnkm1
        DOCUMENT ME!
      • alfkm1

        private double alfkm1
        DOCUMENT ME!
      • aupkm1

        private double aupkm1
        DOCUMENT ME!
      • bn

        private double bn
        DOCUMENT ME!
      • cnorm

        private double cnorm
        DOCUMENT ME!
      • ctrl

        private int ctrl
        ctrl can have 3 different values on entry. If ctrl = 1 or ctrl = -1, compute the residuals for all nPts at a certain point a and return the residuals = yfit - yseries in the array residuals if the functions are computable. If not successful and ctrl was set to 1, set ctrl = -1. If not successful and ctrl was set to -1, set ctrl
        • d1sqs

          private double d1sqs
          scalar containing the predicted reduction in the objective function if gn-direction is used.
        • diag

          private double[] diag
          1D double array of length param conatiaing the diagonal elements of the diagonal matrix D if internalScaling is true. Otherwise, undefined.
        • dx

          private double[] dx
          double working areas 1D array of length param containing the solution of J * dx = -residuals.
        • dxnorm

          private double dxnorm
          DOCUMENT ME!
        • eps

          private double eps
          DOCUMENT ME!
        • epsl

          private double epsl
          DOCUMENT ME!
        • errorStatus

          private int errorStatus
          DOCUMENT ME!
        • eval

          private int eval
          DOCUMENT ME!
        • exitStatus

          private int exitStatus
          integer scalar that indicates why the return was taken. If exitStatus != -1 and exitStatus >= -10, then a[] contains the latest (best) estimate of the solution point. = 1000X convergence because relative predicted reduction in the objective function = (0.5 * chisquare) is less than (relativeConvergence)**2 = 200X convergence because sum of squares is less than (absoluteConvergence)**2 = 30X convergence because the relative change in a is less than parameterConvergence = 4X convergence because we are computing at noise level X, the last digit in the convergence code, indicates how the last steps were computed X = 0 no trouble (Gauss-Newton the last 3 steps) = 1 pseudoRank param at termination point = 2 The method of Newton was used (at least) in the last step = 3 The (last - 2) step was subspace minimization, but the last 2 steps were Gauss-Newton steps = 4 The steplength was not unit in both the last 2 steps
          • fsum

            private double fsum
            DOCUMENT ME!
          • funcEval

            private int funcEval
            integer scalar containing the total number of function evaluations done inside this routine.
          • g

            private double[] g
            1D array of length param containing the gradient of the objective at the current point.
          • gmat

            private double[][] gmat
            param by param array If secondAllowed if false, gmat can be used as a singly subscripted array of dimension param by setting all second indices to 0.
          • gndok

            private boolean gndok
            DOCUMENT ME!
          • gnorm

            private double gnorm
            scalar containing norm of the gradient divided by norm of Jacobian.
          • icount

            private int icount
            Variables used for restart information.
          • lattry

            private int lattry
            Variables used for restart information.
          • itotal

            private int itotal
            Variables used for restart information.
          • irank

            private int irank
            Variables used for restart information.
          • imax

            private int imax
            Variables used for restart information.
          • ival

            private int ival
            Variables used for restart information.
          • iev

            private int iev
            DOCUMENT ME!
          • ifree

            private int ifree
            DOCUMENT ME!
          • indic

            private int indic
            DOCUMENT ME!
          • info

            private int info
            Consistently use 1 base indexing rather than 0 based indexing
          • jacobianEval

            private int jacobianEval
            integer scalar containing the number of function evaluations caused by computing Jacobians with difference methods.
          • kod

            private int kod
            DOCUMENT ME!
          • lineEval

            private int lineEval
            integer scalar containing the number of function evaluations caused by the linesearch algorithm.
          • mdg

            private int mdg
            Leading dimension of array gmat mdg must be >= param if secondAllowed is true.
          • noise

            private double noise
            DOCUMENT ME!
          • constraintAct

            private int constraintAct
            Number of active constraints.
          • pgb1

            private double pgb1
            DOCUMENT ME!
          • pgb2

            private double pgb2
            DOCUMENT ME!
          • phi

            private double phi
            double scalar containging the value of the objective function = (0.5 * chisquare) at the termination point a.
          • phikp1

            private double phikp1
            DOCUMENT ME!
          • philat

            private double philat
            DOCUMENT ME!
          • bestpg

            private double bestpg
            DOCUMENT ME!
          • pivit

            private int[] pivit
            array of integers of dimension param containing the permutation matrix E in the decomposition QTranspose * J * D E = (R) (0) pivit[i] contains the index of the column that was moved into column i.
          • pMinrm

            private double pMinrm
            DOCUMENT ME!
          • qMinrm

            private double qMinrm
            DOCUMENT ME!
          • deltaMinrm

            private double deltaMinrm
            DOCUMENT ME!
          • a1div3

            private double a1div3
            DOCUMENT ME!
          • predb

            private double predb
            DOCUMENT ME!
          • prekm1

            private double prekm1
            scalar containing the predicted reduction in the objective if pseudoRank from previous step is used.
          • rabs

            private double rabs
            DOCUMENT ME!
          • restart

            private boolean restart
            DOCUMENT ME!
          • rlenb

            private double rlenb
            DOCUMENT ME!
          • rmin

            private double rmin
            DOCUMENT ME!
          • kodkm2

            private int kodkm2
            The suffices km2 and km1 in the names of the variables represent time step k-2 and k-1 respectively. These variables are updated only inside the routine evreuc.
          • rngkm1

            private int rngkm1
            The suffices km2 and km1 in the names of the variables represent time step k-2 and k-1 respectively. These variables are updated only inside the routine evreuc.
          • kodkm1

            private int kodkm1
            The suffices km2 and km1 in the names of the variables represent time step k-2 and k-1 respectively. These variables are updated only inside the routine evreuc.
          • rootsp

            private double rootsp
            DOCUMENT ME!
          • bl0

            private double bl0
            DOCUMENT ME!
          • bu0

            private double bu0
            DOCUMENT ME!
          • secind

            private int secind
            DOCUMENT ME!
          • secondEval

            private int secondEval
            integer scalar containing the number of function evaluations caused by using second derivatives in the method of Newton.
          • smax

            private double smax
            DOCUMENT ME!
          • sn

            private double sn
            DOCUMENT ME!
          • speed

            private double speed
            double scalar containing an estimate of the linear convergence factor.
          • srelpr

            private double srelpr
            single relative precision.
          • stepb

            private double stepb
            DOCUMENT ME!
          • v

            private double[] v
            1D array of length nPts containing the orthogonal projection of residuals onto space spanned by the first pseudoRank linear independent columns of the Jacobian.
          • v0norm

            private double v0norm
            DOCUMENT ME!
          • v1norm

            private double v1norm
            DOCUMENT ME!
          • v2norm

            private double v2norm
            DOCUMENT ME!
          • scv0v1

            private double scv0v1
            DOCUMENT ME!
          • scv0v2

            private double scv0v2
            DOCUMENT ME!
          • scv1v2

            private double scv1v2
            DOCUMENT ME!
          • w0

            private double[] w0
            DOCUMENT ME!
          • w1

            private double[] w1
            DOCUMENT ME!
          • w2

            private double[] w2
            DOCUMENT ME!
          • w3

            private double[] w3
            DOCUMENT ME!
          • x1Minrm

            private double x1Minrm
            DOCUMENT ME!
          • x2Minrm

            private double x2Minrm
            DOCUMENT ME!
          • x3Minrm

            private double x3Minrm
            DOCUMENT ME!
          • sqrtem5

            private double sqrtem5
          • p1sqrtem5

            private double p1sqrtem5
          • exp0p1

            private double exp0p1
          • sqrt5

            private double sqrt5
          • sqrt10

            private double sqrt10
          • expap1

            private double[] expap1
          • outputMes

            protected boolean outputMes
          • testMode

            private boolean testMode
          • analyticalJacobian

            protected boolean analyticalJacobian
          • testCase

            private int testCase
          • GULF_RESEARCH_AND_DEVELOPMENT

            private final int GULF_RESEARCH_AND_DEVELOPMENT
            See Also:
            Constant Field Values
          • VARIABLY_DIMENSIONED_FUNCTION

            private final int VARIABLY_DIMENSIONED_FUNCTION
            See Also:
            Constant Field Values
          • LINEAR_RANK1_WITH_ZERO_COLUMNS_AND_ROWS

            private final int LINEAR_RANK1_WITH_ZERO_COLUMNS_AND_ROWS
            See Also:
            Constant Field Values
          • Constructor Detail

            • NLConstrainedEngine

              public NLConstrainedEngine()
            • NLConstrainedEngine

              public NLConstrainedEngine​(int nPts,
                                         int param)
              NLConstrainedEngine - non-linear fit to a function.
              Parameters:
              nPts - number of points to fit to the function to
              param - number of parameters of function
              xSeries - DOCUMENT ME!
              yData - DOCUMENT ME!
          • Method Detail

            • fitTestModel

              private void fitTestModel()
              Creates a new Fit24DModel object.
              Parameters:
              nPoints - DOCUMENT ME!
              xData - DOCUMENT ME!
              yData - DOCUMENT ME!
              initial - DOCUMENT ME!
            • fitToTestFunction

              public void fitToTestFunction​(double[] a,
                                            double[] residuals,
                                            double[][] jacobian)
            • shiftedChebyshev

              private double shiftedChebyshev​(double x,
                                              int n)
            • shiftedChebyshevDerivative

              private double shiftedChebyshevDerivative​(double x,
                                                        int n)
            • dumpTestResults

              public void dumpTestResults()
            • driverCalls

              private void driverCalls()
            • fitToFunction

              public abstract void fitToFunction​(double[] a,
                                                 double[] residuals,
                                                 double[][] jacobian)
              fitToFunction communicates with 3 protected variables param, nPts, and ctrlMat ctrlMat is used as a wrapper for ctrl or lctrl. Evaluates the residuals or the Jacobian at a certain a[]
              Parameters:
              a - DOCUMENT ME!
              residuals - DOCUMENT ME!
              jacobian - DOCUMENT ME!
            • driver

              public void driver()
              driver.
            • getChiSquared

              public double getChiSquared()
              getChiSquared - accessor to chi-squared value (goodness-of-fit measure).
              Returns:
              the value of chi squared
            • getIterations

              public int getIterations()
            • getParameters

              public double[] getParameters()
              getParameters accessor to function parameters.
              Returns:
              the function parameters determined by the algorithm
            • getResiduals

              public double[] getResiduals()
              DOCUMENT ME!
              Returns:
              double[] residuals
            • getExitStatus

              public int getExitStatus()
            • statusMessage

              public void statusMessage​(int status)
            • analuc

              private void analuc​(int[] prank)
              DOCUMENT ME!
            • btrunc

              private void btrunc​(int[] prank,
                                  boolean internalScaling,
                                  double[] work)
              DOCUMENT ME!
              Parameters:
              internalScaling - DOCUMENT ME!
              work - DOCUMENT ME!
            • chder

              private void chder​(double dphize,
                                 int[] k,
                                 double[] alfk,
                                 double[] phik)
              DOCUMENT ME!
              Parameters:
              dphize - DOCUMENT ME!
            • choose

              private void choose​(double xmin,
                                  double[] v2,
                                  double[] root1,
                                  double[] root2,
                                  double[] proot2)
              DOCUMENT ME!
              Parameters:
              xmin - DOCUMENT ME!
              v2 - DOCUMENT ME!
            • covar

              private void covar()
              DOCUMENT ME!
            • dimsub

              private void dimsub​(int[] prank,
                                  int[] rank)
              DOCUMENT ME!
            • dnrm2

              private double dnrm2​(int n,
                                   double[] x,
                                   int incx)
              DOCUMENT ME!
              Parameters:
              n - DOCUMENT ME!
              x - DOCUMENT ME!
              incx - DOCUMENT ME!
              Returns:
              DOCUMENT ME!
            • evreuc

              private void evreuc​(int[] prank)
              DOCUMENT ME!
            • fsumsq

              private void fsumsq​(double alfk,
                                  double[] xnew,
                                  double[] fnew,
                                  double[] fn_val,
                                  int[] ctrl)
              DOCUMENT ME!
              Parameters:
              alfk - DOCUMENT ME!
              xnew - DOCUMENT ME!
              fnew - DOCUMENT ME!
              phiMat - DOCUMENT ME!
            • gauc

              private void gauc​(int[] k,
                                double alfmin,
                                double[] gmod,
                                double dphize,
                                double[] u,
                                double[] phiu,
                                double tau,
                                double pmax)
              DOCUMENT ME!
              Parameters:
              gmod - DOCUMENT ME!
              dphize - DOCUMENT ME!
              tau - DOCUMENT ME!
              pmax - DOCUMENT ME!
            • gnavuc

              private void gnavuc()
              DOCUMENT ME!
            • gndunc

              private double gndunc​(boolean internalScaling,
                                    int[] prank,
                                    double[] work)
              DOCUMENT ME!
              Parameters:
              internalScaling - DOCUMENT ME!
              pseudoRankMat - DOCUMENT ME!
              work - DOCUMENT ME!
              Returns:
              DOCUMENT ME!
            • hess

              private void hess()
              DOCUMENT ME!
            • jacdif

              private void jacdif​(int[] ctrl)
              DOCUMENT ME!
            • jtrj

              private void jtrj​(int nn)
              DOCUMENT ME!
              Parameters:
              nn - DOCUMENT ME!
            • lineuc

              private void lineuc​(double[] gmod,
                                  double dphize,
                                  double alplow)
              DOCUMENT ME!
              Parameters:
              gmod - DOCUMENT ME!
              dphize - DOCUMENT ME!
              alplow - DOCUMENT ME!
            • linuc2

              private void linuc2​(double[] fnew,
                                  double alfk,
                                  double[] v2)
              DOCUMENT ME!
              Parameters:
              fnew - DOCUMENT ME!
              v2 - DOCUMENT ME!
            • lsunc

              private void lsunc()
              DOCUMENT ME!
            • minrm

              private void minrm​(double[] v2,
                                 double alfmin,
                                 double alfmax,
                                 double xmin,
                                 double[] x,
                                 double[] px,
                                 double[] y,
                                 double[] py)
              DOCUMENT ME!
              Parameters:
              v2 - DOCUMENT ME!
              xmin - DOCUMENT ME!
            • minrm1

              private void minrm1​(double[] v2)
              DOCUMENT ME!
              Parameters:
              v2 - DOCUMENT ME!
            • minrm2

              private void minrm2()
              DOCUMENT ME!
            • minrn

              private void minrn​(double x,
                                 double fx,
                                 double w,
                                 double fw,
                                 double v,
                                 double fv,
                                 double alfmin,
                                 double alfmax,
                                 double pmax,
                                 double[] u,
                                 double[] pu)
              DOCUMENT ME!
              Parameters:
              phikm2 - DOCUMENT ME!
              pmax - DOCUMENT ME!
            • newunc

              private void newunc()
              DOCUMENT ME!
            • oner

              private void oner​(double[] x)
              DOCUMENT ME!
            • outuc

              private void outuc()
              DOCUMENT ME!
            • pivec

              private void pivec​(double[] work)
              DOCUMENT ME!
              Parameters:
              work - DOCUMENT ME!
            • pol3

              private double pol3​(double x)
              DOCUMENT ME!
              Parameters:
              x - DOCUMENT ME!
              Returns:
              DOCUMENT ME!
            • pol4

              private double pol4​(double[] v2,
                                  double x)
              DOCUMENT ME!
              Parameters:
              v2 - DOCUMENT ME!
              x - DOCUMENT ME!
              Returns:
              DOCUMENT ME!
            • pregn

              private void pregn​(double[] work,
                                 int mindim,
                                 int[] prank,
                                 int[] dim)
              DOCUMENT ME!
              Parameters:
              work - DOCUMENT ME!
              mindim - DOCUMENT ME!
            • presub

              private void presub​(double[] work,
                                  int[] prank,
                                  int[] rank)
              DOCUMENT ME!
              Parameters:
              work - DOCUMENT ME!
            • quamin

              private void quamin​(double x,
                                  double fx,
                                  double w,
                                  double fw,
                                  double v,
                                  double fv,
                                  double[] u)
              DOCUMENT ME!
              Parameters:
              phikm2 - DOCUMENT ME!
            • reavuc

              private void reavuc()
              DOCUMENT ME!
            • reduc

              private void reduc​(double[] alf,
                                 double[] phialf,
                                 double alfk,
                                 double pk,
                                 double diff,
                                 double eta,
                                 double[] gmod,
                                 double[] fnew,
                                 int[] k,
                                 double[] phik,
                                 boolean[] reduce)
              DOCUMENT ME!
              Parameters:
              pk - DOCUMENT ME!
              eta - DOCUMENT ME!
              gmod - DOCUMENT ME!
              fnew - DOCUMENT ME!
            • releps

              private void releps()
              DOCUMENT ME!
            • rtrw1

              private void rtrw1​(int nn)
              DOCUMENT ME!
              Parameters:
              nn - DOCUMENT ME!
            • scalv

              private void scalv​(double[] v,
                                 double factor,
                                 int n)
              DOCUMENT ME!
              Parameters:
              v - DOCUMENT ME!
              factor - DOCUMENT ME!
              n - DOCUMENT ME!
            • scaunc

              private void scaunc()
              DOCUMENT ME!
            • schdc

              private void schdc​(int nn,
                                 int[] jpvt,
                                 int job)
              DOCUMENT ME!
              Parameters:
              nn - DOCUMENT ME!
              jpvt - DOCUMENT ME!
              job - DOCUMENT ME!
            • secuc

              private void secuc()
              DOCUMENT ME!
            • soliuc

              private void soliuc​(double tau,
                                  int[] prank)
              DOCUMENT ME!
              Parameters:
              tau - DOCUMENT ME!
            • sposl

              private void sposl​(int nn)
              DOCUMENT ME!
              Parameters:
              nn - DOCUMENT ME!
            • sqrdc

              private void sqrdc​(double[][] x,
                                 int n,
                                 int p,
                                 double[] qraux,
                                 int[] jpvt,
                                 int job)
              DOCUMENT ME!
              Parameters:
              x - DOCUMENT ME!
              n - DOCUMENT ME!
              p - DOCUMENT ME!
              qraux - DOCUMENT ME!
              jpvt - DOCUMENT ME!
              job - DOCUMENT ME!
            • sqrsl

              private void sqrsl​(double[][] x,
                                 int n,
                                 int k,
                                 double[] qraux,
                                 double[] y,
                                 double[] qy,
                                 double[] qty,
                                 double[] b,
                                 double[] rsd,
                                 double[] xb,
                                 int job)
              DOCUMENT ME!
              Parameters:
              x - DOCUMENT ME!
              n - DOCUMENT ME!
              k - DOCUMENT ME!
              qraux - DOCUMENT ME!
              y - DOCUMENT ME!
              qy - DOCUMENT ME!
              qty - DOCUMENT ME!
              b - DOCUMENT ME!
              rsd - DOCUMENT ME!
              xb - DOCUMENT ME!
              job - DOCUMENT ME!
            • stepuc

              private void stepuc​(int[] prank)
              DOCUMENT ME!
            • strsl

              private void strsl​(int[] prank,
                                 double[] b)
              DOCUMENT ME!
              Parameters:
              b - DOCUMENT ME!
            • subuc

              private void subuc​(int[] prank,
                                 int[] rank)
              DOCUMENT ME!
            • termuc

              private void termuc​(int[] prank,
                                  double aNorm)
              DOCUMENT ME!
              Parameters:
              aNorm - DOCUMENT ME!
            • triunc

              private void triunc​(double tol,
                                  int constraintAct,
                                  int[] prank)
              DOCUMENT ME!
              Parameters:
              tol - DOCUMENT ME!
              constraintAct - DOCUMENT ME!
            • twor

              private void twor()
              DOCUMENT ME!