Class LayeredNetworkElement
- All Implemented Interfaces:
Serializable,Copyable
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classOne admission constraint row declared by operand name.static classOne declared pool, its operands held by name until getStruct resolves them. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intHandle beta(n): product-form class-dependent scaling, n counted over this server's operands.Peak rate scaling per operand of lcdScaling, normalizes Util = T*S/peak.Matrix(C,K): admission constraint matrix on this server's layer station.Matrix(C,1): admission constraint capacities.Rows declared by operand name, resolved in LayeredNetwork.getStruct.Handle eta(n): non-product-form joint-dependent scaling, n counted over this server's operands.Peak rate scaling per operand of ljdScaling, normalizes Util = T*S/peak.Vector alpha(n): rate scaling of this server's layer station when it holds n jobs.static final intHeterogeneous server pools with a compatibility graph over this server's operands.static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddConstraint(List<? extends LayeredNetworkElement> operands, double[] coeffs, double cap) Appends one admission constraint row naming its operands, so the meaning does not depend on declaration order:voidaddConstraintByName(List<String> names, double[] coeffs, double cap) Name-based form ofaddConstraint(List, double[], double), for operands not yet held as handles.voidaddServerType(ServerType serverType) Declares one pool ofserverType.getNumOfServers()identical servers, each running atserverType.getRate(), eligible only for the operands the ServerType names.Matrix[]Positional constraint pair declared on this element, before name resolution.Declared compatibility pools.booleanWhether this element declares any admission constraint, in either form.booleanWhether this element declares any service-rate dependence.booleanWhether this element declares compatibility pools.voidsetClassDependence(SerializableFunction<Matrix, Matrix> beta, Matrix peakRatePerOperand) Sets a class-dependent service-rate scaling on this server's layer station.voidsetConstraint(Matrix A, Matrix b) Raw form of addConstraint, for programmatic construction.voidsetJointDependence(SerializableFunction<Matrix, Matrix> eta, Matrix peakRatePerOperand) Sets a joint-dependent (non-product-form) service-rate scaling on this server's layer station.voidsetLoadDependence(Matrix alpha) Sets the service-rate scaling of the station that represents this server in its layer: alpha[n] applies when that station holds n jobs in total, as in Queue.setLoadDependence.
-
Field Details
-
ACTIVITY
public static final int ACTIVITY- See Also:
-
CALL
public static final int CALL- See Also:
-
ENTRY
public static final int ENTRY- See Also:
-
HOST
public static final int HOST- See Also:
-
PROCESSOR
public static final int PROCESSOR- See Also:
-
TASK
public static final int TASK- See Also:
-
model
-
linConA
Matrix(C,K): admission constraint matrix on this server's layer station. -
linConB
Matrix(C,1): admission constraint capacities. -
linConRows
Rows declared by operand name, resolved in LayeredNetwork.getStruct. -
lldScaling
Vector alpha(n): rate scaling of this server's layer station when it holds n jobs. -
lcdScaling
Handle beta(n): product-form class-dependent scaling, n counted over this server's operands. -
lcdScalingPeak
Peak rate scaling per operand of lcdScaling, normalizes Util = T*S/peak. -
ljdScaling
Handle eta(n): non-product-form joint-dependent scaling, n counted over this server's operands. -
ljdScalingPeak
Peak rate scaling per operand of ljdScaling, normalizes Util = T*S/peak. -
serverPools
Heterogeneous server pools with a compatibility graph over this server's operands. Each entry is one declared pool; SolverLN lowers the whole list to the activated-server rate ofSnCompatRate, carried onto the layer station as a joint dependence.
-
-
Constructor Details
-
LayeredNetworkElement
-
-
Method Details
-
addConstraint
public void addConstraint(List<? extends LayeredNetworkElement> operands, double[] coeffs, double cap) Appends one admission constraint row naming its operands, so the meaning does not depend on declaration order:
t2.addConstraint(Arrays.asList(e2, e3), new double[]{1, 1}, 2); // n(E2) + n(E3) <= 2Operands are the entries of a Task, or the tasks of a Host. Names are resolved against the model in LayeredNetwork.getStruct, where an operand that does not belong to this server is an error rather than a silent mis-mapping.
- Parameters:
operands- entries of this task, or tasks on this hostcoeffs- one coefficient per operand, or null for all onescap- right-hand side of the row
-
addConstraintByName
Name-based form ofaddConstraint(List, double[], double), for operands not yet held as handles.- Parameters:
names- operand names, entries of this task or tasks on this hostcoeffs- one coefficient per operand, or null for all onescap- right-hand side of the row
-
setConstraint
Raw form of addConstraint, for programmatic construction. Declares A*n <= b on the station that represents this server in its layer, where n counts the jobs in service or queueing at that station.
Columns of A are indexed positionally by the entries of a Task, or by the tasks of a Host, in declaration order, so the mapping shifts if an entry is added later; prefer addConstraint, which names its operands. Only the column count is checked, in LayeredNetwork.getStruct, since entries may be added after this call. Rows from both forms are concatenated.
- Parameters:
A- constraint matrix, one column per entry or taskb- capacity vector, one entry per row of A
-
getLinearConstraints
Positional constraint pair declared on this element, before name resolution.- Returns:
- a two-element array holding A and b, either of which may be null
-
hasLinearConstraints
public boolean hasLinearConstraints()Whether this element declares any admission constraint, in either form.- Returns:
- true if a positional pair or at least one named row is present
-
setLoadDependence
Sets the service-rate scaling of the station that represents this server in its layer: alpha[n] applies when that station holds n jobs in total, as in Queue.setLoadDependence. The scaling multiplies the station rate on top of its multiplicity, so a multi-server host applies min(n,m)*alpha[n].
- Parameters:
alpha- row vector of positive scalings, indexed by station population
-
setClassDependence
Sets a class-dependent service-rate scaling on this server's layer station. The handle takes the per-operand population vector of this server: entry j counts the jobs held on behalf of operand j, which is task j of a Host or entry j of a Task, in the same tasksof/entriesof order as the columns of setConstraint. It returns a 1x1 scaling shared by every operand, or a per-operand row vector.
Product form holds only where an operand occupies the layer station through a single job class; otherwise SolverLN emits the equivalent joint dependence, which is numerically identical but carries no exactness guarantee.
- Parameters:
beta- maps the per-operand population vector to a rate scalingpeakRatePerOperand- 1x1 (broadcast) or per-operand peak rate scaling
-
setJointDependence
Sets a joint-dependent (non-product-form) service-rate scaling on this server's layer station. The handle reads the per-operand population vector arbitrarily (e.g. min(n[0],c)), so solvers treat it as an approximation. Operand order and the required peak rate are as in
setClassDependence(jline.util.SerializableFunction<jline.util.matrix.Matrix, jline.util.matrix.Matrix>, jline.util.matrix.Matrix).- Parameters:
eta- maps the per-operand population vector to a rate scalingpeakRatePerOperand- 1x1 (broadcast) or per-operand peak rate scaling
-
addServerType
Declares one pool ofserverType.getNumOfServers()identical servers, each running atserverType.getRate(), eligible only for the operands the ServerType names.The operands are the tasks of a Processor, or the entries of a Task. They are resolved against the model in
LayeredNetwork.getStruct, where an operand that does not belong to this server is an error rather than a silent mis-mapping, exactly as for an admission constraint.SolverLN lowers the whole declaration to the activated-server rate of
SnCompatRate, carried onto the layer station as a joint dependence, so the pools are an APPROXIMATION in a layer for the same reasonsetJointDependenceis.- Parameters:
serverType- the pool to declare
-
getServerTypes
Declared compatibility pools. -
hasServerPools
public boolean hasServerPools()Whether this element declares compatibility pools. -
hasRateDependence
public boolean hasRateDependence()Whether this element declares any service-rate dependence.- Returns:
- true if a load, class or joint dependence is present
-