/* called by: entrance ctrl of the object 'track'
$ v; F; w7 A1 |5 f*/
6 M6 z4 N3 \ k. iis; c4 o; n; h% G/ r( i
part, GlobalDistObj, assignLObj:object;row,Lan:integer;% z. V& z Y& q h$ E, q8 e
do* w* U. a/ s/ b/ \
Lan := rootfolder.Internal.Tools.AOLlanguage;5 {( P; B4 ~% Q6 {9 ]; h2 b/ _& Y: b
if current = @.Destination -- else return
' z+ N5 P1 e6 ^, @ then
: m% u. I, r! j C4 B @.Destination := void;
X! s }0 C+ r4 h3 b+ f0 `7 X" p: q if @.occupied then
( Y: i% g( o% z part := @.cont;4 ?5 Y/ W$ ?# F
@.transpOrder := void;
+ K3 x/ I) [! J& a: g+ Y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 f, ] S H; O7 J1 P @,root.eventcontroller.simTime);* G2 [( c8 g2 w! T1 A8 K5 `7 k
@.HasOrder := false;3 r, e* l7 o# X+ `9 q. E. l
@.DrivingHome := true;
9 C7 M+ {5 C) H, c7 i# p rgManager.tryToStartTransOrder;& y |7 @6 m4 t
if @.Destination = void% \- X1 G+ \9 r* \
then -- no transport order for vehicle @* n0 c7 u3 ]3 ?3 Q4 L0 Z6 l' R
@.Destination :=
, E/ C8 [5 h3 L! k) y# ]* d1 Z rgManager.nearestFreeStation(@,track.~);9 ~. C6 [) N/ C6 d' ]
newDirection(@);
3 X3 n7 e' J( k if @.Destination /= void then' v) u+ Y9 l1 X: ` P
@.Destination.NumReservation :=
* X. |3 k3 R- b4 f( e @.Destination.NumReservation + 1;
1 t% W) @. J. q2 T end;& T6 L) `# m n, Q. l
@.CurrIcon := "drivingHome";
F/ A. Q* N) s7 T4 h @.DrivingHome := true;0 r: {0 I1 P$ v
end;
# p9 U* R+ p2 ~& d- B) s else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 J% ~* H# c+ U: T
part := @.transpOrder;
* h# v6 v7 A# }. k part.move(@);-- load part
$ I& o0 M. u0 g# {4 A @.CurrIcon := "load";* L: R' R3 K h& x) _) s
GlobalDistObj := part.globDestination;7 s Y$ ]# O& y# ~) j% ~
assignLObj := rgmanager.rgAssignL;8 B/ i$ Z+ Y; o' Z: k2 D* V4 L
row := assignLObj.getRowNo(GlobalDistObj);
4 f1 p- r$ L5 { if Row = -1 then -- since 70
& K8 d, `# Y. I% E' Q6 J" F if lan=1 then
1 Q' |& R- p: t promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 r! f' E7 @* X' `7 x' h6 P
to_str("in der Andockstation: \"",?.~.name,"\""));9 ]6 @/ b4 G5 K; E
else" }1 k* B' f% A% ~. }* ^8 f1 Q5 n' ]
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: o$ i' A; z- W {( O$ F( H
to_str("in docking station: \"",?.~.name,"\""));
4 [9 R/ U6 P1 q3 z end;
6 _+ j, V+ ]9 E3 ? else
x# _. h1 H8 u5 o @.Destination := assignLObj[1,row];
. S# y: j4 D0 n4 d2 q+ X end;
$ {2 h$ B/ \6 t9 T% h: Z newDirection(@);
! A4 n; o5 l: _- }% x/ {1 L @.HasOrder := true;
! _5 N# l2 D& A& U2 p' X5 b2 T end;& d4 T0 v: i4 E" i
end;
5 J+ ~" ]* F3 _- ]& Y# p) s! n! Oend; -- of the method
7 K& a9 u! i* Q; u. l9 L |