/* called by: entrance ctrl of the object 'track'& h" c; Y2 @, A y7 w4 @$ ?
*/" V2 K0 h7 h: Z3 Y
is
& S! f, j* f2 V. u* `6 z part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 [/ d8 ~( Z6 Edo
: U( G6 Z% v: j) G. j( X+ r, O Lan := rootfolder.Internal.Tools.AOLlanguage;- R$ T" _; h" p9 O9 X
if current = @.Destination -- else return
4 q1 T3 H& O, ]- D! Q then
% x3 T+ J/ O2 ` @.Destination := void;
+ y3 _% w! t) g+ R if @.occupied then+ h7 d- l$ l" l) A, v* m
part := @.cont; a6 e1 G! L: G
@.transpOrder := void;- V+ w2 y# o5 p0 b* u! Q- S! U
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: L/ ]3 p7 v- M/ i0 R @,root.eventcontroller.simTime);
; R! f$ B% q$ B8 P6 i @.HasOrder := false;
, p# N( P. b, h7 N. L* ^+ }& Q( o @.DrivingHome := true;8 k$ n. f, I' g+ u
rgManager.tryToStartTransOrder;
8 S( W g7 K; ` if @.Destination = void( u# M9 ]% X; i: t* @2 P
then -- no transport order for vehicle @
* q) w4 K ?, l; ]/ {) x- t @.Destination :=
6 ^( F- l& L4 Q( l rgManager.nearestFreeStation(@,track.~);
- N% A p; k3 ?/ s% e4 `" V0 [# S newDirection(@);
: k# F4 n+ j4 {1 S8 _$ o0 y6 [4 h' J if @.Destination /= void then; M; U; O6 Q6 O, X
@.Destination.NumReservation :=9 T* O4 \5 U+ c) m( g
@.Destination.NumReservation + 1;; W1 D% c6 L$ ^2 |- I
end;/ Q8 z$ }, @- v4 F! D' \. M: r
@.CurrIcon := "drivingHome";! X0 ^. i5 X" d8 k- r
@.DrivingHome := true;
$ B- ?+ u! d3 N" @% m" \ end;
, _9 S0 x6 h; I else -- the vehicle @ is empty, both vehicle and part are in the same dock station; c; y' q6 d5 [& }
part := @.transpOrder;/ c* O5 }& b1 Y- _+ O8 ~
part.move(@);-- load part# t( E8 V2 d$ p2 Y1 Y, K9 B" ^
@.CurrIcon := "load";' C4 K! S D; m
GlobalDistObj := part.globDestination;
! k7 R+ s! v5 ~( x0 r) b1 B+ j assignLObj := rgmanager.rgAssignL;
) Z" t6 f* e7 P3 l$ b# l row := assignLObj.getRowNo(GlobalDistObj);+ _# n9 c$ d7 D: ^4 m* R
if Row = -1 then -- since 70
' l; t. G1 }; W# r& h d% \0 k if lan=1 then
# x; v, g$ X, I' }( X; ^ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& @! g k2 b c; a3 c- g( [! k
to_str("in der Andockstation: \"",?.~.name,"\""));+ p* V6 `" {/ T% s# \3 @
else( I! v" a! |/ \ o
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 g& A2 ]* | s S- w* | to_str("in docking station: \"",?.~.name,"\""));
( G' v5 q) g: n4 H) D end;+ c" p$ ^; s/ e, |! G' v
else) _* V! z4 p- B
@.Destination := assignLObj[1,row];5 j1 d1 ~- S, x n; |
end; 2 F8 [# t$ @( n6 n7 u
newDirection(@);
4 G8 |& r+ E( n5 A5 L @.HasOrder := true;
& I; y2 P9 D/ }$ c0 I: y2 S end;& H' @& ~1 D% v( S
end;
h! f5 n: y# G3 bend; -- of the method3 n; k1 G5 C% m8 m- Z- m$ s+ S
|