Class OptimizationContextInternal

java.lang.Object
fr.ifremer.isisfish.simulator.SimulationPlanContextInternal
fr.ifremer.isisfish.simulator.OptimizationContextInternal
All Implemented Interfaces:
OptimizationContext, SimulationPlanContext

public class OptimizationContextInternal extends SimulationPlanContextInternal implements OptimizationContext
Context utilisé pour gérer les différentes simulation lancées par un script d'optimisation.
Since:
4.3.0.0
  • Field Details

  • Constructor Details

  • Method Details

    • getNextSimulations

      public List<SimulationStorage> getNextSimulations()
      Description copied from interface: OptimizationContext
      Return next generation, in endGeneration, this method return all time empty list.
      Specified by:
      getNextSimulations in interface OptimizationContext
      Returns:
    • clearNextSimulation

      public List<SimulationStorage> clearNextSimulation()
      Get simulation to do, put it generations and increment currentGeneration This method must be call be Simulator when it want to get next simulations to do.
      Returns:
      null or empty collection if no more simulation to do
    • getLastSimulations

      public List<SimulationStorage> getLastSimulations()
      Description copied from interface: OptimizationContext
      Return last generation simulations.
      Specified by:
      getLastSimulations in interface OptimizationContext
      Returns:
    • newSimulation

      public SimulationStorage newSimulation()
      Return new simulation. This new simulation is automaticaly added to next simulation.
      Specified by:
      newSimulation in interface OptimizationContext
      Returns:
      new Simulation
    • addSimulation

      protected void addSimulation(SimulationStorage s)
    • newSimulation

      public SimulationStorage newSimulation(Factor... factors)
      Create simulation. This new simulation is automatically added to next simulations. Database will be modified with factors in parameters
      Specified by:
      newSimulation in interface OptimizationContext
      Parameters:
      factors - factors used to modify simulation
      Returns:
      simulation modified with factors
    • getCurrentGeneration

      public int getCurrentGeneration()
      Return the current generation. 0 for no generation 1 for one generation simulation ...
      Specified by:
      getCurrentGeneration in interface OptimizationContext
      Returns:
    • incGenerationNumber

      public void incGenerationNumber()
    • getSimulationNumber

      public int getSimulationNumber()
    • getGeneration

      public List<SimulationStorage> getGeneration(int n)
      Description copied from interface: OptimizationContext
      Return simulation for generation n
      Specified by:
      getGeneration in interface OptimizationContext
      Parameters:
      n - generation number
      Returns: