/* called by: entrance ctrl of the object 'track'
$ ~2 X% q0 F! V% {# U3 J*/. Z$ h" l& K* Z0 ?! J' o9 P
is( N" g2 |8 y) i: T, p W
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. k* L0 T/ @) v! ]do
; c4 R* m o F6 k7 K Lan := rootfolder.Internal.Tools.AOLlanguage;" T: S. E, I" U! ]
if current = @.Destination -- else return7 V/ t8 A2 G" h
then. | I2 T; X% N. E. I
@.Destination := void;
/ b0 P [2 x* G7 ]( Z8 V; [ if @.occupied then
" G) c. t/ Z' t/ p# M part := @.cont;+ H( Y0 j# K) {' Q+ v$ ]
@.transpOrder := void;( M( W& q$ @* B4 \' j2 y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 n* a1 R6 w! A+ B
@,root.eventcontroller.simTime);
% P5 h% ]; H E* Z& R9 E: K. D# c @.HasOrder := false;
) h: N N+ U8 V4 j! @) X$ m: p @.DrivingHome := true;) G" ^" \* L7 W. X7 \/ Z/ U
rgManager.tryToStartTransOrder;
: f- C3 V% V( `5 ^ if @.Destination = void u2 W9 r3 E+ H) ]
then -- no transport order for vehicle @/ i; F$ o' D$ t; b
@.Destination :=5 I8 Q3 n1 Z6 y* N0 O' R8 p# Q
rgManager.nearestFreeStation(@,track.~);
5 Z" j$ X# B& G$ \ o newDirection(@);
+ `2 N+ f4 m/ C4 u D# J if @.Destination /= void then
3 G7 ~, U9 r/ ~" L; N3 I @.Destination.NumReservation :=, x7 h i0 d2 S$ a% u
@.Destination.NumReservation + 1;, w: |* T( ^ ?5 Q
end;2 y! h: k- i3 a' N; ~) q9 T
@.CurrIcon := "drivingHome";
. l( S+ b& |* x @.DrivingHome := true;2 x: ?1 b. x" {) e$ d
end;% }' M5 P6 ?* l2 E: D2 {
else -- the vehicle @ is empty, both vehicle and part are in the same dock station( e8 s0 K# b" h) d* z
part := @.transpOrder;/ Q' t, T& Q, Y u
part.move(@);-- load part" C# G3 D' j( A2 d1 e% j
@.CurrIcon := "load";1 T! r/ O8 }0 w5 B% b; E
GlobalDistObj := part.globDestination;
# ]& ^0 X: U% v! L assignLObj := rgmanager.rgAssignL;
8 T5 W9 p' H1 p9 ?( `$ L9 L row := assignLObj.getRowNo(GlobalDistObj);
9 ?5 Z+ b) B, W4 V if Row = -1 then -- since 70$ c+ m( }8 R; f5 ~2 N8 h1 `
if lan=1 then
) Q) k; g# a& ^" d" J& p" x promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& _# @; E- S" D- \ to_str("in der Andockstation: \"",?.~.name,"\""));
3 k& m" v, o# W' F else u$ _# y& R9 j' Q( P; B- e
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 d' `* W$ o6 x2 U
to_str("in docking station: \"",?.~.name,"\"")); P* D' ^3 b0 U; a
end;
8 ]6 J% E6 L) i9 K4 a5 e0 v else
* I/ c; u8 X) G0 l7 y$ z0 J @.Destination := assignLObj[1,row];
1 w4 L) d% u% d9 X+ v end;
" s& j1 Y* p' e* H; }. _ newDirection(@);
6 i$ ]# ?3 y; @/ b+ o# O# o @.HasOrder := true;
* P9 H: _% G9 a, y end;
4 L; c0 N( {2 b4 y; h% j3 a end;) H) t9 \0 q3 l7 j. ^
end; -- of the method
# t [1 g! u% D/ H2 R/ X |