/* called by: entrance ctrl of the object 'track'
3 M( [, o! c8 U9 A2 F8 M*/
2 d- T0 p: t! W0 X1 n) S5 f2 j5 eis2 ^/ I/ K- X9 S& A+ i6 o
part, GlobalDistObj, assignLObj:object;row,Lan:integer;) P7 R6 I6 L' M0 G
do
6 Q+ d8 x7 S J' ~$ B4 p Lan := rootfolder.Internal.Tools.AOLlanguage;
$ I# m: T; q$ g1 @4 a/ I* J3 M if current = @.Destination -- else return/ C; e$ i% w) Y3 r& o( f; o. b; m
then
M% W" o9 X: \2 M1 ? @.Destination := void;
+ i: e' A; k' P ? if @.occupied then( Q9 x5 X8 ~6 A6 f! V
part := @.cont;
( F/ J$ I W) V2 _9 ] @.transpOrder := void;. y2 C J: [6 L6 z2 ^2 I) S0 x5 T
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! r4 z4 }. B. I7 ]
@,root.eventcontroller.simTime);
1 j% i4 G \0 s. l @.HasOrder := false;
! {. d2 o- j* X! B: Q9 W @.DrivingHome := true;
3 j; Y$ _6 q1 L# o rgManager.tryToStartTransOrder;
# R! u" E- \1 T# |9 g( n: ` if @.Destination = void
- {# @1 [. L3 Q: }$ P then -- no transport order for vehicle @
; U; k7 R9 o4 j+ q5 x; c @.Destination :=
# @+ M9 y! s0 i* B0 i: y5 q, _ rgManager.nearestFreeStation(@,track.~);5 s1 A1 R w$ N* V C
newDirection(@); # R) M6 u1 k( X8 ]7 C! A: F
if @.Destination /= void then; s8 X8 ^4 A6 ~# q, r
@.Destination.NumReservation :=
$ d' s b6 z& ] @.Destination.NumReservation + 1;
3 H" |; Y8 n. y: O end;
, H- @8 ^7 ?; P- P2 O6 Z. x% m+ L @.CurrIcon := "drivingHome";- G1 F' W1 v; q5 T' h
@.DrivingHome := true;- b4 _1 Y7 v9 W) c% q2 l2 y/ H
end;6 Q7 J& S- e; U" y t ]- x0 x
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' g& @% O' x& s4 c: @ part := @.transpOrder;5 i# h) [1 \* x
part.move(@);-- load part- U. O% a2 m5 |8 f
@.CurrIcon := "load";* T; k. Y/ I' \3 \2 I/ q/ x
GlobalDistObj := part.globDestination;% G3 T* g6 V7 a- N) L5 Z* D9 V
assignLObj := rgmanager.rgAssignL;
& L# ^* Q: S6 N6 o8 a" ~* l$ } row := assignLObj.getRowNo(GlobalDistObj);/ n# ?+ g5 |" f; Z6 J$ k" j
if Row = -1 then -- since 70
# W( P2 E# D4 g6 J5 ]$ }- e" v if lan=1 then
( f+ t; P+ k: N8 w; S1 r promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; ~5 C: t# I4 f% q8 d$ `
to_str("in der Andockstation: \"",?.~.name,"\""));
( \3 }8 Y) I- N/ O6 L else/ D' y4 V. r0 r9 K& B! q+ e
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 Z% ]( }% {, N, j
to_str("in docking station: \"",?.~.name,"\"")); . H5 g& |5 t7 ] H* K+ X
end;
# |3 J7 G' Y) V5 l( j7 {: t. ? else& P7 ?+ V# A3 |$ W8 @' h
@.Destination := assignLObj[1,row];7 D9 ?' p, A, O$ K `8 t
end; 7 w5 V( u6 Q8 l( B f3 B$ p. B; H
newDirection(@);4 B8 _$ S1 s/ Y/ D
@.HasOrder := true;- g/ P- [" y+ n* a' g
end;
- l; M9 p+ T: T! s$ U end;
/ e0 j. U% f* _! ?! Cend; -- of the method( }3 p( U; r; R* M% B' A+ X2 l- C
|