/* called by: entrance ctrl of the object 'track'
]! ?2 h# J+ Z3 S6 e4 S*/
8 s) p5 U' K4 C$ N- Xis
% l/ c% C1 w8 l: l8 c part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 K$ U1 f2 C" d p; ~: q
do+ C. |+ M+ g7 X# t: ]
Lan := rootfolder.Internal.Tools.AOLlanguage;; Q* t0 y2 [; x1 S
if current = @.Destination -- else return
2 l' u4 i; R+ u then
/ G1 g4 A) [+ e$ T @.Destination := void;
$ l4 ~4 V* @ u1 z* G7 r if @.occupied then5 |8 C/ e8 W7 [8 p$ c8 V [ A
part := @.cont;
5 g3 W' Z O* A8 a1 c; ~ @.transpOrder := void;
: s3 g3 R5 |2 N# c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# Q4 {* y# ^/ G* C' e8 F9 [2 ? @,root.eventcontroller.simTime);' \& R! w# w2 o- N: v2 ]; K3 T1 g; D% v
@.HasOrder := false;) x8 G. K: J! o: T& h6 B
@.DrivingHome := true;
3 h" Q+ ?9 e6 M. M rgManager.tryToStartTransOrder;) M |5 j% p, a9 U" I
if @.Destination = void# P+ B q% n0 v9 R7 |+ z- R: e. T
then -- no transport order for vehicle @
; g4 P* o& \" }$ z2 g9 _8 f @.Destination :=
7 m6 C3 u8 j& \ rgManager.nearestFreeStation(@,track.~);" x, u$ L7 J/ [" m9 u
newDirection(@); . ]" l( e7 R: \3 x6 B
if @.Destination /= void then
1 r. T" F- x$ e* _5 e0 D2 ? @.Destination.NumReservation :=
; z3 V% q% u" l J9 l @.Destination.NumReservation + 1;
+ n3 P: c9 x. {! b, r6 |! u' m end;; a3 U2 T7 p# |0 @% W! A+ T
@.CurrIcon := "drivingHome";
7 W" a8 f! y! W" Y; g6 p- ]$ \ @.DrivingHome := true;8 ~( } p9 ~9 W: w/ O
end;
; ?) J6 M8 T+ k else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 U, m+ p4 k! h part := @.transpOrder;- J) {: x# ?- J& R) P
part.move(@);-- load part
/ E- B1 B; Y( g. x3 `/ V @.CurrIcon := "load";6 b9 [: W: h9 e
GlobalDistObj := part.globDestination;
- |: w7 a* Z* w: u* ?5 m" g assignLObj := rgmanager.rgAssignL;% k8 a; S7 w& W" M
row := assignLObj.getRowNo(GlobalDistObj);
% E2 I7 p- @6 n if Row = -1 then -- since 70/ a2 R' U3 X) p& l) b3 v; M
if lan=1 then. ?/ ^& |( d1 n+ ]2 D" @
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% s. r& k. B* h* O: ]' T to_str("in der Andockstation: \"",?.~.name,"\""));' ~6 q5 k' a7 c4 ]
else
7 ~$ M1 e M+ b) V/ Y" e0 o) \) ^- l2 e promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 _4 t" R' B& P* }* q @2 E) s to_str("in docking station: \"",?.~.name,"\"")); : n$ H( Q6 ?: z; t
end;
W+ o; n2 U) M- s else! d0 Q' u j2 E b/ ~" w9 Z! R
@.Destination := assignLObj[1,row];+ `" N- L1 m. }0 H& ^+ W' g$ n
end; ! ]% L* d* t; A/ ~
newDirection(@);
4 K7 j4 n3 U$ a& M& S @.HasOrder := true;* \) ~9 ]' }4 `5 `3 D8 h
end;
& n" j: W2 Z$ h. @; O, R end;
- M- s2 n% {2 W) v5 _/ h3 X5 r Yend; -- of the method
' P- D" a) f& M) {7 F1 c |