/* called by: entrance ctrl of the object 'track'
: s/ c) G( k6 _. Z/ t1 @*/
6 Z# @$ K7 T' Z u/ J# n' Cis. g) N: X: h4 P! o7 P
part, GlobalDistObj, assignLObj:object;row,Lan:integer;' D- f3 j) j! N+ I4 R4 R
do" a& I' s' [1 `8 Z2 G
Lan := rootfolder.Internal.Tools.AOLlanguage;
L3 S, x; {( D* k2 }8 O6 f- _7 l if current = @.Destination -- else return
# V' ^9 V- u8 Y& u$ K# _4 z then6 W7 K; ]; o+ p5 I. k$ |$ u9 x
@.Destination := void;+ x* I2 \ u4 O# @6 d! {
if @.occupied then. r" e" ^; b2 h! V; x; I) _: t( Z3 V
part := @.cont;' K' Q" v3 N* r4 \; P$ k
@.transpOrder := void;
9 F7 @ H* h, Y3 Y. M part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 F0 O+ W# r0 l1 a. a- b. ` @,root.eventcontroller.simTime);
6 e& H Y! \) M5 R9 \4 V0 U' `# C @.HasOrder := false;1 a% i' ~4 a8 l, w7 e
@.DrivingHome := true;8 Y- G$ n1 J: ]
rgManager.tryToStartTransOrder;
6 J4 o6 d4 p$ Q9 Z$ Q0 g$ n0 }5 g if @.Destination = void
/ N" w% o8 e- { `/ |% y( P then -- no transport order for vehicle @
2 ~0 K. E8 ?% F$ H$ e* E! y. R @.Destination :=
) P7 P5 ~6 G: b! O rgManager.nearestFreeStation(@,track.~);, J; [6 e; e9 D+ i7 {! M) a
newDirection(@);
- C# j) |: c, w5 Q% y if @.Destination /= void then
% ^: o" r. N: |% g5 W @.Destination.NumReservation :=
7 L, ~4 I) t n% G, P @.Destination.NumReservation + 1;" V- q) i5 W5 M5 v' R- u
end;
M+ ^4 |% y% M9 w. K @.CurrIcon := "drivingHome";
# T5 G2 G: U" B& y, A4 M; p @.DrivingHome := true; C$ H+ H& U; g1 x$ a" H
end;2 T% z7 A8 i0 C4 U
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 x+ `$ U. D' j7 a6 n; C. c) z; n part := @.transpOrder;+ ^6 ]4 {4 R+ V+ X6 l. H/ Q
part.move(@);-- load part
8 _5 E* y ?: M @.CurrIcon := "load";5 H$ c M, ~0 J/ s
GlobalDistObj := part.globDestination;
: i1 i! w. I# j assignLObj := rgmanager.rgAssignL;
9 {% V6 {3 |0 w& S! F row := assignLObj.getRowNo(GlobalDistObj);
* m: ^2 v1 {9 O) Y3 H! j5 z0 u: l! { if Row = -1 then -- since 707 v5 `/ M+ H F8 _: [3 `
if lan=1 then
$ [; F# I( a5 E. a2 p# L5 ~ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 V9 J$ `9 v) d! | to_str("in der Andockstation: \"",?.~.name,"\""));/ M3 R+ L2 |4 Y# y+ b# E2 X4 @/ Q) I: u
else
+ Z2 g5 X& x! y0 i* b1 Q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 _- w, {2 t' P$ a0 {5 ]" t k to_str("in docking station: \"",?.~.name,"\""));
E3 R4 O% v* ~! t0 D% ^ end;/ ^. a' Y- }1 h9 C9 q. ^3 n
else& E, n$ W8 t6 s6 `- D- u
@.Destination := assignLObj[1,row];
3 } v/ |) `4 ?% |' R; k$ ` end; 1 a& ]+ T. A) u2 B+ G
newDirection(@);$ T- n1 w% F& n
@.HasOrder := true;) A1 J0 |( ~$ e0 c
end;: z6 z3 Q6 Y. F5 @
end;
4 q, S" u9 ? `% @end; -- of the method
# e* H7 B) h. c0 T |