/* called by: entrance ctrl of the object 'track'
2 w( `/ d0 r% f2 m*/
# \' {! y+ J2 |5 |is
6 r3 W# K9 S. C% f$ z: u5 O9 N part, GlobalDistObj, assignLObj:object;row,Lan:integer;) X5 \* f+ e1 b8 `9 u* t( Q: h
do! a: x" K* d' A* h+ R
Lan := rootfolder.Internal.Tools.AOLlanguage;
* U/ T% }! m" g6 i& K3 f8 C if current = @.Destination -- else return
$ G' `" i# ^% S6 ^& A9 H then: D! I6 O1 m/ b. ?! c
@.Destination := void;
1 ?+ D6 S7 H- f/ K# T9 J if @.occupied then( N9 z h, ~1 s7 ?; Y
part := @.cont;
- Q5 M7 C: G# O @.transpOrder := void;
, { p) M9 a1 H part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) W& r9 u; N& a; I2 |% ~+ w @,root.eventcontroller.simTime);
* A1 k6 U5 h. x5 R @.HasOrder := false;/ d/ \% K' X% ?% P; [5 X
@.DrivingHome := true;
/ P) L8 B/ N v+ G rgManager.tryToStartTransOrder;9 B5 H; u9 n n& c0 x
if @.Destination = void
' E. z3 ?% E. n; w then -- no transport order for vehicle @( |4 o* Y7 ^* [0 P, p: w. W
@.Destination :=
; R( }& V7 Z& a( T; w rgManager.nearestFreeStation(@,track.~);& ~% M# V* D8 s6 ?- w
newDirection(@);
4 ^1 |1 }% l( n$ y1 N if @.Destination /= void then* _* q( T/ H+ v# P
@.Destination.NumReservation :=
N, M9 _: M$ @( f) J: |7 o) a3 k @.Destination.NumReservation + 1;
2 e- I' Y0 }* j; w0 r- L end;
4 M% h8 D2 r7 W5 |# R @.CurrIcon := "drivingHome";
4 I* X+ W/ Q& i+ ?! x& \ @.DrivingHome := true;
6 m- p# }* T% Z3 m" y end;+ E, Y- u# p( k- S: A# T2 z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 M7 l7 Z* W+ `& B) j6 V part := @.transpOrder;7 m7 o* E# }; e
part.move(@);-- load part" H: U& r) z* D5 u8 @# c
@.CurrIcon := "load";2 e( L$ ]" G! y: S
GlobalDistObj := part.globDestination;( y% j5 X# [3 U3 `2 D. i s) c
assignLObj := rgmanager.rgAssignL;: o' `2 H5 }( N Z. ^. @# Y# L
row := assignLObj.getRowNo(GlobalDistObj);
9 N# z5 U v& |" s9 C if Row = -1 then -- since 70
y. g/ x9 _( u" k: P! @5 s if lan=1 then6 H4 d' o9 W2 x& I8 X
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 Y0 d2 L7 l9 z8 X to_str("in der Andockstation: \"",?.~.name,"\""));8 ?7 `- Z7 V$ [8 u' g4 m9 l
else$ E ~# A2 q: o% N
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ ] O* @3 T+ L) H4 c w8 ?9 H
to_str("in docking station: \"",?.~.name,"\"")); 1 b2 N; {( X% z* T
end;6 k! A8 l V: ^
else+ \/ G% I9 J% T6 X+ m7 J$ d
@.Destination := assignLObj[1,row];! A+ T; j+ {. p0 x1 S
end;
( ]8 O7 y$ \1 E: l" W$ q newDirection(@);
+ Z' v, e5 v. S4 k6 ~ @.HasOrder := true; r( m J6 A5 E2 N* E: T% r
end;
6 M& l* e5 p4 C c v end;8 d1 R+ c- d$ o8 I- r
end; -- of the method
) R6 t. j/ J' \( b" ]% | |