/* called by: entrance ctrl of the object 'track'
: ]4 V: s8 F9 V6 p% w8 h: \*/ k, x: V0 X- W
is
" D3 `& a1 g$ @0 X part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& e- A1 z% @( ndo$ k4 X' ]3 E3 j1 S) [" X4 X
Lan := rootfolder.Internal.Tools.AOLlanguage;% h1 d# y( @; ?' q
if current = @.Destination -- else return
- l# C) v$ Z( ]4 E then& v, P7 `0 W: a8 @1 i- m
@.Destination := void;. b' z0 P( g, N( ~1 r
if @.occupied then7 Y7 h0 ~' m: J7 [& |
part := @.cont;1 Q! W! d1 z) b8 H+ E
@.transpOrder := void;' W8 ~0 G& o( t
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: y# F5 h/ y: C M @,root.eventcontroller.simTime);
0 E/ d: D- I/ e0 V; ] b @.HasOrder := false;8 ]% f4 s7 b% \5 n4 v
@.DrivingHome := true;
! k. w, N# F+ S# _5 E rgManager.tryToStartTransOrder;/ p3 z0 c" m# r9 V; g
if @.Destination = void( H9 ?1 X- M) _5 N7 J5 Z
then -- no transport order for vehicle @9 r. l' M+ R5 r8 D9 S) k) V7 ]! O
@.Destination :=
6 z) M" r: \4 W( M1 c0 X' ? rgManager.nearestFreeStation(@,track.~);) \, ]5 ~3 b4 ^: n5 ]$ \4 B1 _1 p
newDirection(@); % k+ @, ]8 f* o7 X1 N
if @.Destination /= void then
$ Y @! _% R2 k4 v! o9 P @.Destination.NumReservation :=
9 W; j; J. @# }' c @.Destination.NumReservation + 1;; v ? O) u" P. s0 R4 D5 ]: O H
end;8 R% C5 x7 _1 Z# }+ L
@.CurrIcon := "drivingHome";, |0 N; q, ]( U4 V1 x8 ~
@.DrivingHome := true; ^7 h* ?* w+ l
end;$ Q7 [% M3 |6 ^+ C V: w$ z" F: ?
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- u+ q. v1 ` k( o$ E part := @.transpOrder;
# r% M2 j8 ^; ?, T; B# J$ [" z; i! u part.move(@);-- load part
) R; U+ f1 [9 ]: S, P2 T @.CurrIcon := "load";( ^' F! ^* [ K- s: t. _2 O0 J" n
GlobalDistObj := part.globDestination;+ [( w+ I7 c, y# @: U B
assignLObj := rgmanager.rgAssignL;
9 M e" y) \- S row := assignLObj.getRowNo(GlobalDistObj);
$ ]" M6 j' O, H if Row = -1 then -- since 70
/ }/ O# U' O# M* o0 T% e if lan=1 then
% Z1 b; h# u+ g& d) l8 w& U- A% Y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," H% ?. j- H8 t& x7 [+ G+ Z
to_str("in der Andockstation: \"",?.~.name,"\""));) T1 Z6 P* D9 s. g" Z8 G/ _1 S$ f
else$ X" {3 i/ [& g; H
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 o: k: d+ T7 F* N to_str("in docking station: \"",?.~.name,"\"")); ' Z% {1 I. \8 p/ ~/ y' p
end;3 Z/ O6 x m4 M# Z; X/ i
else" ~# _* u5 {0 z# ^) p
@.Destination := assignLObj[1,row];
7 p; L) T0 r1 ?+ ] end; 8 a6 R4 V/ a- M0 P
newDirection(@);1 C- y* d) C" h7 A8 l
@.HasOrder := true;5 x8 w3 a' |' U0 c; A
end;8 R- ?; i! w6 e' ^
end;
! I2 s0 q8 V4 t* \ \" v% Mend; -- of the method
. M2 }5 B0 O8 A. M% h. q( t/ l |