Class EventNode

All Implemented Interfaces:
IOptimizationElement, INode, Serializable
Direct Known Subclasses:
InducedIdleEventNode, PillarEventNode

public class EventNode extends AbstractNode
This class describes Eventnodes which have no location. hasRealGeoLocation() and isPillarNode() therefore return false.
Since:
01/09/2019
Version:
14/10/2019
Author:
DNA
See Also:
  • Constructor Details

    • EventNode

      @Deprecated public EventNode(String nodeId, List<IDutyHours> openingHours, int visitDuration, int priority)
      Deprecated.
      Deprecated constructor.
      Parameters:
      nodeId - the string ID of the node
      openingHours - the list of openingHours when the Node can be given service
      visitDuration - the int duration of the service
      priority - the int priority
    • EventNode

      @Deprecated public EventNode(String nodeId, IDutyHours openingHour, int visitDuration, int priority)
      Deprecated.
      Deprecated constructor.
      Parameters:
      nodeId - the string ID of the Node
      openingHour - the iDutyhours when the node can be given service
      visitDuration - the int duration of the service
      priority - the int priority
    • EventNode

      public EventNode(String nodeId, IOpeningHours openingHour, Duration visitDuration, int priority)
      The EventNode has no location and cannot be a Pillar. An example for an EventNode would be a telephone conference.

      Implementation example:

      
       // Define Hours
       List<IOpeningHours> telCoOpeningHours = new ArrayList<>();
           telCoOpeningHours.add(
                   new OpeningHours(
                           ZonedDateTime.of(2019, SEPTEMBER.getValue(), 3, 9, 30, 0, 0, ZoneId.of("Europe/Berlin")),
                           ZonedDateTime.of(2019, SEPTEMBER.getValue(), 3, 12, 0, 0, 0, ZoneId.of("Europe/Berlin"))));
      
           Duration conferenceDuration = Duration.ofMinutes(45);
       // Define EventNode
       EventNode telCo =
                   new EventNode("telCo DNA", telCoOpeningHours, conferenceDuration, 1);
      
       
      Parameters:
      nodeId - the string ID of the Node
      openingHour - the iOpeningHours when the node should be visited
      visitDuration - the duration of the visit
      priority - the int priority of the node
    • EventNode

      public EventNode(String nodeId, List<IOpeningHours> openingHours, Duration visitDuration, int priority)
      The EventNode has no location and cannot be a Pillar. An example for an EventNode would be a telephone conference.

      The difference between this constructor and EventNode(String, IOpeningHours, Duration, int) is that the latter is setting the IOpeningHours in the following way: this.setDutyHours(new ArrayList<>(Collections.singletonList(openingHour)));

      Implementation example:
      
       // Define Hours
       List<IOpeningHours> telCoOpeningHours = new ArrayList<>();
           telCoOpeningHours.add(
                   new OpeningHours(
                           ZonedDateTime.of(2019, SEPTEMBER.getValue(), 3, 9, 30, 0, 0, ZoneId.of("Europe/Berlin")),
                           ZonedDateTime.of(2019, SEPTEMBER.getValue(), 3, 12, 0, 0, 0, ZoneId.of("Europe/Berlin"))));
      
           Duration conferenceDuration = Duration.ofMinutes(45);
       // Define EventNode
       EventNode telCo =
                   new EventNode("telCo DNA", telCoOpeningHours, conferenceDuration, 1);
      
       
      Parameters:
      nodeId - the string ID of the node
      openingHours - the iOpeningHours when service can be give to the node
      visitDuration - the duration of the visit
      priority - the int priority
    • EventNode

      @Deprecated public EventNode(String nodeId, IDutyHours[] openingHours, int visitDuration, int priority)
      Parameters:
      nodeId - the node id
      openingHours - the opening hours
      visitDuration - the visit duration
      priority - the priority
      Category:
      Legacy

      LEGACY CONSTRUCTOR

      Instantiates a new time window geo node.

      PLEASE DO NOT USE THIS CONSTRUCTOR ANYMORE! IT WILL BE REMOVED IN FUTURE VERSIONS

  • Method Details

    • getFlavour

      Description copied from interface: IOptimizationElement
      Gets the flavour which spells out the kind of Node of the element.
      Returns:
      the flavour
    • hasRealGeoLocation

      public boolean hasRealGeoLocation()
      Gets whether this Node has a location. Since this is an Eventnode the response always is false.
      Returns:
      false, since EventNode
    • isPillarNode

      public boolean isPillarNode()
      Checks, whether this Node is a PillarNode. Since this is an EventNode the response always is false.
      Returns:
      false, since EventNode
      See Also:
    • setIsPartialExchangeIdleForDrivingTime

      public void setIsPartialExchangeIdleForDrivingTime(boolean isPartialExchangeIdleForDrivingTime)
    • isPartialExchangeIdleForDrivingTime

      public boolean isPartialExchangeIdleForDrivingTime()