/* called by: entrance ctrl of the object 'track'3 {9 W' u( h1 o; n$ C
*/
( V4 C+ g% W& }1 b+ S- G, K |. bis4 R6 _# m5 i& {0 l; u
part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 e! e, [! M1 v+ ~ B; g* s" Z
do
. G0 H5 O2 }- N Lan := rootfolder.Internal.Tools.AOLlanguage;: P& c% h' E+ \. e. x1 o' X7 z, N
if current = @.Destination -- else return
3 E, Y, ~/ Y- ^. V! L then
2 g) r& r# u3 N2 U" ^5 E @.Destination := void; E' W1 b! x$ d8 |' ]/ W+ \
if @.occupied then
( |9 S3 }$ h1 N) ] part := @.cont;
: ^3 i: A! g! F6 b @.transpOrder := void;7 \8 {* s9 c8 w. a2 F: P1 t
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 m b0 ]/ f. N D5 _& Q
@,root.eventcontroller.simTime);6 D( w* X+ y( `# u- H, i5 [
@.HasOrder := false;
7 `- d9 @7 d) Z/ S4 K0 t @.DrivingHome := true;5 B6 \1 t' D$ z$ T) T7 k$ i$ g d4 O
rgManager.tryToStartTransOrder;
. d4 G! Z8 u, g* @% a if @.Destination = void
$ x5 O! u( x$ |0 y then -- no transport order for vehicle @
- G2 z9 m }& H% ^1 Y @.Destination :=
- o6 e" y2 h$ p$ S4 _/ h2 \ rgManager.nearestFreeStation(@,track.~);
! E+ W2 T' [3 k* s newDirection(@); ' X( B6 u! o8 q7 q& Y/ `& ~: |
if @.Destination /= void then
6 D3 | {6 L) g; Q @.Destination.NumReservation :=
% B. o7 v6 k* u* f+ Z9 e! b @.Destination.NumReservation + 1;% U% i* B, S7 x0 }6 _; ~
end;
( F! j/ y# G+ t5 S/ ]; g @.CurrIcon := "drivingHome";1 a) S/ U" k% w( }+ G: U6 M
@.DrivingHome := true;3 H+ ]( o+ ~) Y# I B
end;
1 S% O$ W) p& n else -- the vehicle @ is empty, both vehicle and part are in the same dock station: N7 X/ }1 k: Q/ R' B
part := @.transpOrder;' y/ s9 Q& g6 ~5 b
part.move(@);-- load part
# m: @) n+ _% E, A L( O, A! H @.CurrIcon := "load";; U: F/ x7 o' f' T
GlobalDistObj := part.globDestination;1 A& \. e4 i9 K( u, V
assignLObj := rgmanager.rgAssignL;: T/ e2 T6 t9 k/ I* W% Y* o
row := assignLObj.getRowNo(GlobalDistObj);
9 U* ]7 N' P1 [" E ^ if Row = -1 then -- since 70" N( `& ~1 @, W1 N9 {1 x x
if lan=1 then
( Y8 ~8 X( e3 p6 Z3 c2 G) f- p promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( M7 R: J! L- s1 i
to_str("in der Andockstation: \"",?.~.name,"\""));
" c, b1 |* K( i. _2 N, E! e else
; F/ R9 m; w' G5 {/ T8 w+ n* J promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ [+ v$ B c3 I* s/ ~
to_str("in docking station: \"",?.~.name,"\"")); # u+ h& o& [& ^, i4 A
end;6 H) V# A4 k9 J2 v- W. f8 K
else
0 o9 `9 t: c2 e @.Destination := assignLObj[1,row];% ], w) t& A7 l9 Z. y3 V
end; , I) U' s& T. ]* b$ [9 d, L
newDirection(@);
4 l: w+ G$ r" M% m5 s1 U9 W @.HasOrder := true;0 P( i3 F( |! N3 M2 [5 o% \
end;& t; Q; O3 q1 _# c
end;
7 a8 Z/ r- P8 n4 K/ H4 W4 K8 dend; -- of the method P) S: ~ r4 B C; _
|