Class OptimizationUtils


  • public class OptimizationUtils
    extends java.lang.Object
    Utility methods for the optimization process.
    • Constructor Detail

      • OptimizationUtils

        public OptimizationUtils()
    • Method Detail

      • getPredecessorChannel

        public static Channel getPredecessorChannel​(Channel channel)
        Finds the single input Channel of the given channel's producing ExecutionTask.
        Parameters:
        channel - whose predecessor is requested
        Returns:
        the preceeding Channel
      • collectConnectedSlots

        public static java.util.Set<Slot<?>> collectConnectedSlots​(Slot<?> slot)
        Collects all Slots that are related to the given Slot either by a SlotMapping or by OutputSlot/InputSlot occupation.
        Parameters:
        slot - whose related Slots are requested
        Returns:
        the related Slots including the given Slot
      • logisticGrowth

        public static double logisticGrowth​(double g0,
                                            double epsilon,
                                            double x0,
                                            double x)
        Uses the right part of the logistic regression curve to model a strictly growing function between g0 and 1.
        Parameters:
        g0 - the starting value at x = 0
        epsilon - the function should have a value >= 1 - epsilon for x >= x0
        x0 - the convergence x value
        x - the actual input value to the function
        Returns:
        the function value