/* called by: entrance ctrl of the object 'track'
' z% f# A% P+ j$ H$ |( g0 Y*/' c b( e6 [+ j% y! d9 D" C, Z
is
0 w" b8 d& w: W8 f part, GlobalDistObj, assignLObj:object;row,Lan:integer;& b. B% J" J) g7 S
do
2 k2 v! P* k( J; ~ Lan := rootfolder.Internal.Tools.AOLlanguage;
4 ^) n. k1 y. O* B if current = @.Destination -- else return: Y" f8 `8 s% a7 h& X5 [! i) S" L
then
$ M4 @) }( S3 J, r, U$ V4 e @.Destination := void;
! l+ f6 {" C( }/ T' i if @.occupied then
+ | c7 o, K4 K* T* T part := @.cont;
/ B+ C/ W, a' j6 B @.transpOrder := void;: j5 m8 I! n- k# q4 T9 m) K
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: s% w5 ~2 a- m2 {* \$ \% d) D @,root.eventcontroller.simTime);7 k& {- Z8 F$ ^6 d8 t
@.HasOrder := false;; }6 W Y6 W, c, g/ H
@.DrivingHome := true;* \8 h( B) h; W
rgManager.tryToStartTransOrder;& b, @% F8 S2 G8 C: k) s4 l
if @.Destination = void3 @+ Y5 {2 @& A
then -- no transport order for vehicle @
$ {- n5 @- G' q t% ` @.Destination :=
: Y9 [ h$ a' Q' v rgManager.nearestFreeStation(@,track.~);% |8 t$ c! v* M/ ^$ u0 ?3 Y
newDirection(@);
9 h) T v' D2 R9 @+ v# M5 c if @.Destination /= void then& t! k! a5 a, W; ]. \1 H
@.Destination.NumReservation :=' k5 W8 T3 q$ ]9 l* ~
@.Destination.NumReservation + 1;7 I1 M( f+ c) ?: w
end;
! E2 D' g& @$ M4 c* w$ a- d @.CurrIcon := "drivingHome";& v5 a/ v; j+ I# e7 i$ W
@.DrivingHome := true;
* p% S% N" y- @; Q& S end;+ t( K# _- {1 s; h
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 m& ^ i8 e& z: }7 B' B) {5 k part := @.transpOrder;
+ b1 P' D, t# p% h+ X o part.move(@);-- load part
! } o) ^& u6 b+ ~/ J @.CurrIcon := "load";3 i1 F( A- F4 i5 a
GlobalDistObj := part.globDestination;
3 X8 u+ P, E. y& w U1 n" i! N assignLObj := rgmanager.rgAssignL;
A" `: R9 v1 O3 g$ d row := assignLObj.getRowNo(GlobalDistObj);( b3 D5 G2 k, s) t5 |0 h
if Row = -1 then -- since 70
' b( u6 \9 K& {& }: }3 Y if lan=1 then
6 D) Z F0 m- |6 X4 w promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 _( j9 N2 R- j
to_str("in der Andockstation: \"",?.~.name,"\""));
1 p# h! ^8 S9 g else3 d) |2 U" i) n; j$ ^
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. Y' a) g# b) ]# M. T! H2 k to_str("in docking station: \"",?.~.name,"\"")); 3 f" B; B! V! w0 W3 R9 h
end;
" w- w+ C- F# ^! t2 X else
, i4 @6 {+ y0 j! { @.Destination := assignLObj[1,row];- H5 B. `/ s9 p. `. `$ U* Q0 r
end; ! S$ `4 q; c. j; y
newDirection(@);
" X& E- @/ A& i @.HasOrder := true;
" Q2 @; R/ c' J+ F; K end;9 c# `' Z6 ^* ~ T
end;
/ {& O+ c9 n! F+ F: J$ g8 {end; -- of the method
$ F- J' n- ~! b0 a |