Enum SchedStrategyType

java.lang.Object
java.lang.Enum<SchedStrategyType>
jline.lang.constant.SchedStrategyType
All Implemented Interfaces:
Serializable, Comparable<SchedStrategyType>, java.lang.constant.Constable

public enum SchedStrategyType extends Enum<SchedStrategyType>
Constants for specifying a scheduling strategy type at stations.

Declaration order is MATLAB's numbering in matlab/src/lang/constant/SchedStrategyType.m (NP = 0), so an ordinal means the same thing in all three codebases. It used to start at PR, and the two Prio members below did not exist here at all.

  • Enum Constant Details

  • Method Details

    • values

      public static SchedStrategyType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static SchedStrategyType valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getTypeId

      public static SchedStrategyType getTypeId(SchedStrategy strategy)
      Classifies a scheduling discipline by preemption behaviour and priority.

      This IS the classification Queue stores in schedPolicy: the constructor calls this and keeps no table of its own, as MATLAB's Queue.m and native python's Queue do. The three were written out separately until 2026-09-17 and disagreed on eleven disciplines: this table answered PNR for the preemptive-identical family, PR for PSJF/FB/LRPT and NPPrio for LCFSPRIO where MATLAB answered PR, NP and NP. Nothing in any codebase READS schedPolicy, so the disagreement was never a wrong number, only a wrong label, which is why it survived.

      The preemption axis follows each discipline's own definition in SchedStrategy. PI is "preemptive independent", i.e. the preempted job RESTARTS, so it is non-resume and not resume; SRPT, PSJF, FB, LRPT, FSP and EDF preempt, against SJF, LJF, SEPT, LEPT, EDD and SETF, which rank the same jobs without preempting.

      Parameters:
      strategy - the scheduling discipline
      Returns:
      the scheduling strategy type