/* called by: entrance ctrl of the object 'track'
; I L7 t4 j* H; w8 J8 U7 ^7 d*/8 f' ]( t( z% P
is0 L3 Q0 N1 G( s5 Q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 t, N6 q& z' F5 X5 Hdo% ^" a- }7 S; v+ \- L( f9 t
Lan := rootfolder.Internal.Tools.AOLlanguage;
2 f! ~4 O: Y9 Y$ } H; ^* z$ r if current = @.Destination -- else return
1 @, Q7 W4 Q9 x; T; z7 w then+ |. ~; B( p8 p7 Y t- i y
@.Destination := void;
' i3 m o, _' G$ p$ E5 f I% F/ } if @.occupied then
- U2 _2 Y0 ^9 f& E part := @.cont;
$ p2 \: Z, v# u' h" k( ^! W2 { @.transpOrder := void;9 v5 D, B0 x& V1 v; ^) u- ^ [
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; k8 M6 b0 b, [# C& t u @,root.eventcontroller.simTime);
2 Y+ u. g3 n/ x& o( j9 i K1 ] @.HasOrder := false;
% u) l7 H$ S6 T' m% K @.DrivingHome := true;
$ E. ?, p% Y. P: V& P$ m) y1 r rgManager.tryToStartTransOrder;
& ^) p$ B' D: R, u) d if @.Destination = void
6 ^" k0 U1 q$ ` then -- no transport order for vehicle @
# I2 j5 ~' W) A" N$ _ @.Destination :=2 ]/ D% s% N E* U8 L
rgManager.nearestFreeStation(@,track.~);
I3 y. `% m$ p* q newDirection(@);
+ B, o) ?6 m2 X4 |" L5 d if @.Destination /= void then+ A$ X* R- K# Z, \$ K& A5 {+ l
@.Destination.NumReservation :=( W. g6 M) l# |: q' P
@.Destination.NumReservation + 1;
$ f" v4 n9 I' W E/ k end;& o1 y' U1 C W( i; A. y
@.CurrIcon := "drivingHome"; d/ N. o5 J T% P/ U: _) ]4 H
@.DrivingHome := true;" F6 n3 v+ @9 t& R0 Q
end;8 c3 ]5 I( T- c6 F- D! r; F
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ @! g( r( g7 ?: ] part := @.transpOrder;8 ]7 K6 D0 n7 w- @' o; @# d
part.move(@);-- load part
( G) W# ]" h4 s3 |: Y( m0 E @.CurrIcon := "load";
, ~. x' P" ]& K! K; O# o GlobalDistObj := part.globDestination;
H" l7 x# f$ q. [) ] assignLObj := rgmanager.rgAssignL;6 w/ f* m. t# w# [. A, Q2 ~
row := assignLObj.getRowNo(GlobalDistObj);
$ U/ F6 g) V$ L6 N) l, h1 P if Row = -1 then -- since 70
9 _' V0 p& D8 @2 q1 |& d1 a if lan=1 then
. T# m9 ]2 v4 z9 O. y: v promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 P4 i/ n; x% t7 v2 Q to_str("in der Andockstation: \"",?.~.name,"\""));7 N8 y0 ^# m, Z8 C4 e
else
: D% p# {& @7 U& v promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 v2 @, X' ?4 s
to_str("in docking station: \"",?.~.name,"\""));
+ u9 r0 e0 a$ P/ k, u2 K end;
; U/ m" W/ ^( a, R else7 |$ M4 d7 {4 F3 @
@.Destination := assignLObj[1,row];
5 X# L) T1 `/ z end; F% Q0 H9 s, G
newDirection(@);) j4 p$ d ?$ t. _
@.HasOrder := true;
' B( M% |# y/ A$ {! ? end;. P0 H" `4 I, }! |/ R0 r
end;
% X. M; x5 J1 ~- g: }4 {8 S" V }end; -- of the method
% \; e( H6 o; c: s+ y* r |