/* called by: entrance ctrl of the object 'track'
' O3 K( C, _ K3 G1 B*/& D2 ?2 l# G! p9 o
is8 r2 j, K- G' z" p" ?
part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 e) c) X4 A1 I- e) B( w$ e: a) Z
do# O9 f9 Z' f- ]: b2 b/ G
Lan := rootfolder.Internal.Tools.AOLlanguage;
# m( b) R& o( i7 y if current = @.Destination -- else return9 t4 y4 w- k* s6 w [2 h
then- p6 j0 |. J; ~5 {/ j5 e7 P
@.Destination := void;
4 k5 t( z0 j& \+ [ if @.occupied then
: Y/ [( X* r l0 s2 Z part := @.cont;, v* P3 G7 _4 r Z/ k# m
@.transpOrder := void;
/ A# T% v* K: m4 J0 m part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 Y* ~3 c, e: H3 p7 V8 o: d
@,root.eventcontroller.simTime);
/ H- Q" Y u) g" e: o @.HasOrder := false;& Z3 T# S& _9 Q9 O' }* m- ^
@.DrivingHome := true;
8 L9 o o& {" b9 ^$ J rgManager.tryToStartTransOrder;% o! ~" H0 n6 K. D% b
if @.Destination = void ^: R0 p7 O+ c+ C
then -- no transport order for vehicle @
& {! V, D( ]; | s$ d6 w @.Destination :=% i* K. W6 o' O' b
rgManager.nearestFreeStation(@,track.~);) E# P. H* {" ]# k/ {) `
newDirection(@); 4 |8 k3 e* [! s; |8 s# C3 O3 d4 j
if @.Destination /= void then
- R2 g9 E0 H; Y) [% _+ C @.Destination.NumReservation :=. ?% g' n, l/ f6 N' w1 I9 l0 z
@.Destination.NumReservation + 1;& H+ H" j# i1 q# A
end;
; V# U+ L" {) \) M( V8 M4 d6 x @.CurrIcon := "drivingHome";* K1 y5 a. Z. ^1 y
@.DrivingHome := true;
; ?5 y6 Q* |/ i6 R% P/ K end;$ L2 e, g* F; J0 z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 x3 a9 a- c4 {2 L
part := @.transpOrder;+ X+ W' Z- j+ [1 `; p
part.move(@);-- load part
1 s" [& s' a4 l, C @.CurrIcon := "load";
; B8 G, u+ o8 h4 ~- } GlobalDistObj := part.globDestination;
- k+ u# C9 Q- D* t1 ^( b assignLObj := rgmanager.rgAssignL;
) c2 G( u. P! }5 m7 W$ [1 C: k row := assignLObj.getRowNo(GlobalDistObj);+ p$ n7 [: R7 E2 g+ g
if Row = -1 then -- since 70
2 Y5 ^7 F2 ?1 K% e; C, X7 E$ w9 E if lan=1 then
1 v. x$ S$ p6 f0 n# t( T- A1 ` promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, q/ D+ _. P; {1 P5 r% R to_str("in der Andockstation: \"",?.~.name,"\""));
# f' v1 {+ j0 I9 m9 j1 y5 N else4 S8 m9 }1 e" x
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 n# ^% |) i0 u! B) I9 _& r6 r, }0 E to_str("in docking station: \"",?.~.name,"\""));
2 v9 x! t4 A& l5 |" D) H, I6 ?4 ` end;1 p$ o2 ~# g) n, N' n/ Y
else& Y4 R- K7 @( O' y0 P
@.Destination := assignLObj[1,row];
$ [4 h* h7 M1 B% U end;
2 [# z* x: X' X- N: X newDirection(@);: b3 Q9 d' ]8 Q# @
@.HasOrder := true;
& d [2 ]% w$ h; i: P" E8 G3 l end;8 [9 n8 Q. p& A# Z& M {
end;
$ q3 N1 K4 O; d" xend; -- of the method5 o6 @# k) W$ M: C; w
|