/* called by: entrance ctrl of the object 'track'" c0 M3 p. `9 a. D: u4 {1 n# B
*/9 N' x- t" G6 x3 Y1 ]
is
J/ x+ G$ P: ?5 y part, GlobalDistObj, assignLObj:object;row,Lan:integer;! @0 k# r: i' w2 k1 U
do
) j! O9 \6 @' w Lan := rootfolder.Internal.Tools.AOLlanguage;
( q. x' ?( p3 M5 A% x if current = @.Destination -- else return
) D7 C: B- j4 u6 [+ p0 J then
" I' R. `6 y- g. }( y- _; ` @.Destination := void;8 X& N" }7 p- L' f# k
if @.occupied then; `8 I: g: K% r8 h9 D2 @6 {$ n
part := @.cont;
5 |% d c# V+ k @.transpOrder := void;. u/ N. g, m7 J9 j
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 r( e2 v. z* X C# A @,root.eventcontroller.simTime);
& t6 Q8 i! H! a* j* _ @.HasOrder := false;; v' \- V4 x4 l
@.DrivingHome := true;& ~, m# X- U0 U! ^7 ~, t
rgManager.tryToStartTransOrder;
3 L1 |: K! f- H if @.Destination = void; h3 m0 [$ a- @, b
then -- no transport order for vehicle @
1 L" ]9 @" ` {' @& z, y @.Destination :=
- s1 y8 m1 {7 @- A1 p- C rgManager.nearestFreeStation(@,track.~);8 Z# h/ s* D; N" u6 R- Y( z; z
newDirection(@); % O2 F9 E0 h. r! L( e* x, C; N
if @.Destination /= void then
. _1 o1 q5 g |! p5 }+ d% I/ E @.Destination.NumReservation :=. e! Z0 ^$ d; c7 a. I8 l: S; ?
@.Destination.NumReservation + 1;+ N0 ~) u/ i9 D5 O
end;, B1 z' F5 R* y% c: C8 h" H- `
@.CurrIcon := "drivingHome";
+ n! i4 O/ L6 ~# E1 `3 Y! A @.DrivingHome := true;
7 r: G) f8 f- z% U/ i end;2 l" ?( i8 N; H) _. l X6 J$ x
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! m2 _- `, G" g part := @.transpOrder;# w5 M% h; j. T' ^$ S" T) M
part.move(@);-- load part
7 F e0 n9 B% K, ^ @.CurrIcon := "load";
4 A2 B2 M$ B! _ GlobalDistObj := part.globDestination;% y/ S6 U. |% d& l' N
assignLObj := rgmanager.rgAssignL;
; W, u1 M4 i3 D% l" `; w row := assignLObj.getRowNo(GlobalDistObj);
6 y5 v+ j( S' `. ?) q' J3 V if Row = -1 then -- since 70# o; p) Q: Y- [: u' L
if lan=1 then
. O7 S9 M" M) a# C* M* M% ^, }$ n promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 D% w, x& D7 Z to_str("in der Andockstation: \"",?.~.name,"\""));( i, G( Q: Q/ _' t8 }8 |
else
% D3 I' M% z2 J$ y0 H8 t c promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' H1 F' b; Q3 Z
to_str("in docking station: \"",?.~.name,"\""));
" d; `3 x& D$ ?& P/ j- N end;
& Q* M; n c% T else ~4 z8 j; ^+ N- _3 e% U
@.Destination := assignLObj[1,row];8 H, O+ z F. Z4 n8 _
end; & X6 o! x9 e! y j& t) R b
newDirection(@);
' N, G) ?* k' m8 Z& w( d @.HasOrder := true;- z* H' L; N. F% n" Y4 h# E# r" K
end;1 L- v4 p8 v* w! X
end;
/ j3 ?" O" l; O# L4 ? k7 M6 G" Uend; -- of the method
6 ~1 i( @% ?7 ` |