Class Fork
-
- All Implemented Interfaces:
-
java.io.Serializable,jline.lang.Copyable
public class Fork extends Node implements Serializable
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.
Solver compatibility for tasksPerLink >1:
- SolverDES: 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): Limited support - results may be inaccurate due to missing synchronization delay modeling
-
-
Field Summary
Fields Modifier and Type Field Description public final NodeAttributeattributepublic Networkmodelprotected InputSectioninputprotected OutputSectionoutputprotected ServiceSectionserverprotected DropStrategydropStrategyprotected intstatefulIdxprotected intnodeIndexprotected intstationIdxprotected Matrixstateprotected Stringname
-
Method Summary
Modifier and Type Method Description NetworkgetModel()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, setModel, setNodeIdx, setProbRouting, setRouting, setRouting, setState, setStationIdx -
Methods inherited from class jline.lang.Element
getName, setName -
Methods inherited from class jline.lang.Copyable
copy -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
Fork
Fork(Network model)
Creates a new fork node with default name "Fork".- Parameters:
model- the network model to add this fork node to
-
-
Method Detail
-
getModel
Network getModel()
Returns the network model containing this node.
- Returns:
the parent network model
-
setTasksPerLink
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 (SolverDES, SolverJMT). Analytical solvers may produce errors or inaccurate results.
- Parameters:
nTasks- the number of tasks to send on each outgoing link (default: 1)
-
-
-
-