/* called by: entrance ctrl of the object 'track'
$ N/ i) F+ T: |- p& T. `*/ a3 Z2 V( W9 {3 b
is+ I4 l( A; J1 m4 Y0 e6 e
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
M; O0 z$ s, J' E7 v% B( o `, odo" ]% }1 F5 J0 \: R# p( N/ N
Lan := rootfolder.Internal.Tools.AOLlanguage;
- `9 l, a* }6 T+ j/ b if current = @.Destination -- else return
D7 x' D3 e8 F9 _' M then% B9 Q: E" |' J- l
@.Destination := void;
; S: J" |# s& R9 r% M if @.occupied then
0 y4 \8 y+ \6 A% W; I6 i part := @.cont;
( E6 {7 \" k) v6 l- k; X: M @.transpOrder := void;
( l+ s2 @% l- E" F part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," j: q W1 m% `
@,root.eventcontroller.simTime);
; {) U% l- Q$ ~7 ^ @.HasOrder := false;4 e0 X3 U v$ T; a
@.DrivingHome := true;* R4 n* @! X% V. j2 a' T' ^
rgManager.tryToStartTransOrder;0 J* s3 W8 H3 u1 V
if @.Destination = void- B0 W `9 `: g. R$ K; L
then -- no transport order for vehicle @
9 D( C! B# H; H1 {- O, Z0 ~, s0 }: | @.Destination :=0 b( }! A6 V1 P" j, [% T
rgManager.nearestFreeStation(@,track.~);. s# e8 T$ J; m [# t ~: Q5 R3 r' _
newDirection(@);
5 o- F; J/ z/ T( e( G if @.Destination /= void then. }- c% [! ^8 X) x3 d, X
@.Destination.NumReservation :=
, ^; I7 V" D# X" J& M7 h @.Destination.NumReservation + 1;
! f# |/ ~3 X, H. n) U6 r end;
+ Q$ W1 a8 `' I* n7 m @.CurrIcon := "drivingHome";
7 m+ A. z2 I3 ` i7 D/ g @.DrivingHome := true;
4 a1 I/ O& {7 q- U* u end;% N5 }( g. M1 ~/ {& v5 x9 n
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. m" b z& N/ y8 c: T part := @.transpOrder;
3 ~. h- j; O$ n/ S4 e& K) G part.move(@);-- load part
" O- {$ O0 V0 O* M, }' K* t @.CurrIcon := "load";
8 u# z, Q& ?5 v/ u3 ` GlobalDistObj := part.globDestination;
1 \% b" E; d9 }: K6 C' u2 x assignLObj := rgmanager.rgAssignL;$ g+ p& s* c m0 y3 c. I; w9 J
row := assignLObj.getRowNo(GlobalDistObj);! ]& `8 C* B$ F9 |6 T$ u# x% T1 M
if Row = -1 then -- since 70
2 e+ ^! a# J, k( @ if lan=1 then3 E* D- d5 Q/ v& ^; W3 ^0 d# K
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 b0 n4 T% z+ _, _6 k1 _ to_str("in der Andockstation: \"",?.~.name,"\""));+ Z$ b: ~, V8 d5 i) C
else8 \; h& i% o; t. E- ]
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% X. a& } D" W
to_str("in docking station: \"",?.~.name,"\"")); " f" W9 _) o9 N) M: b2 F& T
end; n# _: S2 X# ]1 r
else
: ^9 ^. e! f& e* ~5 W8 @ @.Destination := assignLObj[1,row];/ {! r2 X: j8 g) U% \
end; 3 F( {8 h( p0 J" A+ e% t
newDirection(@);& Q$ b6 \6 U1 ]( i& h7 `, ?/ p
@.HasOrder := true;% t0 w6 W3 Y" o; P' b
end;+ o- Y2 Y* b4 Z; a5 \
end;; o8 U4 I7 V3 i/ |; K
end; -- of the method
# s) \5 E' w0 n& K5 v |