/* called by: entrance ctrl of the object 'track'
8 [) d7 V2 d5 \*/' W* f; M# P, S8 f- j; u. Y+ f, _
is
' d K% p5 p- F* w part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ q, H, g! D# n' g8 ddo5 `, }% t7 b* V" F$ T. V
Lan := rootfolder.Internal.Tools.AOLlanguage;
1 j+ w- v; k. K8 p4 W4 [4 k if current = @.Destination -- else return6 R$ E3 q9 e6 N: ?4 Z: ]* F
then
6 u: Z6 F; M1 w( Z* s @.Destination := void;
7 f" B, O8 m; e if @.occupied then* e$ g5 A" N6 X
part := @.cont;
& o p, z# S* W7 Q. F @.transpOrder := void;
% [/ o1 P# w6 t: l m7 a part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; e: h; J' }( R @,root.eventcontroller.simTime);' `4 h9 \2 t1 @
@.HasOrder := false;
( C2 G. a4 H [1 j0 [0 z) g) u4 y @.DrivingHome := true;
* ^; c8 _" J+ s rgManager.tryToStartTransOrder;+ o- {/ E( Y1 i3 P
if @.Destination = void* k( x1 x# R: e2 P$ F
then -- no transport order for vehicle @8 ?) {# h3 ]5 C3 ^0 ` {) t# T
@.Destination :=- |6 V& b: W. v3 }
rgManager.nearestFreeStation(@,track.~);, N3 Z3 T% _: M. A
newDirection(@); 3 ^( i5 u: Z ^- g" H" Q2 v
if @.Destination /= void then
0 q$ x6 `, n: `1 m) @ @.Destination.NumReservation :=0 P4 z/ A% ^/ c( J- V# q
@.Destination.NumReservation + 1;
1 u0 L1 _& W' z, U/ t end;
$ v3 ?1 y4 a! n6 Z: F: E: @ @.CurrIcon := "drivingHome";, b3 q8 d6 i; Q4 U
@.DrivingHome := true;5 [3 q- v- z+ I
end;
4 M) Z: Y3 x C else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 ^3 X+ D2 w& V# W, R" r I4 Q' M3 { part := @.transpOrder;
1 A- ~5 k. l/ U6 R% p7 M part.move(@);-- load part
) j9 a! Q5 b% s- Z! F @.CurrIcon := "load";
% t# i2 z2 o1 W/ c" h, O GlobalDistObj := part.globDestination;
- m l. l' Y/ R* c4 j2 r assignLObj := rgmanager.rgAssignL;
- i- a1 R! u9 o$ g0 T row := assignLObj.getRowNo(GlobalDistObj);/ Y1 |5 l/ B, |6 j2 ]
if Row = -1 then -- since 705 w; M) n% u4 y
if lan=1 then
. K# U8 q8 l$ N promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 J$ B. Y. H6 _0 ^' D( H to_str("in der Andockstation: \"",?.~.name,"\""));
" D5 p8 _: @6 Q/ t else
% J; I- b# }: _ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 x0 i; Z- V* c: o to_str("in docking station: \"",?.~.name,"\"")); / q1 Z- Z) O9 |5 J* e7 h/ P) p2 j
end;
: n$ @: h8 i# Y" c" C: ` else( M9 n* E+ v5 ]2 i2 _, E$ d( s
@.Destination := assignLObj[1,row];
" J" ?/ a% P \) W( U0 { end;
0 }+ c" o* a% w S newDirection(@);" p- D p' m/ E5 w! a
@.HasOrder := true;
5 h5 W2 h# i; |; [7 n0 ~ end;
" j; k" C v! [; h- O: g& A" R end;0 n5 A0 h* f3 A/ P) d7 D
end; -- of the method; j9 ~% x& q! X5 y( v; J
|