/* called by: entrance ctrl of the object 'track'1 _* @. {3 U; y$ _
*/
; K1 I+ ^* H, p6 K7 ?9 |- d! h% yis3 A% M7 b$ H# j2 A
part, GlobalDistObj, assignLObj:object;row,Lan:integer;' C$ u! S, z2 ]; D1 Z' @
do/ K- V, Q6 d. o; P
Lan := rootfolder.Internal.Tools.AOLlanguage;
0 r" W: K! j& J/ t5 q if current = @.Destination -- else return
* ~2 Q2 t/ j' n A1 c t then9 W" v6 W& X+ Y0 _$ o
@.Destination := void;
) R. t% J+ @1 U% ?5 A4 a+ r1 L. R5 a if @.occupied then- j& ^* ^( h! c/ }3 K* a) ^
part := @.cont;
8 H) `7 e6 \, u0 z7 r: y @.transpOrder := void;! v% |9 w; z& w, J* {
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! {. E3 r2 e5 Y- x
@,root.eventcontroller.simTime);$ g0 n0 w8 V* |, ?, E% M6 [
@.HasOrder := false;5 ?9 B; i3 M; s$ I& h
@.DrivingHome := true;
4 T2 P- Z2 J5 z5 H6 F \9 g- V rgManager.tryToStartTransOrder;( f6 V x2 k: G
if @.Destination = void
% l5 N ^) X' u! ~; c1 A' w# f then -- no transport order for vehicle @7 L* z6 v1 p% [/ v
@.Destination :=* _. D/ n/ O/ ^$ c7 q
rgManager.nearestFreeStation(@,track.~);
$ H( o; `" x2 ~% g0 V' W newDirection(@); / _/ F$ S& B8 d
if @.Destination /= void then
0 Z& L+ q1 A9 c; z y! P6 Q5 E @.Destination.NumReservation :=
% r- ]" E, }+ t% ~+ d @.Destination.NumReservation + 1;- o6 {- v; f: p x B
end;8 t& z! D; y6 ^. h, i# y$ a/ ~
@.CurrIcon := "drivingHome";
7 Q$ `/ r2 \7 ]# j, Z+ i9 s: S/ S @.DrivingHome := true;3 m1 E$ ]' L! \' ^
end;4 L% x$ u" t( g
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 }8 G; f0 a, i; x6 N part := @.transpOrder;4 h0 h$ y* a0 {2 T
part.move(@);-- load part7 @5 }; x& c( @3 t4 D0 w {
@.CurrIcon := "load";
$ ?( g' v& D8 z" O3 L6 @# A GlobalDistObj := part.globDestination;$ d/ b$ y+ w u% G! Y+ j
assignLObj := rgmanager.rgAssignL;) E! ?- e3 u: u/ |- w# k7 B' }& j4 k
row := assignLObj.getRowNo(GlobalDistObj);& {9 c' Z& W5 p% y5 ~4 v
if Row = -1 then -- since 70
. k* ?8 y/ @" [3 M! z if lan=1 then3 u' ]& Y% D8 K$ ^7 j
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. B0 B7 Q, i& r5 L0 h* Q5 [1 k9 y to_str("in der Andockstation: \"",?.~.name,"\""));
- f# h/ Y4 L, @ else2 ~& b) U; D9 I1 \
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 t, }1 M" B& q5 j$ X! L( d to_str("in docking station: \"",?.~.name,"\""));
# Z$ s9 P6 u k P4 \- z) ^ end;1 a+ e! P' X3 u' g
else
+ C9 _! i2 g5 R8 u0 b @.Destination := assignLObj[1,row];' V7 I9 W7 ~0 \# v+ R
end;
* M) {4 h- g" ~( g newDirection(@);0 N8 U) k$ z1 C$ T; v# h( ~4 N
@.HasOrder := true;0 N" a! Z8 j4 s4 ~
end;
( T7 S5 [2 ~! V1 W$ c7 _ end;# \ ]* ]9 d) o) j n
end; -- of the method
3 H' X% U# y2 B B/ X r$ L3 R, C; l |