Package jline.lang.nodes
Class Fork
java.lang.Object
jline.lang.Element
jline.lang.NetworkElement
jline.lang.nodes.Node
jline.lang.nodes.Fork
- All Implemented Interfaces:
Serializable,Copyable
A node that forks an incoming job into a set of sibling tasks.
Fork nodes split incoming jobs into parallel sibling tasks that are sent to multiple
output destinations. The number of tasks per output link can be configured using
setTasksPerLink(int).
Solver compatibility for tasksPerLink > 1:
- SolverLDES: Fully supported - correctly simulates multiple tasks per link
- SolverJMT: Fully supported - simulation handles multiple tasks correctly
- SolverMVA (H-T method): Not supported - throws error when tasksPerLink > 1
- SolverMVA (MMT method): Supported - analytical approximation
- See Also:
-
Field Summary
Fields inherited from class jline.lang.nodes.Node
dropStrategy, input, model, nodeIndex, output, server, state, statefulIdx, stationIdx -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetModel()Returns the network model containing this node.voidsetTasksPerLink(int nTasks) Sets the number of tasks sent out on each outgoing link.Methods inherited from class jline.lang.nodes.Node
getAttribute, getCap, getClassCap, getDropStrategy, getInput, getNodeIndex, getOutput, getOutputStrategies, getRoutingStrategy, getSections, getServer, getState, getStatefulIdx, getStationIdx, isReferenceStation, isStateful, printSummary, reset, resetRouting, setKChoicesRouting, setModel, setNodeIdx, setProbRouting, setRLRouting, setRouting, setRouting, setState, setStationIdx
-
Constructor Details
-
Fork
Creates a new fork node with default name "Fork".- Parameters:
model- the network model to add this fork node to
-
Fork
Creates a new fork node with the specified name. Initializes the fork with buffer input, service tunnel server, and forker output sections.- Parameters:
model- the network model to add this fork node toname- the name for this fork node
-
-
Method Details
-
getModel
Description copied from class:NodeReturns the network model containing this node. -
setTasksPerLink
public void setTasksPerLink(int nTasks) Sets the number of tasks sent out on each outgoing link.By default, a Fork node sends exactly one task per outgoing link. This method allows configuring the Fork to send multiple identical tasks on each link. The total number of tasks created will be: (number of outgoing links) × tasksPerLink.
Important: Values greater than 1 are only fully supported by simulation-based solvers (SolverLDES, SolverJMT). Analytical solvers may produce errors or inaccurate results.
- Parameters:
nTasks- the number of tasks to send on each outgoing link (default: 1)- See Also:
-