/* called by: entrance ctrl of the object 'track'
& K8 V9 e0 u0 @6 w5 Z/ x/ I6 l6 i2 y*/
8 n; H/ S$ }2 l, g1 Bis
% c- o2 ]' K4 A! s part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 l* g8 f- u$ C. O6 @) G8 x
do' e. r0 l; p6 o8 C9 P" Q' b' a
Lan := rootfolder.Internal.Tools.AOLlanguage;, Y3 I3 ~6 x# o& o/ |1 M
if current = @.Destination -- else return
' p' O6 [; E! c4 m- H1 s! a9 o then
+ M2 s& ]1 u, |/ e" m& k @.Destination := void;) b( |7 g4 C. O6 l# q+ j. E% _% t( y
if @.occupied then) t U! f/ L U
part := @.cont;* b% B9 H5 t, H) K4 H+ j7 ^% ?- `: J
@.transpOrder := void;% M0 v9 O6 H3 V
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% ]4 H! e8 |, w6 x
@,root.eventcontroller.simTime);
0 h5 {) N/ u# f6 D- W @.HasOrder := false;
" j R1 M* Q0 Q5 C @.DrivingHome := true;
' R$ s! J% X1 |# | rgManager.tryToStartTransOrder;
! |; L6 s. {, V, J if @.Destination = void
! H4 D5 i8 n4 U9 t: ` then -- no transport order for vehicle @! p5 O$ k. ?. f/ Y% h1 |
@.Destination :=7 x& h4 b$ W& u- @% P l! Z
rgManager.nearestFreeStation(@,track.~);* e. [: N- L8 s8 R5 d7 K0 G! [
newDirection(@); / Z* V* h; T$ }7 f& b7 a) ?
if @.Destination /= void then
1 X7 Y$ h" `8 X# S' o$ s5 V; w @.Destination.NumReservation :=) j) d5 A7 ~1 H* X: h, |- b
@.Destination.NumReservation + 1;8 v5 k4 v C/ F7 {; x6 e% v4 n
end;& p4 z/ _1 u1 R4 [- E S
@.CurrIcon := "drivingHome";; i; O4 v- z# N0 F) U) X, h. I
@.DrivingHome := true;/ f1 d; f: ^1 n
end;% n6 I/ B- l$ S! r- P: d3 l) t
else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 t: N; J! h. c# x/ r+ R& n
part := @.transpOrder;5 E; X/ {% X3 d, H! N/ q
part.move(@);-- load part) ]3 u" T) q }/ f6 |& p. _
@.CurrIcon := "load";
; Y6 H$ n) k, U# J( \, e/ f) L GlobalDistObj := part.globDestination; \! P$ \0 F1 ^0 J. X) D
assignLObj := rgmanager.rgAssignL;
- E6 a5 {" d+ m. k, i+ u, S$ I row := assignLObj.getRowNo(GlobalDistObj);
# ^: h# d+ I4 U0 ] if Row = -1 then -- since 70) y+ b3 B$ @& w! ?% R3 A
if lan=1 then
4 W+ X7 j- p o# O promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 a* P. @! u( D% L% ]* j" } to_str("in der Andockstation: \"",?.~.name,"\""));
# t) ^/ W" F6 H. W else
. \8 F0 e: W3 Q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 Q, o$ @* T e$ c4 a9 c
to_str("in docking station: \"",?.~.name,"\"")); # L+ i+ x6 q. |& v r& p
end;
* Q+ U! G4 F8 o# f else
, y( T& ^' L3 T% Y+ n+ v# W. g @.Destination := assignLObj[1,row];
u3 _+ Z" R8 q- Q end; % G8 s. ^& B' z$ w: e% i
newDirection(@);
& x* d* A0 _4 d- j @.HasOrder := true;
1 _1 S4 s7 m6 ` C. B end;% f) X* Y, U! v5 C( a! S! g
end;$ Y% x3 I V* x5 A3 F
end; -- of the method# C1 j8 M4 _! X: P# t3 S( i
|