/* called by: entrance ctrl of the object 'track'
$ i- K4 b; m J3 |: O! W! d R*/
7 \! `( X/ a- x" cis
6 r: p9 |6 P, }( e% a1 C9 M0 o$ [* \ part, GlobalDistObj, assignLObj:object;row,Lan:integer;' I. k# H1 i( h0 Y/ U" Y
do7 s/ m3 W0 w! j# x6 V* r- n
Lan := rootfolder.Internal.Tools.AOLlanguage;4 i" S6 I2 I$ c) G8 U4 Q3 E
if current = @.Destination -- else return
) `1 S K+ r& \ then
. l* X% f% O+ F2 o! D2 v) ^ @.Destination := void;
+ _! h# P2 P8 L; Q if @.occupied then, G- C: ^: ]8 \7 g0 N& v7 E
part := @.cont;$ z3 ?1 i" X& K, D. a- t& Y5 Y2 r6 Z
@.transpOrder := void; Z7 o6 l7 x% o4 _0 s9 t
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' }+ v5 ~6 t. b- q @,root.eventcontroller.simTime);$ ]- m& J1 Z# H4 d( `- t& T
@.HasOrder := false;' q& K1 n2 s7 p
@.DrivingHome := true;4 i7 |7 b6 C- I
rgManager.tryToStartTransOrder;
, f6 u( f9 \; _! \4 ~% j# l5 P if @.Destination = void
5 @. b8 F: a/ h- K9 i5 ` then -- no transport order for vehicle @
8 I/ b) u# q6 X. J$ _2 e4 a @.Destination := n0 e1 @: G! u9 z8 P
rgManager.nearestFreeStation(@,track.~);! d+ |, y& v) V* m; D' }
newDirection(@);
8 P0 d7 d) p3 i+ ?4 C, N if @.Destination /= void then# e& K8 c8 g" _4 |- }
@.Destination.NumReservation :=
/ n3 R) }, @9 i( W; Q# Q$ ^) ?' l X @.Destination.NumReservation + 1;* C) D5 ?9 b* h+ M
end;
& D7 Z m; B+ L2 c0 S @.CurrIcon := "drivingHome";
" G* @+ n0 j" Q9 ~% m3 d1 S @.DrivingHome := true;) {, E @7 T8 e
end;( d- \' Z* G7 A9 ]# K
else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 T ~7 V) U5 B9 p+ l
part := @.transpOrder;) P" A. R* j& W% ^% @1 A7 E
part.move(@);-- load part* \' d# T6 S1 w. H5 j. G+ |3 c# P
@.CurrIcon := "load";8 _2 b3 S0 v+ |& O6 r( o
GlobalDistObj := part.globDestination;
. S- s6 }2 j5 ]+ K! b assignLObj := rgmanager.rgAssignL;5 F4 ^6 z5 {& Z. |
row := assignLObj.getRowNo(GlobalDistObj);
* ]; e! q9 J: m. o2 G) ^* V if Row = -1 then -- since 704 T: _2 {: c4 W
if lan=1 then2 m' K; ~0 i- {) q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- J1 O% W6 t" s4 k* I to_str("in der Andockstation: \"",?.~.name,"\""));
7 E8 D* x9 \8 p else5 e5 n9 v9 Z' U; M
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 `& ^1 S. |! Q to_str("in docking station: \"",?.~.name,"\"")); 6 g4 P# K( e8 I, W6 y. n
end;
0 ]8 q" r8 H3 r0 V$ D& }. h else
% c1 b% ?+ }% N @.Destination := assignLObj[1,row];; C2 \; P- P w/ Z- t: u* }; B* \
end;
0 J- @, M9 d+ e: @+ ^. c newDirection(@);
i; Y+ T1 u- C9 ^$ J @.HasOrder := true;
1 J T9 g$ ]0 G9 R7 N% G$ M F1 b: f end;
; `+ i4 O, p8 G2 P end;
! ?5 Z: R3 k% L9 C1 \3 `; O# W% ?end; -- of the method
8 B/ t. N- O( p |