/* called by: entrance ctrl of the object 'track'
7 N! i% O, c' S*/
0 z( q- a9 [/ f3 H* Fis/ U0 w9 l0 Q8 t7 A& U6 t
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
w3 d1 n1 I3 Zdo; j) S X2 r$ e$ v
Lan := rootfolder.Internal.Tools.AOLlanguage;+ l) |1 H4 W6 ?! V \+ \5 S5 I/ I
if current = @.Destination -- else return. L0 w0 Q9 C+ s
then
* j3 H7 Q. K% n( \ @.Destination := void;
0 p8 Z8 y, W5 a- {2 H if @.occupied then$ W$ A5 ~) N1 @- U
part := @.cont; @2 c- e7 y1 ?3 T) j0 _
@.transpOrder := void;
& _- T8 a$ H% k1 w- C part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" u9 r3 Z0 V( K0 `% t& P$ [5 ? @,root.eventcontroller.simTime);; D7 o. ?2 n; ]9 o c
@.HasOrder := false;$ i" p/ A) ^; a3 Z. O; s
@.DrivingHome := true;
0 v! ~0 r1 H! n" O/ w1 V+ o. x4 ] rgManager.tryToStartTransOrder;
3 N/ h; y2 i. S# x( R if @.Destination = void
0 h& ~/ |; n! Y8 |0 b then -- no transport order for vehicle @
6 d, J& v3 `' |7 d/ [7 r @.Destination :=7 v' D: U. B! r6 e) x. k% L
rgManager.nearestFreeStation(@,track.~);7 C: p9 [" B. W9 }( n
newDirection(@); + R$ [7 c, [5 c% I$ E0 I
if @.Destination /= void then
% W$ q& Z$ E; H- } @.Destination.NumReservation :=
9 T: Z' L4 }& x! c" {5 g) j9 V1 _2 ` @.Destination.NumReservation + 1;. L' N" x$ n6 q, |9 y1 W
end;
- a- z2 G& w" K7 G( @! n7 q! s. q @.CurrIcon := "drivingHome";# x( O/ y$ s; P, P* y
@.DrivingHome := true;
! e* C$ E" w' e8 | end;
. R) E' O) Y5 k0 u$ a else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 _4 a' D4 [( X: |3 i" q part := @.transpOrder;
% v- |' T- ~; p part.move(@);-- load part
3 B6 D0 C8 c9 O, b' e/ t2 ~& } @.CurrIcon := "load";
9 b9 \% T# u( r: g4 w GlobalDistObj := part.globDestination;. P8 y4 V6 o# y$ m2 t
assignLObj := rgmanager.rgAssignL;0 N- h5 T) v3 l* n
row := assignLObj.getRowNo(GlobalDistObj);, _; K4 E$ w8 x& h
if Row = -1 then -- since 708 H& W) y7 ^* T& ^
if lan=1 then
1 E) z1 r# D) \/ a- p9 W promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 J! r0 B" ^" v to_str("in der Andockstation: \"",?.~.name,"\""));
' x7 k; i. g( _ else1 v3 J! [& Z! N, s$ k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* y* a$ `; r9 j p/ K to_str("in docking station: \"",?.~.name,"\"")); % p: e0 W; c4 D/ X# g6 l) e# |4 A) }- ]
end;
( J6 C5 Q( @" P' @ else, i1 j+ B9 [( \' f- m
@.Destination := assignLObj[1,row];+ d' `4 k9 c9 c3 R
end;
6 \( t; E1 H! r/ N' y newDirection(@);& [% n) `) d. f( d" @: s5 H
@.HasOrder := true;
7 j7 _4 q% G4 z1 {. I end;
) W4 |9 Q: q6 x# }2 Z end;" d0 R7 J' a/ R& p
end; -- of the method
$ d, o# p/ j$ W# `* S5 X$ A |