public class NetworkLaneParser extends Object
NODE = {NAME=N1, COORDINATE=(0,0)} # the first node NODE = {NAME=N2} # the second node LINK = {NAME="A4_12", FROM=N1, TO=N2, E="S1|V2:V1|D|A1:A2|S2", T=S, L=50m, s=80km/h, w=4m, w(S1)=1m, w(S2=1m)} # a lane NODE = {NAME="N3 b2"} LINK = {NAME="A4_13", FROM=N2, TO="N3 b2", E="S1|V2:V1|D|A1:A2|S2", T=C, R=100m, A=+90, s=80km/h, w=4m, w(S1)=1m, w(S2)=1m} # another lane NODE = {NAME="N4"} LINK = {NAME="A4_14", FROM="N3 b2", TO=N4, E="S1|V2:V1|D|A1:A2<A3|S2", T=S, L=50m, s=80km/h, s(A3)=60km/h, w=4m, w(S1)=1m, w(S2)=1m} NODE = {NAME="N5"} NODE = {NAME="ENTRY5"} LINK = {NAME="A4_15", FROM="N4", TO=N5, E="S1|V2:V1|D|A1:A2|S2", T=S, L=100m, s=80km/h, w=4m, w(S1)=1m, w(S2)=1m} LINK = {NAME="LE1", FROM="ENTRY5", TO=N4(A3), E="|A|", T=C, R=50m, a=-45, s=60km/h, w=4m} NODE = {NAME="ENTRY6"} LINK = {NAME="LE2", FROM="ENTRY6", TO=ENTRY5, E="|A|", T=C, R=50m, a=-45, s=60km/h, w=4m}
Copyright (c) 2013-2014 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
public NetworkLaneParser(Class<?> networkIdClass, Class<?> nodeClass, Class<?> nodeIdClass, Class<?> nodePointClass, Class<?> linkIdClass)
networkIdClass
- the ID class of the Network.nodeClass
- the class of the Node.nodeIdClass
- the ID class of the Node.nodePointClass
- the Point class of the Node.linkIdClass
- the ID class of the Link.public final Network<?,?> build(String original) throws NetworkException
original
- the network in the agreed grammar.NetworkException
- in case of parsing problems.public static void main(String[] args) throws NetworkException
args
- none.NetworkException
Copyright © 2014–2015 Delft University of Technology. All rights reserved.