/* called by: entrance ctrl of the object 'track'" s1 f# Y$ F: z5 Q: E4 Q4 Z( r
*/0 l2 P2 R7 @0 @& s) \* O
is
8 `- p5 c, w j' L# P t1 p- } part, GlobalDistObj, assignLObj:object;row,Lan:integer;) \0 h" ]+ ~) x( z. k
do
6 Q, b) H( z4 j) f, s# ` Lan := rootfolder.Internal.Tools.AOLlanguage;' A5 r& G9 d8 h8 }) R. d+ j
if current = @.Destination -- else return
( Q" A8 }1 v& ~7 X! e6 y0 G then
, p g) N0 Z j, l @.Destination := void;
1 N! n" Q# G3 m. L1 b/ ?& o if @.occupied then. ~8 J6 K1 ~& G5 j- s& u
part := @.cont;
: G: S- }9 Y9 E0 F2 ] @.transpOrder := void;" F5 f' M4 R0 H9 ?' q* A5 i
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- X+ Q3 x9 i1 H0 N
@,root.eventcontroller.simTime);7 `0 O5 h2 w2 Y |3 u+ F
@.HasOrder := false;# S7 c9 J! ^! e, C& U; [
@.DrivingHome := true;. ]$ A% d6 \8 d+ N8 p- D1 a
rgManager.tryToStartTransOrder;
0 ^2 R) d4 M- V6 a1 i' J7 h if @.Destination = void5 ?- W4 c" t- [
then -- no transport order for vehicle @# {! M9 E( y4 a2 i
@.Destination :=
1 M8 T2 b! h# x+ H. c* b rgManager.nearestFreeStation(@,track.~);6 O1 A0 u% `! d7 G- J
newDirection(@);
4 G/ c( R* e- F! ~+ c8 V if @.Destination /= void then
% `+ a( o' e# A! h @.Destination.NumReservation :=4 n3 Q8 ]: g, L7 V& w
@.Destination.NumReservation + 1;
# ]: a" k) Y2 G& a5 S3 z end;; T% M5 M5 c, u0 `9 @: |* a
@.CurrIcon := "drivingHome";
* R# j% c2 H" m% [- S$ { @.DrivingHome := true;
# D! G3 C$ Q& e% n end;
. p% x# ?' S9 _: v# A% X else -- the vehicle @ is empty, both vehicle and part are in the same dock station) c8 k5 l2 y$ _ F/ p+ \
part := @.transpOrder;+ ^2 Q. r8 g2 p% _" e4 j
part.move(@);-- load part+ q$ t! B# ~+ d
@.CurrIcon := "load";9 J8 A5 G6 b" B: W
GlobalDistObj := part.globDestination;
: S. r! }# B: y* P6 g- E assignLObj := rgmanager.rgAssignL;
# [$ z1 \% v5 j: S+ M0 W* K row := assignLObj.getRowNo(GlobalDistObj);: L+ j5 ~0 v/ F3 ~& b% M
if Row = -1 then -- since 70
0 `' N! q* D! d8 @ if lan=1 then w* A& U0 k7 l7 ]& Z/ d' u
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 s# {& n; J7 g( W$ ^9 r$ i! \
to_str("in der Andockstation: \"",?.~.name,"\""));
; E$ h. r" Q. b }& x9 a9 M else- L0 [% B% l( I
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( Z& {2 p7 Y- v. l9 w* t" e
to_str("in docking station: \"",?.~.name,"\""));
0 F* H" c( M6 Z( ~- D end;7 Q. w* W( s8 c9 _$ }6 R: s
else
$ k* C. |& S3 k; v2 y: L @.Destination := assignLObj[1,row];
7 R. I& N8 j) [. j2 q* P end;
! c* {3 @3 y6 o: S' O newDirection(@);
% f2 W$ _8 @8 N9 t% }- P- s$ p$ z5 B @.HasOrder := true;6 F! C* |: W' X& O9 |, T' Z
end;, J5 x3 H/ Q. `% D" `- p1 g
end;. V2 c; B: ~- H) h" t
end; -- of the method& L0 d' S0 |4 H7 F$ M3 ^: E
|