/* called by: entrance ctrl of the object 'track'7 D0 j: i9 d; S5 N5 o
*/
2 r0 q: x0 B, J. [- h; X# C! ?/ ^is% l0 k8 g u" y" q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;: ] o' Q2 |- r5 Z
do8 K/ r; A" ^8 ]. U
Lan := rootfolder.Internal.Tools.AOLlanguage;
2 N0 W& W7 s8 b& C" T if current = @.Destination -- else return2 x' z1 G' G6 `2 E/ I
then) j8 k; R8 W6 F T. W2 D$ b
@.Destination := void;
* M+ V4 V* q: z% t- E; B0 G1 ] if @.occupied then2 o# Z2 `& Y5 j3 }) D0 z
part := @.cont;
, C8 p$ K; B1 U7 @4 r- P! h) h2 W, f @.transpOrder := void;
. J3 x7 i6 j& \: g: g8 v2 T part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 d, a. W3 {8 M/ d% P5 y8 O) `. c @,root.eventcontroller.simTime);
5 T, _3 U7 P+ z @.HasOrder := false;- P- H: O ^- I9 d; L' Z# j
@.DrivingHome := true;
% Y# n" _5 n% W7 P; a# R rgManager.tryToStartTransOrder;
- A! j- ]& B8 L) _4 l" n- X+ ` if @.Destination = void
; ?2 ^$ K: ]0 y- k+ O8 `& o: D' Y then -- no transport order for vehicle @( T+ g. N6 ^, S5 `, i: ~0 S
@.Destination :=2 c3 T! s, A. U' z8 n
rgManager.nearestFreeStation(@,track.~);
" N# Y5 Q5 O" l9 }! [) P" a newDirection(@);
: J* g) v- k9 I6 b if @.Destination /= void then! u$ H) @; [% s
@.Destination.NumReservation :=
. g" [6 r! V% ^+ S3 G @.Destination.NumReservation + 1;
- s+ P3 e8 W1 w/ m3 o% g end;
# O3 H* g7 Z9 y6 ? @.CurrIcon := "drivingHome";9 Z+ u6 }/ |; e
@.DrivingHome := true;
. n1 R8 V) x M+ T I end;+ q" i0 T8 R$ [$ ~
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' y- H: i* ^, k1 a, x0 k part := @.transpOrder;
6 H: \& b3 | b' J/ C part.move(@);-- load part
" S. o% E4 {% K. x4 { @.CurrIcon := "load";, R; i4 y) M- @6 b" C; g
GlobalDistObj := part.globDestination;% P. ]: Q8 Q5 }
assignLObj := rgmanager.rgAssignL;# i Q1 h( t- m3 R2 U: K% ^" N! C
row := assignLObj.getRowNo(GlobalDistObj);$ C j3 {0 p% F; N2 \, a) P
if Row = -1 then -- since 70
3 i* ?2 T0 k) a6 O' f( S if lan=1 then
* \* ~. p2 ~, _ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ S; T% \, _$ f+ L4 T& } c9 V i. o to_str("in der Andockstation: \"",?.~.name,"\""));
$ K; G9 [0 M; k else T$ i! G4 t5 ^/ p0 d7 n% l
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" Q c+ U0 ^+ e* R/ A. v to_str("in docking station: \"",?.~.name,"\"")); ' B5 c( p2 j# h$ c, Z; X2 W/ T
end;
. a9 X, V4 P5 p# A- j1 i else
/ F( t+ Q6 y6 c! s5 n: x. J4 i. T @.Destination := assignLObj[1,row];
6 t2 R% [! U+ x- H- y" i- R end; 9 M2 Q6 h$ ^4 O% M+ r
newDirection(@);* Y X8 C9 b9 k, Y
@.HasOrder := true;
9 i. N; L/ R- L) S end;
( w: n; o0 D% @# b' I# p& h, F end;" `0 |- p% x, g! h: ], v3 T
end; -- of the method
- U& X- c- V2 Z6 Q S3 u* G |