/* called by: entrance ctrl of the object 'track'0 K7 C+ W- h9 u' a% n
*/
# d; r) k( ^" J/ Fis
; H. E5 i) C/ n4 }8 n# \7 |) g% ]5 ] part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 ]1 _' g2 S* F/ f8 Z+ z; O
do9 [8 ^* T' u+ z4 J, V8 V
Lan := rootfolder.Internal.Tools.AOLlanguage;
" }& I7 S$ N8 \' h/ l if current = @.Destination -- else return
; J& A( b- Z, w# ]1 f) I1 b then
0 b7 _4 B) P" B4 g1 } @.Destination := void;: X% H' J$ O9 X( e
if @.occupied then
3 ]$ C, ~& R/ s8 U part := @.cont;
" N2 Q% \3 t$ @5 m+ [ @.transpOrder := void; Z( N, x! V" Q4 Q) p) H% W& C
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& O. [/ D6 ~& a$ V# @ @,root.eventcontroller.simTime);. y; s* [1 z6 o/ }
@.HasOrder := false;/ \- U& g0 h n/ d' T
@.DrivingHome := true;
7 k$ n" H$ x& C5 i% q# J( ^* V* d rgManager.tryToStartTransOrder;; D8 l5 h; Q2 \
if @.Destination = void' l# t0 b- F) K4 s: K4 F, j
then -- no transport order for vehicle @) r. M1 `$ ?$ Q( q
@.Destination :=
( U# B! c7 f% ]( U! S9 \+ J rgManager.nearestFreeStation(@,track.~);; w5 m5 t. Y3 R
newDirection(@); / F% ]& x+ U1 q i$ n! a# f
if @.Destination /= void then; P3 Y3 i/ v% ]) d0 i) r6 \
@.Destination.NumReservation :=; U7 H- S/ q; G7 K: D8 e
@.Destination.NumReservation + 1;* b8 U; A! o: C$ d, L C) u2 v$ A6 M
end;
# E% I& M% j* r2 y% j! Y @.CurrIcon := "drivingHome";$ |! q: a* f8 s6 f2 O
@.DrivingHome := true;6 G9 o! A' d9 J/ `7 Z% h+ p
end;
% k5 X8 ]7 _$ }( Q( w; T9 H* F8 | else -- the vehicle @ is empty, both vehicle and part are in the same dock station' Q+ A% ^ Q5 P o6 K# T
part := @.transpOrder;
) ]+ ]6 q- j0 L4 z part.move(@);-- load part
2 ]( k* I6 y* }# v- _ @.CurrIcon := "load";- Z% g7 }$ @" V! g; F8 s
GlobalDistObj := part.globDestination; O2 d. R3 l* J: k" i# U
assignLObj := rgmanager.rgAssignL;
' \, r# C$ M3 b4 w row := assignLObj.getRowNo(GlobalDistObj);0 V$ ~( q1 C2 t t' S* K9 B
if Row = -1 then -- since 70
& W8 ?& J8 }2 R$ t: H' u: T( ^% G if lan=1 then: p! |: }/ E' Z# |) @
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ U: |/ }6 y: e, T: f, _
to_str("in der Andockstation: \"",?.~.name,"\""));" _' a/ T, T+ [! H
else: z: K: u/ K8 l
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 E8 X, I' l6 V3 Q
to_str("in docking station: \"",?.~.name,"\"")); ; d) F% n' t& V) j, o1 F" J, I. |
end;8 l3 z1 b' T: o* t+ M0 _1 g
else
0 o8 r0 k) G3 e6 Z @.Destination := assignLObj[1,row];: p- _& S$ E) Z2 @* s* R
end;
+ F& ]1 G! C+ Z* o4 B newDirection(@);
- f5 r+ ?6 I; C @.HasOrder := true;8 `2 T# U* |! ~1 m" F7 f& I+ b- m
end;8 n' ~# K; Q. i n
end;8 c( I: P: F& z' Y
end; -- of the method
" s" _! K; V7 @) R% V8 E* P |