Class MultipleQueueNetAnimation

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Animation

public class MultipleQueueNetAnimation extends AnimationClass
Class with all the JComponents for the Animation of a Routing Policy
Author:
Lorenzo Torri Date: 02-apr-2024 Time: 09.10
See Also:
  • Constructor Details

  • Method Details

    • initGUI

      public void initGUI(JPanel container)
      Description copied from interface: Animation
      Paint for the first time the model
      Specified by:
      initGUI in interface Animation
      Overrides:
      initGUI in class AnimationClass
    • paint

      public void paint(Graphics g)
      Description copied from interface: Animation
      Paint is a method for all JComponents. It is called when the class is istanciated, and called again when the repaint() method is invoked inside the class. Each paint of an animation recall then all the paint() of the subcomponents of an Animation. Repaint() must be called only once inside the Animation class, never on the subcomponents
      Specified by:
      paint in interface Animation
      Overrides:
      paint in class AnimationClass
      Parameters:
      g -
    • refresh

      public void refresh()
      Description copied from interface: Animation
      Method for updating some values inside the class. It is crucial since when we call the repaint() method and start the chain of calls of the paint() methods of each JComponent, those paint() method use some local variables of the clasess. If we change those variables with this method, then we can obtain some changes also in the graphics
      Specified by:
      refresh in interface Animation
      Overrides:
      refresh in class AnimationClass
    • updateMultiple

      public void updateMultiple(Simulation sim, DistributionJMCH service, DistributionJMCH interA, int maxJobs, boolean isGraphicalAnimation)
      Description copied from class: AnimationClass
      Method for updating the MultipleQueue
      Overrides:
      updateMultiple in class AnimationClass
      Parameters:
      sim - new info about the simulation
      service - distribution of the service time
      interA - distribution of the inter-arrival time
      maxJobs - max number of generated jobs
      isGraphicalAnimation - if the edge between the source and the station is there or not
    • updateMultiple

      public void updateMultiple(Simulation sim, double[] percentages, DistributionJMCH service, DistributionJMCH interA, int maxJobs, boolean isGraphicalAnimation)
      Description copied from class: AnimationClass
      Method for updating the MultipleQueue with routing Policy = PROBABILISTIC
      Overrides:
      updateMultiple in class AnimationClass
      Parameters:
      sim - new info about the simulation
      percentages - new array of percentages associated to the outgoing arcs from the router
      service - distribution of the service time
      interA - distribution of the inter-arrival time
      maxJobs - max number of generated jobs
      isGraphicalAnimation - if the edge between the source and the station is there or not