/* called by: entrance ctrl of the object 'track'
% p; a: Z3 E0 R- R6 U*/
$ [: ^- A+ v( xis
: J0 t8 O8 g; } part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ f2 c9 {5 j* A3 N2 ], U8 Wdo
- f" E3 u. \# M1 c' }8 l& D: u Lan := rootfolder.Internal.Tools.AOLlanguage;8 v/ _" J: x O
if current = @.Destination -- else return
# z; K+ D! y! m: h+ K8 @+ x then% T+ @* X/ J* b- I- ]8 O: r
@.Destination := void;
1 I) X9 m* k$ B% G. x9 Q if @.occupied then
) C' ]( Y: p1 C0 P% a' d, i part := @.cont;
, [/ J* n" R' d) [9 v5 h# I @.transpOrder := void;
+ m f- w4 w" M5 P% k part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# {+ s( C B9 t! ~1 X9 A: ~ @,root.eventcontroller.simTime);1 Z1 F, A. u6 l( ]8 q; T: o
@.HasOrder := false;
7 K6 |* t+ b' |) c$ I9 a O: | @.DrivingHome := true;
# P8 R# P _! r rgManager.tryToStartTransOrder;- u9 ~# U! E1 ~( e/ x
if @.Destination = void
2 X- ?, |' s, Z1 s, _) o4 Z T then -- no transport order for vehicle @
+ M$ ~) j& C$ m @.Destination :=
! C! ?9 |+ z9 o+ ` {, S rgManager.nearestFreeStation(@,track.~);
6 A' Z# O2 \* A- n# [ newDirection(@); . D6 \! a. m4 L' s7 N$ c
if @.Destination /= void then* M( Y; x/ j A! d$ z
@.Destination.NumReservation :=
/ m4 V) A& _! m) A4 ?) C1 @1 U @.Destination.NumReservation + 1;0 D/ Q- {9 A! F1 i' k1 Y/ q1 @
end;
5 Q: f) e$ T+ t/ k3 @8 l @.CurrIcon := "drivingHome";6 j) t7 K6 [' p- ]$ r" J, S( l
@.DrivingHome := true;) W) a& Y& f$ G6 L9 J
end;/ v# c% W8 j$ B2 c4 O- v
else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 V/ ^. O9 r( k$ r3 z9 V! y9 C
part := @.transpOrder;
8 f- Y# a$ ?; E! y/ M/ v) J part.move(@);-- load part
7 v: m/ l( B9 d @.CurrIcon := "load";" a0 P3 B. r: Q# o
GlobalDistObj := part.globDestination;- I; c. ~- R" @0 q
assignLObj := rgmanager.rgAssignL;6 j6 P8 s4 b2 e; l) v
row := assignLObj.getRowNo(GlobalDistObj);
( l5 R$ Y2 Q4 D9 }$ \, u if Row = -1 then -- since 70
5 s; @7 U7 A5 k6 s if lan=1 then
% z% O8 z9 K: c( ?0 o& p4 |$ | promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* q3 L% P- s# T2 z& E* G: m
to_str("in der Andockstation: \"",?.~.name,"\""));3 m# x2 K9 s3 [) K
else, b5 L$ Y; O. W, H
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& P' G; N" \5 w9 C to_str("in docking station: \"",?.~.name,"\"")); ! z$ z8 P. \! s$ N2 `
end;
- z# |" t! y; r, r else
' F8 \7 W; C- h @.Destination := assignLObj[1,row];
/ @' t# d* J( k$ p7 G end;
F& |+ L; g8 m- @. m1 m0 A0 h newDirection(@);& v0 z* t# Z, y/ s) O$ o# k' O5 ^
@.HasOrder := true;
, b9 W' E* g" o" C ?- g end;( [& K! D' y6 |) T& g }9 }
end;, _6 q/ {2 ^# k+ [4 P
end; -- of the method
3 ^) U8 z0 c3 d! D2 B3 P& w3 m |