/* called by: entrance ctrl of the object 'track'
% V- g# Y/ a% g5 F9 ^*/. N( X/ M' H7 H: U1 M* D$ {
is
# f$ ~ b/ E' \ y8 J7 k part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; d1 b1 H0 v8 Rdo3 ?9 A5 `' y4 _! R! n5 C: G% i8 m3 A3 T
Lan := rootfolder.Internal.Tools.AOLlanguage;
4 x+ C+ \6 c( C' H- p9 Y if current = @.Destination -- else return
! C- M! U! J; B/ d4 _ then
6 Z" j2 h5 @) _& W6 w! c2 _/ m @.Destination := void;2 k1 {2 C8 q5 |+ R/ Z
if @.occupied then+ x9 s# u( O( B
part := @.cont;
/ N& N# U. ~7 T7 f3 t P( n/ F @.transpOrder := void;) B4 T5 i9 I/ x l, a9 _1 h" _/ Y: S
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 e4 ?& |# n" Y! V: i; w# `
@,root.eventcontroller.simTime);; A! \2 x0 a6 P- Y4 D C
@.HasOrder := false;
( _/ b0 _1 W5 W; x* m5 Z @.DrivingHome := true;
( |8 ]! j( {5 Y' j" \* K rgManager.tryToStartTransOrder;
: z( a& F% Z* {1 D+ L if @.Destination = void
( z. l$ T% e8 N/ G; `6 ] then -- no transport order for vehicle @
( E6 e7 D( S; Q/ \ @.Destination :=
- [7 j. \# |4 p4 f rgManager.nearestFreeStation(@,track.~);
) m1 s' I9 R+ h+ ~ X# u8 @, o9 C newDirection(@); $ ?" ], { G! P/ M/ x0 U! h! U2 D
if @.Destination /= void then
1 A# G" e) v8 s; b$ j- ~ @.Destination.NumReservation :=( F% w4 p u- F; V' z& A
@.Destination.NumReservation + 1;
$ M7 a9 V1 F2 c! z @5 T E end;
2 e2 P! O, A4 t; Y8 t$ K& n% ?: \ @.CurrIcon := "drivingHome";
' e$ {* I5 G6 e @.DrivingHome := true;
, S- B' o+ M! x& o0 y3 C end;6 E6 Q" O2 t! d. o
else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 V/ f' z* j5 P5 X* R' a
part := @.transpOrder;
2 ?0 h% g! c8 P m* {! t part.move(@);-- load part& Y& o _) ^8 i
@.CurrIcon := "load";
: b9 a4 i5 r/ Y% b! ^ GlobalDistObj := part.globDestination;
5 ]3 ^6 ^) q& w0 {! B assignLObj := rgmanager.rgAssignL;: ]' K2 W" D) f& h# V
row := assignLObj.getRowNo(GlobalDistObj);
9 P$ p4 }* x0 N4 v if Row = -1 then -- since 70
. l& m6 v/ k7 J" h7 Q if lan=1 then# X) [ k1 {3 v7 M( T$ m2 c7 K& T( m
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! H) M s' b' g# I to_str("in der Andockstation: \"",?.~.name,"\""));5 r/ b9 S V C
else8 h7 R) R& j/ Q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 ?$ @/ V/ q6 D to_str("in docking station: \"",?.~.name,"\"")); $ @% m5 D: x* A# k! t' Z6 n
end;- M5 C/ {) F$ q* r( o; h4 O( n& d
else
. |# Q9 F* M- b @.Destination := assignLObj[1,row];
" V' U! P1 F: F* c9 t. O N5 d2 c end; + u6 K0 \) I6 e2 D$ E
newDirection(@);' u# | ^& ?' N' t
@.HasOrder := true;
2 i+ P9 c% |' q2 Z end;( H! k$ e2 I- o6 ]( W
end;
$ ~# P+ w2 {' _' h9 q1 ^( gend; -- of the method
) C9 y ^, a( w O |