/* called by: entrance ctrl of the object 'track'9 \1 u9 m0 l; b; a# h" G
*/: M3 `5 l4 ]0 N
is
8 ~9 B _4 N, j part, GlobalDistObj, assignLObj:object;row,Lan:integer;) S# z) h X Y b
do. Q$ d, V+ K* ^1 ]4 O
Lan := rootfolder.Internal.Tools.AOLlanguage; W" F% u* p+ K1 g6 l" @% n# M& _
if current = @.Destination -- else return1 W# t2 }0 G% P7 n
then9 Y7 B! N2 M+ L/ l9 P5 E
@.Destination := void;
) S* A, x2 k! @1 s' {2 P& i if @.occupied then0 e( x2 `1 U+ s- H* x/ g
part := @.cont;) S8 C V9 \6 L
@.transpOrder := void;5 l9 H h, m0 J
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 \5 H% N3 n8 E2 @
@,root.eventcontroller.simTime);
8 u. x6 T& K. E) T+ p& n @.HasOrder := false;0 o2 i) ?2 j! E1 N
@.DrivingHome := true;# b `7 f0 B" `# E1 d
rgManager.tryToStartTransOrder;
! `8 z2 s5 F3 S7 f. L' r- ?% k if @.Destination = void9 A: ~) K& @- }
then -- no transport order for vehicle @
& Q7 ]5 T( p' }2 ~ @.Destination :=3 A! y1 P. t- W! {
rgManager.nearestFreeStation(@,track.~);
( L( s, X$ @, f: Z newDirection(@);
9 D1 H+ f/ e* ^; Y8 P8 H3 ` if @.Destination /= void then
, e# M7 }2 r" [7 S @.Destination.NumReservation :=' t1 y6 a# K- ~0 h
@.Destination.NumReservation + 1;
+ }; e9 X2 |+ B9 h end;
3 i5 T$ b8 v2 u- c, T$ N @.CurrIcon := "drivingHome";
, I' ~" U& D' W; } r @.DrivingHome := true;. q7 {& L1 L3 S3 a/ A/ \
end;
2 P5 a* J* \8 K; z! s else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 Q/ _# B2 n3 m: @. X0 Z$ L( ~
part := @.transpOrder;. z( q5 C% ` g- F' V9 D
part.move(@);-- load part
% K1 ?# w+ p _8 H @.CurrIcon := "load";- Y" `3 }' \; z; b5 S7 b2 d
GlobalDistObj := part.globDestination;& K! g1 W1 P8 N% n8 F8 M
assignLObj := rgmanager.rgAssignL;
. ?& F( b; m& b* |0 {# m row := assignLObj.getRowNo(GlobalDistObj);
! R% H }" _1 V5 p5 B6 G1 \ if Row = -1 then -- since 70
. a; o7 j' q( s* i+ Z0 t if lan=1 then
' l+ x- e$ j8 T' ]6 E) [8 u promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 S5 O/ W+ ~. e6 \5 ` O) g+ W to_str("in der Andockstation: \"",?.~.name,"\""));
; R4 W. [/ F( t$ l. { s else
) [* M# ?' Z" V; T+ A9 v# L0 c promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& n' a; m" X$ A+ I to_str("in docking station: \"",?.~.name,"\"")); " r; Y4 q$ v- d( M; X
end;
# x/ b) G; F" O) E+ k else
0 o' d: ]$ z9 J$ {, H3 w1 u' ~/ { @.Destination := assignLObj[1,row];: ~3 L e/ ?- W2 C' Y3 E2 `
end;
4 d$ j* [ r3 P$ v* `% T2 L, ~+ ] newDirection(@);
5 J) J; d$ e# ?6 R1 W @.HasOrder := true;5 o8 q" p; V/ ~" w4 D, l& H! o
end;
. n8 f+ K, c7 k+ Z" V2 K end;
3 `- p1 [# t! y, qend; -- of the method5 V6 P% @6 U l' ~$ b5 N6 ~2 z
|