/* called by: entrance ctrl of the object 'track'
y: g k: W! v* n' @) {7 p% p*/
" V2 {+ p; Q5 |$ eis
2 m- t4 Y$ A" t0 D0 T part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 j+ W* B! M$ u- G4 O! B+ `do
* h. d7 ]' Y! e Lan := rootfolder.Internal.Tools.AOLlanguage;
& _* B, e/ L" H/ q& a if current = @.Destination -- else return
/ e: d3 z/ p2 m+ q then
- e6 U7 V( ~. N M" K) p @.Destination := void;7 ?7 o7 s5 |9 L* O* {* [( ^
if @.occupied then
6 O- _+ y: s! }/ X" Y" _3 ` part := @.cont;
! V! }9 D& T* V8 C, m @.transpOrder := void;
+ x" M0 k' C. B+ e7 r; M6 V part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. ^+ q. X+ E [+ g( y! B( o b
@,root.eventcontroller.simTime);
D3 }5 L; \8 g& T3 J. k @.HasOrder := false;) Y' `2 H: M) f9 Z* V# V& U
@.DrivingHome := true;
1 h$ ?. F) `3 C7 L' R' v/ m rgManager.tryToStartTransOrder;( K" o* K1 V5 `: `; |6 ?0 G; \
if @.Destination = void
& r, g E( r0 }% y2 T, B& p) l then -- no transport order for vehicle @
6 F! L( m) c$ L! Y, v0 v w! l @.Destination :=
! K$ y3 j2 P5 W1 p' d$ O rgManager.nearestFreeStation(@,track.~);
{- i! `& Q: ?7 q! X1 V newDirection(@); $ F8 q$ e; G8 q3 b
if @.Destination /= void then
7 @6 H' c7 A: m% j @.Destination.NumReservation :=
0 n5 {, [+ D/ W/ L& A @.Destination.NumReservation + 1;+ W9 \5 T ~6 s* d- m1 Z
end;
* I$ {; Q H( R) D1 B @.CurrIcon := "drivingHome";
6 I' k$ b: k$ A) X @.DrivingHome := true;) b' C0 a: f) q0 P6 m6 K. L7 _
end;( p) l+ Z, n: S2 W# `6 j. J. r
else -- the vehicle @ is empty, both vehicle and part are in the same dock station. W8 e" z1 B. _
part := @.transpOrder;) R6 D! S8 u- b3 m* h4 c( Z
part.move(@);-- load part: A3 E$ \4 J t" A8 m
@.CurrIcon := "load";
2 X- _, A- D4 T$ {: [ GlobalDistObj := part.globDestination;3 |: l' T7 ?- z1 ?+ u$ B
assignLObj := rgmanager.rgAssignL;: P+ ?7 L$ c9 _8 s
row := assignLObj.getRowNo(GlobalDistObj);
- i. j$ k( c, U; L if Row = -1 then -- since 70: D7 v! R' I6 K+ K
if lan=1 then
3 R% w9 e+ j- J# { promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- f3 |* Y3 ?/ e, s# W1 p to_str("in der Andockstation: \"",?.~.name,"\""));! Z, F/ `( j5 Z( a) y
else
9 Y; c J3 w( M/ z- F promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ x! y+ Z( g, x+ l: ~3 e8 ?+ ?
to_str("in docking station: \"",?.~.name,"\""));
- n1 u" M# c7 R! l end;: A4 W- T: _) e5 U- u5 |
else
8 }' @# z$ h/ I B' }: P @.Destination := assignLObj[1,row];: [+ J' A$ j& n$ F
end;
; Z. ?- M/ }* Q. |) t" g newDirection(@);
: O2 M k) w& W6 z4 P @.HasOrder := true;8 u- Y9 M$ `* F9 s; E
end;
% A! A6 l, T( O end;# A9 @" l0 ~/ l% W9 \/ A; i+ O$ v
end; -- of the method8 w+ ]3 ^$ g8 w2 A& R
|