/* called by: entrance ctrl of the object 'track'1 m* d2 a: B- `. y. h% ^! e/ O
*/ y3 b7 c$ q9 n. A/ ^
is
9 A) v8 n$ x f8 u part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- n% L2 a" v$ z, gdo
7 E8 W! }9 z5 v8 m Lan := rootfolder.Internal.Tools.AOLlanguage;
) v! c2 B, f- s; [$ b- j if current = @.Destination -- else return. Q; n: @/ ?- j
then/ \! [ G; o; X7 E- {
@.Destination := void;
$ @( L3 l1 C% y, j: |$ l& k! a+ L if @.occupied then
; F* \6 @0 p1 H' F' ` part := @.cont;+ W* k. D) @5 k
@.transpOrder := void;0 T0 \; c4 Y2 l5 c: F( u
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ k8 s8 |6 S# ~& L; z) C- t5 b& j
@,root.eventcontroller.simTime);
0 d: l! z6 ~4 G! Q! E @.HasOrder := false;
# ^; j7 B5 [% k, l8 T3 R @.DrivingHome := true;( n4 C% T1 d5 ^9 s
rgManager.tryToStartTransOrder;
/ V" I! ?5 j) {% {5 u d if @.Destination = void
' o- o% o4 k" H9 J) u: n then -- no transport order for vehicle @! @. r! Z" J% ]8 T) n
@.Destination :=' l" [7 d8 ]# [
rgManager.nearestFreeStation(@,track.~);
1 r, j G: E6 I1 ^* ` newDirection(@);
. c) e! {2 N4 h' K if @.Destination /= void then
6 \. q1 d( S1 w @.Destination.NumReservation :=; F( Y B+ t# j! u( Y4 n. g
@.Destination.NumReservation + 1; f6 N5 J7 {+ B
end;
2 [6 q4 ^' b" o1 e* ~ @.CurrIcon := "drivingHome";
6 u4 t: u1 S6 }; v @.DrivingHome := true;
1 M2 Z; m$ d; D& Y+ u- K; a end;' Q8 x/ S7 E) o. Z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station: J& Z& Y1 u. p$ R& q9 U* i3 S
part := @.transpOrder;" `$ ^8 y) I: I3 B4 F, e
part.move(@);-- load part; X/ K0 x! Y& _# q
@.CurrIcon := "load";: ^0 i* ]7 @2 ~& s- v$ S5 j% N9 f
GlobalDistObj := part.globDestination;6 m& V9 ]" _' F/ t' ], V8 S% u
assignLObj := rgmanager.rgAssignL; ~+ |8 |4 y. y% v% a
row := assignLObj.getRowNo(GlobalDistObj);' n7 m7 m/ T W& q5 Z6 P# H1 G* \) i
if Row = -1 then -- since 708 a) v5 h3 L* K
if lan=1 then; `* a$ M7 T; d
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* c6 J V8 \, D( s7 u j3 N9 }
to_str("in der Andockstation: \"",?.~.name,"\""));6 ~# e. t% ?) B# A4 R+ M
else
_- h) P, [% G: t8 l promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- l0 u& A3 X4 D2 X3 q7 |4 ?2 F to_str("in docking station: \"",?.~.name,"\"")); + h X1 @* u# b2 S3 q; y
end;/ C! C/ g7 f, {( p" N
else
( ?/ f4 P* o0 m: Z/ d @.Destination := assignLObj[1,row];# a6 ] M! _( N! B) u
end;
+ W7 {! \, D/ S/ t! C newDirection(@); t* _) ]4 q3 |/ S7 c1 X! |+ Y
@.HasOrder := true;" J- _# A0 l3 G2 g' G0 U8 D
end;0 s/ `! C0 F* M G& u! @
end;
8 W7 ~, A! R! W/ E @" wend; -- of the method3 {8 L( F0 L% B$ n" q
|