Package pulse.search

Class SimpleOptimisationTask<T extends PropertyHolder & Optimisable>

    • Constructor Detail

      • SimpleOptimisationTask

        public SimpleOptimisationTask​(T optimisable,
                                      DiscreteInput input)
    • Method Detail

      • run

        public void run()
        Description copied from class: GeneralTask

        Runs this task if is either READY or QUEUED. Otherwise, will do nothing. After making some preparatory steps, will initiate a loop with successive calls to PathSolver.iteration(this), filling the buffer and notifying any data change listeners in parallel. This loop will go on until either converging results are obtained, or a timeout is reached, or if an execution error happens. Whether the run has been successful will be determined by comparing the associated R2 value with the SUCCESS_CUTOFF.

        Specified by:
        run in interface Runnable
        Overrides:
        run in class GeneralTask
      • searchVector

        public ParameterVector searchVector()
        Generates a search vector (= optimisation vector) using the search flags set by the PathSolver.
        Specified by:
        searchVector in class GeneralTask
        Returns:
        an IndexedVector with search parameters of this SearchTaks
      • assign

        public void assign​(ParameterVector pv)
                    throws SolverException
        Description copied from class: GeneralTask
        Tries to assign a selected set of parameters to the search vector used in optimisation.
        Specified by:
        assign in class GeneralTask
        Parameters:
        pv - a parameter vector containing all of the optimisation parameters whose values will be assigned to this task
        Throws:
        SolverException
      • set

        public void set​(NumericPropertyKeyword type,
                        NumericProperty property)
        Description copied from class: Accessible

        An abstract method, which must be overriden to gain access over setting the values of all relevant (selected by the programmer) NumericProperties in subclasses of Accessible. Typically this involves a switch statement that goes through the different options for the type and invokes different set(...) methods to update the matching NumericProperty with property.

        Specified by:
        set in class Accessible
        Parameters:
        type - the type, which must be equal by definition to property.getType().
        property - the property, which contains new information.