Q - The type of SimQueues supported.public interface SimQueueEventPredictor<Q extends SimQueue>
SimQueues under external and internal events.Copyright (C) 2005-2017 Jan de Jongh, TNO
This file is covered by the LICENSE file in the root of this project.
SimQueuePredictor| Modifier and Type | Method and Description |
|---|---|
default SimQueueState<SimJob,Q> |
createQueueState(Q queue,
boolean isROEL)
Creates a suitable
SimQueueState object for this predictor and given queue. |
default WorkloadSchedule_SQ_SV_ROEL_U |
createWorkloadSchedule_SQ_SV_ROEL_U(Q queue,
Set<SimJQEvent> workloadEvents)
Creates and prepares a suitable
WorkloadSchedule_SQ_SV_ROEL_U object for this predictor and given queue,
for a given set of workload events. |
default WorkloadSchedule_SQ_SV |
createWorkloadSchedule_SQ_SV(Q queue,
Map<Double,Set<SimJQEvent>> workloadEventsMap)
Creates and prepares a suitable
WorkloadSchedule_SQ_SV object for this predictor and given queue,
for a given map of event times onto workload events. |
void |
doQueueEvents_SQ_SV_ROEL_U(Q queue,
SimQueueState<SimJob,Q> queueState,
Set<SimEntitySimpleEventType.Member> queueEventTypes,
Set<JobQueueVisitLog<SimJob,Q>> visitLogsSet)
Process the next event(s) at a queue with given state.
|
void |
doWorkloadEvents_SQ_SV_ROEL_U(Q queue,
WorkloadSchedule_SQ_SV_ROEL_U workloadSchedule,
SimQueueState<SimJob,Q> queueState,
Set<SimEntitySimpleEventType.Member> workloadEventTypes,
Set<JobQueueVisitLog<SimJob,Q>> visitLogsSet)
Process the next event(s) from given
WorkloadSchedule at a queue with given state. |
default void |
doWorkloadEvents_SQ_SV(Q queue,
WorkloadSchedule_SQ_SV workloadSchedule,
SimQueueState queueState,
Set<JobQueueVisitLog<SimJob,Q>> visitLogsSet)
Process the next event(s) from given
WorkloadSchedule at a queue with given state under IOEL. |
double |
getNextQueueEventTimeBeyond(Q queue,
SimQueueState<SimJob,Q> queueState,
Set<SimEntitySimpleEventType.Member> queueEventTypes)
Returns the time and types of the next event(s)
scheduled strictly beyond the time at (the state object of) a specific queue.
|
void |
updateToTime(Q queue,
SimQueueState queueState,
double newTime)
Updates the queue state to a new time, without processing any events.
|
default WorkloadSchedule_SQ_SV_ROEL_U createWorkloadSchedule_SQ_SV_ROEL_U(Q queue, Set<SimJQEvent> workloadEvents) throws WorkloadScheduleException
WorkloadSchedule_SQ_SV_ROEL_U object for this predictor and given queue,
for a given set of workload events.
The initial time must be set to Double.NaN.
Implementations must prepare the required maps from the WorkloadSchedule_SQ_SV_ROEL_U at construction.
The default implementation returns a new DefaultWorkloadSchedule_SQ_SV_ROEL_U.
queue - The queue, non-null.workloadEvents - The workload events, may be null or empty.WorkloadSchedule_SQ_SV_ROEL_U object for this predictor and given queue.WorkloadScheduleException - If the workload is invalid or ambiguous (for instance).default WorkloadSchedule_SQ_SV createWorkloadSchedule_SQ_SV(Q queue, Map<Double,Set<SimJQEvent>> workloadEventsMap) throws WorkloadScheduleException
WorkloadSchedule_SQ_SV object for this predictor and given queue,
for a given map of event times onto workload events.
The initial time must be set to Double.NaN.
Implementations must prepare the required maps from the WorkloadSchedule_SQ_SV at construction.
The default implementation returns a new DefaultWorkloadSchedule_SQ_SV.
queue - The queue, non-null.workloadEventsMap - The workload events, may be null or empty.WorkloadSchedule_SQ_SV object for this predictor and given queue.WorkloadScheduleException - If the workload is invalid (for instance).default SimQueueState<SimJob,Q> createQueueState(Q queue, boolean isROEL)
SimQueueState object for this predictor and given queue.
The initial time must be set to Double.NaN.
queue - The queue, non-null.isROEL - Whether or not the event list used is a Random-Order Event List.SimQueueState object for this predictor and given queue.IllegalArgumentException - If queue == null.UnsupportedOperationException - If isROEL == true, because the default implementation does not
support non-ROEL event lists.double getNextQueueEventTimeBeyond(Q queue, SimQueueState<SimJob,Q> queueState, Set<SimEntitySimpleEventType.Member> queueEventTypes) throws SimQueuePredictionException
The time from which to search must be taken from SimQueueState.getTime(),
and equals Double.NaN after initialization.
queue - The queue, non-null.queueState - The queue-state, non-null.queueEventTypes - A non-null set to store the (possible multiple) event types; it must be cleared upon entry.Double.NaN if no such event exists.IllegalArgumentException - If any of the input arguments is null.SimQueuePredictionException - If the result cannot be computed, e.g., due to invalid input or schedule ambiguities.SimJQSimpleEventType.START,
SimJQSimpleEventType.DEPARTUREvoid updateToTime(Q queue, SimQueueState queueState, double newTime)
Implementations must at least set the time on the queue state.
Beware that the old time on the queue state may equal its initial value Double.NaN.
queue - The queue, non-null.queueState - The queue-state, non-null.newTime - The new time.IllegalArgumentException - If the queue or queue state is null,
the new time is in the past,
or the new time equals Double.NaN.SimQueueState.setTime(double)void doWorkloadEvents_SQ_SV_ROEL_U(Q queue, WorkloadSchedule_SQ_SV_ROEL_U workloadSchedule, SimQueueState<SimJob,Q> queueState, Set<SimEntitySimpleEventType.Member> workloadEventTypes, Set<JobQueueVisitLog<SimJob,Q>> visitLogsSet) throws SimQueuePredictionException, WorkloadScheduleException
WorkloadSchedule at a queue with given state.
The scheduled time and the types of the next events must be known beforehand,
e.g., through WorkloadSchedule.getNextEventTimeBeyond(org.javades.jqueues.r5.entity.jq.queue.SimQueue, double, java.util.Set<org.javades.jqueues.r5.entity.SimEntitySimpleEventType.Member>).
The scheduled time has already been set on the SimQueueState object,
and the object has been updated upto that time.
The time on the queue state must not be changed.
Implementations must update the queue state and (if applicable) add suitable entries to the visit logs.
Implementations must not modify the workload schedule.
queue - The queue, non-null.workloadSchedule - The workload schedule, non-null.queueState - The queue-state, non-null.workloadEventTypes - The (pre-calculated) types of the next workload event(s).visitLogsSet - The visit logs, non-null.IllegalArgumentException - If any of the mandatory input arguments is null.SimQueuePredictionException - If the result cannot be computed, e.g., due to invalid input or schedule ambiguities.WorkloadScheduleException - If the workload is invalid (e.g., containing ambiguities).WorkloadSchedule.getNextEventTimeBeyond(org.javades.jqueues.r5.entity.jq.queue.SimQueue, double, java.util.Set<org.javades.jqueues.r5.entity.SimEntitySimpleEventType.Member>),
updateToTime(Q, org.javades.jqueues.r5.util.predictor.state.SimQueueState, double),
SimQueueState.setTime(double)default void doWorkloadEvents_SQ_SV(Q queue, WorkloadSchedule_SQ_SV workloadSchedule, SimQueueState queueState, Set<JobQueueVisitLog<SimJob,Q>> visitLogsSet) throws SimQueuePredictionException, WorkloadScheduleException
WorkloadSchedule at a queue with given state under IOEL.
The scheduled time and the types of the next events must be known beforehand,
e.g., through WorkloadSchedule.getNextEventTimeBeyond(org.javades.jqueues.r5.entity.jq.queue.SimQueue, double, java.util.Set<org.javades.jqueues.r5.entity.SimEntitySimpleEventType.Member>).
The scheduled time has already been set on the SimQueueState object,
and the object has been updated upto that time.
The time on the queue state must not be changed.
Implementations must update the queue state and (if applicable) add suitable entries to the visit logs.
The default implementation creates a workload schedule for each individual event
through createWorkloadSchedule_SQ_SV_ROEL_U(Q, java.util.Set<org.javades.jqueues.r5.entity.jq.SimJQEvent>)
and has it processed
through doWorkloadEvents_SQ_SV_ROEL_U(Q, org.javades.jqueues.r5.util.predictor.workload.WorkloadSchedule_SQ_SV_ROEL_U, org.javades.jqueues.r5.util.predictor.state.SimQueueState<org.javades.jqueues.r5.entity.jq.job.SimJob, Q>, java.util.Set<org.javades.jqueues.r5.entity.SimEntitySimpleEventType.Member>, java.util.Set<org.javades.jqueues.r5.entity.jq.job.visitslogging.JobQueueVisitLog<org.javades.jqueues.r5.entity.jq.job.SimJob, Q>>).
Implementations must not modify the workload schedule.
queue - The queue, non-null.workloadSchedule - The workload schedule, non-null.queueState - The queue-state, non-null.visitLogsSet - The visit logs, non-null.IllegalArgumentException - If any of the mandatory input arguments is null.SimQueuePredictionException - If the result cannot be computed, e.g., due to invalid input or schedule ambiguities.WorkloadScheduleException - If the workload is invalid (e.g., containing ambiguities).WorkloadSchedule.getNextEventTimeBeyond(org.javades.jqueues.r5.entity.jq.queue.SimQueue, double, java.util.Set<org.javades.jqueues.r5.entity.SimEntitySimpleEventType.Member>),
updateToTime(Q, org.javades.jqueues.r5.util.predictor.state.SimQueueState, double),
SimQueueState.setTime(double)void doQueueEvents_SQ_SV_ROEL_U(Q queue, SimQueueState<SimJob,Q> queueState, Set<SimEntitySimpleEventType.Member> queueEventTypes, Set<JobQueueVisitLog<SimJob,Q>> visitLogsSet) throws SimQueuePredictionException
The scheduled time and the types of the next events must be known beforehand,
e.g., through getNextQueueEventTimeBeyond(Q, org.javades.jqueues.r5.util.predictor.state.SimQueueState<org.javades.jqueues.r5.entity.jq.job.SimJob, Q>, java.util.Set<org.javades.jqueues.r5.entity.SimEntitySimpleEventType.Member>).
The scheduled time has already been set on the SimQueueState object,
and the object has been updated upto that time.
The time on the queue state must not be changed.
Implementations must update the queue state and (if applicable) add suitable entries to the visit logs.
queue - The queue, non-null.queueState - The queue-state, non-nullqueueEventTypes - The (pre-calculated) types of the next workload event(s).visitLogsSet - The visit logs, non-null.IllegalArgumentException - If any of the mandatory input arguments is null.SimQueuePredictionException - If the result cannot be computed, e.g., due to invalid input or schedule ambiguities.getNextQueueEventTimeBeyond(Q, org.javades.jqueues.r5.util.predictor.state.SimQueueState<org.javades.jqueues.r5.entity.jq.job.SimJob, Q>, java.util.Set<org.javades.jqueues.r5.entity.SimEntitySimpleEventType.Member>),
updateToTime(Q, org.javades.jqueues.r5.util.predictor.state.SimQueueState, double),
SimQueueState.setTime(double)Copyright © 2018. All rights reserved.