/** * Sets the network change events and replaces existing events. Before * events are applied to their corresponding links, all links are reset to * their initial state. Pass an empty event list to reset the complete network. * * @param events a list of events. */ @Override public void setNetworkChangeEvents(final List<NetworkChangeEvent> events) { this.networkChangeEvents.clear(); for(Link link : getLinks().values()) { if (link instanceof TimeVariantLinkImpl) { ((TimeVariantLinkImpl)link).clearEvents(); } // Presumably, there is no exception here if this fails because it can be interpreted: maybe only some links are time-dependent // and others are not, and it is sufficient if the time-dependent ones can be configured by the addNetworkChangeEvent method. // kai, jul'16 } for (NetworkChangeEvent event : events) { this.addNetworkChangeEvent(event); } }