/* called by: entrance ctrl of the object 'track'
7 c5 ~' k/ a) p- O1 J1 A*/6 P( V; t n& |9 f* d5 S
is- `$ y$ h/ R) W+ l6 d
part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 y- B* }( q( V# F1 d
do
8 W; s* e0 ?% w! p# G" t, g7 M' y Lan := rootfolder.Internal.Tools.AOLlanguage;( c" ?4 R. @ W% H q
if current = @.Destination -- else return) l2 j3 Y6 p! a6 I6 h+ p
then
, Y3 p$ V) O( V @.Destination := void;0 e9 ~4 l' ?+ [0 j
if @.occupied then
8 t6 n' x$ q. k; Q' o# W part := @.cont;* ^7 ^5 V3 L/ N% l% m e' e, J+ B
@.transpOrder := void;
9 g# Y- t: {- N. u, k# m* j! I9 I+ j# K/ f part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 V% N/ L f! c3 e v$ `
@,root.eventcontroller.simTime);
' W5 W9 ^$ A& \1 @" ?) c @.HasOrder := false;
( a; x( _( R" m- a2 q @.DrivingHome := true;
1 ]4 e) i% f2 R. K% P$ Y) E; ?5 { rgManager.tryToStartTransOrder;2 I/ A5 O; `; _# Q
if @.Destination = void
+ D" I3 t8 k/ v) c then -- no transport order for vehicle @
4 z2 _7 @. z& u) Y! f1 l: ] @.Destination :=. o7 v+ u( M/ c: s0 x) j- [2 {% I
rgManager.nearestFreeStation(@,track.~);8 H- j5 [ }) n- s( p; M
newDirection(@);
0 O4 A# Z# Z+ m2 r5 r* ] if @.Destination /= void then
; S3 p1 K5 p9 n, N: N a } @.Destination.NumReservation :=
9 z, s& \/ D& r* m6 X5 Q( \& [ @.Destination.NumReservation + 1;, d) o- m% U! p" O% T
end;( D* R1 O) I; x; p
@.CurrIcon := "drivingHome";
$ g/ P3 F) U! F9 X6 v6 Q$ i @.DrivingHome := true;. d2 @" c/ y/ N1 o) V9 w% u
end;% Z" _6 K! ^$ F1 W. I
else -- the vehicle @ is empty, both vehicle and part are in the same dock station) O2 ]# o, D/ c4 y. y8 b
part := @.transpOrder;
) @7 C8 B$ t9 j2 L: Y& [! ? part.move(@);-- load part
$ u1 G; R! |) M) ^/ t @.CurrIcon := "load";
( O" s l/ o2 L) l e) x0 O GlobalDistObj := part.globDestination;
* m& N0 \+ ^# }, F/ T+ s! v% _ assignLObj := rgmanager.rgAssignL;
) Y. h4 C5 ~ n. o5 [: u row := assignLObj.getRowNo(GlobalDistObj);0 M+ w2 o0 t% ~
if Row = -1 then -- since 70
" V7 v8 w2 O# n5 l* W if lan=1 then2 r; O6 S5 a2 [$ [4 m5 ^
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# m" E3 v4 `: O3 ~* P to_str("in der Andockstation: \"",?.~.name,"\""));
! J1 L- N" q* ~ else4 _6 x$ o; q4 \* ]- `# t
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 M4 o" y' E2 H3 X1 `
to_str("in docking station: \"",?.~.name,"\""));
y8 A" \- N1 v$ n# m end;+ t3 F3 a2 ?' S7 U1 y s
else* ?5 G% F+ F# X. m8 p' ]( Y
@.Destination := assignLObj[1,row];" U- Y) L# ^0 V& u
end;
6 r# T+ R$ H! l newDirection(@);( E; Z: m; n. C6 p4 k
@.HasOrder := true;9 }+ r7 R s& u% L* ~
end;
5 A. k' q- }. e. C5 p end;& @ O6 [, \/ h" N
end; -- of the method
c& Y: c- Z: M+ _' A2 B9 p$ O! ~4 ` |