/* called by: entrance ctrl of the object 'track'2 J; {5 s' v0 G* X+ x/ F% W- y
*/$ k- C+ o5 h9 f d1 c2 F, }
is
- y, ]) C& J- U) Q part, GlobalDistObj, assignLObj:object;row,Lan:integer;& x( \2 p. U9 Q; A; w2 q B. k
do
& x0 e- S3 O' k4 H5 y1 Y+ I Lan := rootfolder.Internal.Tools.AOLlanguage;
) b9 N0 g+ k' J0 d% l if current = @.Destination -- else return
% ]+ B }2 S$ G r then
/ @5 w) ?+ o$ V; u- T @.Destination := void;$ T+ }4 O9 _$ d- T: |2 ]
if @.occupied then
; ], n; \5 `, \- J# N# m part := @.cont;+ U2 V& W3 Y8 d: {8 A0 a, C
@.transpOrder := void;
2 t& E) q' i9 l8 W part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 L+ l0 t" l0 ^; W @,root.eventcontroller.simTime);
, {* [* ~+ G+ g/ Z) ` m' Z @.HasOrder := false;
1 u3 a. c& r. F- h5 w3 H( T @.DrivingHome := true;- s$ G6 r5 o4 z" z7 s& s+ ]0 t% j
rgManager.tryToStartTransOrder;. I3 ~ m7 A: |! J' A
if @.Destination = void
$ k- k% `1 m1 g then -- no transport order for vehicle @: C9 l" [% C, E
@.Destination :=% i. u; w3 v3 U$ D% B, g$ u# U
rgManager.nearestFreeStation(@,track.~);2 r% b5 j! P$ y5 A
newDirection(@); ( K3 q+ t- T, ?' j0 j9 t
if @.Destination /= void then
I. `7 M3 b3 D/ k# J2 f" `; r# e @.Destination.NumReservation :=# F" i% Y1 M" I) ]2 F! E
@.Destination.NumReservation + 1;
2 b1 c" K8 ^2 q" C5 y9 \! d end;! ~2 f# u' x! a/ j% z
@.CurrIcon := "drivingHome";2 O# w, I$ a; x# u! F b
@.DrivingHome := true;: _& y: T( N# |8 r
end;! O9 x$ F; ~( F# V: x. r- D2 M
else -- the vehicle @ is empty, both vehicle and part are in the same dock station- j+ t% u& f; t% [, g! z
part := @.transpOrder;
/ R% a. t' z4 n# h# O part.move(@);-- load part0 f7 c5 G* ?: z8 t: L
@.CurrIcon := "load";" C z9 Y/ ~: G) P) a2 \. ?* c2 p
GlobalDistObj := part.globDestination;3 N1 s( r% N8 D: e
assignLObj := rgmanager.rgAssignL;
/ `/ W' E h% M2 I, ^/ i6 { row := assignLObj.getRowNo(GlobalDistObj);
% z9 y; N& V( `0 H if Row = -1 then -- since 70* {6 ^0 G4 z3 q+ K1 I+ Q3 W) Z8 z
if lan=1 then) t2 i8 S& C/ P
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 T# |0 s0 T4 p& ?" V1 ?
to_str("in der Andockstation: \"",?.~.name,"\""));
: w& N' R* n2 l3 k7 ~ else
. l4 N2 b6 S } ? promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, |. N9 C5 h. y/ A0 ?2 S to_str("in docking station: \"",?.~.name,"\"")); ' I, F% b, I. ~& \
end;
5 l! G$ K: ~$ [1 m0 l, I0 z7 k! ] else
/ e# C E; v0 y, I @.Destination := assignLObj[1,row];9 p3 V$ ]- w( b7 D# G
end;
( ~0 d+ }# \- f+ d8 ? newDirection(@);
/ W+ }7 l) @1 _9 r+ g( R. p( w/ r @.HasOrder := true;
7 b4 }* j. I4 p% m3 D V- _2 L) e8 e end;
. q, v- |0 ~. F; Z9 u end;
p3 W! x$ }6 vend; -- of the method( }0 [1 r0 g/ n! I
|