/* called by: entrance ctrl of the object 'track'
0 R0 r1 H& T* H1 c3 R K9 @*/
0 ]2 b9 B4 v8 m! t$ k1 W% ris1 ?9 y3 x. p4 ^' s5 ?5 T% F7 d+ m7 E
part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 |; s8 H7 Z( h2 |3 F, ], r3 x
do
1 ]7 |1 _5 k" Q3 L6 `6 Q+ y1 ` Lan := rootfolder.Internal.Tools.AOLlanguage;% h) Q# D& U# S4 g8 X
if current = @.Destination -- else return" M' V/ S6 A0 D: s. L
then& r' g) F+ Q) P. J
@.Destination := void;! ]# N- p8 j+ }' j1 P7 z, H
if @.occupied then
1 K- h; g) w" U2 `0 W" v- Q part := @.cont;
8 l4 i) v M) e2 N @.transpOrder := void;
9 S i! g8 R& L4 Z3 i& c5 e1 K8 s part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 K! p+ n2 l" v% i1 H: ? @,root.eventcontroller.simTime);5 t5 r# V: y2 C- f9 B5 l
@.HasOrder := false;$ H. {; g, W1 U$ M9 k# m* m
@.DrivingHome := true;
! |' ]; Q( T. E2 ^7 `) y0 V) n rgManager.tryToStartTransOrder;
" c( N9 c2 x2 x5 e8 m if @.Destination = void
5 c2 M' a# L2 ] then -- no transport order for vehicle @* C+ h. a* n/ E
@.Destination :=
, V8 o2 _! X, B3 V rgManager.nearestFreeStation(@,track.~);( [2 q/ ?8 e s8 `9 @: \
newDirection(@); f* e9 Q0 D- m, ?4 _+ H
if @.Destination /= void then1 Z! Y; W. c; R) Y; W- H
@.Destination.NumReservation :=0 N8 T1 n J) F/ o
@.Destination.NumReservation + 1;# ^0 @" s- B! ^1 b* l7 F ~9 {8 T
end;- `" Q) j- c" }! D' l
@.CurrIcon := "drivingHome";" _; }8 y. G0 O, a* M5 ~
@.DrivingHome := true;% z, j( X$ Y. e. J6 Z7 W
end;
6 Z, X3 w0 @- i b else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 n3 S" `+ U% F9 |
part := @.transpOrder;; {. L) @9 u9 P* `: N
part.move(@);-- load part! z- ^* `6 ^6 n- Y" d0 a
@.CurrIcon := "load";% m0 W" M$ a# `, v B# k" ]
GlobalDistObj := part.globDestination;6 c, |! J* m4 O3 ^- c; g
assignLObj := rgmanager.rgAssignL;9 D \# c5 s, Y! M! U
row := assignLObj.getRowNo(GlobalDistObj);
" A1 Z* N/ c7 i& H if Row = -1 then -- since 70. x. f. }9 `% z+ N) q
if lan=1 then8 l% C8 }& Z$ t2 E5 T0 K+ `
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 ~ b) H0 }. E. R2 D' ^5 m to_str("in der Andockstation: \"",?.~.name,"\""));! m* W& d, `1 G6 t7 R
else4 e% |6 S7 _. @# F1 C
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) ]& b: R. H: Z9 z4 N to_str("in docking station: \"",?.~.name,"\""));
/ i- e& P' S. l& T7 b8 d end;
$ |+ _7 {5 ~6 _* k' A7 h9 Y else1 O: L, F4 t4 N( D
@.Destination := assignLObj[1,row];
2 ?* P% }" X" F$ h S, P end; + l# z; G& B! E6 e# s
newDirection(@);
. x* A# O* Z4 C5 L v2 z8 j$ j @.HasOrder := true;9 F+ n$ @* d! x) ~0 ~
end;
. p- Z8 ]2 T7 z+ x2 J9 N$ K/ m3 a end;
9 Z8 S+ \3 Y& p3 Q }) x1 fend; -- of the method
9 i/ v S! J$ R/ z( A6 s |