@Override QLinkI createNetsimLink(Link link, QNodeI queueNode) { return delegate.createNetsimLink(link, queueNode); }
@Override public QNodeI createNetsimNode(Node node) { return this.delegate.createNetsimNode(node); }
public void initialize(QNetsimEngine simEngine1, AgentCounter agentCounter, MobsimTimer simTimer) { this.simEngine = simEngine1; this.queueNetworkFactory.initializeFactory( agentCounter, simTimer, simEngine1.ii ); for (Node n : network.getNodes().values()) { this.nodes.put(n.getId(), this.queueNetworkFactory.createNetsimNode(n)); } for (Link l : network.getLinks().values()) { final QLinkI qlink = this.queueNetworkFactory.createNetsimLink(l, this.nodes.get(l.getToNode().getId())); this.links.put(l.getId(), qlink); } for (QNodeI n : this.nodes.values()) { n.init(); } }
@Override void initializeFactory(AgentCounter agentCounter, MobsimTimer mobsimTimer, NetsimInternalInterface netsimEngine1) { this.netsimEngine = netsimEngine1 ; double effectiveCellSize = network.getEffectiveCellSize() ; SnapshotLinkWidthCalculator linkWidthCalculator = new SnapshotLinkWidthCalculator(); linkWidthCalculator.setLinkWidthForVis( qsimConfig.getLinkWidthForVis() ); if (! Double.isNaN(network.getEffectiveLaneWidth())){ linkWidthCalculator.setLaneWidth( network.getEffectiveLaneWidth() ); } AbstractAgentSnapshotInfoBuilder agentSnapshotInfoBuilder = QNetsimEngine.createAgentSnapshotInfoBuilder( scenario, linkWidthCalculator ); context = new NetsimEngineContext( events, effectiveCellSize, agentCounter, agentSnapshotInfoBuilder, qsimConfig, mobsimTimer, linkWidthCalculator ); delegate.initializeFactory(agentCounter, mobsimTimer, netsimEngine1); }
@Override void initializeFactory(AgentCounter agentCounter, MobsimTimer mobsimTimer, NetsimInternalInterface simEngine1) { SnapshotLinkWidthCalculator linkWidthCalculator = new SnapshotLinkWidthCalculator(); linkWidthCalculator.setLinkWidthForVis( scenario.getConfig().qsim().getLinkWidthForVis() ); linkWidthCalculator.setLaneWidth( scenario.getNetwork().getEffectiveLaneWidth() ); AbstractAgentSnapshotInfoBuilder agentSnapshotInfoBuilder = QNetsimEngine.createAgentSnapshotInfoBuilder( scenario, linkWidthCalculator ); this.netsimEngine = simEngine1; this.context = new NetsimEngineContext( events, scenario.getNetwork().getEffectiveCellSize(), agentCounter, agentSnapshotInfoBuilder, scenario.getConfig().qsim(), mobsimTimer, linkWidthCalculator ); delegate.initializeFactory(agentCounter, mobsimTimer, simEngine1); }
@Override public QLinkI createNetsimLink(Link link, QNodeI queueNode) { QLinkI ql = null; LanesToLinkAssignment l2l = this.laneDefinitions.getLanesToLinkAssignments().get(link.getId()); if (l2l != null){ List<ModelLane> lanes = LanesUtils.createLanes(link, l2l); // LinkSpeedCalculator linkSpeedCalculator = new DefaultLinkSpeedCalculator() ; // // yyyyyy I don't think that this was set correctly for this execution path before I refactored this. kai, feb'18 // ql = new QLinkLanesImpl(link, queueNode, lanes, context, netsimEngine, linkSpeedCalculator); QLinkLanesImpl.Builder builder = new QLinkLanesImpl.Builder(context, netsimEngine) ; ql = builder.build( link, queueNode, lanes ) ; } else { ql = this.delegate.createNetsimLink(link, queueNode); } return ql; }