Class SignalRemoval
- All Implemented Interfaces:
Serializable
State.afterEventStationSignal and State.signalBatchPMF.
A signal never joins the station: it acts on the jobs already there and is annihilated. CATASTROPHE empties the station, ignoring the removal count distribution (a catastrophe removes all jobs by definition). NEGATIVE removes a batch of jobs:
- Victims. When the signal declares a target class (
sn.signaltarget >= 0, set via forJobClass) only that class is eligible; otherwise every non-signal class is eligible. The untargeted case is the classic Gelenbe negative customer and agrees with SolverMAM and SolverLDES, which are both class-agnostic. - Count.
sn.signalremdistgives the batch-size pmf. An oversized batch empties the eligible jobs rather than driving the queue negative, so the pmf tail P(B >= n) lumps onto "remove all n" (the min(B,n) clipping used by LDES and the tail term used by MAM). - Policy.
sn.signalrempolicyselects the victim: FCFS removes the oldest waiting job, LCFS the newest, RANDOM draws uniformly over waiting and in-service jobs. FCFS/LCFS only touch an in-service job when no job is waiting (two-tier, as in LDES).
The station state carries no arrival-time order for in-service jobs, so when a policy has to reach into the servers the victim is drawn uniformly across the occupied phases (exact whenever at most one job of the class is in service, which covers every single-server station).
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Ret.EventResulthandleSignalArrival(NetworkStruct sn, int ind, int ist, Matrix inspace, int jobClass, boolean isSimulation, Matrix phasessz, Matrix phaseshift, Matrix K, Matrix Ks, Matrix S, Matrix spaceBuf, Matrix spaceSrv, Matrix spaceVar) Passive arrival of a G-network signal class at station ist.static booleanisCatastropheSignal(NetworkStruct sn, int jobClass) True if the signal empties a station on arrival.static MatrixsignalBatchPMF(NetworkStruct sn, int jobClass, int ntot) Batch-size distribution of the jobs removed by a signal class when ntot eligible jobs are present.
-
Constructor Details
-
SignalRemoval
public SignalRemoval()
-
-
Method Details
-
isCatastropheSignal
True if the signal empties a station on arrival. The signaltype is consulted alongside the iscatastrophe flag so the two encodings of a catastrophe cannot disagree (SolverMAM applies the same test). -
signalBatchPMF
Batch-size distribution of the jobs removed by a signal class when ntot eligible jobs are present. Without a removal distribution a signal removes exactly one job. With one, the pmf is clipped at ntot: a batch larger than the eligible population empties it instead of driving the queue negative, so the tail P(B >= ntot) lumps onto "remove ntot".- Returns:
- a two-row matrix: row 0 holds the batch sizes, row 1 their probabilities.
-
handleSignalArrival
public static Ret.EventResult handleSignalArrival(NetworkStruct sn, int ind, int ist, Matrix inspace, int jobClass, boolean isSimulation, Matrix phasessz, Matrix phaseshift, Matrix K, Matrix Ks, Matrix S, Matrix spaceBuf, Matrix spaceSrv, Matrix spaceVar) Passive arrival of a G-network signal class at station ist.Removal is in general a random choice, so the generator needs every destination state and its probability. A simulation instead advances along one sample path, so under isSimulation the set is collapsed to a single successor drawn from outprob (the rate stays -1, as for the other passive actions).
- Returns:
- the weighted successor states; the rate is -1 throughout (passive action).
-