/* called by: entrance ctrl of the object 'track'
+ J: z( _. u7 |, t( C1 j& ^1 u, R*/& L7 D9 A7 v' S7 t/ R! f
is
6 r0 e( }# w- b2 ]* H: W a part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 b! ]7 _) v: ?5 M4 X. e
do( _. Q+ q. A2 c! z1 z& K9 |
Lan := rootfolder.Internal.Tools.AOLlanguage;3 e$ O7 X# R8 L# L) q3 ]
if current = @.Destination -- else return, Z' b7 d! j( ?
then8 R/ r0 E0 n1 ^0 i9 z N3 A1 p/ _
@.Destination := void;
/ `5 s, W& @ D* X- _ if @.occupied then; S4 q) t+ W5 V$ `: a$ s
part := @.cont;
; ~9 k6 [1 b! a U# d/ R) v @.transpOrder := void;0 E0 ^' r* L) x& J; N' r
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 f+ ?) C8 v- [
@,root.eventcontroller.simTime);( C2 r) B5 j9 r% t
@.HasOrder := false;$ r5 ^% O4 x) q8 O7 W, P+ r/ T9 {0 G
@.DrivingHome := true;
. g8 I( v2 _( k5 { rgManager.tryToStartTransOrder;# h* f+ Q- ?. k, m
if @.Destination = void* G1 l4 P! t& G" ^
then -- no transport order for vehicle @
& l8 c% d p" d+ b& g @.Destination :=
1 Q8 j" g+ R& B1 {3 P$ W4 B: B rgManager.nearestFreeStation(@,track.~);
' [4 o& M6 z, C/ q0 r6 G8 L) X. E newDirection(@); 6 X" X; F# k; G7 Q
if @.Destination /= void then" u6 d0 Y. U A- v
@.Destination.NumReservation :=1 h! D% P$ o% G6 p3 i7 s* U
@.Destination.NumReservation + 1;
6 Y! I X7 a8 x7 T end;
8 |, W0 K9 o4 N, X" M @.CurrIcon := "drivingHome";
% E' f3 D2 _/ ~1 ~ [. t0 a* b4 M @.DrivingHome := true;
, k( Q% h, J( N/ N! o: x5 P end;$ I0 u- W! o" l
else -- the vehicle @ is empty, both vehicle and part are in the same dock station* p& X* `/ m7 _. w+ v
part := @.transpOrder;' z# `+ P# w: ^; | @ Q. M
part.move(@);-- load part
. N$ |- D+ v+ K; }" w @.CurrIcon := "load";, M k, \6 t9 K6 _ \
GlobalDistObj := part.globDestination;
8 f6 ]7 n% W1 y$ S) o assignLObj := rgmanager.rgAssignL;* h9 d2 b% ]- r! B$ O3 w: _
row := assignLObj.getRowNo(GlobalDistObj);
4 B8 e5 B: i) V. F if Row = -1 then -- since 702 f+ z' _+ _9 s4 {; e2 |* N
if lan=1 then) i$ Z( i! h6 ~! l, b6 H6 W
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( s: L7 U: T& G* x& P& x to_str("in der Andockstation: \"",?.~.name,"\""));
L. C, W% }, X4 X) }) p' Y else
/ B* }7 K4 q) G" Z+ o promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; F8 m# z4 Y6 ~, `0 E2 z8 s
to_str("in docking station: \"",?.~.name,"\""));
: G! m: y. I( N end;
& B0 a& b3 e- e k7 K else
5 L: C& }+ x; ~/ Q; S* u @.Destination := assignLObj[1,row];) g% \1 t8 G9 U0 s
end; " `# R! A/ x" W5 y( M) M- D6 T) ^
newDirection(@);
' W4 \4 Z3 o: |9 x0 @7 Y @.HasOrder := true;/ S4 A% L% T5 H/ |) Y V
end;& O- E0 _; i& y" c
end;& Y. I' l5 X) m! w
end; -- of the method
6 A5 ~ U7 W1 j- _5 @$ ` |