/* called by: entrance ctrl of the object 'track'
$ h9 D. q' R7 x) {*/
3 q- m& X7 J5 f h, r W5 Zis; e; @+ ^- `) R
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- U! e9 q0 O" ]% k5 m( _3 Ido, u Q2 b+ T# w/ p/ t
Lan := rootfolder.Internal.Tools.AOLlanguage;
* Y" J5 C6 S, A/ H9 F1 b8 I3 f) c if current = @.Destination -- else return) k) R+ ]) S( K5 Q
then
& G6 c+ A q8 [ @.Destination := void;7 ^( \( `% h {7 P3 N" s) A6 k; h
if @.occupied then
6 o* ?' S9 @( [3 t3 U+ q7 i part := @.cont;
. b+ W" R' k I. @7 A0 Q @.transpOrder := void;9 V* W) j# F* m3 Y1 B- E
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 m @( E( w+ T5 q; y
@,root.eventcontroller.simTime);& ^/ T0 x8 Z; l" Z
@.HasOrder := false;
9 c u1 B- I+ [* p0 R) N" P @.DrivingHome := true;" ^, d% E' C: z. A7 D3 R
rgManager.tryToStartTransOrder;
0 o) p" h) H3 }& o% \) Z if @.Destination = void: g% S% |8 s! V- M$ a; N
then -- no transport order for vehicle @$ j- g: K& M0 ~
@.Destination :=
! r |8 j4 M- ~) J2 G rgManager.nearestFreeStation(@,track.~);
9 S+ I. A3 S- G" Z* O: U. n newDirection(@);
8 F+ b) q2 A# y) J if @.Destination /= void then
9 i, j" z0 P2 Q8 q9 t2 f8 q u @.Destination.NumReservation :=
# n$ M# ?; W; h0 T# v3 C1 g @.Destination.NumReservation + 1;% ^ _5 Q4 L. H+ y& ^
end;1 I7 t5 Y$ `+ e J
@.CurrIcon := "drivingHome";8 L2 u% S' Z4 o3 h3 K& `
@.DrivingHome := true;* ?/ A M1 M% N9 d2 y+ d$ @3 j
end;
- D% n# z8 H0 I else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 p1 y6 W& p: t% D" B$ X4 E
part := @.transpOrder;
: ~( M- U3 K7 r part.move(@);-- load part
, ?% T. T2 \8 \9 I' A! W2 m- q @.CurrIcon := "load";) R+ X$ H5 S" `. |! k
GlobalDistObj := part.globDestination;! |, \) }) K7 j% Z) p
assignLObj := rgmanager.rgAssignL;
2 N3 ]2 D) V+ {/ V row := assignLObj.getRowNo(GlobalDistObj);
- J% G% T& }) S* a5 w* Q$ X( \" y if Row = -1 then -- since 70
$ v8 x" Y+ U; B& r( z. [1 N% q if lan=1 then9 N+ s! A. e8 X$ i3 m' W$ N
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 L9 E2 j2 d/ N0 k6 d/ v6 F to_str("in der Andockstation: \"",?.~.name,"\""));' l5 V" I Z- d' ]. `3 Q
else
2 R, x% K1 ^8 w* |/ r) ` promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& m+ A8 ^- h4 r9 j O
to_str("in docking station: \"",?.~.name,"\""));
. p2 K, L- ^0 A- A) f: T9 ~/ e. t, B end;0 c) m$ {$ j3 T
else
7 r6 e+ [ ^/ q$ ~, Y, O @.Destination := assignLObj[1,row];% i G( N+ |% Y' q
end; # X2 @! P) ~. v# r8 ~% ]2 M
newDirection(@);
) X' O; l/ I. j+ |8 y5 B @.HasOrder := true;
% Z" w- u& _2 T, `/ g( } end;
5 B+ M8 j$ e3 A& _$ B7 h end;: \7 M. v$ A* v7 _9 g. u: Q
end; -- of the method
% ]( K8 H R1 t { |