/* called by: entrance ctrl of the object 'track'
G# d: m" x" ~*/
" |. N( l2 l: Tis
4 |! b% C' a8 ?* M part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 u$ W' o2 g9 u* [+ j0 cdo
. f; M, b; q+ ^ Lan := rootfolder.Internal.Tools.AOLlanguage;
6 g, v n6 R- w# t/ o" g if current = @.Destination -- else return' ?+ c4 P. X; h; E r3 u8 l
then
% }$ |* R& D" ^- ]4 J7 \* X @.Destination := void;
$ Q- @" ]2 v! G( z/ z. x) }$ j0 c+ I if @.occupied then
& T( m, F% y& h k, j& y; m part := @.cont;* Q: E3 J" t" M8 a8 M. B
@.transpOrder := void;
# g0 s0 C$ E8 o2 R5 [ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# U" e; x7 Q N, J4 e5 F1 m @,root.eventcontroller.simTime);
& ^$ T. z5 T$ h+ o& K- s. i @.HasOrder := false;: [$ O- d! o6 l9 Z, q
@.DrivingHome := true;: R( C9 e6 r- t& u# y- \: ^3 u6 w
rgManager.tryToStartTransOrder;
7 s. K7 o! D8 G/ M! g if @.Destination = void
6 h- b, v+ U# v7 F* n then -- no transport order for vehicle @6 `6 b) K: C4 L% O& [% A
@.Destination :=. ]+ a' J9 r; j2 c
rgManager.nearestFreeStation(@,track.~);7 c5 @3 ]9 q8 l: ~
newDirection(@);
. v& r% E5 x$ l' w if @.Destination /= void then
; p% b1 ?8 T6 B$ [+ J @.Destination.NumReservation :=
# M4 }2 M3 V( |# z* V& I @.Destination.NumReservation + 1;9 c) ?2 [5 n2 t: ^. c
end;
1 h* Z3 N3 {5 {( t* E @.CurrIcon := "drivingHome";
7 V; r. C$ E1 ^# P) u @.DrivingHome := true;+ ?% |, e b* k F: l q
end;9 w* J0 G' z, R9 H
else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 B- ?" `9 P3 ]2 v
part := @.transpOrder; B: d8 I* p7 F$ T" B
part.move(@);-- load part
- I1 `- ?9 L" ?% z8 Z @.CurrIcon := "load";" I( n) ^ G1 _, m
GlobalDistObj := part.globDestination;, I: b1 ]8 }8 `* v
assignLObj := rgmanager.rgAssignL;
) ~4 f' W" |5 f" p+ W row := assignLObj.getRowNo(GlobalDistObj);
$ W2 E2 b4 ]0 x, N# y3 b8 X if Row = -1 then -- since 70
* X5 N. Y1 _0 N- F) C if lan=1 then
; b) B0 C- G2 ] V6 I# T9 ]) _ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) n( n F; b' t8 \! L
to_str("in der Andockstation: \"",?.~.name,"\""));" w5 a" h" A' L# ~) Y$ K
else; w0 u* c3 _, H8 g+ k8 ~; N6 s
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 r: o: B: x2 R to_str("in docking station: \"",?.~.name,"\""));
7 }* |8 x! h6 t, P9 ]# r7 w end;$ N: Z# C! B3 i! D, Q) \
else8 y9 `0 q; P0 z" z
@.Destination := assignLObj[1,row];
/ ^, o3 w$ ^( C+ S end;
! p* J3 s/ \* V4 A. M) P0 S newDirection(@);* U1 {# A j: N% p& n
@.HasOrder := true;: {9 [- h3 u9 I. J' L, m
end;( b6 q7 J1 t2 `" g a0 D4 f
end;& C2 o) K0 v1 m$ Y* s
end; -- of the method' F0 E% @, Q* Q5 `2 Q
|