/* called by: entrance ctrl of the object 'track'9 ^" \3 G2 R: d5 V* `8 c
*/; I G1 B% V# ?/ f! y
is* A( Y9 q) j! X& R0 h, u
part, GlobalDistObj, assignLObj:object;row,Lan:integer;; Q0 S9 q% P& W: `# C
do
6 T. j4 e X9 ~' _7 y Lan := rootfolder.Internal.Tools.AOLlanguage;& @2 A& m. t! V
if current = @.Destination -- else return1 U, M% _! O# e
then
5 }: B, I/ T1 S4 C! h4 M; ~8 G @.Destination := void;8 M4 _3 J8 K) T8 I+ [ D/ _; \5 X
if @.occupied then
, Q6 I' C, s& @ k, b% X part := @.cont;
% X, E* c5 C: b! a' ^7 H2 R @.transpOrder := void;
* k3 j9 R- @/ ?7 N" u( X part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# I* A& I) ~& \$ c7 Y. }; M: Q @,root.eventcontroller.simTime);# X" J: b0 S, u' }6 @$ M
@.HasOrder := false;* @5 l9 X- A( r+ E& n& ?
@.DrivingHome := true;
4 k% d5 g0 V( |9 t1 N( I3 h rgManager.tryToStartTransOrder;
7 Y2 S4 c; N( R if @.Destination = void5 w& X6 t9 Z( S' w9 J, k
then -- no transport order for vehicle @
6 f. }! A: y, U: ~/ P- K @.Destination :=) e" b- R7 C9 H% O% Q) Z
rgManager.nearestFreeStation(@,track.~);0 H6 ?7 {$ S% U# O. {0 v. e
newDirection(@);
' i2 ~8 l0 r! Q4 @2 B if @.Destination /= void then
i* M% o7 A+ ] @.Destination.NumReservation :=
6 g" s" x# E, U- W @.Destination.NumReservation + 1;
5 K# W5 Z! _8 X. P% d+ n+ O0 _" ] end;9 V/ X" \2 v* s$ @& K2 f* \
@.CurrIcon := "drivingHome";
( R4 L5 a5 ^4 H4 R D% q @.DrivingHome := true;* f8 Z6 e4 r& B7 x/ ?
end;
1 O8 s ^$ |. p4 z8 ]+ k else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" K2 m) Q0 a/ b3 A; A part := @.transpOrder;6 M/ Z, A) S7 W5 f/ m! D% Q3 Q
part.move(@);-- load part
/ x" a- ^- I- y5 Y0 d @.CurrIcon := "load";3 v# L M( c: Q, Q' v
GlobalDistObj := part.globDestination;+ V! X6 H- w. ~2 ], P
assignLObj := rgmanager.rgAssignL;
- _! H# ]7 I1 h7 S/ @, N" O+ I row := assignLObj.getRowNo(GlobalDistObj);
/ h) r+ \( i/ C* ^6 Y* J- I+ { if Row = -1 then -- since 70- t7 W% O. o! P+ P$ Y7 A
if lan=1 then' h" [! D+ I7 T+ ?! K- G
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 `9 x6 i9 `7 E/ p: x# { to_str("in der Andockstation: \"",?.~.name,"\""));
* c: `9 I/ O9 ?$ c! X9 e7 q else
3 b) i# ^( T& Y: p, a* t( w. o promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ l! y6 K! u& U- ~
to_str("in docking station: \"",?.~.name,"\""));
( r o0 l* P& i end;
( _7 U1 o9 h& H2 l6 s3 o else+ j/ T: `4 G" I$ q
@.Destination := assignLObj[1,row];
" T" [' K. \8 j* {) [0 s( I3 m end; v5 |; {! V9 x2 j9 ]0 r: r; `- u' j
newDirection(@);1 @- C8 \, e/ |2 i4 Y
@.HasOrder := true;; l3 W9 H/ h& W! r8 l! k. M
end;7 Z* E. E: a* p4 c
end;3 X" {. j) p" [" R8 a: }# W: c
end; -- of the method
/ N$ g/ R1 t6 P |