J - The job type.DQ - The queue-type for delegate jobs.public class FeedbackSimQueueSelector<J extends SimJob,DQ extends SimQueue> extends Object implements SimQueueSelector<J,DQ>
SimQueueSelector for feedback queues.
This is the mandatory SimQueueSelector for feedback queues, as enforced in the constructor
of AbstractFeedbackSimQueue.
It uses a more convenient SimQueueFeedbackController provided upon construction.
In addition, in support for FB_v,
it maintains the number of visits since the last reset for each "real" job in the composite queue.
If attached to a AbstractFeedbackSimQueue,
the selector will be reset automatically by the queue when required.
In return, the FeedbackSimQueueSelector then automatically resets the embedded SimQueueFeedbackController.
Copyright (C) 2005-2017 Jan de Jongh, TNO
This file is covered by the LICENSE file in the root of this project.
SimQueueFeedbackController,
FB_v,
FB_p| Constructor and Description |
|---|
FeedbackSimQueueSelector(DQ queue,
SimQueueFeedbackController<J,DQ> feedbackController)
Creates a
SimQueueSelector for a feedback queue. |
| Modifier and Type | Method and Description |
|---|---|
SimQueueFeedbackController<J,DQ> |
getFeedbackController()
Returns the feedback controller.
|
void |
resetSimQueueSelector()
Resets the feedback controller and clears the registration of visits.
|
DQ |
selectFirstQueue(double time,
J job)
Returns the embedded queue.
|
DQ |
selectNextQueue(double time,
J job,
DQ previousQueue)
Returns the embedded queue if the delegate job is to be fed back,
null otherwise. |
public FeedbackSimQueueSelector(DQ queue, SimQueueFeedbackController<J,DQ> feedbackController)
SimQueueSelector for a feedback queue.queue - The queue, non-null.feedbackController - The feedback controller, non-null.IllegalArgumentException - If the queue or feedback controller is null.public final SimQueueFeedbackController<J,DQ> getFeedbackController()
null.public void resetSimQueueSelector()
resetSimQueueSelector in interface SimQueueSelector<J extends SimJob,DQ extends SimQueue>SimQueueFeedbackController.resetFeedbackController()public DQ selectFirstQueue(double time, J job)
Updates the visits administration, putting the new job in with zero visits.
selectFirstQueue in interface SimQueueSelector<J extends SimJob,DQ extends SimQueue>time - The time of arrival of the job.job - The job, non-null.SimQueue.public DQ selectNextQueue(double time, J job, DQ previousQueue)
null otherwise.
Updates the visits administration, removing the job when it is leaving or increasing its number of visits when it is fed back.
selectNextQueue in interface SimQueueSelector<J extends SimJob,DQ extends SimQueue>time - The current time, i.e., the departure time of the job at its previous queue.job - The job, non-null.previousQueue - The previous queue the job visited, and just departed from.SimQueue,
null otherwise.SimQueueFeedbackController,
getFeedbackController()Copyright © 2018. All rights reserved.