Class LoadIntegrator

java.lang.Object
net.sourceforge.plantuml.gantt.ngm.math.LoadIntegrator

public class LoadIntegrator extends Object
  • Constructor Details

    • LoadIntegrator

      public LoadIntegrator(PiecewiseConstant loadFunction, Load totalLoad)
      Creates a new LoadIntegrator.
      Parameters:
      loadFunction - the piecewise constant load function to integrate; it defines the load rate at any given time
      totalLoad - the total amount of load to be consumed
  • Method Details

    • computeEnd

      public LocalDateTime computeEnd(LocalDateTime start)
    • computeStart

      public LocalDateTime computeStart(LocalDateTime end)
      Computes the start date-time at which the total load has been completely consumed.

      The computation is expected to traverse the successive PiecewiseConstant segments starting at the integration start date-time, accumulating consumed load in past until the target total load is reached.

      Returns:
      the LocalDateTime corresponding to the start of the load integration