/* called by: entrance ctrl of the object 'track'
7 l2 V4 }8 S7 [5 b# ]- Z4 Q4 z1 r9 Y*/) n2 u, p- D f6 k# i3 c4 {
is5 w: U" a6 w" s
part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 E" n- W! [! k! `4 b' R8 C- K
do
, z) b. X$ P A" N* W Lan := rootfolder.Internal.Tools.AOLlanguage;: X* R0 ^) D9 g. H" S
if current = @.Destination -- else return
, _( ]$ R! K) }. k then; ]8 {1 Y/ l+ P Y4 R0 V% O1 W
@.Destination := void;
; t% Q( w7 `& T6 H, n0 W if @.occupied then1 p: z# R Y7 f$ S& d4 n7 ?
part := @.cont;
3 K5 [/ L3 F! Y2 Y @.transpOrder := void;
; ~- g) ~: b* m3 Z/ z part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 {+ \( J0 R) Y* k
@,root.eventcontroller.simTime);
4 ~" z0 A1 [# S- B# U, W: V @.HasOrder := false;
1 a4 ^# [0 H4 s @.DrivingHome := true;1 v& y1 W2 r. T. f
rgManager.tryToStartTransOrder;% o( r& e; r6 m, u
if @.Destination = void* N+ e" O g9 Q3 Y/ Y/ y r- ~' r, F
then -- no transport order for vehicle @
! c) r0 ]1 d8 e! X( q M @.Destination :=3 U& q3 U# N* R) ^( }) }) D
rgManager.nearestFreeStation(@,track.~);
9 \' b$ x; B% H0 Z newDirection(@);
8 o9 ]7 J5 q5 i K. m3 b if @.Destination /= void then. b" g& u6 c" M. y P
@.Destination.NumReservation :=
1 _8 G" f' [7 U+ h% D8 R @.Destination.NumReservation + 1;
W# j- }8 ^0 U7 A( ?. ^1 h end;6 j: `; U7 D8 k6 t$ a0 Y) k! _
@.CurrIcon := "drivingHome";
4 P0 P0 w7 H# _5 u- W% l0 S+ w @.DrivingHome := true;
9 G- P9 U( U; d- t/ s8 r! _4 J end;6 J$ q! U' U, z- ~* \
else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 l6 q7 d% ^0 B# U* {0 b
part := @.transpOrder;: V/ E1 x2 M* T5 }" E0 U1 ^
part.move(@);-- load part% W7 C6 L2 E7 x
@.CurrIcon := "load";
5 p' X: u! ]8 H GlobalDistObj := part.globDestination;
; E/ A% e6 M8 `: V assignLObj := rgmanager.rgAssignL;4 m ]$ {& M2 [$ i. q4 Q
row := assignLObj.getRowNo(GlobalDistObj);- |2 Y4 W0 P0 O! O2 s
if Row = -1 then -- since 700 s: R1 n/ T' ~4 c: G
if lan=1 then8 _- j. {3 F3 n* e' ~
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 G* O1 V/ w! s: y* \3 O' X
to_str("in der Andockstation: \"",?.~.name,"\""));* M, Z% o8 `, A9 e, V+ E. N( F
else' T% r, S+ u4 D; S' m9 h
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, M: q2 m' j J" U
to_str("in docking station: \"",?.~.name,"\""));
z$ Z+ x# K. J( u7 E4 X1 m end;5 _$ g( h0 L( i; V% z' h
else( n2 Q0 O$ _, R5 `
@.Destination := assignLObj[1,row]; D0 A q! G- ^# I7 I7 M
end;
d. z# m" ~2 g2 | newDirection(@);
6 p8 l" O) n9 z& S$ c3 V, ?: c @.HasOrder := true;+ o. v) t8 W' a; C" w/ d
end;& f( T! A$ f" n* p: u6 I8 ?
end;
8 {0 E2 Q7 G+ Nend; -- of the method
+ D( p: f1 r, [( ? |