Class Fork

All Implemented Interfaces:
Serializable, 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(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:
  • Constructor Details

    • Fork

      public Fork(Network model)
      Creates a new fork node with default name "Fork".
      Parameters:
      model - the network model to add this fork node to
    • Fork

      public Fork(Network model, String name)
      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 to
      name - the name for this fork node
  • Method Details

    • getModel

      public Network getModel()
      Description copied from class: Node
      Returns the network model containing this node.
      Overrides:
      getModel in class Node
      Returns:
      the parent network model
    • 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: