/* called by: entrance ctrl of the object 'track'
' D( @& Y. W& z% S% ?6 l9 K*/4 {- i6 J, `- J8 l
is
" v$ ~/ o: \9 ]% X9 a v part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 X# s$ e" u0 h G% _) Mdo
. ?7 b3 b$ g4 E% j* n+ j3 I Lan := rootfolder.Internal.Tools.AOLlanguage;! r' x& q( x- m v# i2 F) D
if current = @.Destination -- else return
% a& ]! E Z7 u" b7 G then8 f+ e. q+ R* W6 B# L
@.Destination := void;# ~2 O2 x. c, c: j' U% m8 l' h
if @.occupied then S3 z5 y/ {0 x
part := @.cont;0 a% k9 `7 ^6 l* t6 e) w
@.transpOrder := void; j" \. w; j* l' C$ s O' ~# x
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 C' p9 E2 u, z! J* N4 x
@,root.eventcontroller.simTime);" s7 f' }$ M" q* {8 m4 F3 @. G$ ]
@.HasOrder := false;
3 y/ p! B7 l {& ^( B& [' Q @.DrivingHome := true;- O0 [& k5 v1 y; i! c
rgManager.tryToStartTransOrder;! z/ E/ H. o" c! @6 G- r
if @.Destination = void
3 z+ r, f2 U! R) d% }# s then -- no transport order for vehicle @
- \% A' j! G1 K8 |5 ]) O2 z' K3 ^& w @.Destination :=
6 e/ H3 A" Z; I2 j a; z rgManager.nearestFreeStation(@,track.~);
0 o* B) P- ~* [& J- {* X6 t$ s newDirection(@);
6 D" [+ O% |, i& l" B if @.Destination /= void then* Q |' {. T, D: [+ `" ^" S. y
@.Destination.NumReservation :=
$ I7 h5 l) [4 E) E7 T( U; R# {* q" A' K @.Destination.NumReservation + 1;
, o& s; L- P/ e% k( G end;
7 Z) `& u @/ S1 l @.CurrIcon := "drivingHome";5 h$ ^0 l6 K9 L0 o; h
@.DrivingHome := true;; }: |: Y* z* a% r$ _3 l) q
end;
0 j( \' m+ l6 I1 p* m9 j else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 w( b5 Q2 o* J4 y, C4 v part := @.transpOrder;
" E( C1 C3 y3 c& @( O7 ^" {) U part.move(@);-- load part
1 c+ Q3 h, w2 A8 Q" V- J @.CurrIcon := "load";8 P6 B% N$ n* J' ?, T
GlobalDistObj := part.globDestination;
5 w) m) }/ d( q5 E5 ]6 U assignLObj := rgmanager.rgAssignL;# w$ p# v$ y \) T
row := assignLObj.getRowNo(GlobalDistObj);$ Z' z" C$ {1 E3 {
if Row = -1 then -- since 708 x7 E% F7 m. s3 M6 J x4 u
if lan=1 then
~4 x N" l, L3 |1 x" g+ a) y" y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% m7 r& l) ]- i B. H
to_str("in der Andockstation: \"",?.~.name,"\""));/ W( |& Q) s8 P7 g
else; K& `/ g) Y( e" l3 R$ j/ z$ _6 _
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 B W0 y& ]" c7 P
to_str("in docking station: \"",?.~.name,"\""));
% F& U1 M+ b6 m* ]! {- u end;2 Z! @: H/ |5 d9 z+ t
else G/ ?" @! B8 |) w% ~
@.Destination := assignLObj[1,row];/ E2 c7 _- S; ?; t
end;
2 A0 \/ D2 E+ ^. F, O# Q& y. } newDirection(@);: o& |9 k$ A1 K5 O t- ]
@.HasOrder := true;4 m2 e; i0 @- a7 M# F$ A/ f
end;
2 M9 o1 X1 |) Q4 O3 M! u( { end;
" a3 n- y5 R5 _end; -- of the method
6 j7 p& [$ X) A8 O |