/* called by: entrance ctrl of the object 'track'; n' P2 w N/ b, q, }5 F
*/0 D2 r6 {! e7 m: G: | t3 j4 v
is( e% l( f; s2 o) d
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' S8 `+ @) T2 E( u0 F1 gdo+ t# U; c, D5 o) J! B
Lan := rootfolder.Internal.Tools.AOLlanguage;* Q1 w8 c1 c5 I+ w
if current = @.Destination -- else return
4 V+ u, Y: l$ a, z0 O! O8 {! B% N then
: j8 {6 j/ S5 n8 c @.Destination := void;
- X- a8 w) y+ f( i& d, C if @.occupied then- a$ W. h t: x# J; A
part := @.cont;
3 v- P' G7 R% z* G$ h @.transpOrder := void;7 p% ?, m6 v7 q# d5 l% h
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 D y* y7 u( w2 `: C3 m8 M
@,root.eventcontroller.simTime);
: L- D5 @, a5 Y2 a) P3 z4 x7 L4 [ @.HasOrder := false; r7 ^& S5 B, _, ?. a4 F7 [
@.DrivingHome := true;6 ^' U3 G& H3 D
rgManager.tryToStartTransOrder;
- l2 Z' X, i p5 N( Z/ h if @.Destination = void/ t+ m8 M3 q- @) U- w/ y! _
then -- no transport order for vehicle @
; {) \0 J3 c; s5 l; U- p @.Destination :=
6 C4 |3 p) _( I4 c rgManager.nearestFreeStation(@,track.~);' s0 @4 N- w6 X8 `9 q
newDirection(@); 8 X$ @& T1 q; L( M
if @.Destination /= void then$ C% h2 H% A4 k- ~; s1 N% L. p
@.Destination.NumReservation :=0 I/ B) Q+ W' E# H, C" X# I: I
@.Destination.NumReservation + 1; j$ h& R/ a" W8 G: Z/ T( s5 E
end;% a9 n1 a9 ^. ?0 H |% M
@.CurrIcon := "drivingHome";
B4 U0 \' h& @+ w ` @.DrivingHome := true;1 s. v: z2 N5 c; x C# ~. p1 |
end;( C2 W. g" Q. r3 s
else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 v! g( V. N) ? z' C2 N! z
part := @.transpOrder;
. J, J5 a+ D7 [/ S Z part.move(@);-- load part
9 y1 Q; X) e* J# @8 s9 P2 H( z @.CurrIcon := "load";* ?: R+ A* z3 \* x! F) L" |2 v
GlobalDistObj := part.globDestination;9 o$ s# F0 b/ x( A2 ~0 t
assignLObj := rgmanager.rgAssignL;
$ [" X' R1 ~( N' W8 z- o( J$ S j row := assignLObj.getRowNo(GlobalDistObj);
: D+ C5 W$ {8 e- l if Row = -1 then -- since 70
7 {/ x1 _8 V9 Z8 h3 | if lan=1 then
& P2 X5 Z8 J6 z# k! K# \# E promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# s$ z8 }# t, r7 J; z; K4 l! M to_str("in der Andockstation: \"",?.~.name,"\""));! D) W! X- A' L) l
else
! ]% Q2 s3 \9 A/ L; V7 c promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 Z Q( {/ [8 p h to_str("in docking station: \"",?.~.name,"\"")); 8 k3 l \2 G' Z. B8 O/ o
end;
2 Y' L( k6 B r# M1 P else
1 }& g' Q: U& K) W @.Destination := assignLObj[1,row];
' _0 y- K1 d4 ^ end;
0 L% p# e9 Y# B newDirection(@);9 W7 ]; ^1 x a$ p* T" ~! W
@.HasOrder := true;
. J l2 j$ _. @* r; G( c( s end;$ u+ f& p3 Q& ], x
end;
" A4 w3 @3 q* Y7 qend; -- of the method
% q5 X9 F8 v" e+ N% A |