/* called by: entrance ctrl of the object 'track'
1 F4 ]0 j6 I5 i) ]( s& F. |*/3 D2 [* m( G7 ~3 H) @
is
' x" L5 G. o- _9 H part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ d9 M* j k k) n4 [2 u6 ?
do2 h7 C- \8 D, M- y
Lan := rootfolder.Internal.Tools.AOLlanguage;
; v" K1 a- |# s' x if current = @.Destination -- else return* E. c. |+ y$ {8 l) \
then5 r6 p( z3 m7 O8 S3 [: f
@.Destination := void;
% X( p! ?6 p, D4 D% `6 k if @.occupied then
* G0 ^# ]2 ~1 J9 V4 W part := @.cont;
, O1 S. ?" P! B* @, E7 [& C0 Y' m @.transpOrder := void;- n0 D6 p2 r6 c7 y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 d& O4 R0 L* n6 K9 a- |& h
@,root.eventcontroller.simTime);5 O9 f7 W; K4 e4 o
@.HasOrder := false;0 g @# X8 D: v
@.DrivingHome := true;
2 C7 b- Q$ n6 u5 y5 z: N rgManager.tryToStartTransOrder;
7 n7 W. v6 i* |. O( V if @.Destination = void
. U/ y# C7 M/ S& E6 u" V0 a6 e. r then -- no transport order for vehicle @
, T1 A9 J8 M5 t/ z6 d: Q; q @.Destination :=
1 T4 P) ^2 W0 ~( c2 p8 N3 ^, q rgManager.nearestFreeStation(@,track.~);
9 {& v1 G. {! i2 D+ J. b( X8 r newDirection(@);
) x3 U+ l7 J3 J, q0 a0 e if @.Destination /= void then+ t1 Q. t8 S; f5 } P! @* `. }' x
@.Destination.NumReservation :=, a% z' ?! ]+ C; w& C, W4 o
@.Destination.NumReservation + 1;- G' g8 [0 P" x5 S6 E+ K* u2 ~
end;+ _) _, F# F' w% t
@.CurrIcon := "drivingHome";+ l7 T, Z4 @1 j+ p& a' _0 j; S3 h
@.DrivingHome := true;/ F+ A: U: [; \; Z! |) V- u
end;
/ R D$ }0 r5 c else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 Z X6 @3 c# {' A. X) W/ I; l/ F
part := @.transpOrder;' D( s, S: g- E4 u" L u
part.move(@);-- load part0 L8 I* S/ j5 i
@.CurrIcon := "load";& H+ H3 q3 X$ |. ]* [- f! {% B
GlobalDistObj := part.globDestination; f% u$ w5 H: D: e. d1 F
assignLObj := rgmanager.rgAssignL;
C* {6 [% ~2 g, T row := assignLObj.getRowNo(GlobalDistObj);
0 ]9 d" J! |0 ]6 p if Row = -1 then -- since 70; H) @9 Q7 _# c4 p) W
if lan=1 then
& A$ A1 X; a2 Z( i: }, P promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# W, A; d- j; D# }) G9 |# T
to_str("in der Andockstation: \"",?.~.name,"\""));* v4 D% r2 n! S% V. }
else4 O4 Y0 J7 q7 Q0 `( k3 @; }
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
_ d- X9 p& h8 L c to_str("in docking station: \"",?.~.name,"\"")); 1 B# i- g( @' `# U* ^& P
end;
1 X/ `1 G# i$ s6 w else
' W. E% O' W! Z0 X; I e @.Destination := assignLObj[1,row];" u. E. Y8 I7 o3 N: A( s
end;
) N5 d: x4 C W; S' V1 v newDirection(@);
* _' Y8 X: W- u' j) q/ E @.HasOrder := true;" p: G0 S' ]& e3 O
end;
1 |, {6 y; _; ] M7 U! m! X" O1 L end;+ f3 x6 v; F/ y3 h6 p8 ?4 f2 u
end; -- of the method- S; a$ E2 U) ^/ |! \4 h) p+ R: M& n8 P
|