/* called by: entrance ctrl of the object 'track': d" _4 m" |; A+ V
*/4 R( n8 F" w$ p$ h8 i
is
7 J5 U8 W o2 U0 { part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ \' W: \! c5 V. [
do% E( D# k' N( s3 ^* I
Lan := rootfolder.Internal.Tools.AOLlanguage;6 d! {# q$ D4 U! c4 w
if current = @.Destination -- else return
3 ]2 P1 u B+ H" Y8 M. G3 S then# `% Z; K: G- h, L# X5 J
@.Destination := void;
3 w4 q* x7 v. \ if @.occupied then
9 h9 v" g( w0 X) p& j part := @.cont;
# C6 E7 Y% T5 s- z- V. u @.transpOrder := void;
2 A# y" U# f* F( x7 p: S+ I3 K4 K part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 G; }# O1 R6 n( ]+ |, V+ s @,root.eventcontroller.simTime);0 F1 `( a- { T1 \0 H" q; L# b. x! j
@.HasOrder := false;* ?5 U: A0 Z# }9 M# A6 Z+ G# f1 v p; U
@.DrivingHome := true;
$ j0 v; s9 y+ P& `, ^ rgManager.tryToStartTransOrder;
: ~% d/ n8 k0 b. ^) e' U. t if @.Destination = void" _: O* ?1 u: q; k
then -- no transport order for vehicle @
" w7 @# j' X; w- e; w5 F# s @.Destination :=
9 s& G D/ H3 T" j; @ rgManager.nearestFreeStation(@,track.~);4 J& y* [6 O. G
newDirection(@);
5 m9 E) C4 s) ?' @4 _& u# a0 X if @.Destination /= void then
. J# e8 h( H! a) l& [" ^ @.Destination.NumReservation :=
: d/ k' o: C# c% `, m @.Destination.NumReservation + 1;9 u7 a+ T# }7 f! s4 O% x1 x* S
end;
& Z, h6 K' j% g4 [+ r4 l' b @.CurrIcon := "drivingHome";6 t- B+ P1 v U& r$ M4 k
@.DrivingHome := true;0 J& {7 \. l% p. U% q* |
end;! N9 j# w, Y$ n/ q7 h
else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 l' N: T5 X. k( P! c& y8 ~- X
part := @.transpOrder;7 t3 [% f5 {! L- N
part.move(@);-- load part
& q+ _: R, a7 Z( u+ |" c/ H @.CurrIcon := "load";! G, L4 @7 w: `5 X9 `. Y9 V
GlobalDistObj := part.globDestination;( ?, L7 d$ W$ ^; ~0 ?9 O0 R
assignLObj := rgmanager.rgAssignL;
- W- `6 A' S% c* z, V row := assignLObj.getRowNo(GlobalDistObj);6 N7 e' I- g; P; ~1 b7 q3 Z
if Row = -1 then -- since 70
) C1 l5 k# R, i' n0 L" @2 _ if lan=1 then5 g. F/ H5 \( h5 \9 ]
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# T; W6 _0 }* W# [" P* L
to_str("in der Andockstation: \"",?.~.name,"\""));+ P! ^4 q; H6 Y0 P1 j( B
else
1 T" q4 P; S K! R promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ T- T% _! M4 p Q9 y. c) p to_str("in docking station: \"",?.~.name,"\"")); ; D* D+ j0 J# D$ Y4 T
end;
$ G& o4 ^. [1 [1 J3 v& p1 t else
& G; Z& W4 `& C+ L" @. { @.Destination := assignLObj[1,row];3 f/ F0 y8 [* g% H
end;
, p) |) B* @4 Z# B; S* y newDirection(@);+ A0 ~4 n; H4 G3 {; J' G
@.HasOrder := true;5 H' [- H8 B' ~6 o0 q& C
end;# b& U% _) B$ L% s o' b$ N2 F
end;0 F+ p) Y7 w4 m6 C5 [% W! E* \# i
end; -- of the method
- G* S% ?1 L! i |