/* called by: entrance ctrl of the object 'track'
( a. }# _4 U# P" [; p*/0 E" @3 Z) r8 ?: z: A9 s) O
is8 I6 Z( S P# z+ T
part, GlobalDistObj, assignLObj:object;row,Lan:integer;, s/ z8 ^3 g6 T, D+ b) N
do
) \5 J g' f. ~# s Lan := rootfolder.Internal.Tools.AOLlanguage;3 A% H, R, m" G' t
if current = @.Destination -- else return
" E6 S! [% q+ m! h0 _3 p0 e then, E4 f5 ^7 H" g9 r1 o
@.Destination := void;
# I' \9 b# k# R8 b4 Y2 v! ^5 O2 S% [1 b if @.occupied then2 y% V9 w1 ?: A2 {
part := @.cont;
: @' d$ y. [/ A7 f, X- Q4 b @.transpOrder := void;# [; S5 E7 s7 ]8 b
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 A7 F. l! w0 E2 m" e3 W @,root.eventcontroller.simTime);
, n4 [7 n2 j" p @.HasOrder := false;& [2 B# k( R1 L: D" g
@.DrivingHome := true;
, q. @ V2 E, @9 e- B rgManager.tryToStartTransOrder;, G- r; }) V8 p, m, d/ {5 H
if @.Destination = void
8 [7 c3 v# Z6 {3 G' J# q8 _ then -- no transport order for vehicle @
; V2 y* i5 H5 V8 F) W @.Destination :=4 V5 E# h4 C- q" l& l
rgManager.nearestFreeStation(@,track.~);
0 M: N! g2 c9 r$ G3 t: c# t newDirection(@);
8 D$ ?5 W% K$ C2 Y, J; e* o {! w if @.Destination /= void then
, Q% @* g( J/ }8 D7 @ @.Destination.NumReservation :=
: a6 H% d( c: W' u ~& C @.Destination.NumReservation + 1;1 w7 ^. p2 b& |" p/ w7 K
end;
3 X, y* l x! G6 o/ D9 t @.CurrIcon := "drivingHome";
% u. [+ X4 ?, |: K# n9 D @.DrivingHome := true;
8 S x: h' ]& w9 N' G1 W end;
4 ?8 }' j! y$ b4 |+ T2 o* G' |1 i else -- the vehicle @ is empty, both vehicle and part are in the same dock station. N9 }0 I2 E( z' f: p% y& c
part := @.transpOrder;
* n G' b0 a0 z# @, B/ B part.move(@);-- load part
1 a) X+ D# _3 K1 g8 {1 {6 L @.CurrIcon := "load";
5 b, ]4 y4 t" Z, q GlobalDistObj := part.globDestination;
; [7 {) F$ J! ^1 M assignLObj := rgmanager.rgAssignL;; `: p/ w5 o5 k, G F* }5 @
row := assignLObj.getRowNo(GlobalDistObj);7 N2 R/ L( L) x7 s/ \& d
if Row = -1 then -- since 70
1 ^9 a3 X L* q! }+ h, {- k/ ~ if lan=1 then, Z' B) N! K/ ^" Y" x
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- @! G( S* k( `! x to_str("in der Andockstation: \"",?.~.name,"\""));
: M# w- n' B9 |9 s! ~ else$ \7 z5 _- n/ G" A
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ O3 i$ ^: |. ^
to_str("in docking station: \"",?.~.name,"\"")); 7 L7 @5 }' N: j4 Q' c9 M0 r0 B
end;2 V- l' G) I' N- F
else
& F3 `! N6 v9 p6 W3 q @.Destination := assignLObj[1,row];
7 ?6 I# K/ s! D$ r2 ^$ w0 F4 ]8 W end; * r* D$ h/ d7 d4 O" Q7 }( z
newDirection(@);
5 |1 i) R9 V! M/ m, Y ~3 U @.HasOrder := true;
' x# P# O ?" j6 {( m9 @0 x2 [ end;
0 q/ p _) H& J' n+ @8 f$ A* z- z end;
5 ^% m1 K" o2 g& Qend; -- of the method$ J$ i! K( _$ K" f0 u2 G! w6 P
|