Class TampereNodeModelFixedInput


  • public class TampereNodeModelFixedInput
    extends Object
    Inner class that holds the mapping of the inputs to/from the underlying physical network (if any). Currently we support the PLANit network format for this mapping, or one provides the fixed input separate from a particular network format By default we:
    • map incoming link segments in order of appearance to index a=0,...,|A^in|-1
    • map outgoing link segments in order of appearance to index b=0,...,|B^out|-1
    • extract incoming link capacities C_a
    • extract receiving flow capacities such that R_b=C_b
    Note that in case the receiving flows are not fixed at the outgoing link's capacity this can be omitted and provided as a separate input via the TampereNodeModelInput
    • Field Detail

      • maxInLinkSegmentCapacity

        protected double maxInLinkSegmentCapacity
        in case in link shave no capacity set, or an physically infeasible capacity, it is capped to this capacity
      • incomingLinkSegments

        protected ArrayList<MacroscopicLinkSegment> incomingLinkSegments
        mapping of incoming link index to link segment (if any), i.e., a=1,...|A^in|-1
      • outgoingLinkSegments

        protected ArrayList<MacroscopicLinkSegment> outgoingLinkSegments
        mapping of outgoing link index to link segment (if any), i.e.e, b=1,...|B^out|-1
      • incomingLinkSegmentCapacities

        protected org.ojalgo.array.Array1D<Double> incomingLinkSegmentCapacities
        store the capacities of each incoming link segment, i.e., C_a
      • outgoingLinkSegmentReceivingFlows

        protected org.ojalgo.array.Array1D<Double> outgoingLinkSegmentReceivingFlows
        store the receiving flows of each outgoing link segment at capacity, i.e., R_b=C_b
      • DEFAULT_MAX_IN_CAPACITY

        public static double DEFAULT_MAX_IN_CAPACITY
        default max in capacity
    • Constructor Detail

      • TampereNodeModelFixedInput

        public TampereNodeModelFixedInput​(Node node,
                                          boolean initialiseReceivingFlowsAtCapacity)
                                   throws PlanItException
        Constructor. The TampereNodeModelFixedInput class is meant to be created once for each node where the node model is applied more than once. All fixed inputs conditioned on the network infrastructure are stored here and therefore can be reused with every update of the node model throughout a simulation.
        Parameters:
        node - to use for extracting static inputs
        initialiseReceivingFlowsAtCapacity - indicate to initialise receiving flows at capacity (true), or not initialise them at all
        Throws:
        PlanItException - thrown when error occurs
      • TampereNodeModelFixedInput

        public TampereNodeModelFixedInput​(org.ojalgo.array.Array1D<Double> incomingLinkSegmentCapacities,
                                          org.ojalgo.array.Array1D<Double> outgoingLinkSegmentReceivingFlows)
        Constructor. Using this constructor does not require any dependency on PLANit network infrastructure.
        Parameters:
        incomingLinkSegmentCapacities - to use
        outgoingLinkSegmentReceivingFlows - to use
      • TampereNodeModelFixedInput

        public TampereNodeModelFixedInput​(org.ojalgo.array.Array1D<Double> incomingLinkSegmentCapacities)
        Constructor. Using this constructor does not require any dependency on PLANit network infrastructure
        Parameters:
        incomingLinkSegmentCapacities - to use
    • Method Detail

      • capInLinkCapacitiesToMaximum

        public void capInLinkCapacitiesToMaximum()
        Based on the set maximum in link capacity, check and update current in link capacities if they exceed this maximum
      • getNumberOfIncomingLinkSegments

        public int getNumberOfIncomingLinkSegments()
        Collect number of incoming link segments
        Returns:
        number of incoming link segments
      • getNumberOfOutgoingLinkSegments

        public int getNumberOfOutgoingLinkSegments()
        Collect number of outgoing link segments
        Returns:
        number of outgoing link segments
      • getMaxInLinkSegmentCapacity

        public double getMaxInLinkSegmentCapacity()
        Collect current maximum in link capacity that is being used
        Returns:
        max in capacity
      • setMaxInLinkSegmentCapacity

        public void setMaxInLinkSegmentCapacity​(double maxInLinkSegmentCapacity)
        Collect current maximum in link capacity that is being used
        Parameters:
        maxInLinkSegmentCapacity - set the capacity