/* called by: entrance ctrl of the object 'track'. u! S: `: K7 B& {8 m2 a
*/ a8 h' M; `8 B3 c( B: P& e- i
is
# {; w7 h, t/ }8 b8 Q6 | part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* c1 K+ q2 h* vdo
6 l6 [1 g0 d- k+ x Lan := rootfolder.Internal.Tools.AOLlanguage;
+ B6 }3 r, |6 j `( _) I* l if current = @.Destination -- else return) E: U7 }- N4 S* [' }, _2 ]# q
then1 E3 V9 p5 l( [3 D! F: p) O! G8 s
@.Destination := void;
! K2 D6 o2 U+ {! j0 q4 Z( | if @.occupied then
! e4 } b# _( W. a, P0 }' L' x part := @.cont;
0 ^3 y+ W; X5 m3 ^ @.transpOrder := void;
) K& z, |& _8 j5 R2 O2 D; d: m part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. T( S7 l" p) k* ]+ g2 ^# @# j+ V
@,root.eventcontroller.simTime);* l+ o3 d- _9 d- X* s0 B) S/ S
@.HasOrder := false;2 _ U" I# b6 c1 _9 r
@.DrivingHome := true;5 U' H5 k, U* I% H3 o# y S
rgManager.tryToStartTransOrder;& \$ }2 N4 ]1 E& m5 Y& o
if @.Destination = void: h' k' R0 z t3 k
then -- no transport order for vehicle @* y8 G! _$ y9 e6 O% X' o! l2 T
@.Destination :=; ~! H$ }4 m* `* Y7 n/ \
rgManager.nearestFreeStation(@,track.~);9 d! x- T. N& ~$ t, [0 d( t
newDirection(@); 1 N$ c' t2 I; l
if @.Destination /= void then2 X9 g# \: \2 y4 b7 G( e
@.Destination.NumReservation :=
X6 o' L! y) h @.Destination.NumReservation + 1;
% {: b( L& l' _5 f2 N$ R end;
a9 U$ o! P8 Z, z& X @.CurrIcon := "drivingHome"; F( G. ^- J: Q3 o7 Q
@.DrivingHome := true;# u# M# f" E1 b& l3 v
end;. H! ?% C! \: B+ z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station- [5 G8 X/ @8 v6 F- J' f
part := @.transpOrder;
) R4 r2 C, r3 H% l" x. ^ part.move(@);-- load part I% b* p! U+ K; }$ n
@.CurrIcon := "load"; O; C( K! k& e2 h
GlobalDistObj := part.globDestination;7 Q4 D0 U s7 } @* f2 |$ [/ j
assignLObj := rgmanager.rgAssignL;1 d+ W. |$ f4 V: M2 R, `" c
row := assignLObj.getRowNo(GlobalDistObj);
7 F, w+ V: x Q \ if Row = -1 then -- since 70% c6 K- N8 M2 d5 a! s
if lan=1 then
/ k: s2 H+ m: i- L7 Z- j4 I promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 o# i' H) C5 A* o3 i8 L to_str("in der Andockstation: \"",?.~.name,"\""));; n$ N0 r. v: S7 s% T% o1 K! n; P
else
' g3 _! }" U% L+ h" X promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ d6 a' j! n" C H B9 e to_str("in docking station: \"",?.~.name,"\"")); : q4 E( o8 @6 O' R9 `8 Q# I
end;
3 Y. p* R& b9 }; Q. P7 p) ^$ L9 e else
0 l1 S4 F6 A! p0 F @.Destination := assignLObj[1,row];% U2 K- Z* V' `0 V/ C% z
end;
, W M& n0 i4 G9 H1 m5 j V* I newDirection(@);# U' j+ I7 o) q5 A3 x$ q
@.HasOrder := true;8 ^+ t& v5 ^8 H
end;
' n- {; m+ t! C end;
$ O% i+ N6 _+ U- W p9 qend; -- of the method T: ~& T, n; N* G
|