/* called by: entrance ctrl of the object 'track'
% K) [; s* G) p9 L- q) Q*/' Z+ K9 @' a9 v) ]& `
is
; z# l5 O9 C, T/ |1 |6 F part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. D! s: }- r- ?do6 H# G0 q2 C% a# Y; k: N [
Lan := rootfolder.Internal.Tools.AOLlanguage;
& l0 ]$ n! |9 r, s# P if current = @.Destination -- else return6 R' }# v' T; E) Z
then; i. F0 o4 W- ?% g# o9 r' _
@.Destination := void;
0 U& {0 |) y) i/ w3 g if @.occupied then0 m0 {6 ~+ \! j# }! `; l3 u" i
part := @.cont;( B, U, x$ a3 ]1 @7 a1 j( y
@.transpOrder := void;8 m: B) U: a, D* m+ R! E) y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 |6 |& y: b; \, e @,root.eventcontroller.simTime);
6 F+ l# e1 h5 u( m @.HasOrder := false;. h8 {- ]) ~" R0 P7 ^
@.DrivingHome := true;
- P6 W0 ~# R6 E3 w7 N! |7 g rgManager.tryToStartTransOrder;
; H( z+ W! i' D/ Z3 U if @.Destination = void
/ c/ E! _8 N: X% X9 @2 E# a- H6 f then -- no transport order for vehicle @
! I& x$ w5 D4 c* }& N2 \0 x @.Destination :=' R# g. Y, B8 E/ D3 L
rgManager.nearestFreeStation(@,track.~);/ R5 z. r9 n! c* I
newDirection(@);
0 w, \8 d7 `3 B8 S if @.Destination /= void then
: `. h) H8 v/ [( x/ Q @.Destination.NumReservation :=
. _) y/ Q! R1 O @.Destination.NumReservation + 1;
; |; G9 `0 y9 k4 f2 [ f end;9 Y" H; s9 e1 K9 E4 i/ O! h' \
@.CurrIcon := "drivingHome";% K" B; j5 E; v8 ]. T; _$ L7 J
@.DrivingHome := true;# e% |- Z! {( ^
end;, r# \. O$ }9 C# g5 A
else -- the vehicle @ is empty, both vehicle and part are in the same dock station& V- h! }# o! t/ ?1 z
part := @.transpOrder;
% @+ ]1 I0 k# g7 Y8 l" P+ X; |6 g) @ part.move(@);-- load part: Q, M, U/ p& m4 H
@.CurrIcon := "load";
( O4 \' U9 [- A" ] GlobalDistObj := part.globDestination;
5 z0 W$ u" u9 r assignLObj := rgmanager.rgAssignL;
# |+ b r3 E- l$ m# j6 X9 b" r1 @" e row := assignLObj.getRowNo(GlobalDistObj);
" n+ ?/ t. ]* M5 i u: ]$ y if Row = -1 then -- since 70
8 _% ~, c) M8 K( _- M$ V! R% A if lan=1 then
( \8 U( l. J! `' _& c1 H promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 `+ [6 d- z3 |+ w* Q
to_str("in der Andockstation: \"",?.~.name,"\""));
: c! \. R- R# x2 M9 {8 |! t else
5 f8 R, `! b! e. L2 I# z; G promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% E4 g* p2 r' A+ l: ^: G to_str("in docking station: \"",?.~.name,"\""));
6 H1 ^0 `$ @/ J& X* q end;6 i: i+ q8 \1 @$ ?
else4 T4 F# \3 M( \% C8 s
@.Destination := assignLObj[1,row];
2 D% l" D9 h( N- {/ v1 n) Q end;
- J- i$ e+ w" \" u newDirection(@);
& f7 _- F0 t0 T' _- E @.HasOrder := true;& L& e# l$ p1 C. t; k" e# A1 |4 R6 ~
end;
- I3 u) ^% m y& y7 B end;
/ E2 c; x6 t. o4 w5 Y4 _' gend; -- of the method
+ L: l0 ~9 o O: Y/ u% Q" V; t |