/* called by: entrance ctrl of the object 'track'
, M9 c5 W! H5 K$ V) k*/' H. v$ B \! C$ A. @( s/ W
is3 |: f) h4 H$ _3 P2 j0 }
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' E, y; G, e$ J7 v2 D udo& x# A; |0 m) p+ v% T
Lan := rootfolder.Internal.Tools.AOLlanguage;; [7 A: X5 v' s- \: L9 z
if current = @.Destination -- else return, l0 O2 X. c8 z- H
then4 W$ i ]8 }+ \; ^7 I
@.Destination := void;5 ~* g* Q+ n6 m ~2 F' Q* H: p
if @.occupied then' ~% Q' R$ k+ g5 I) K; W5 P3 s
part := @.cont;
( x/ g3 m) U# X7 `" U! W4 y9 M" M @.transpOrder := void;2 G' f1 W7 C9 P5 }
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' l U4 @- f, C# a% o/ S* p) m! P @,root.eventcontroller.simTime);% ?2 G; k; |6 a0 a% V
@.HasOrder := false;9 o% R( r! I$ N$ }8 ~/ r- J
@.DrivingHome := true;6 C+ i' ?& L: L! Y$ g
rgManager.tryToStartTransOrder;* K6 D& k, b( }( z2 A
if @.Destination = void
- Y! T# {) n; X4 Y then -- no transport order for vehicle @5 z9 z7 Q k7 J- A' P
@.Destination :=+ p0 i% M9 S/ V7 k
rgManager.nearestFreeStation(@,track.~);" N, w1 Y6 m8 Z A3 q5 v
newDirection(@);
( P8 i# i0 t2 Z" j6 r' W if @.Destination /= void then
5 N0 ~" V8 c* o4 L @.Destination.NumReservation :=
9 j, ~, c4 a7 j+ {5 M @.Destination.NumReservation + 1;0 N7 q0 ]/ P% {) l
end;: v$ M5 {5 ~4 V) ]" ?7 D
@.CurrIcon := "drivingHome";
( [- t$ |$ x a0 ^- M6 a @.DrivingHome := true;
. ?3 ~+ F* E* l; W% I; |4 @9 S end;
- {1 H. W9 b: I0 g) p else -- the vehicle @ is empty, both vehicle and part are in the same dock station* a+ c6 [- e) w0 l6 C
part := @.transpOrder;
- N2 ] h8 B* ^% ?4 @; ?! ~( q part.move(@);-- load part2 _$ T" O* t t. c4 Q
@.CurrIcon := "load";/ T" n0 r; r# w, |1 j3 J
GlobalDistObj := part.globDestination;+ J& A3 R) g( q! \
assignLObj := rgmanager.rgAssignL;
0 i* N6 L7 S5 y: S row := assignLObj.getRowNo(GlobalDistObj);- v5 H1 r; e7 V3 C N
if Row = -1 then -- since 70
& j5 j7 x: m. X; |0 h( f if lan=1 then7 X: g1 h: f7 m( ]2 r% i
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ h. |9 v. g# j) m% m4 c2 Y to_str("in der Andockstation: \"",?.~.name,"\""));
4 k( N# `2 i- F& x9 t else
$ h* a$ C! }+ i. r promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," F; |6 z, D2 x$ r' V5 c. W3 v
to_str("in docking station: \"",?.~.name,"\"")); $ d" q3 g* _/ i# I7 V8 z4 }
end;' S' ?3 c. i5 `/ X7 {: T b
else5 j$ W% E" c/ [* F5 L
@.Destination := assignLObj[1,row];0 U; E: E9 b' o# `; \
end;
! c4 z2 @5 W7 J/ L newDirection(@);
* A% n7 x" m$ n/ h. j* ~9 z+ c9 h @.HasOrder := true;
3 ^3 _) `8 I9 C+ F' u! k; W1 Y- v. R end;
" K' c: F9 g! r: y8 @ end; Q+ l$ ?, g: O, C# E( Y
end; -- of the method
9 R: ~& u2 p8 J; Q |