/* called by: entrance ctrl of the object 'track'
: Z8 u+ W# m) }6 x" J( |*/3 o% N/ q; P& z
is
/ F N, I- h* O4 a part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 }# X! L6 N4 \$ f! z: ]/ P! edo
2 z4 F' O4 A: H" a# e4 i4 W Lan := rootfolder.Internal.Tools.AOLlanguage;
7 f ?+ W! x: A+ k if current = @.Destination -- else return' V4 T0 ?5 ?3 [ y: j g3 R- _
then
& `9 E, C, \2 m! p/ T8 l. m! M @.Destination := void;% w% {$ `+ U- R
if @.occupied then
* z* y- N, p% y5 j. D part := @.cont;
$ ^ r: r3 ]6 F @.transpOrder := void;) N3 F# [7 U8 H
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. ]& v% n5 {; A6 i+ g" I% C6 Z
@,root.eventcontroller.simTime);
. t) l. c1 G8 q) q9 Y0 I @.HasOrder := false;
1 `/ ^5 u3 g) x. M @.DrivingHome := true;# E. g. {* j4 E; Z8 m" o
rgManager.tryToStartTransOrder;
/ k) e2 h7 | d. X4 l! v) ?7 m if @.Destination = void
4 C: @# N( X# N* a then -- no transport order for vehicle @! j/ w3 ~! z/ ~
@.Destination :=
7 H( C4 g7 E: r! |8 k4 z rgManager.nearestFreeStation(@,track.~);
. Y" a& Y G" h, D' \1 } newDirection(@); ; _0 C+ g" Z" \1 c
if @.Destination /= void then
4 F6 p6 f- j% E. M* K @.Destination.NumReservation :=
- g2 m9 i1 g& U! ^ @.Destination.NumReservation + 1;. H( j3 M! e2 M1 ~8 l
end;5 g& w5 S3 T" y+ n
@.CurrIcon := "drivingHome";7 K5 r4 ~5 K4 O+ O. B' _/ q
@.DrivingHome := true;( B$ ^# ^8 a3 g6 f
end;" n. u$ g+ }( @( M3 V4 F
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! Y" ^1 {2 V* J$ M+ @3 D6 r4 Q part := @.transpOrder;
% w3 [& B, a' ]* C# L+ M part.move(@);-- load part) i: ^0 i6 ]6 E7 d& i
@.CurrIcon := "load";
9 `0 ~9 g) s% y, f* `$ o GlobalDistObj := part.globDestination;7 N9 s" Q: [& Y
assignLObj := rgmanager.rgAssignL;4 O* R2 z6 C7 P+ S
row := assignLObj.getRowNo(GlobalDistObj);
4 i+ ^; a4 S8 V* H1 K8 e Z! D if Row = -1 then -- since 70
/ c1 U. J9 t: c if lan=1 then* ]! p; T/ @1 F; |/ V
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 J, V- q7 g4 l. N/ l to_str("in der Andockstation: \"",?.~.name,"\""));
" k! S) R% U- A8 F9 r c else
U3 |6 s8 k% y8 L# z+ j `: S promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 E6 S( n& a. ^: s2 x3 W4 [
to_str("in docking station: \"",?.~.name,"\""));
2 ~- ?3 A% o) J+ j2 t. b4 Q end;8 h3 S$ H$ _6 |$ j4 u
else7 l7 q8 x& o% o/ l J+ J2 f
@.Destination := assignLObj[1,row];
) o) n* f4 M6 j- |0 m; u4 I k4 T end; ! Z4 i( ?) n, O. J* I
newDirection(@);6 B1 e/ i$ u9 F, k6 @
@.HasOrder := true;
% r. `( D1 v6 _5 @/ w; q end;" D3 q7 h* t) q. ~6 T; `/ k, q3 u
end;
/ N* n' o7 @3 N3 Q8 o, [end; -- of the method
) r& p) t4 I. i: p* J- b# E; x |