/* called by: entrance ctrl of the object 'track'! A. q- ?# ^1 [. c* v* E
*/- @! s% p0 ]' h6 _
is
2 M' x! b% L/ V part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 l+ Y4 p0 l0 y
do( i7 J8 [ G) L. i6 B" M
Lan := rootfolder.Internal.Tools.AOLlanguage;
! Q1 D9 z4 E) C( Z; V; G if current = @.Destination -- else return
& c* ?' S; B/ `5 ?6 h5 f then
/ V# B# R- [% v( P. f! ?: O3 C8 f @.Destination := void;8 {2 k; [( o: t: e
if @.occupied then
1 ]; p) v P% ^! ?$ ^* X, ? part := @.cont;
" a7 P$ @% D1 M4 e$ o* ^" h @.transpOrder := void;
( T, k9 s! V5 W+ o- l( @ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: N+ H8 b: f6 }$ W2 i
@,root.eventcontroller.simTime);
5 c7 b& H5 p7 B, k0 @+ q' Z @.HasOrder := false;
6 L- I3 Y3 j9 a @.DrivingHome := true;
; b/ r1 v7 Q) Y2 C+ a rgManager.tryToStartTransOrder;
; U" f2 K O- K# r% y if @.Destination = void/ X3 x, s2 o: T+ X. g
then -- no transport order for vehicle @
+ K: ]3 U% o" \* ]& R @.Destination :=
6 A0 o$ u$ W- [' ^. D rgManager.nearestFreeStation(@,track.~);5 W1 D+ e3 w E/ z) `1 y" |" ?
newDirection(@); 8 C) Y2 t" [, m& |
if @.Destination /= void then
7 c/ O/ I9 d( H4 I# S" w) Q @.Destination.NumReservation :=$ S' r! _- Q' f$ j1 b3 u
@.Destination.NumReservation + 1;
. v& h' b* x) f4 U) { end;
% n, H: \. f2 E: P; ~) y @.CurrIcon := "drivingHome";
6 c0 B) Z+ S. D) H* _& E8 e; D @.DrivingHome := true;
% S5 _1 l i1 Z% H+ |' K end;
* x9 n; a: v' Z3 [8 K. T else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 A( D+ }9 X/ O! |( w
part := @.transpOrder;* D0 B: A8 H/ e) r. j
part.move(@);-- load part, T$ b9 e, u+ D$ o$ d
@.CurrIcon := "load";
! G, o% _' H+ d; ? GlobalDistObj := part.globDestination;- v- V! Y% b8 T6 A- L8 E
assignLObj := rgmanager.rgAssignL;
! ?5 L/ H; N& q. x" R row := assignLObj.getRowNo(GlobalDistObj);! s& o3 H' Q1 O( _9 n( C2 t1 K$ T' Y6 v
if Row = -1 then -- since 70/ K: N/ `" Y9 n1 B% ^
if lan=1 then/ u$ H5 A" K, W9 z+ t
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% ~& X0 o T0 v* Q E
to_str("in der Andockstation: \"",?.~.name,"\""));, Z' o) P6 \$ _+ G5 Y5 l
else
/ Z5 N! g6 \. n9 i5 z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- }; t: r K- e5 z+ E
to_str("in docking station: \"",?.~.name,"\"")); 5 \' `& ^: k) ~$ h+ u; d" g4 Y' N: W; F
end;
% u. N( _% ^3 w0 M% v else& l" l# i+ r+ Q! B
@.Destination := assignLObj[1,row];& s5 H& z$ v5 m
end;
- G0 E- l X3 s newDirection(@);3 K e, H1 m# k1 N' x( ^2 ~
@.HasOrder := true;; Y" u; L, _* a) }* \) f3 k
end; a- p8 K' m5 ^. X3 t- p
end;
" S0 t- a7 S) K$ H5 P% r1 [end; -- of the method
, V' C6 U6 C$ x) V4 y' N: O1 d1 c |