/* called by: entrance ctrl of the object 'track'0 a' R0 I! R4 u# L/ a
*/
: X& f4 q4 ?3 [) N2 r) l# s, Tis
/ p9 t) y- t3 i+ Q! @ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% K' A3 ^' J B: ndo- B4 h: o! X8 F! j U5 Q. S4 _; R6 n
Lan := rootfolder.Internal.Tools.AOLlanguage;
$ ]" {9 }" @0 w0 Z9 h) e if current = @.Destination -- else return" v# |% @% A9 ?% H! r1 {4 S
then) u$ z% T- h, N! F
@.Destination := void;+ m* f, y, @& _4 _1 d4 k! e
if @.occupied then
5 F8 K/ w+ z' i* v8 K part := @.cont;$ W1 |" f6 M6 D" s! P
@.transpOrder := void;/ O. q! q) G% ]* L) l
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 ^5 B4 l v v" K9 f @,root.eventcontroller.simTime);
& w& K2 g4 J( Q6 N @.HasOrder := false;
$ a, o' D, M4 u# x @.DrivingHome := true;
3 Z4 L ^. p. S% h a+ m rgManager.tryToStartTransOrder;
$ A. Z3 c% ]* E, X7 L if @.Destination = void# G$ ?! @0 x* j4 F& G" _1 W$ s
then -- no transport order for vehicle @
$ Z0 O* E' m/ j# V @.Destination :=6 J. a# O- }0 s$ M H$ `
rgManager.nearestFreeStation(@,track.~);
, J# _ H2 b; e# b4 Y/ f2 e newDirection(@); , s: i9 U3 W) L: B8 @* L6 t
if @.Destination /= void then
+ ~. J- j; J9 a) Y& F D7 k' Q. Y& e @.Destination.NumReservation :=8 ]( S" P. g% k" _ R
@.Destination.NumReservation + 1;
8 Q) Z6 T- h d) X end;5 A: K% B) ^6 J3 b; [# K, k
@.CurrIcon := "drivingHome";
/ ]& u# a/ |* F+ @0 p @.DrivingHome := true;( q7 E2 W7 g/ s" P2 W
end;# o+ D$ D0 H9 o1 ?0 E
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. Z4 U( E" {; E7 z) X part := @.transpOrder;+ Z) \4 N% d& Z: z% t
part.move(@);-- load part
" g% l; w) A2 M8 p8 m: b/ d% K @.CurrIcon := "load";; l; }: \. n0 N7 Z9 Y0 E
GlobalDistObj := part.globDestination;8 z/ @" E. K6 S5 [# T7 e2 w0 a
assignLObj := rgmanager.rgAssignL;& k" c& w. d! }' V! G6 D3 Y0 P
row := assignLObj.getRowNo(GlobalDistObj);
2 @4 d# x4 j) _9 S0 _) [9 p; D if Row = -1 then -- since 70
& q2 W! R8 ^. P3 k! z; G, A if lan=1 then
& F) C; G/ j; Z' S( C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
B1 z7 q4 Q4 G5 Z to_str("in der Andockstation: \"",?.~.name,"\""));
& g) \1 F! y& z else
' m. {& ~' H% ^( G+ ?/ X1 Y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( q, q; _1 p! t" B+ c" O, V to_str("in docking station: \"",?.~.name,"\"")); 1 n6 @) k# e. N/ d- E# F# j
end;# e6 q \* v6 Q& |
else
! l, ?6 t: x" s P% E; l4 M @.Destination := assignLObj[1,row];
; S. E+ L* k" t: x: y3 } end; , r/ r. R/ \9 V2 T( \
newDirection(@);
1 W5 G1 o2 Z" q' R$ L% l& f' s } @.HasOrder := true;
\# y" j$ ]& s& \" I$ q end;3 i$ w2 x5 p9 h1 ^6 p
end;9 R8 Q8 k/ c& L+ G2 w, h' C
end; -- of the method
. G9 I: J0 G9 A, J, O0 J |