/* called by: entrance ctrl of the object 'track'
% w7 r* Z) v/ x2 T*/0 k& g8 F6 Z# i4 s1 L& f6 s/ e
is
1 c( U* a) {3 T+ J part, GlobalDistObj, assignLObj:object;row,Lan:integer;# l1 D8 d0 R6 q9 \2 [* E
do
3 }# R6 K& J3 s) ? Lan := rootfolder.Internal.Tools.AOLlanguage;
7 H2 f: J% H( j% \: u3 m5 `8 J8 T# B. i if current = @.Destination -- else return/ [3 s# w& p/ J3 A A) {" x
then# v+ g( a% d" ?" \
@.Destination := void;
2 \& q1 G0 s7 y/ k) b if @.occupied then5 @/ D# e0 Y+ x! Z: V
part := @.cont;
; D" H* _/ G( V& l# C @.transpOrder := void;1 b% `& ^; _% A+ G9 q+ A* m6 A& D( |
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 {: Y. [8 y2 D. Z @,root.eventcontroller.simTime);
; b) d1 A |' O7 s4 b% ?' k @.HasOrder := false;7 a* B! s; I9 h; [
@.DrivingHome := true;
9 ^, T4 o ^; K/ d( W' m( k5 C rgManager.tryToStartTransOrder;+ h4 f5 H, t+ H1 { j
if @.Destination = void
8 t! i1 `' ^( X then -- no transport order for vehicle @+ i d. i7 t- h+ Z2 D# _& d* L5 @
@.Destination :=
3 k: U4 ?& g9 E" ?" y# H rgManager.nearestFreeStation(@,track.~);' o! q g! S Y3 D" p
newDirection(@); # J6 a# H! m6 m! m
if @.Destination /= void then
, b3 b6 }- M6 J6 U v @.Destination.NumReservation :=8 [) @) r$ L: _0 P& U8 D9 C
@.Destination.NumReservation + 1;& o; f# i1 |. D+ l* n9 F* v$ a$ `
end;
. z$ v' a& u7 {! a1 u- T5 Z @.CurrIcon := "drivingHome";% T$ b6 Y$ ?3 V9 i
@.DrivingHome := true;
1 e0 L0 h4 ^0 q# Q6 h end;
+ ~9 @: U! L1 b% q+ ?& {0 N' I else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 S: r* Z0 H' B/ P* A" Y part := @.transpOrder;
% _# H4 y+ a- q7 B. J; w part.move(@);-- load part
0 V) |0 ~( ^! l# a j$ \0 S1 t, ^ @.CurrIcon := "load";6 |3 o+ d5 A; v2 P" _& M
GlobalDistObj := part.globDestination;3 N& ?5 |3 g9 {; ^7 C% L# K- J
assignLObj := rgmanager.rgAssignL;
% d0 m1 i7 `; A9 Z row := assignLObj.getRowNo(GlobalDistObj);
! x4 X/ r, g: c" q. i: M% J h5 z5 ` if Row = -1 then -- since 70
6 _# y! D* t" G. V) C- ^( \ Y' }0 j+ F if lan=1 then
& s1 T! e+ Q" k7 D+ q3 x# | promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 u; g3 f# \: R4 |* P/ ], U: h to_str("in der Andockstation: \"",?.~.name,"\""));
; f& i( O' V8 w0 j else
' c8 d+ _# l$ n4 y h9 g+ e* y* @ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," b, B0 H0 z. X" W* v1 @, u, b. Y
to_str("in docking station: \"",?.~.name,"\""));
9 k' P; ?" x! q. q; X" } end;2 b7 |# B: }1 Z; l% R G' B
else( V$ |2 }9 B$ x# M5 c+ e2 g
@.Destination := assignLObj[1,row];$ w4 }2 e$ [7 A
end; 2 n2 y4 U" Z5 x* ~+ L: k. A8 G
newDirection(@);+ G2 l! Y' f. H2 o* V2 p3 d6 f* B
@.HasOrder := true;
2 M& y/ c7 `6 J9 b( w( d end;7 t8 i( m7 K0 X$ H
end; t2 X1 `0 `- w& R) }8 R
end; -- of the method
) w+ ]+ P! M+ V2 O% N. ^" Y8 w |