Utilities and Constants

Helper functions, constants, and enumerations.

These modules provide utility functions, constants, and example models.

Utility Functions (line_solver.utils)

The utils module contains helper functions for working with LINE models.

Mock module that can handle any attribute access

Constants and Enumerations (line_solver.constants)

The constants module defines enumerations and global constants used throughout the LINE Solver package.

Scheduling Strategies

class SchedStrategy(*values)[source]

Bases: Enum

Scheduling strategies for service stations.

EDD = 8
EDF = 9
SRPT = 15
SRPTPRIO = 16
HOL = 17
LCFSPRIO = 25
LCFSPRPRIO = 26
LCFSPIPRIO = 27
FCFSPRPRIO = 28
FCFSPIPRIO = 29
PSJF = 31
FB = 32
LAS = 33
LRPT = 34
SETF = 35
static fromString(obj)[source]
static fromLINEString(sched)[source]
static toID(sched)[source]
class SchedStrategyType(*values)[source]

Bases: Enum

Categories of scheduling strategies by preemption behavior.

Distribution and Process Types

class ProcessType(*values)[source]

Bases: Enum

Types of stochastic processes for arrivals and service times.

static fromString(obj)[source]

Node Types

class NodeType(*values)[source]

Bases: Enum

Types of nodes in queueing network models.

static from_line(obj)[source]

Job Class Types

class JobClassType(*values)[source]

Bases: Enum

Types of job classes in queueing networks.

  • OPEN: Open class (jobs arrive from outside the system)

  • CLOSED: Closed class (fixed population circulating in the system)

  • DISABLED: Disabled class (not currently active)

Routing Strategies

class RoutingStrategy(*values)[source]

Bases: Enum

Strategies for routing jobs between network nodes.

Service Strategies

class ServiceStrategy(*values)[source]

Bases: Enum

Service strategies defining service time dependence.

Solver Types

class SolverType(*values)[source]

Bases: Enum

Types of solvers available in LINE.

DES = 3

Metric Types

class MetricType(*values)[source]

Bases: Enum

Types of performance metrics that can be computed.

SysDropR = 11
SysPower = 13
Tard = 24
SysTard = 25

Drop and Replacement Strategies

class DropStrategy(*values)[source]

Bases: Enum

Strategies for handling queue overflow and capacity limits.

  • WaitingQueue: Jobs wait in a waiting queue when capacity is exceeded

  • Drop: Jobs are dropped (lost) when capacity is exceeded

  • BlockingAfterService: Jobs are blocked after service completion

Join Strategies

class JoinStrategy(*values)[source]

Bases: Enum

Strategies for join node synchronization in fork-join networks.

  • STD: Standard join (wait for all parallel branches)

  • PARTIAL: Partial join (proceed when some branches complete)

  • Quorum: Quorum-based join (wait for minimum number of branches)

  • Guard: Guard condition join (custom completion criteria)

Layered Network Types

class CallType(*values)[source]

Bases: Enum

Types of calls between tasks in layered networks.

  • SYNC: Synchronous call (caller waits for response)

  • ASYNC: Asynchronous call (caller continues immediately)

  • FWD: Forward call (caller terminates, response goes to caller’s caller)

class ActivityPrecedenceType(*values)[source]

Bases: Enum

Types of activity precedence relationships in layered networks.

These specify how activities are ordered and synchronized: - PRE_SEQ: Sequential prerequisite (must complete before) - PRE_AND: AND prerequisite (all must complete before) - PRE_OR: OR prerequisite (any must complete before) - POST_SEQ: Sequential post-condition - POST_AND: AND post-condition - POST_OR: OR post-condition - POST_LOOP: Loop post-condition - POST_CACHE: Cache post-condition

Polling Types

class PollingType(*values)[source]

Bases: Enum

Polling strategies for polling systems.

static fromString(obj)[source]

Event and Timing Types

class EventType(*values)[source]

Bases: Enum

Types of events in discrete-event simulation.

  • INIT: Initialization event

  • LOCAL: Local processing event

  • ARV: Job arrival event

  • DEP: Job departure event

  • PHASE: Phase transition event in multi-phase processes

  • READ: Cache read event

  • STAGE: Staging area event

READ = 6
class TimingStrategy(*values)[source]

Bases: Enum

Timing strategies for transitions in Petri nets.

Verbose Level

class VerboseLevel(*values)[source]

Bases: Enum

Verbosity levels for LINE solver output.

Global Constants

class GlobalConstants[source]

Bases: object

Global constants and configuration for the LINE solver.

Immediate = 1e-14
classmethod getInstance()[source]

Get the singleton instance of GlobalConstants.

classmethod get_instance()

Get the singleton instance of GlobalConstants.

classmethod getVerbose()[source]

Get the current verbosity level.

classmethod get_verbose()

Get the current verbosity level.

classmethod setVerbose(verbosity)[source]

Set the verbosity level for solver output.

classmethod set_verbose(verbosity)

Set the verbosity level for solver output.

classmethod getConstants()[source]

Get a dictionary of all global constants.

classmethod get_constants()

Get a dictionary of all global constants.