/* called by: entrance ctrl of the object 'track'
; d6 \, c# g- N, @8 w*/
8 ~$ F* k; @- r0 ^is- Y1 B. x. S. K) `
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ l: j3 l1 l2 V, a s0 [2 V9 Ddo2 Z/ l O) n4 W4 a1 I
Lan := rootfolder.Internal.Tools.AOLlanguage;5 ~* Z1 u: V/ C N
if current = @.Destination -- else return0 I: J' M% u, U. }" P: s
then0 V& f6 {3 e* v9 H& ]
@.Destination := void;0 o3 D$ _6 v4 l x6 r& T4 g1 O% D
if @.occupied then0 w8 `. Q X2 Z; u: L
part := @.cont;
" p: t: R3 Z/ `! } @.transpOrder := void;
) n) B% `! j, c3 Y8 f' O part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 v5 O. I3 c+ @4 c, [/ N! O8 Z- b @,root.eventcontroller.simTime);5 e5 o5 a4 G) d% L# K2 x
@.HasOrder := false;
- U: l2 {0 \+ C+ n/ S- f& P) Z @.DrivingHome := true;
* L1 }5 V( E" i8 Z x" L' S rgManager.tryToStartTransOrder;
" t u3 T- m/ H: S2 X if @.Destination = void0 [5 t5 U& f( [, R
then -- no transport order for vehicle @! }5 z6 `+ @* M1 w4 U
@.Destination :=
7 _8 y2 b% V4 d5 k0 V0 n2 T# } rgManager.nearestFreeStation(@,track.~);
& k9 D7 x3 Y& w newDirection(@); " Q6 u' O- q& \* {6 b
if @.Destination /= void then; n& `; ^) C, L1 [/ o
@.Destination.NumReservation :=! c0 {( S9 x8 o* G( x! U6 o' D2 [
@.Destination.NumReservation + 1;0 y8 ]! T$ O- I, s# c4 b
end;
# q! o p1 N3 J: J @.CurrIcon := "drivingHome";2 S: c- u! A! \+ k! _! ^3 @3 d
@.DrivingHome := true;/ Z; w; u' c7 e2 A
end;3 x) ^2 T, W9 O3 G% v' `" i
else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ {: Z( h7 {0 y9 U0 p
part := @.transpOrder;' c+ L/ k7 a/ ^! {
part.move(@);-- load part/ S( s6 u3 C$ E, ? j7 L
@.CurrIcon := "load";
. r0 Y9 v Y. O# B7 j& [ GlobalDistObj := part.globDestination;) |2 s' E* O. D [3 D- t: ]
assignLObj := rgmanager.rgAssignL;
+ B2 g6 @& k/ |0 g. ?' i" W row := assignLObj.getRowNo(GlobalDistObj);3 P M4 ^! H4 v1 H
if Row = -1 then -- since 70: F" D7 Y5 T/ \6 @' m% [
if lan=1 then
! c& \! F6 X1 u, ^6 D3 J promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) w$ j; P) m- D( ] to_str("in der Andockstation: \"",?.~.name,"\""));2 s: w1 C6 W, S
else
. U' b" e2 q$ @$ r: B( x promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: d- p5 K4 m1 \8 }% y3 `3 |
to_str("in docking station: \"",?.~.name,"\"")); : }5 R! w& M& B3 C
end;
* M. p4 f, K! f% i% Z0 C4 i else! j2 ~1 e7 M+ Q' f6 Z) v' c
@.Destination := assignLObj[1,row];* F0 A1 a$ n+ D: P6 E! f6 |
end;
" `* E2 B: b2 p; O. z newDirection(@);: Y3 W, ]) a4 f! @) L9 Y) T
@.HasOrder := true;' \. ?9 Y. t- |7 ~& X+ L, o3 M
end;
) P: t( b6 X. F2 K; H/ e end;
7 A- @' s/ ] `; F$ Q8 C- ~ fend; -- of the method+ j2 h: \7 u! ^1 y* j; X
|