LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
afterEventHashedOrAdd.m
1function [outhash, outrate, outprob, sn] = afterEventHashedOrAdd(sn, ind, inhash, event, class)
2% [OUTHASH, OUTRATE, OUTPROB, QN] = AFTEREVENTHASHEDORADD(QN, IND, INHASH, EVENT, CLASS)
3
4% Copyright (c) 2012-2026, Imperial College London
5% All rights reserved.
6if inhash == 0
7 outhash = -1;
8 outrate = 0;
9 return
10end
11% ind: node index
12%ist = sn.nodeToStation(ind);
13isf = sn.nodeToStateful(ind);
14
15inspace = sn.space{isf}(inhash,:);
16isSimulation = true; % allow state vector to grow, e.g. for FCFS buffers
17[outspace, outrate, outprob] = State.afterEvent(sn, ind, inspace, event, class,isSimulation);
18if isempty(outspace)
19 outhash = -1;
20 outrate = 0;
21 return
22else
23 [outhash, sn] = State.getHashOrAdd(sn, ind, outspace);
24end
25end