/* called by: entrance ctrl of the object 'track'
6 S1 Q7 J, v& @3 P) ? z6 i*/! r2 C o( b c1 f) X
is
- r. X$ ^6 ?5 G; v part, GlobalDistObj, assignLObj:object;row,Lan:integer;: D v) B4 p+ @3 T( N V
do m# w; B* p: `; ]1 m
Lan := rootfolder.Internal.Tools.AOLlanguage;
; q$ W! [( ?9 x, K2 |) { if current = @.Destination -- else return g/ L4 ^0 N1 A, t2 D4 F
then6 G! X0 V+ E3 n& G a
@.Destination := void;+ X; R. y$ H/ s" q5 } R& \* A
if @.occupied then
% m. P2 V% E5 |) ]# X1 U$ G" ` part := @.cont;$ l3 b7 y+ x- s9 x
@.transpOrder := void;5 P$ Y- t" M8 U5 m+ `
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& L9 `% O3 k: E( H' ^% }
@,root.eventcontroller.simTime);3 H* f& ?8 t' A3 |/ o& L! G; P4 W8 }
@.HasOrder := false;
: J+ o. ~7 x$ y @.DrivingHome := true;
& W. [: N ~; g& b. L6 `* [ rgManager.tryToStartTransOrder;
& Y; [9 Y) R3 m7 v' Q& B5 N; U7 Z if @.Destination = void
: L5 d! X/ z: p/ i, F! p7 N( U then -- no transport order for vehicle @5 \; u6 |/ j. E- n# j% n. S% m
@.Destination :=: x/ F; ?- [+ X, f
rgManager.nearestFreeStation(@,track.~);
5 Y- e7 s# \! ]: a newDirection(@);
4 a9 O- L/ D9 Q/ {% b2 d if @.Destination /= void then
; k2 U @: s$ l5 T @.Destination.NumReservation :=
7 R% N0 M3 B+ {, @- M9 N @.Destination.NumReservation + 1;" K1 M ^+ @) {' }# o0 g
end;
' }" |+ m/ Q8 T5 b7 b9 f. \ @.CurrIcon := "drivingHome";9 V, |) x! D1 v& K; P
@.DrivingHome := true;
' d$ \& w8 E" F) k( m& S end;
4 L' D% X% s' F4 ]! y& M* n7 | else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. K! C9 k# C) z8 \8 u( P part := @.transpOrder;5 m& k! |. [) i9 {0 y
part.move(@);-- load part
& l# ~0 w' k' B% D @.CurrIcon := "load";8 R+ \# K7 ?$ U/ q% i) U
GlobalDistObj := part.globDestination;! S7 U' ] C1 X- a/ G
assignLObj := rgmanager.rgAssignL;
/ d5 j$ t) o4 _1 q row := assignLObj.getRowNo(GlobalDistObj);
; Y! Z8 ~. l: m4 Z if Row = -1 then -- since 70
* X# a/ J/ R/ O$ N' ~! n5 x if lan=1 then) J7 \% k- A" \$ E2 k! _. ~
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 w7 t$ [1 o+ ] to_str("in der Andockstation: \"",?.~.name,"\""));
" i8 F: w% X+ W3 l3 n& K6 j( \ else
$ l' i9 v" o2 Q( s: B) T2 o promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ U4 q& z/ H1 r) L to_str("in docking station: \"",?.~.name,"\"")); . s" e: u4 W* u: n, o
end;
' u) [1 H1 U! c1 p& M- A' B else
: [* C9 }0 S: q- [3 Y5 w: g @.Destination := assignLObj[1,row];( h- U; e% F+ i, P
end;
+ a" G) w) Y* U5 O( r newDirection(@);% v3 K! s' t3 B/ y
@.HasOrder := true;: |# `% [1 h" R8 Q
end;
/ h+ e1 {* k# a: t end;" O9 F2 F# D. A! W
end; -- of the method8 T7 V0 N+ ?! p
|