/* called by: entrance ctrl of the object 'track'
- _. l, l R9 G, u c. z( b*/0 V+ A) [, ~& F: T2 y+ X
is1 q0 G q& f: X5 _* w4 N) q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 M2 u2 q9 W( ]$ Q4 g+ l% fdo
, j% O) ^. e# {" } Lan := rootfolder.Internal.Tools.AOLlanguage;5 j1 H8 |7 U4 q' k6 z& \
if current = @.Destination -- else return
: L* Z& F! U% C3 a" T2 h then
: l& q* p" ]. M6 t- b- W& X @.Destination := void;6 l V: X1 n$ \
if @.occupied then
. G# E/ W2 m+ Y7 C' l/ I part := @.cont; R7 N0 Y: v0 r4 S) V2 f& b
@.transpOrder := void; F3 j. R) n1 }+ ^& |6 S
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; p% S& G, P1 U7 U5 a# B& t4 w$ }
@,root.eventcontroller.simTime);
! [9 b- x+ X; n* V _$ P4 | @.HasOrder := false;
( m6 f8 w1 P) |" ^9 l! ^ @.DrivingHome := true;, Q8 k% I, a6 N% m2 ^& O* f+ U
rgManager.tryToStartTransOrder;
8 F* \3 d0 c4 W) G+ m- k2 p8 N if @.Destination = void
" i9 g4 R5 t4 C* G E' n then -- no transport order for vehicle @: E# F9 B# P4 c% m1 x: f
@.Destination :=
( G. q3 k2 F; s6 N9 K) ^ rgManager.nearestFreeStation(@,track.~);
; B. l+ p, S* _/ ~; O# [ newDirection(@); 7 U! Y) V/ A( [2 N( Q" t) `% }# ]
if @.Destination /= void then# ?5 b3 u- c/ Y4 g) O6 V: _" C
@.Destination.NumReservation :=
- o" k9 ]" P+ ` @.Destination.NumReservation + 1;3 \5 p) r/ ?. j! W
end;
* _/ X1 c% f. v1 w4 K! v @.CurrIcon := "drivingHome";! u9 X8 m) A9 K+ |0 L; j& `
@.DrivingHome := true;
7 e3 {( {+ p4 n& s end;4 Z& b* F4 O9 Y% Y) Q/ f
else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 U/ g# v& b, N! G1 z4 ~% }* q+ o
part := @.transpOrder;
$ Q1 q) ^# G) e/ ^! d! j4 A part.move(@);-- load part3 G8 n) V, n1 |( P" s: J
@.CurrIcon := "load";3 W+ `# Y" @8 q0 d: e
GlobalDistObj := part.globDestination;7 n* {4 I5 [) Y! D( R9 k+ Q
assignLObj := rgmanager.rgAssignL;: j1 Q% X- H# \$ o6 t
row := assignLObj.getRowNo(GlobalDistObj);
; G" I$ [" M$ m( Z5 q N' i if Row = -1 then -- since 70
- S- k w, E9 _6 S% P6 H2 T- Y) ^# v if lan=1 then
# u" R2 c/ |0 y+ J" L! p( i promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( M' n+ W4 i1 W- o4 _
to_str("in der Andockstation: \"",?.~.name,"\""));4 Z) f$ _' P- Y9 @+ W" [
else2 d" `/ N5 a7 e ^, N/ m) q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, j' X: m# O" ` d- O to_str("in docking station: \"",?.~.name,"\"")); ( @/ W4 [- m7 Z- H8 q0 e
end;
% D) \/ w6 g2 l: \) M! R$ ? else: r' h! {; \# {
@.Destination := assignLObj[1,row];7 W8 a- y3 S- k3 |6 C5 S
end;
c5 E. K k4 R- k newDirection(@);
6 L" N7 N6 l' M! G! r. w- E @.HasOrder := true;
( @6 K, `7 s1 x0 j4 p; l' e end;0 h, O$ K; [/ x* E P
end;
# e6 m9 z0 O/ ^9 Pend; -- of the method) `3 m/ [$ ]' M% s
|