Class PopulateInitialLinkSegmentCostEvent

  • All Implemented Interfaces:
    Cloneable, Comparable<IdAble>, PlanitComponentEvent, Event, IdAble

    public class PopulateInitialLinkSegmentCostEvent
    extends PopulateUntypedComponentEvent
    A Populate initial link segment cost event is fired when PLANit requests for a registered listener to populate these initial costs which relate to a specific network. It is assumed only a single handler populates this component and the registration of this handler is dealt with by the platform rather than the user. The end user will - via the handler - receive this event when implementing an input builder, and registering this builder on a PLANit project for example.
    Author:
    markr
    • Field Detail

      • EVENT_TYPE

        public static final PlanitComponentEventType EVENT_TYPE
        event type fired off when initial costs (without specific time period) needs to be populated
    • Constructor Detail

      • PopulateInitialLinkSegmentCostEvent

        public PopulateInitialLinkSegmentCostEvent​(PlanitComponentFactory<?> source,
                                                   InitialLinkSegmentCost initialLinkSegmentCostToPopulate,
                                                   String fileName,
                                                   MacroscopicNetwork network,
                                                   TimePeriod timePeriod)
        Constructor
        Parameters:
        source - of the event
        initialLinkSegmentCostToPopulate - cost to populate
        fileName - with the location of the costs to use for populating the memory model
        network - parent network of these costs
        timePeriod - Optional time periods for which to populate, may be null in which case it is time period agnostic
    • Method Detail

      • getInitialLinkSegmentCostToPopulate

        public InitialLinkSegmentCost getInitialLinkSegmentCostToPopulate()
        Collect PLANit initial cost component to populate
        Returns:
        zoning
      • getFileName

        public String getFileName()
        Collect fileName of the file containing the actual initial costs to use to populate this instance
        Returns:
        fileName
      • getParentNetwork

        public MacroscopicNetwork getParentNetwork()
        Collect network these costs should relate to
        Returns:
        network
      • hasTimePeriod

        public boolean hasTimePeriod()
        Verify if time period is set for this initial cost to populate
        Returns:
        true when present, false otherwise
      • getTimePeriod

        public TimePeriod getTimePeriod()
        Collect time period for which the initial costs are meant (might not be set)
        Returns:
        time period, null if not set for a specific time period