/* called by: entrance ctrl of the object 'track'# Z! _3 y F a
*/& @0 g/ R7 Q. i0 o! N y
is
' c# ^" p: ]# P6 k( u# q" e2 P1 M7 B% h part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 I D @3 e- X% ?8 A4 |do
" F& t/ k, F. S; j' b+ G0 W+ U# }. | Lan := rootfolder.Internal.Tools.AOLlanguage;
$ P6 q8 u8 e# y9 D# {# J if current = @.Destination -- else return
) g% ~( C6 A( [( _ G then
) r; C/ q, X3 [2 G/ a& z @.Destination := void;( p' ^. o0 h# X: K* @) A
if @.occupied then
9 w$ Y) }4 Q* Z part := @.cont;
# w8 l# E6 L$ g4 C1 z7 F @.transpOrder := void;# X" u: s. G0 ^
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 `2 `7 D; u* d' y @,root.eventcontroller.simTime);" y3 ?' ~. j- c) W5 ~. z! i( O
@.HasOrder := false;4 X9 ]6 p2 p. E2 W
@.DrivingHome := true;6 `) f$ O- b+ h& t
rgManager.tryToStartTransOrder;
& f, }9 x# K, z+ T4 y$ }. t& L if @.Destination = void
# g. w8 u* W: |* Z then -- no transport order for vehicle @3 u1 j) j4 b# F: G% Y4 s; f
@.Destination :=
- d/ O+ E @& Y. @7 x rgManager.nearestFreeStation(@,track.~);
- i6 p" d& j: m8 @, {! h newDirection(@);
+ d0 u& {, x; R4 h7 t3 q3 N) r if @.Destination /= void then4 x+ E: k% K' v* D4 ~
@.Destination.NumReservation :=" M9 B( k( ?7 u& ^5 T
@.Destination.NumReservation + 1;
4 x: e; l$ H! e% h6 F0 o1 I end;6 d0 ^ c3 w& Z' W& d
@.CurrIcon := "drivingHome";3 { g9 g8 ~' i8 b! `; u- `
@.DrivingHome := true;
. k+ i/ \. Z$ R! S- N' F end;
# z5 B. _8 V( L9 d2 N- x else -- the vehicle @ is empty, both vehicle and part are in the same dock station' |8 V( w# E y* P
part := @.transpOrder;
# H q' ^6 X, D; |! p part.move(@);-- load part
# ~* E* h1 V3 v8 D. x @.CurrIcon := "load";( b. u8 n/ _! A/ X
GlobalDistObj := part.globDestination;3 X( d' L6 x6 q/ ]! a
assignLObj := rgmanager.rgAssignL;" T9 \6 S0 ~5 L" k6 O/ I. Q
row := assignLObj.getRowNo(GlobalDistObj);$ b2 _4 W {7 W2 J3 e3 l
if Row = -1 then -- since 70
# v7 I) s9 y$ @* |7 b2 U if lan=1 then
/ l) p' `7 Y1 X$ L promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ F% r5 v F7 e3 P7 X
to_str("in der Andockstation: \"",?.~.name,"\""));. O/ s; H/ ~/ ^" H! k3 P
else! T1 n7 ], [% L0 j7 a0 w
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" S7 ~8 k5 h/ p, w% T to_str("in docking station: \"",?.~.name,"\""));
9 V0 a9 t( u1 {) ?- b" [6 q* | end;
6 S$ K- R$ ]* ]! [/ T# @7 q else! g2 M' r# l$ H1 V4 p n! l
@.Destination := assignLObj[1,row];: r+ a) M$ M6 m" j3 w2 V" _
end;
U; p; H. \+ U5 J newDirection(@);
$ G" D. e' a$ R" X @.HasOrder := true;
! a! f; j! R+ a; T6 |: i end;6 ]; B4 A& [0 X, v h
end;
8 G- |" p& O' y& }. cend; -- of the method: n/ Z0 t$ ^; I4 ]) w' ]- l
|