/* called by: entrance ctrl of the object 'track'4 W# L0 ^, H9 @
*/
& S2 w4 Y/ M) I R: j5 fis! d' m' ], p6 V0 m
part, GlobalDistObj, assignLObj:object;row,Lan:integer;( h9 R1 A" P: D- z
do
9 g3 \. r; V9 Q! m5 `/ k Lan := rootfolder.Internal.Tools.AOLlanguage;0 n& @& b" d$ w. a
if current = @.Destination -- else return
3 V6 O" W3 ~ @2 Q: r% X then
# r! o( ~! y0 M! l, w2 Q @.Destination := void;
) K- L- ?& ]+ B7 _/ Y if @.occupied then3 w1 i" g; B+ H2 q" O
part := @.cont;% B) {; N+ p; b+ \3 m/ N% t0 U- K
@.transpOrder := void;
4 U" P; ^9 `6 ?5 Q+ w2 I1 z part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" L( k- R0 b. F1 i @,root.eventcontroller.simTime);6 S3 F! m$ p8 r
@.HasOrder := false;
! h0 g0 Q: A( z @.DrivingHome := true;
, a8 g z# _5 i% J1 T5 P rgManager.tryToStartTransOrder;0 d. n6 w, h4 [6 ]# U% d, M
if @.Destination = void
" _ r( Y; r- | E4 [; Y% o then -- no transport order for vehicle @
+ W7 {* l M4 r9 S, Y @.Destination :=
/ ^) f% b, s1 n B/ V rgManager.nearestFreeStation(@,track.~);
' f5 `+ \7 z/ i ]5 G newDirection(@); 1 ^; W) G: W, S5 e4 N! W( q
if @.Destination /= void then
' A3 Z8 ~* b! ?* C @.Destination.NumReservation :=
3 A) V$ k8 n( G$ w V) \3 I: U0 X8 _ @.Destination.NumReservation + 1;
1 L8 Y% o8 N" T) j3 d/ r end;
; w. T$ G, c: q. M7 A% o* S5 K @.CurrIcon := "drivingHome";
4 h3 |9 b! q: r2 B1 r7 Z! d0 r @.DrivingHome := true;
! N7 s# f8 G. E. Q0 x5 _0 p end;& [* T$ B# N" \+ A" `4 s
else -- the vehicle @ is empty, both vehicle and part are in the same dock station. w( A- Q# P! t
part := @.transpOrder;
2 T2 Z3 M# S1 B! L part.move(@);-- load part$ \" b5 b9 h3 v4 G4 c0 A4 w
@.CurrIcon := "load";
4 h9 t! a8 ]2 E1 @ GlobalDistObj := part.globDestination;2 A* J8 T- q0 ]: |9 W8 `
assignLObj := rgmanager.rgAssignL;0 u/ J+ a; m9 D$ X+ \; z
row := assignLObj.getRowNo(GlobalDistObj);
0 o* p+ m" P5 n: E if Row = -1 then -- since 70
; {6 P. j6 ?4 x% ]& ~) _0 P if lan=1 then$ ?% R& B) C% r+ p! X3 W3 W
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# w; d0 n$ k. ~ to_str("in der Andockstation: \"",?.~.name,"\""));
o& l& t& Y1 _ else- L/ e; W ]3 c1 v
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 L6 ]3 b% b4 u6 G& b# A; S to_str("in docking station: \"",?.~.name,"\""));
- A: B3 W* d) ^* X1 x end;
9 u4 P2 B- G! L5 m% ^- E, k else! c4 X( K& T7 o
@.Destination := assignLObj[1,row];% K' _: s6 ?( a$ B$ T* j7 L6 G
end; 9 p& g+ A9 q2 Z ?
newDirection(@);
: j2 F% N0 ^8 d5 ]% e. T y @.HasOrder := true;
/ k0 G( C/ z5 l5 S( i% _ end;( H, D c3 M# p7 n2 r0 c
end;8 t; L$ d B: ]# G" S
end; -- of the method
1 q1 o& X; V% h: k) n |