/* called by: entrance ctrl of the object 'track'
) R9 j2 q' I1 m' D, a*/
) H3 h* m/ i! d: ?is
; J ~/ I6 m+ j; [ part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ `4 N; V8 `1 S! q! |' D
do9 u s- e* z, o# | s0 z0 H& C
Lan := rootfolder.Internal.Tools.AOLlanguage;
, ?% q1 b3 L, \. a if current = @.Destination -- else return
! \$ d8 o/ c6 R' J' t then
. N9 G9 W b9 m, a, |/ X @.Destination := void;0 N; [4 k; Q! n
if @.occupied then: }; O& H( x$ i' U- y
part := @.cont;
6 q& ~8 [ a% s* T/ t4 m @.transpOrder := void;
6 B5 s5 a, X* h part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, P) K+ o4 Q7 V @,root.eventcontroller.simTime);% ?4 O! ?( s* L' q; i1 ?3 K
@.HasOrder := false;
% a: C" n1 h8 [9 ^2 C0 R @.DrivingHome := true;$ C7 p! d3 a0 H
rgManager.tryToStartTransOrder;
- E, A( r' G6 f! p" Z if @.Destination = void
( S) [& j# y; \$ Z1 w6 t s then -- no transport order for vehicle @
6 K2 H% H: R4 Y) K0 G1 v @.Destination :=
+ ^" X2 i4 _" e7 W7 l rgManager.nearestFreeStation(@,track.~);. W7 c* d" P% _" ^4 Z5 f" c# P
newDirection(@); + }: \% B1 ]; j1 z
if @.Destination /= void then
- s3 x% A' }0 x/ T3 z8 r! q @.Destination.NumReservation :=- S! R4 R& R) ]5 m0 t! g
@.Destination.NumReservation + 1;- |. O" C; }! i: Q$ z9 o3 p8 f& @
end;2 O2 _% O9 f1 f7 u2 v
@.CurrIcon := "drivingHome";/ h: V' x6 G2 t# O! k
@.DrivingHome := true;; n$ b. ^5 H7 g) d' x
end;
9 l6 D/ i( r& y else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& D8 a5 [- h/ H$ @. j/ n" n part := @.transpOrder;* y$ u8 e. o- ~* J
part.move(@);-- load part9 h0 c3 `0 |! o% X" e* T* q
@.CurrIcon := "load";
7 W5 `3 D: V! h$ S* Y- A GlobalDistObj := part.globDestination;
# n/ g7 g K- X, x. {$ @ assignLObj := rgmanager.rgAssignL;
; q: Q5 C: B. u1 O2 S( c7 T row := assignLObj.getRowNo(GlobalDistObj);, D& f" d' w, D* e
if Row = -1 then -- since 70# s. C, S+ H0 u
if lan=1 then6 N$ C; b: a% m! Q$ c
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 ?) Q {. Q5 L0 V V; N$ ~8 l8 I to_str("in der Andockstation: \"",?.~.name,"\""));5 U/ N6 w& ]8 r# U. K
else) X8 ~# U' d# r& C. e7 n
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; s7 l( W% a2 t* h to_str("in docking station: \"",?.~.name,"\""));
) I! g* ]/ P ~ end;& ~1 h: ? ~% [
else
* T1 z3 q: u* z/ ?1 R* P @.Destination := assignLObj[1,row];
* X% t3 G' @9 b, F; y c/ a end; . [. N( T7 J7 z0 p0 C5 r
newDirection(@);
$ A3 d9 B+ w6 d% }& n @.HasOrder := true;# I" v* u: T/ o6 T
end;8 e4 ~- @& `" {) V: I/ {5 P
end;( b: S+ W" e1 I K+ R* U
end; -- of the method
$ V( ]" c9 T1 \3 C d- d. R' A |