/* called by: entrance ctrl of the object 'track'
% h$ N9 H1 n+ @- R$ W* d*/
" b& t. B8 H( R3 uis V6 K+ M( F# b' N8 L! e. y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 w) S$ ~' q6 V1 p+ ?* C4 l
do
2 [1 U% S( M2 b5 C& L% H Lan := rootfolder.Internal.Tools.AOLlanguage;$ L! E+ |$ f( \# G% S$ ~5 W5 f
if current = @.Destination -- else return
% X. z; ~$ J& {# e then
- j9 v. g: m/ c! @% G- ^, ? @.Destination := void;! D% O/ z! N$ f& Q7 _" K
if @.occupied then. Y" s. E6 Q% l1 e
part := @.cont;
; G. Q, F* y& G* \( K3 \ @.transpOrder := void;' u6 z9 a, `9 |# \8 B H
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 q7 y/ L; S, g! o
@,root.eventcontroller.simTime);
) V& `9 F/ [% |# ?6 i6 \- z" | @.HasOrder := false;7 t! m m x, v* G2 w/ `
@.DrivingHome := true;
7 v! i" `! r0 e( b6 X- A( d5 H7 P rgManager.tryToStartTransOrder;& X' h+ o: M' O; G
if @.Destination = void( F2 F4 n6 @$ i2 s9 @1 e; z) ^
then -- no transport order for vehicle @
. n( @4 g* l3 ^) O @.Destination :=
+ y4 c/ p7 H8 a$ m3 g rgManager.nearestFreeStation(@,track.~);
, g- l0 T |9 s w+ z% y# }( p H* s newDirection(@); - G5 H5 L: j! h) h2 `7 {' z E
if @.Destination /= void then
9 N5 E: N3 Y! e% l) @% U @.Destination.NumReservation :=
( X9 `. z v* F/ d% ^ k. x @.Destination.NumReservation + 1;
) r# F" Z9 S9 E6 _) y end;" B! K/ {- Z5 v8 b
@.CurrIcon := "drivingHome";
- b0 L J' {3 N) `: J @.DrivingHome := true;3 A2 x+ s. n, n. V+ I
end; Y. f- @7 x# h2 I0 u8 c# a3 B
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* W: Y' m" o3 V* ], E- k1 N part := @.transpOrder;
" N; E& U4 i% B" `5 n1 l# J% d; S part.move(@);-- load part
$ E' O2 V" a$ E' H @.CurrIcon := "load";
" d: l2 I6 J- N/ k E1 _ GlobalDistObj := part.globDestination;, |# ]* b0 q; S' {/ I
assignLObj := rgmanager.rgAssignL;
8 J9 y4 u+ p; o$ ]; \ row := assignLObj.getRowNo(GlobalDistObj);7 o' t+ I0 H" l
if Row = -1 then -- since 70
, \- V" R- U; ?5 E if lan=1 then/ O+ C3 W5 q7 e
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. `" n7 J K; i1 f: U6 G! w* f to_str("in der Andockstation: \"",?.~.name,"\""));
+ W. Q* y( x5 H0 x4 e) s' h else' V- Y, L7 C. b5 c) x# n% k! v* y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 X% _- W* i8 [9 w- K$ R' D9 z( h to_str("in docking station: \"",?.~.name,"\"")); - v- W3 ?! Z I: _+ `* N) w2 e
end;
c/ k/ N; ]5 Q& G; c6 h5 c( y else
2 K6 @& \0 h, { @.Destination := assignLObj[1,row];0 H3 g; t2 V: R$ m7 e
end; F. E. l% _- r8 y, P" ~/ M* `
newDirection(@);
% o3 v& o$ c' Z3 p% J7 v) S8 \ @.HasOrder := true;; y& j8 P/ s" d7 A
end;
) B" v: ~( u, `" Q* p: f0 c% w' |5 L end;
( o. N o) u6 B5 R. B: C9 T4 I, Xend; -- of the method+ p! I6 p+ _. G; s4 M8 C
|