/* called by: entrance ctrl of the object 'track'
: ]7 |; }6 }# K0 Y*/
0 r8 V) W: C! O& [is
0 A% N+ m% r: L( V+ k part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 w& q7 U6 x( ]% Ido
$ _8 z+ L4 N0 K/ K1 y Lan := rootfolder.Internal.Tools.AOLlanguage;
' t4 z+ _# x: Q6 [7 z# S) @# ~ if current = @.Destination -- else return* m8 R- e7 ]( B2 J
then
+ u0 A- U" }, F7 |' V" G1 ]+ G @.Destination := void;+ m% N g. v9 o" ~& \7 S
if @.occupied then
( a3 {: N; n$ s+ s) D part := @.cont;/ W/ s' n# y; [$ J; K5 R8 D6 i0 M
@.transpOrder := void;. |. M& Z# n/ v2 I
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% d+ h9 Z- i' f7 T8 Z* R' N
@,root.eventcontroller.simTime);8 Y7 O) F$ S+ J. \; u3 c' o
@.HasOrder := false;6 N9 Q2 P" _7 {0 ^) u" c2 [
@.DrivingHome := true;
8 Z9 o v1 O* C2 u. T rgManager.tryToStartTransOrder;
! P+ K& j" A. |: w* `( A$ b if @.Destination = void
4 F4 K" F" J& w Y' V' X then -- no transport order for vehicle @" Z, l) [; b) V& V+ u% i
@.Destination :=1 P; n1 C1 n0 S. {* S
rgManager.nearestFreeStation(@,track.~);. O: }% ?% @( p, d! E
newDirection(@);
5 f1 N T/ ]; _. E) K3 b, q# m if @.Destination /= void then2 d- Z2 j$ w. Y- R# R1 T" i! r
@.Destination.NumReservation :=) u. G) n, o: G9 e$ Y/ k! l
@.Destination.NumReservation + 1;; [1 f: U& y7 c( I6 [4 d1 L
end;
M$ p. [3 G/ \( k @.CurrIcon := "drivingHome";
% L2 Y' V/ c7 M3 }+ T# j) ^ @.DrivingHome := true;
. I7 t' H! w& i5 ^8 s- R2 L end;
7 n" P( o+ u$ f: t& y else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; K, ~$ O7 b: U! q; k ^0 A/ e part := @.transpOrder;
' p# G6 p s+ u- c5 P( y part.move(@);-- load part$ Q P( _8 |1 w3 s; K0 d
@.CurrIcon := "load";& z( f9 U( | l L6 l: ]; I
GlobalDistObj := part.globDestination;# j+ x* l. J# j& M* w: f
assignLObj := rgmanager.rgAssignL;% u/ f; [3 W+ a) g6 R7 O
row := assignLObj.getRowNo(GlobalDistObj);
6 o# T1 e" v3 ]0 ]" J% }. [ if Row = -1 then -- since 70
: C5 V. I0 W8 w& O. A if lan=1 then# l) C4 W0 O" O+ `- {$ g/ Y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( g* t7 e' c' _' X& ]& K$ \' w% m- @
to_str("in der Andockstation: \"",?.~.name,"\""));4 f4 _; K6 y+ ?% D5 @) |) y
else7 `7 `. V+ W' |5 }6 I2 ~
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 \% w v/ D. P7 ]1 X: J* q to_str("in docking station: \"",?.~.name,"\"")); 1 U) g8 X/ @6 W5 V$ B4 D3 j; l
end;
* o/ O* j- q p9 X2 o: }& P else& L( B" K2 ~6 z l- Q [ o0 {
@.Destination := assignLObj[1,row];
7 y* t# O; L7 h8 u% q" b5 e end;
* a7 h+ \' R5 c) A5 T0 \ newDirection(@);
3 z, I8 J% _. F; @. e8 I3 d @.HasOrder := true;# A0 b2 U2 q2 \6 O
end;
& s$ E" h: v. _+ T/ P3 O" h6 U end;
, M |2 I1 n, Kend; -- of the method# d2 V' @9 k5 C# r! x% _
|