Class ResourceAwareSpreadCheckpointPolicy

java.lang.Object
gov.nasa.jpl.aerie.scheduler.simulation.ResourceAwareSpreadCheckpointPolicy
All Implemented Interfaces:
Function<gov.nasa.jpl.aerie.merlin.driver.CheckpointSimulationDriver.SimulationState,Boolean>

public class ResourceAwareSpreadCheckpointPolicy extends Object implements Function<gov.nasa.jpl.aerie.merlin.driver.CheckpointSimulationDriver.SimulationState,Boolean>
Policy for saving simulation checkpoints in a cache. The number of checkpoint saved is equal to the capacity of the cache multiplied by a discount factor. The resulting number of cache events are then spread over the whole planning horizon.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ResourceAwareSpreadCheckpointPolicy(int resourceCapacity, gov.nasa.jpl.aerie.merlin.protocol.types.Duration planningHorizonStart, gov.nasa.jpl.aerie.merlin.protocol.types.Duration planningHorizonEnd, gov.nasa.jpl.aerie.merlin.protocol.types.Duration subHorizonStart, gov.nasa.jpl.aerie.merlin.protocol.types.Duration subHorizonEnd, double discount, boolean endForSure)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    apply(gov.nasa.jpl.aerie.merlin.driver.CheckpointSimulationDriver.SimulationState simulationState)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface java.util.function.Function

    andThen, compose
  • Constructor Details

    • ResourceAwareSpreadCheckpointPolicy

      public ResourceAwareSpreadCheckpointPolicy(int resourceCapacity, gov.nasa.jpl.aerie.merlin.protocol.types.Duration planningHorizonStart, gov.nasa.jpl.aerie.merlin.protocol.types.Duration planningHorizonEnd, gov.nasa.jpl.aerie.merlin.protocol.types.Duration subHorizonStart, gov.nasa.jpl.aerie.merlin.protocol.types.Duration subHorizonEnd, double discount, boolean endForSure)
  • Method Details

    • apply

      public Boolean apply(gov.nasa.jpl.aerie.merlin.driver.CheckpointSimulationDriver.SimulationState simulationState)
      Specified by:
      apply in interface Function<gov.nasa.jpl.aerie.merlin.driver.CheckpointSimulationDriver.SimulationState,Boolean>