/* called by: entrance ctrl of the object 'track'# R {* p+ U; h" @/ A* J
*/) z0 A0 r+ l! b# j# G
is
% B. ^ c9 @( c$ k9 E part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, ^" N; H$ L4 a/ g/ Ido
4 O+ B. A" V' i% {: y Lan := rootfolder.Internal.Tools.AOLlanguage;3 I, @% v& d+ \5 m
if current = @.Destination -- else return
4 }4 y2 f. |8 i7 t4 [7 \ then
6 u6 M9 H7 _* x3 M @.Destination := void;( n9 `* i* ]4 ]' b$ {
if @.occupied then
& I& S; N/ _ O# n7 f5 `$ h part := @.cont;8 v, R) o2 ?5 |4 R5 d
@.transpOrder := void;* V& V, ]0 F/ n$ ~
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ b1 E: b2 k; w: o [3 t
@,root.eventcontroller.simTime);0 A V. H8 w% g6 o) |
@.HasOrder := false;
! P! R& k. U; `: x! u, h @.DrivingHome := true;
9 H, ?! V7 O: N; @! P7 h rgManager.tryToStartTransOrder;
% Z& u9 Q$ z8 H: ]- M: k3 ~ if @.Destination = void3 p! n( o! p6 [' M
then -- no transport order for vehicle @
j: R1 _: z. U2 Q. u$ H* v; Q& k# e @.Destination :=. N# p" j( y: m! Z* ~/ |
rgManager.nearestFreeStation(@,track.~);
$ v8 f" A% w$ Q. o4 K* k# M newDirection(@); 7 t9 O T: S: \* i
if @.Destination /= void then
8 n! ]7 b# h" E( B( I' r @.Destination.NumReservation :=4 c' s& ?+ N: T+ ^0 B% C
@.Destination.NumReservation + 1;+ T2 U: U* j& P% p5 F+ U
end;
* z4 u8 j) z- s+ w G @.CurrIcon := "drivingHome";
% ]# v* G5 V5 E$ i6 w5 H' z. J @.DrivingHome := true; ^, F% A7 z- \2 t: N3 S
end;# J4 P" O6 {% f
else -- the vehicle @ is empty, both vehicle and part are in the same dock station& s# K! @8 D! [; R
part := @.transpOrder;* [1 R, T+ U& d. r& N$ Q
part.move(@);-- load part( n ?! [; u6 b- i& a% f H
@.CurrIcon := "load";" P- K4 x0 v, o3 B
GlobalDistObj := part.globDestination;
0 C3 K5 a( N! k3 V, I assignLObj := rgmanager.rgAssignL;2 b* W% j+ |: H |$ U5 |( e
row := assignLObj.getRowNo(GlobalDistObj);( p5 z7 p9 [! X2 r5 X
if Row = -1 then -- since 70- y. a! Z' e3 L; q
if lan=1 then* j9 g( R g; |
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," d- C8 F! Q0 Q9 G7 b
to_str("in der Andockstation: \"",?.~.name,"\""));& K6 z) |0 L5 ^ }
else
$ i/ y* m' X/ l promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 H: r+ V4 y2 h/ H6 t7 ^. F h1 m to_str("in docking station: \"",?.~.name,"\""));
9 ? _6 ~* a) O8 b* ^ end;. D" G' S y1 C/ k8 B
else1 m8 @: _$ A5 _4 O$ }
@.Destination := assignLObj[1,row];1 j/ A) T* Y/ H K, B4 j
end;
$ s4 B0 g ?$ m1 v/ m- T newDirection(@);- d) V' F% `: a& a. x& q
@.HasOrder := true;
; O& i6 s6 X) s( u, R6 V% V end;4 Z- m. z! U0 a- c- A/ ~8 D
end;
7 L3 H: d* d' g; w, b& dend; -- of the method# a9 z( E9 i x# H1 {" G
|