/* called by: entrance ctrl of the object 'track'
; l, s# J% \( Y0 K0 J*/
" C! Y0 V/ M: K; b0 d8 H" L Tis8 e$ v, H u/ {$ F8 K' ]! [
part, GlobalDistObj, assignLObj:object;row,Lan:integer;, N! K2 a; ?5 A" o' |, a1 W
do
3 l; t o/ R- Z$ T6 V Lan := rootfolder.Internal.Tools.AOLlanguage;
2 s S& z) ]4 o% k' D5 T: ?& e if current = @.Destination -- else return
W* j2 @5 U% |* ? then! e! f J7 J5 k) M1 R$ N( }
@.Destination := void;
7 w7 I# u& o4 E% q8 ? if @.occupied then+ t6 c2 Q+ `! K) b, f; h# t8 t
part := @.cont;
. w _1 M6 z" m: n3 |* @ @.transpOrder := void;# s8 ^+ f5 G7 r4 y8 b; o" `) K
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ i" T1 A- `! O! J
@,root.eventcontroller.simTime);8 N7 m, y8 y! r4 t
@.HasOrder := false;, k4 T0 s/ \. T: K
@.DrivingHome := true;' H: h, v* A& h: h& y- L
rgManager.tryToStartTransOrder;& K$ T0 t$ P% L: n7 E
if @.Destination = void }+ ~/ S' y. q: M! O6 W, W
then -- no transport order for vehicle @
5 z5 E; J- |( p @.Destination :=+ N0 y% L( Q* @5 V' i1 [8 E/ \
rgManager.nearestFreeStation(@,track.~);( g3 I. U& a/ e& x% Y
newDirection(@);
8 n, L% X% B8 n7 U if @.Destination /= void then' w; }5 ?6 \* b* @; ?
@.Destination.NumReservation :=. S# j" Y: R+ T U* ~" {
@.Destination.NumReservation + 1;
- m' o O6 u' h9 V4 X) L& p" p end;! r2 V, ]+ P$ u c6 Z* t: ~/ u' m
@.CurrIcon := "drivingHome";* A9 w- |0 Z% Y* K6 z* t: ~/ u
@.DrivingHome := true;; ~" H A9 d& x) ~1 }2 @8 x
end;) {% N: b8 s2 b4 j! y. {1 z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' Y; x3 W9 [6 ?7 a' p! z part := @.transpOrder;5 X4 s8 P4 R% A+ Y( S4 ~" j2 Q
part.move(@);-- load part
6 u' j4 e7 j# @, M1 S @.CurrIcon := "load";
7 E. ^: P. O5 p4 n GlobalDistObj := part.globDestination;1 B$ s! n5 ]( s9 a4 |. p: p0 J
assignLObj := rgmanager.rgAssignL;
! D5 l0 G1 |1 W, Z6 j0 V row := assignLObj.getRowNo(GlobalDistObj);1 P+ d9 d3 n) \4 t
if Row = -1 then -- since 70
" [1 H& [+ i0 D9 B8 i if lan=1 then- w2 b) N7 a* n! |' o- ]
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' O$ G* q4 K: O/ G) i4 P
to_str("in der Andockstation: \"",?.~.name,"\""));
" Q: g& j$ g* m4 s2 H5 Y else
/ f$ W0 q2 C/ i. \4 p$ a promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 s$ Y4 U3 r6 O" V6 h/ w3 n
to_str("in docking station: \"",?.~.name,"\"")); 6 x2 j U: p. {
end;# ~! o) z r7 s% l" ^
else
; H2 y# G$ P. n, w @.Destination := assignLObj[1,row];" i' z7 H* Y9 W- i
end;
& e) k/ R6 X2 l Y newDirection(@);
0 Z2 V0 Z7 f- Z: J8 V @.HasOrder := true;
" [+ f! |9 v& L3 n end;3 w7 y3 P$ V) g
end;
5 A& h2 ]* }7 B% v! Fend; -- of the method
$ }2 ]5 v u/ o r4 N: } |