/* called by: entrance ctrl of the object 'track'
5 R% M$ k, J+ }6 H" {. f*/
; k3 o4 W W+ q; Iis
' b$ E6 r8 M" ? part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% B5 o5 T4 x1 P& z8 f) Y/ Y8 W# A6 bdo
4 P g+ j+ |* q, ~; N; J- C Lan := rootfolder.Internal.Tools.AOLlanguage;
6 v7 {$ K) H+ y: H! h if current = @.Destination -- else return
& h& l& N: P7 T9 \6 Z then
3 u( ^/ R+ x4 m0 m; I2 h @.Destination := void;; c6 d, M" U& Q. a
if @.occupied then
7 I* w! u! a% \6 I0 ?9 i part := @.cont;( A# B/ }* g! w
@.transpOrder := void;
9 ^- \$ W8 z- e part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 a7 W1 N1 V& Z5 W9 m
@,root.eventcontroller.simTime);! Y9 N+ [) \* P; F3 T# t
@.HasOrder := false;
+ E4 w9 J/ L5 H7 ~0 H& b& y @.DrivingHome := true;4 E' q$ P! Y. i4 l* t3 f$ `* U( t5 Q
rgManager.tryToStartTransOrder;) S7 q2 c; \5 T9 S1 w( H+ u
if @.Destination = void
; s; x* J+ V2 V0 `3 `1 r; r X then -- no transport order for vehicle @2 E0 F, R, F( ]: O' i9 B S
@.Destination :=/ ~1 g/ O4 O5 X1 A9 s
rgManager.nearestFreeStation(@,track.~);
9 b( b1 h! Q; n6 h0 a newDirection(@); & B% ^4 K$ J5 L9 s' W+ l
if @.Destination /= void then8 d* l" t. }' t! z: Q4 g, ]; r
@.Destination.NumReservation :=
" v6 X) n! r% z @.Destination.NumReservation + 1;
2 Y4 z9 \$ K7 U end;
) i% p9 F1 J) }$ t* G" R k @.CurrIcon := "drivingHome";7 b1 u: g" H+ s7 D* g' K" X( H. f
@.DrivingHome := true;1 W M! J# J9 a, S0 q
end;$ C. h; J/ w: X
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# X; k. r5 w* \" u9 F4 ] part := @.transpOrder;
# v6 B% l1 Z! k3 h part.move(@);-- load part
2 o( `6 s% ]: I* f @.CurrIcon := "load";
* ^. G' R- Y6 Z. r GlobalDistObj := part.globDestination;( R' x i2 O, H6 Y
assignLObj := rgmanager.rgAssignL;
0 {2 z. u) @5 K' z S' c& m' X row := assignLObj.getRowNo(GlobalDistObj);
7 s+ C- t+ E4 i/ a: E if Row = -1 then -- since 70* A- j3 \8 s* |9 o
if lan=1 then
. Y9 ?( F/ m8 z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," ~! v% l/ V% k" A/ k' s* e' I6 R7 B/ q
to_str("in der Andockstation: \"",?.~.name,"\""));
2 R/ {3 _6 F+ L" y1 ` else# B8 _5 P! h5 W4 }$ H z
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- U1 ?0 u: y/ M4 V$ W9 j+ [ m- t5 Q/ b' K to_str("in docking station: \"",?.~.name,"\""));
$ L, i0 e' r; b, s end;
2 R2 e ~: W* t- v- p% E else1 v4 r6 ?$ H* g- Y% j/ k+ f$ k
@.Destination := assignLObj[1,row];# q* x0 v. R" I% {) T
end;
! n' C, o9 H6 D% i7 ^1 @ newDirection(@);# V2 H0 M; @3 M; a9 q
@.HasOrder := true;
; v0 r* E8 _0 I: {: s7 F1 n! f end;' T- \7 |( J( ]% N
end;8 F; N5 b u, y6 x6 i! {( w
end; -- of the method7 l9 K8 [& W; E+ i/ n0 C; ?
|