/* called by: entrance ctrl of the object 'track'
: J* U. K, ]8 L8 N*/
3 ^% k5 E5 [5 o7 U& R! @8 His. A- g! v. P- {+ d) E* Q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;% B" s" o; {' r- \4 j$ d: A
do
0 g+ u' ?3 n. w- y( U Lan := rootfolder.Internal.Tools.AOLlanguage;) u; R3 W: s! q$ [) v( G' _) i
if current = @.Destination -- else return
2 ~" m8 ^! G7 ]4 A; U _; O then& K1 K. C! ~6 W0 H. b4 P
@.Destination := void;8 X* G1 h$ Y6 s A( H
if @.occupied then
% ^5 R" j3 [+ v; R4 d part := @.cont;& D& C, g6 ^. s( c) b
@.transpOrder := void;+ y; g$ n' W/ v: I
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ _7 R, T# c' K @,root.eventcontroller.simTime);8 m* D0 q6 ~% V6 k! o6 Y
@.HasOrder := false;# f+ o! c1 \" t+ c* B9 {1 k
@.DrivingHome := true;
! Y1 v# j. d0 h5 V$ ]$ M% C rgManager.tryToStartTransOrder;
5 u7 S1 f) a' v( W/ {5 \ if @.Destination = void" J4 c9 S% s3 u7 [ F/ H
then -- no transport order for vehicle @
+ Q8 j. M# r3 T @.Destination :=
. g, S& _6 N4 r rgManager.nearestFreeStation(@,track.~);
6 |+ j/ A m: y7 | x newDirection(@); * N( l1 R8 }& o* W# F
if @.Destination /= void then$ n. h+ g$ u, V4 {) N( B) W
@.Destination.NumReservation :=# T% Z' t! G- a, G1 E4 j* s
@.Destination.NumReservation + 1;8 j! v* E2 Q. R
end;( O( ~( J/ @) Q- W1 V( e! h: X$ O
@.CurrIcon := "drivingHome";: q% y" w5 M! ^( U- Q
@.DrivingHome := true;
& j+ ]& D5 ?, F# ` end;
2 x4 m& k$ [8 e4 n* W8 l else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 Z8 L" `% f) J) f9 h
part := @.transpOrder;
- I! ^- ]7 X" g" H5 k part.move(@);-- load part7 A z5 Y: }& d% R1 k' `. n
@.CurrIcon := "load";# f0 l# G- }! @
GlobalDistObj := part.globDestination;# L( _+ k' M4 U1 D; G) e
assignLObj := rgmanager.rgAssignL;0 S! X) {8 f4 l6 j( f; l: @
row := assignLObj.getRowNo(GlobalDistObj);
" n) H; I7 K F7 F* }9 \ if Row = -1 then -- since 70
6 [. Z' ~& E7 c. |. Q& p if lan=1 then' t6 V; i. d# e, c4 K# A
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- }8 ^, h ^* k* [# V
to_str("in der Andockstation: \"",?.~.name,"\""));* ^# D* ?) n" C) Q
else5 y& }; b! k. {& q. G6 B1 O$ ?) `6 R& d
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% \- r! Q @- e* @/ A& N6 q
to_str("in docking station: \"",?.~.name,"\""));
; x* {3 Q, w/ G# Q: e* \3 n end;
4 s: O$ Z/ @# d, @5 T6 D else9 e7 |3 E, ]+ G2 M
@.Destination := assignLObj[1,row];
# x+ ], \4 A3 \ end; $ C l* d" j/ O! X- `
newDirection(@);
; z7 B" G _/ `! G9 y @.HasOrder := true;
4 Z9 \8 ^( P, t end;" o6 E% @1 w7 O4 A6 x5 n& E
end;
6 l" K, H3 t0 r* o, C$ E5 lend; -- of the method
* t1 E9 U m6 U$ P5 p# Z8 p6 c( X |