/* called by: entrance ctrl of the object 'track'$ V: [. |, D/ D5 m/ ^ q
*/3 q" r; X2 X6 ^5 k
is
5 G) a, I& L# r" { part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 B. T+ b& {6 q, odo! ]3 ]. y# _4 |, P3 k
Lan := rootfolder.Internal.Tools.AOLlanguage;" s7 z/ O1 J1 P
if current = @.Destination -- else return
5 ~! q9 X# \' e- i! H1 y then
4 y! o( `# _+ c! k9 l5 n2 ` @.Destination := void;6 x" i6 t7 O- w1 ?+ {% @( s: X
if @.occupied then
$ V% ^; `- F1 P+ Y7 E9 Z part := @.cont;
0 u w" L5 a9 R5 e% b @.transpOrder := void;# ]& {3 G* d9 Q1 _+ d# i d
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ Y' }) y' P5 m8 _" i: ]" f6 ]
@,root.eventcontroller.simTime);
7 `# P+ P: V5 R @.HasOrder := false;
8 K/ V. X9 j* N @.DrivingHome := true;
, I% P# r( l6 L' f3 t' n; u# P rgManager.tryToStartTransOrder;
. Z7 V& Q2 l; b) Y/ T1 w if @.Destination = void
( {; B- c2 }* h% r then -- no transport order for vehicle @$ ^" [/ M: p9 R( A( u
@.Destination :=
) [, {3 T% U9 z$ H rgManager.nearestFreeStation(@,track.~);% t9 U m4 T% \* i1 p0 ?
newDirection(@); . z9 D5 N! d' K$ B4 t' i1 f
if @.Destination /= void then
3 M4 o% b& E' R @.Destination.NumReservation :=- ]1 B0 t6 L/ w7 g L# W) o3 c& c* B
@.Destination.NumReservation + 1;
! i0 C! I$ F. q; A, t0 u, M7 k end;5 Q9 u; f5 D; f" V. @$ J
@.CurrIcon := "drivingHome";
" u: ^- {5 L2 X; w' J0 `, v/ P @.DrivingHome := true;
! F2 F+ P& B6 V end;
! a& X& Z( ]- g" C. @2 Z else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 f7 B8 u6 z# r& l* S) E- | u$ i
part := @.transpOrder;
% A2 ~6 n5 w- @# o part.move(@);-- load part
3 y% I( s- F& K4 S1 m @.CurrIcon := "load";8 a. p4 l: n( v1 l7 Z% l |
GlobalDistObj := part.globDestination;
/ V9 r- o" C0 }* c$ _9 T' N1 L assignLObj := rgmanager.rgAssignL;
2 \: G9 ^# ~ @# \6 P0 k: u row := assignLObj.getRowNo(GlobalDistObj);! }1 E+ B" ~ X5 ^ O
if Row = -1 then -- since 70) W% f, d0 G7 m! ]
if lan=1 then
% a8 D* u7 x: u8 ?5 q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# F, J" [( f' M& R" |, X. u1 ^
to_str("in der Andockstation: \"",?.~.name,"\""));
; C! o" D, g/ @% N else
; @" u% g" W. L# m promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; W0 g2 T8 R. X) |! S( Q6 w
to_str("in docking station: \"",?.~.name,"\"")); A2 U5 X. e; a
end;
. D& ^8 W% g$ @ else' T5 i+ W7 _0 W- \5 h8 B" h& C
@.Destination := assignLObj[1,row];. t8 ]& V. m1 q5 e
end;
$ f4 Z' a2 c) k) D2 | newDirection(@);
9 P c# C! D# w* Q( ~ @.HasOrder := true;
7 I* s" C% N5 l; _% N( ^+ t3 H end;
1 s" |: P8 J% V" G* O# `2 j end;
; V. i/ P' b1 J0 }, E9 O4 Uend; -- of the method0 t3 a! n8 ?; X. Y8 J; V3 \
|