/* called by: entrance ctrl of the object 'track'( B; C4 f) g# p, o. \1 Z% }
*/
4 W9 t: p( a" p7 J5 [) b& yis: F u/ W. X/ j) A
part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 r _ X9 G+ j0 J& \ A9 [
do" D% S' V6 f; T5 J% W: [
Lan := rootfolder.Internal.Tools.AOLlanguage;: ~, ?" ?* n! }/ a' _' ]' U
if current = @.Destination -- else return
% p2 l0 W7 R4 |% P then/ h2 `% G I9 `2 l% k' F: W+ y
@.Destination := void;
1 t/ W/ H& N) n* @7 Q# m if @.occupied then1 L" P9 f r; I) h8 s1 F
part := @.cont;
) m Z+ O, h9 s6 y" W' i @.transpOrder := void;
# j" S m2 U; L, }# i- q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. `3 l+ d! z, Z* C4 h
@,root.eventcontroller.simTime);
. y: b3 ~- j1 s8 W7 V @.HasOrder := false;, ~1 E4 h+ U/ a0 l3 G
@.DrivingHome := true;
" X5 B0 i% x8 Q8 W6 c4 @4 Z rgManager.tryToStartTransOrder;
3 K* }% l. P. _- g& t if @.Destination = void0 O/ [. g" m, d
then -- no transport order for vehicle @, l( S" ?+ o8 |' m/ J+ ]# _3 y$ D8 v
@.Destination :=
4 z$ F5 A5 y& _& U rgManager.nearestFreeStation(@,track.~);
0 e) D! I/ L6 d' z+ w1 x1 s newDirection(@); % r- n# h% \3 `/ f; a2 R. B& B
if @.Destination /= void then
& i1 n# E g( d" r; X @.Destination.NumReservation :=; o- ?$ }0 b$ O0 o' g: H
@.Destination.NumReservation + 1;0 X( L3 V/ o( W
end;, I6 r$ ~5 s& D
@.CurrIcon := "drivingHome";( o! q% b0 A! ?& B5 d- S
@.DrivingHome := true;* v, R0 O w" D
end;
9 _" h% f, K4 g# ]+ ~4 y, l else -- the vehicle @ is empty, both vehicle and part are in the same dock station- Z) \, T" C m" Z
part := @.transpOrder;% q1 Z4 C; v3 m! X% F& Y3 J
part.move(@);-- load part5 x. \( `8 O% F! @, Z2 ]
@.CurrIcon := "load";% j$ y/ s0 n! Z
GlobalDistObj := part.globDestination;
, Z Y1 B8 h9 x k+ g0 z0 G# l assignLObj := rgmanager.rgAssignL;
$ G9 ~( W6 D7 c i+ r# v row := assignLObj.getRowNo(GlobalDistObj); B' k) h( [( c1 K; |" O
if Row = -1 then -- since 708 ~5 `8 Q# I; `4 c& ]3 X& s4 ?6 l
if lan=1 then# w: t& [7 t4 E# T/ a9 l" }; k6 ^& ~
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: S& K' E/ s' z
to_str("in der Andockstation: \"",?.~.name,"\""));! q6 E: J, v+ } E* W
else
N9 N' p$ ]) K4 g promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! X) B- w5 n4 [. c) J: y5 d2 T
to_str("in docking station: \"",?.~.name,"\"")); ' Z8 l. {; s/ B9 j. }+ ?
end;1 \2 `3 q8 @# l& D+ E4 R8 T
else4 s. l7 ?) {8 X9 E8 i0 g
@.Destination := assignLObj[1,row];, ?( ^0 v d* R
end;
6 M7 e. X. [* D) f8 e: D2 F5 X) P* q6 z newDirection(@);
6 H" k0 Q1 }% V0 O; C6 [/ q @.HasOrder := true;. N* l* D8 P+ L- O1 X
end;! H( H: i6 U, s6 ~6 N. j- b! A
end;
& T- F2 x/ Y8 {end; -- of the method
6 O9 Z A1 E [3 ]3 [ |