/* called by: entrance ctrl of the object 'track'. A7 q/ ~( g/ M- J# u9 h
*/) _" v# }% [1 N% u
is
" q7 m* ~9 m+ v% h, J1 c p part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) E3 `7 T8 V: J* B+ D# Tdo
! I1 r9 P# o; H+ i6 ^8 V Lan := rootfolder.Internal.Tools.AOLlanguage;
0 t8 w9 i. M4 k# l' C8 m. T2 v if current = @.Destination -- else return
) M- ^( l, Q- s: C" O2 ~' \ V3 S then, }' V1 j4 z$ Y9 p) @* ]$ B) ]0 V
@.Destination := void;% ]0 l2 x/ E" G* S6 a
if @.occupied then) T! Z+ P" [; M& {) G- K7 @) T
part := @.cont;5 k* j' q& I+ f7 A5 C8 ?- a9 i" o
@.transpOrder := void;4 E$ b& y8 y$ g+ u8 \
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 [( P7 W% c( X: q7 z @,root.eventcontroller.simTime);& j( ^. ~" W6 t @' W4 U# a
@.HasOrder := false;
# d) p U* F8 p) w" J, f" | @.DrivingHome := true;
8 ~( t+ B8 C, P( y, o" ? rgManager.tryToStartTransOrder;
6 q7 K5 s. I1 \' Q if @.Destination = void
. i' `* s& D2 Y& g1 ?5 m: h- Q8 ~ then -- no transport order for vehicle @
! \! L# |% o6 @) c' F% V @.Destination :=' U6 M% W* O x4 v! h' r4 U: T
rgManager.nearestFreeStation(@,track.~);
1 }- R7 \; \5 E* Y2 k, @ newDirection(@);
5 g) V4 A. T1 m8 a if @.Destination /= void then: E% O( P( V4 @2 o7 H- ~: J# x
@.Destination.NumReservation :=
2 Z0 C M4 b' _. t7 S5 Y @.Destination.NumReservation + 1;) x1 }6 i' ^5 |
end;
/ S$ o% C, o- a @.CurrIcon := "drivingHome";
: U! D z T4 X$ H' w. J @.DrivingHome := true;7 e6 r6 L. o, z$ c
end;* E/ v" s7 {# d2 _
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 @. U! v8 O4 N W part := @.transpOrder;
8 `* Z! H+ c$ U9 D1 V! M part.move(@);-- load part& M8 a7 K: P( O) w: d; C
@.CurrIcon := "load";7 K$ t3 v# j7 p8 y
GlobalDistObj := part.globDestination;
+ E3 w5 M6 a; J/ g3 L assignLObj := rgmanager.rgAssignL;
, a. e+ X$ W+ ^* Z row := assignLObj.getRowNo(GlobalDistObj);5 a( G5 U6 h P. U8 H) B
if Row = -1 then -- since 705 \9 S1 k/ g2 k) T
if lan=1 then. P# x+ |* [* r+ e- j: a
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! c# y4 ~* {& F7 f
to_str("in der Andockstation: \"",?.~.name,"\""));
( ]& c5 |/ [. o( J0 T% Z; m+ a6 T else! x j) Y/ w! P/ J; ]; U3 J6 ?6 O* k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" q5 L8 ~9 z( s$ s to_str("in docking station: \"",?.~.name,"\"")); 2 K" L! L# w( L1 f: R
end;0 v2 I1 E6 N T3 r: G* t
else
7 O) P& }+ s' {9 L1 F @.Destination := assignLObj[1,row];2 m/ W" l1 n" W+ Y( G, q7 u
end;
2 J6 D$ h p2 _) p0 o, F newDirection(@);/ b0 g, s# F9 [/ I$ G. w$ U* Y+ v
@.HasOrder := true;
! Z1 D) f' _1 j" L- |/ Q end;8 z3 J4 i4 p2 F' V9 J
end;
; k5 ^- O. t% G7 D1 jend; -- of the method
" J& c ]7 b+ V5 r% K; ]# x5 q |