/* called by: entrance ctrl of the object 'track'" Y, G& g6 T& R, Q. T u! z
*/& C3 M5 D% K* R9 x5 A
is& T: E6 Y. n. m
part, GlobalDistObj, assignLObj:object;row,Lan:integer;, y* t$ i- v" n4 x) A# Q
do/ m6 o2 D, A' e8 b% i7 u: R# G/ c
Lan := rootfolder.Internal.Tools.AOLlanguage;2 h* O; |2 y9 e* x+ Q" b
if current = @.Destination -- else return
0 l4 w! h9 a7 `1 [3 ?( p( s then( n r! O! w% C. ~) v7 ~
@.Destination := void;
* O+ S7 o u: }0 `' t if @.occupied then
: T7 C' S0 S# O; K6 u$ f part := @.cont;
& _3 P) K! ~" v. e- X& ~# n A- m @.transpOrder := void;& z5 `3 Q# E8 O( n- Z+ x& c: M
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- l! J6 }- s4 h' w5 B
@,root.eventcontroller.simTime);+ J9 v1 ]1 C/ U" }; D3 ?
@.HasOrder := false;
: p: y4 T- O$ T( s5 r @.DrivingHome := true;
+ l# `2 k6 w2 f8 V [ S/ k; t rgManager.tryToStartTransOrder;3 I8 F3 {0 K. u4 m: d: ]+ w! N5 f
if @.Destination = void: @0 Y1 Y, B- v- ~* ~
then -- no transport order for vehicle @' [/ d. o. P# L' l# r. c0 G
@.Destination :=6 @' f. J9 _1 j/ a
rgManager.nearestFreeStation(@,track.~);
# K& X/ j1 x( n" o newDirection(@);
) C; r7 A I1 ?* N if @.Destination /= void then
{. T: H5 l+ s9 r* F @.Destination.NumReservation := G: U2 [8 P: Y, E* ^0 {0 c
@.Destination.NumReservation + 1;$ I" |0 n9 S9 G2 b X# c
end;7 g1 T' J' f! A
@.CurrIcon := "drivingHome";, m# w* j# P: { y9 B
@.DrivingHome := true;& q; z5 p, a6 d7 L1 I w
end;
! Z% {& R2 P) I2 \8 f8 n else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 R! L/ R8 p! t$ K3 @% d
part := @.transpOrder;9 i! ]7 R$ j( c( y9 C* w# |
part.move(@);-- load part
3 ?% S1 I, q9 e" }' D" ]" B @.CurrIcon := "load";, g! Q6 [1 q, Z
GlobalDistObj := part.globDestination;
- {) F& A1 S3 W ^: j( @3 ~ assignLObj := rgmanager.rgAssignL;
! q" h7 O7 `' J. l row := assignLObj.getRowNo(GlobalDistObj);; r, r/ O6 a8 `8 Y% r
if Row = -1 then -- since 707 I2 r% J/ f8 h& l5 J
if lan=1 then% G1 u( `2 C5 \5 N' a& g0 q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( t( F7 r' o4 H, H( z' c to_str("in der Andockstation: \"",?.~.name,"\""));/ n s" l5 L& L
else
# W) _# ]9 L! f. K4 R) I promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) k* C# {- Z9 D$ n to_str("in docking station: \"",?.~.name,"\""));
, T( o T1 \: p, S8 X% V end; A/ S2 x; i6 A; {
else7 X; w+ a0 q$ `: m
@.Destination := assignLObj[1,row];
# Y! u% Q u- k! L end; w9 R0 H* c( h1 j
newDirection(@);9 N- B+ O2 ~, e d% S, k* c* e
@.HasOrder := true;) K, _6 `: }/ K; y) |$ ~- D
end;, B4 \2 B4 R% [7 b. F7 p
end;5 {6 r' ~+ `0 i. a F
end; -- of the method# R. R# Z/ w* H: ]
|