/* called by: entrance ctrl of the object 'track' O: F. ]2 F4 n6 y
*/, Y0 e9 s+ J5 a4 d# s( t
is/ u: G3 X, B. h A
part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 u4 x+ F4 J5 a% H0 l9 }/ r2 h
do
" A) ^: q) M, P- S& b Lan := rootfolder.Internal.Tools.AOLlanguage;
- L) | t7 N- F `6 s, t if current = @.Destination -- else return9 V5 V7 p. c- y6 {) F
then
8 H) t- R2 `0 k @.Destination := void;
9 [! ?% w. X8 G5 W/ g/ n if @.occupied then: t+ V2 P7 P8 D/ w1 N
part := @.cont;8 ^8 e8 Y$ Z# y0 P
@.transpOrder := void;( a' p+ `( n, t9 b( e% e
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 G% c- X/ L) v; i t
@,root.eventcontroller.simTime);8 ~( @' x% M- n) g% E
@.HasOrder := false;
$ b3 D5 u2 A+ p/ N- N @.DrivingHome := true;
2 |! x% f. ]: a( b8 U8 ~2 n rgManager.tryToStartTransOrder;: ^1 j+ ~% ]) D
if @.Destination = void
2 R4 J) a$ _9 y then -- no transport order for vehicle @9 l' W' W" H7 y* p( y4 }
@.Destination :=
2 A' \) W- I/ J6 U rgManager.nearestFreeStation(@,track.~);" o% v3 ^9 f6 _ J7 E: |' F( |
newDirection(@);
; {( t# c/ V% ?) F [4 U if @.Destination /= void then% c! w0 x# N% g4 Y
@.Destination.NumReservation :=% r) C) ^2 F0 W
@.Destination.NumReservation + 1;+ m9 J! `, n7 ^- }7 Q
end;+ S- l% p4 S/ u% M3 B
@.CurrIcon := "drivingHome";+ H# K1 E( Y' D- ?9 D% P' j0 c
@.DrivingHome := true;
5 Q) u1 _; v) `; M/ p8 m end;
% Q. z% E0 j0 I else -- the vehicle @ is empty, both vehicle and part are in the same dock station' H/ z2 \" p' h* m7 D
part := @.transpOrder;
! r# o+ x; t) @& ` part.move(@);-- load part. a: _* T. R* S+ J' M$ S
@.CurrIcon := "load";
# l2 I; S9 p2 r' v GlobalDistObj := part.globDestination;" Y. o# Z/ b* K$ F9 `6 _9 Y9 w0 X
assignLObj := rgmanager.rgAssignL;6 L/ W6 L( O: ~. r, L
row := assignLObj.getRowNo(GlobalDistObj);
- Y* v3 T4 M+ A# A7 A! {+ C if Row = -1 then -- since 70' i2 b# Y F! P6 ]% W
if lan=1 then
: j0 k2 z0 ~2 N! ~" m promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' C8 g" E6 J/ |; ]$ ^1 _ to_str("in der Andockstation: \"",?.~.name,"\""));
! }. K3 r% j$ }4 A else
/ i& M7 F4 J* m0 S5 Q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 g5 Z/ O! H, y3 \) X to_str("in docking station: \"",?.~.name,"\"")); 2 Q) X& E. @6 H+ B: N
end;& `! V9 h3 d) \( Z0 T6 A
else Q1 \7 ^1 D1 ^: I* V6 b5 a8 p
@.Destination := assignLObj[1,row];
* A$ _, ]7 b B; ? end;
C) S# k o5 b0 P) e) J newDirection(@);
& _5 @2 b3 Z9 T) G+ w! b' f1 X: n& y @.HasOrder := true;9 `5 k) H c! ~1 E$ t$ E5 Z
end;8 M% d+ T! x j. {* N
end;" Q$ j5 U4 r; l& ~
end; -- of the method( i. P+ k: y+ q5 \8 J0 F% {* n
|