/* called by: entrance ctrl of the object 'track'
' j. p9 O1 Z$ ?4 b/ n0 l# @*/
9 E. u6 r5 `' g) V6 \" ?# j3 i: mis5 _6 O( z, E9 C7 d5 O4 _
part, GlobalDistObj, assignLObj:object;row,Lan:integer;, F1 f5 f0 A" h* D/ k" E; d
do
c5 V) ]# T W" r( l Lan := rootfolder.Internal.Tools.AOLlanguage;2 V" l# x# m6 ]0 R! Z
if current = @.Destination -- else return
# `3 J+ l* T' W; G& {2 k8 \9 D; b then/ D" [; m, x2 E& V
@.Destination := void;) D9 U0 t; D1 u7 G5 N. ^
if @.occupied then
" W9 r, H+ {- ~8 K d part := @.cont;
, ^: S7 X# i- l @.transpOrder := void;( D- I) c" o( S# `3 n z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," r( }, i4 X% n: I% z7 h
@,root.eventcontroller.simTime);! Q u" y; Y6 M- A
@.HasOrder := false;- n a5 i/ w5 @ v
@.DrivingHome := true;
6 M! Y- A( \! Q* ^8 l# i) O @5 w3 h rgManager.tryToStartTransOrder;! Y' [* p6 |2 W! f8 L+ h
if @.Destination = void
( t8 H# h& w2 {1 E7 K" n* w7 i: p( ~ then -- no transport order for vehicle @
2 \% o& Z, @' w# o* i @.Destination :=
% ?' q' N; U# r" v6 u rgManager.nearestFreeStation(@,track.~);# ^4 [4 R* @( x, J
newDirection(@); + X( P8 |& R5 L+ ^( F0 _
if @.Destination /= void then( V; _* z3 n/ `) J" a
@.Destination.NumReservation :=
0 @, x; n/ m! G) q/ E @.Destination.NumReservation + 1;4 D$ o; o2 i/ ]! ?, s6 t
end;) Y q$ U8 M$ E$ L, w
@.CurrIcon := "drivingHome";1 w; P: H i! d- ?3 j0 q" [; f
@.DrivingHome := true;9 x9 I, I- U* v& v3 q
end;
$ _& ]! t' o- j* s) l else -- the vehicle @ is empty, both vehicle and part are in the same dock station# K9 O0 `8 m% W; { W5 D
part := @.transpOrder;# B/ |3 c/ E% V+ ?
part.move(@);-- load part
) O! |4 l0 L- h$ ^- T4 e2 G @.CurrIcon := "load";
( G. N; s% _+ }8 |' l- ^9 G* b% [ GlobalDistObj := part.globDestination;
2 p9 [9 B; Q$ {; X8 } assignLObj := rgmanager.rgAssignL;0 X. U! z1 @5 n9 k2 N$ G2 U$ z
row := assignLObj.getRowNo(GlobalDistObj);' r. n( H+ ]6 z! K) I0 h
if Row = -1 then -- since 70
_; k7 j. p0 C8 t. Z* _ if lan=1 then2 w, Z$ c; B. S5 i0 C" e; L: N4 Z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 N+ [' r6 d9 D3 X/ {/ F- a/ {
to_str("in der Andockstation: \"",?.~.name,"\""));
) X0 D) ?, @6 x: m0 U7 o else
% T( S6 j+ E8 q# [) L7 `5 i' p promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 d L3 ~- c7 {7 v. g4 `# @! h: R0 m
to_str("in docking station: \"",?.~.name,"\""));
& ~- s1 O3 B+ a3 d* M' n end;
2 m' }# o3 Z! c9 M$ G! _ else
! x, j8 g% M5 R, { @.Destination := assignLObj[1,row];
" N% Q: B+ u8 a( f1 v$ F end; 6 K/ x7 s5 W- B2 A
newDirection(@);8 e9 D& [4 n3 R8 o6 z, N
@.HasOrder := true;& d7 ~5 Z$ u- a3 i
end;! ~$ I8 H$ P- t7 m
end;
: i$ X# H# B8 o3 m) H- n: b5 Aend; -- of the method
! T* F' F/ b' l% r! I |