/* called by: entrance ctrl of the object 'track'
7 J$ X7 D2 k) |7 O- K*/
' T$ @1 Q5 J8 P3 W5 l! _! b R1 ois- y/ r6 ~! w- @$ k4 ]' N% X
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 Y/ H: |# P* l) Ddo
+ h& Z/ ]: o" X. i& o$ K! ^0 R Lan := rootfolder.Internal.Tools.AOLlanguage;
7 d1 b- z! M* h, X% X9 W if current = @.Destination -- else return" s3 w9 ]! D" a3 m
then
6 z4 Z% V+ f0 p* s' C1 h" o @.Destination := void;
7 `" T: f' k. y8 {7 \ N if @.occupied then
% F8 a1 {3 `; {. |6 M/ b! [6 G, ~ part := @.cont;2 V+ d' ?3 N0 o
@.transpOrder := void;
$ d' E' V6 r3 I. t F( I( F part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) I! N3 h& Z; m J0 X( Y
@,root.eventcontroller.simTime);
\, w) x- [5 v( W+ n1 b: g @.HasOrder := false;3 R, P) m% u* U8 [
@.DrivingHome := true;
/ J. A9 s o; J3 O# k8 e1 a# l$ _! V rgManager.tryToStartTransOrder;
& n+ X; q8 f& [( ] Z# m" M4 O2 E if @.Destination = void# S6 M# R5 T: S& z$ G0 p# m
then -- no transport order for vehicle @7 F0 k8 E4 N3 x0 B q1 m
@.Destination :=
& f( i2 S- o8 k+ h rgManager.nearestFreeStation(@,track.~);
# k& G4 p" t v6 |7 ^, ]: K newDirection(@); ; E, D. U: c5 E5 }2 ?' `
if @.Destination /= void then
4 [7 Y* c% P6 o. M! M, _+ L% E y @.Destination.NumReservation :=8 p( U# V" l. v$ x. t# ?+ Z
@.Destination.NumReservation + 1;
; }. y7 N. q% ]5 y, I( b" C! v end;; c! n F; |. ~7 R
@.CurrIcon := "drivingHome";0 F7 P" w2 q; ~$ Q
@.DrivingHome := true;3 a' |1 X a1 M7 [
end;
; f r. q* g& t5 F% ^ else -- the vehicle @ is empty, both vehicle and part are in the same dock station" g7 g8 @: t" a7 L
part := @.transpOrder;9 U: I2 Z# v% T7 D7 C" \
part.move(@);-- load part; V9 u# _' s. | |2 u- p
@.CurrIcon := "load";
- b8 @6 @5 L% U, ~ GlobalDistObj := part.globDestination;* ~- w" w1 t* N- [0 A T8 T& }
assignLObj := rgmanager.rgAssignL;
, H% X; {$ ]* O row := assignLObj.getRowNo(GlobalDistObj);
3 c A) l6 y O+ c0 m5 }! j if Row = -1 then -- since 700 M: \. i6 t3 _8 t" ^0 N# l( F; Q
if lan=1 then
( N; v' U O9 ~1 p- y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 F3 d6 V5 C! P% d/ X$ k to_str("in der Andockstation: \"",?.~.name,"\""));
' v8 y+ x3 l+ r9 @5 ^( [" A else2 G6 j1 }0 h4 t5 ~, Y$ ~2 ]9 P7 ?
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- e$ h3 e5 Q0 m$ P) @ to_str("in docking station: \"",?.~.name,"\"")); . f& x& [8 i# \: V
end;
. F$ i1 v" k$ S% b( @8 q' e! ? else5 p3 X& C* C% g f' s8 W0 [
@.Destination := assignLObj[1,row];
8 f6 a! X, G& U& h- Y P! n7 _ end; ( M, c9 L+ M- G
newDirection(@);6 s7 b/ W L7 q7 Z5 P% c' I
@.HasOrder := true;6 `; @$ z5 [+ V
end;
& v) w6 H& K8 w: u R6 ?9 e" ]% R/ W end;
9 T1 {4 H1 p( j) \end; -- of the method
! Z' i! ]; A2 N) {+ p+ j# w. W |