java.lang.Object
edu.kit.ipd.sdq.pcm.simulation.scheduler.exact.loaddistribution.balancers.AbstractLoadBalancer
edu.kit.ipd.sdq.pcm.simulation.scheduler.exact.loaddistribution.balancers.ToThresholdBalancer
All Implemented Interfaces:
ILoadBalancer

public class ToThresholdBalancer extends AbstractLoadBalancer
Ensures that the load of two resource instances does not differ more than 'threshold'. The threshold is a relative value between 0 and 1. If 0 the load of both instances must be equal, if 1 the load of both instances is never balanced.
  • Constructor Details

    • ToThresholdBalancer

      public ToThresholdBalancer(de.uka.ipd.sdq.scheduler.SchedulerModel model, double balancing_interval, boolean prio_increasing, boolean queue_ascending, int threshold)
  • Method Details

    • activelyBalance

      public void activelyBalance(IResourceInstance instance)
      Description copied from interface: ILoadBalancer
      Balances the load. Two scenarios are possible. Either the load is balanced between all instances, or the specified instances pulls processes from the busiest one.
    • onFork

      public void onFork(IResourceInstance instance)
    • onSleep

      public void onSleep(IResourceInstance instance)
    • onTerminate

      public void onTerminate(IResourceInstance instance)
    • onWake

      public void onWake(IResourceInstance instance)