Class GeneralSolver

java.lang.Object
jmt.jmch.animation.solver.AnimationSolver
jmt.jmch.animation.solver.GeneralSolver

public class GeneralSolver extends AnimationSolver
Solver for all the different animations (no PS)
Author:
Lorenzo Torri Date: 10-apr-2025 Time: 20.25
  • Constructor Details

    • GeneralSolver

      public GeneralSolver(AnimationClass animation, int nQueues)
  • Method Details

    • init

      public void init()
      Description copied from class: AnimationSolver
      Init variables, but it's also a way to reset all of them when the stop button is pressed
      Overrides:
      init in class AnimationSolver
    • jobEntrance

      public double jobEntrance(double randomArrival)
      Set the real arrival time of a job as Real arrival time previous job + new random value
      Specified by:
      jobEntrance in class AnimationSolver
      Parameters:
      randomArrival - the new random value from the distribution
      Returns:
    • jobExit

      public void jobExit(Job job, int index)
      Sets the completion time (T) based on the arrival of the job in the system and when the previous job finished.
      Specified by:
      jobExit in class AnimationSolver
      Parameters:
      job - the job exiting the system
      index - the i-th station (0 if single queue)