Package jline.api.sn

Class SnRegionMembers

java.lang.Object
jline.api.sn.SnRegionMembers

public final class SnRegionMembers extends Object
  • Method Details

    • snRegionMembers

      public static boolean[] snRegionMembers(NetworkStruct sn, int f, Matrix Rmat, Matrix memMat)
      Station membership mask of finite capacity region f. Membership is read from sn.regionmembers.get(f), which refreshRegions records directly from the region's node list. It cannot be derived from sn.region.get(f): -1 there means "unbounded", which is indistinguishable from "not a member", so a region constrained only by regionlincon (or only by a memory budget) reads as empty and is silently ignored. Rmat and memMat provide the legacy derivation, used only for an sn built before regionmembers existed (for instance one deserialised from an older model file). That derivation carries the ambiguity above and is not equivalent.
      Parameters:
      sn - network structure
      f - region index
      Rmat - sn.region.get(f), Matrix(M, K+1), used by the legacy fallback
      memMat - sn.regionmaxmem.get(f), Matrix(M, 1) or null, used by the legacy fallback
      Returns:
      boolean[M], true where station i belongs to region f