English

How To: Dynamic Segmentation demo No. 8

Procedure

This demo shows how to overlay several event tables.

Create a line cover C with one arc.

arc60>
cw dynsegdemo8
w dynsegdemo8

generate c
line
100
0,0
30,0
end
q
clean c
build c line
build c node
list c.aat

Record FNODE# TNODE# LPOLY# RPOLY# LENGTH C# C-ID
1 1 2 1 1 30.000 1 100

Enter arcedit and make a route named BUS to include this arc.

&term 9999
display 9999
ae
edit c
de arc ids node section.bus measures route.bus arrows
draw
setdrawsym 11 2
createfeature route.bus
add Enter 1 to select the arc
Enter 4 to add the arc to your route.
Enter 9 to quit.

makeroute length * Pick the left end of the line.
list
draw
save
q
list c.ratbus

Record BUS# BUS-ID
1 1 1

list c.secbus

1
ROUTELINK# = 1
ARCLINK# = 1
F-MEAS = 0.000
T-MEAS = 30.000
F-POS = 0.000
T-POS = 100.000
BUS# = 1
BUS-ID = 100

Enter tables and define three event tables T1, T2, T3.

Event Table Type
============ ========
T1 LINEAR
T2 LINEAR
T3 POINT


T1
========================================
Record BUS-ID FROM TO SPEED
1 1 0 15 20
2 1 15 30 40
T2
========================================
Record BUS-ID FROM TO WIDTH
1 1 0 10 100
2 1 10 20 120
3 1 20 30 130


T3
========================================
Record BUS-ID POSITION KILLED
1 1 5 2
2 1 17 4
3 1 25 6

tables
DEFINE T1
BUS-ID
3
3
I
FROM
3
3
I
TO
3
3
I
SPEED
3
3
I
~
ADD
1
0
15
20
1
15
30
40
~
DEFINE T2
BUS-ID
3
3
I
FROM
3
3
I
TO
3
3
I
WIDTH
3
3
I
~
ADD
1
0
10
100
1
10
20
120
1
20
30
130
~
LIST
DEFINE T3
BUS-ID
3
3
I
POSITION
3
3
I
KILLED
3
3
I
~
ADD
1
5
2
1
17
4
1
25
6
~
LIST
Q STOP
list c.ratbus
list t1
list t2
list t3

Set up three eventsources e1, e2, e3 to connect c.ratbus to event tables t1, t2, t3.

eventsource add
eventsource add linear e1 t1 info linear bus-id bus-id from to
eventsource add linear e2 t2 info linear bus-id bus-id from to
eventsource add point e3 t3 info linear bus-id bus-id position
eventsource list

Set up an output event table t4 to hold the results of
overlaying t1 and t2. Add eventsource e4.

eventsource add
eventsource add linear e4 t4 info linear bus-id bus-id from to
overlayevents
overlayevents e4 intersect
e1
e2
end
list t4
============================================
Record BUS-ID FROM TO SPEED WIDTH
1 1 0 10 20 100
2 1 10 15 20 120
3 1 15 20 40 120
4 1 20 30 40 130

Set up an output event table t5 to hold the results of overlaying t4 and t3. Add eventsource e5.

Note:
When overlaying several event tables, if one of them is linear, the output event table must also be linear.



eventsource add linear e5 t5 info linear bus-id bus-id from to overlayevents e5 intersect
e4
e3
end
list t5
=========================================================
Record BUS-ID FROM TO SPEED WIDTH POSITION KILLED
1 1 5 5 20 100 5 2
2 1 17 17 40 120 17 4
3 1 25 25 40 130 25 6

This can also result by combining eventsources e1, e2, e3, all at once.

Set up an output event table t6 to hold the results of overlaying t1, t2, t3. Add eventsource e6

eventsource add linear e6 t6 info linear bus-id bus-id from to
overlayevents e6 intersect
e1
e2
e3
end
list t6
==============================================================
Record BUS-ID FROM TO SPEED WIDTH POSITION KILLED
1 1 5 5 20 100 5 2
2 1 17 17 40 120 17 4
3 1 25 25 40 130 25 6