/* called by: entrance ctrl of the object 'track'# b7 D- R+ @* I" k
*/6 p* y/ H& t/ |1 D$ A
is6 b) L- b0 G; }6 {7 M' C
part, GlobalDistObj, assignLObj:object;row,Lan:integer;, B$ i: s, W! n$ b, ~* [
do/ l( L7 G! E8 b% | I
Lan := rootfolder.Internal.Tools.AOLlanguage;
) ~$ b. U u# m; U- }; u" q if current = @.Destination -- else return
0 Y) T8 y- i& d y) Q/ h1 i then
. n. s; i y- H$ u @.Destination := void;
9 {9 _9 X' |2 L# A if @.occupied then- u5 u8 F2 H8 d3 {
part := @.cont;9 E4 a) m6 k/ R1 S8 ?" h; S R
@.transpOrder := void;' I4 W9 k. U, r* U: g, G" s2 m
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* }+ K7 m2 L( Q: t. n1 o% b! k
@,root.eventcontroller.simTime);! M) T6 i& Q S+ l D, T
@.HasOrder := false;
9 |0 u4 P8 z% ^. M9 ^ @.DrivingHome := true;# v1 N* o( h; M
rgManager.tryToStartTransOrder;' I, }; a7 n8 T& T# M' |
if @.Destination = void% ?! \- d8 |0 ]5 R. N
then -- no transport order for vehicle @6 J8 ]. R6 H1 V
@.Destination :=* K0 f& |# l& h
rgManager.nearestFreeStation(@,track.~);
1 s* S' N1 f" e$ P% | newDirection(@); * l0 F1 A, O! x& t1 B
if @.Destination /= void then
3 M0 u0 j; ]. w7 r2 d, v @.Destination.NumReservation :=( B& Z$ E0 h# l" {
@.Destination.NumReservation + 1;
' m7 e. t3 P2 C' y/ K0 p end;% l$ _+ A" c \$ B! b& c2 Z
@.CurrIcon := "drivingHome";% e# k9 ~ _ T
@.DrivingHome := true;
4 [5 v9 b& {- D end;: I$ _: n& R. l' l; U* }
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 @9 D/ {" _- \; a6 P/ B part := @.transpOrder;
) M: s: a& Q- m, d5 m) C; m/ a part.move(@);-- load part
* B2 u. e6 j1 P: z- v/ ^% k @.CurrIcon := "load";: l+ q0 a/ p8 D! Z" d& l2 g- C
GlobalDistObj := part.globDestination; O( I: D8 i1 \; q# r; w
assignLObj := rgmanager.rgAssignL;
9 V1 n* U' M8 |& a/ _# [' a row := assignLObj.getRowNo(GlobalDistObj);
. g/ I) {$ P |) z O9 T if Row = -1 then -- since 70
. y; _7 n5 X9 M1 h- H if lan=1 then
6 T2 d @1 e$ k' L0 u5 q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 O) @; u1 Q! t. Y/ C' \$ R- @
to_str("in der Andockstation: \"",?.~.name,"\""));
3 ^* U# `8 v5 z4 s- h else
. W0 h3 |0 E3 V* N* T promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& \2 W" q3 R0 u2 b2 E' z) e
to_str("in docking station: \"",?.~.name,"\"")); 7 Y$ f, V5 y& y+ P
end;
( u. Z/ ?" D( X+ h3 i4 n; [ else3 ~9 a$ W. p9 v- W3 Z* a. ~# u
@.Destination := assignLObj[1,row];# `% i) G2 c! e# p
end;
( e! I2 ~# B9 Z) w. O newDirection(@);
[: }. Y# r, M @.HasOrder := true;
, H( O1 z" i- e6 A end;% t+ L" R3 n% y B" W
end;, n2 `! @# p* @. g+ c; S; X- D" ?
end; -- of the method5 B- D+ x5 @1 M% D
|