/* called by: entrance ctrl of the object 'track'! D; J! \1 F j$ Q' {. v6 k. M
*/
( \( J! [9 h( u5 N, His4 n1 j0 n, g, b& j& K
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' g# t6 x) P& z" Qdo
* V7 r$ A2 R5 }3 }! U& ^ Lan := rootfolder.Internal.Tools.AOLlanguage;
3 H9 h8 T6 t5 `& H5 ]/ } if current = @.Destination -- else return
, `3 n1 a' T+ D. A& n then! E! ]1 P% }' e1 c! c
@.Destination := void;2 L7 m# y7 u( W" ^
if @.occupied then( F; }6 [+ J3 Q& W
part := @.cont;! `7 ^3 {! _; _2 m& u8 c, u! g! h# ]
@.transpOrder := void;
* Y6 G4 H% q# v4 Q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 _8 n/ _, I7 R" ]+ N7 N @,root.eventcontroller.simTime);
3 U' y. n$ l3 y& F' ]+ g# L @.HasOrder := false;
% `) r8 e% I$ C/ m, m/ z @.DrivingHome := true;
. X! X7 s# R# d ^ U rgManager.tryToStartTransOrder;
+ G/ c- h; Q( R( j# O4 Q if @.Destination = void
1 M: D1 o" h+ O/ ~6 d5 @0 s1 w5 f then -- no transport order for vehicle @
0 `8 D/ O. ?3 b/ B5 | @.Destination :=
7 ^# A+ R5 p! h( B rgManager.nearestFreeStation(@,track.~);
# [$ a L, o. Z" C" W newDirection(@);
* y M' Q7 i- S% c8 B4 q6 L if @.Destination /= void then
+ x D# a' t' v @.Destination.NumReservation :=* |* i( D0 D+ \7 Y
@.Destination.NumReservation + 1;! q3 M1 D5 W1 n- [
end;
! X% e3 \7 `0 X6 S% H. c @.CurrIcon := "drivingHome";" `0 }! r* V0 z
@.DrivingHome := true;
" C/ a. f% G* [$ Q' G. j0 w end;7 B; X& {, g) B8 @. l- [
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! @7 A, Q: e& ~ H1 J* Y5 x' e part := @.transpOrder;
) o7 @, {3 T: p6 r, K4 ` part.move(@);-- load part
4 I+ H+ b# H3 I# y @.CurrIcon := "load";" M0 Q9 J/ ^$ @! X8 A( h
GlobalDistObj := part.globDestination;5 e* k1 ^2 p# k
assignLObj := rgmanager.rgAssignL;3 a. u7 X: @ C; Q q/ R3 v
row := assignLObj.getRowNo(GlobalDistObj);7 l C: n/ n* @& ]9 l2 K1 ]
if Row = -1 then -- since 70
# u6 ?! V: g& r6 N8 f; o if lan=1 then; @! v1 n% o' s3 n% i
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ G( z" s( H, f to_str("in der Andockstation: \"",?.~.name,"\""));- V4 ^7 g; n& v7 J
else
* I) E( Q' p$ g* y) L promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* c* O Z4 B5 i2 D/ x2 |% M; \ to_str("in docking station: \"",?.~.name,"\"")); + D+ l" C1 z# f4 m) D- J8 u
end;% {6 k$ x: X/ k* D) i* l
else0 D% A2 ]$ h0 @& x4 `
@.Destination := assignLObj[1,row];
7 M0 ]) e' ~# q end; 7 M6 k# }" X# J7 b( i5 [* S
newDirection(@);) X7 r' k; y3 G& ?
@.HasOrder := true;
6 j1 z5 Q* G$ O3 s% m end;7 w- z. Y6 o5 ?5 C8 W
end;9 k( V/ ^" c+ i7 h( m
end; -- of the method& T$ e4 f! j+ [+ l. H+ x' n
|