Class ObjectiveFunctionWithSoftConstraints


  • public class ObjectiveFunctionWithSoftConstraints
    extends java.lang.Object
    The objective function class which is used in Phase 1 of the interior point method. In the interior point method, a starting point X must be a feasible point that satisfies all constraints. If the feasible point couldn't be found, the interior point method solve the problem using this class treating the hard constraints as soft constraints.
    Since:
    Ptolemy II 11.0
    Version:
    $Id$
    Author:
    Shuhei Emoto
    Pt.AcceptedRating:
    Pt.ProposedRating:
    Red (shuhei)
    • Field Detail

      • f0Result

        public double f0Result
      • fiResults

        public double[] fiResults
      • f0Gradient

        public double[] f0Gradient
      • fiGradients

        public double[][] fiGradients
      • f0Hessian

        public double[][] f0Hessian
      • fiHessians

        public double[][][] fiHessians
      • currentX

        public double[] currentX
      • iterationCounter

        public int iterationCounter
      • stopRequested

        public boolean stopRequested
      • quasiNewtonMethod

        public boolean quasiNewtonMethod
    • Constructor Detail

      • ObjectiveFunctionWithSoftConstraints

        public ObjectiveFunctionWithSoftConstraints​(org.ptolemy.optimization.ObjectiveFunction a_source)
    • Method Detail

      • calcFunction

        public boolean calcFunction​(double[] x)
        Objective function and constraint functions. In this function, all results(f0_result, fi_results) and gradients(f0_gradient, fi_gradients) must be updated.
        Parameters:
        x - : input variables
        Returns:
        If calculation was terminated by user input, return "false".
      • calcFuncInternal

        public void calcFuncInternal​(double[] x)
        Objective function called in optimization class.
        Parameters:
        x - input variables
      • checkFeasibility

        public boolean checkFeasibility()
        check feasibility of current point
        Returns:
        : true if all of constraints are negative
      • getCurrentPoint

        public double[] getCurrentPoint()
        get current point
        Returns:
        : current point X
      • clearMatrix

        protected void clearMatrix​(double[][] matrix)
        Clear Matrix
        Parameters:
        matrix - : matrix which is to be zero-matrix.