/* called by: entrance ctrl of the object 'track'
/ O2 i4 M9 @- N*/
, B2 \' c X" G$ D* V; X& T9 g9 }is6 X7 Q# t' c( g2 A. t! L: r
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 B$ \5 D& P D' j$ O, |: Jdo
" @3 i2 E. |; s; \ Lan := rootfolder.Internal.Tools.AOLlanguage;+ C; t( V* P& C; J- T: r% X
if current = @.Destination -- else return
( T( P+ R) \4 B' c; C then" p, m$ P# y# X+ ^; `1 F, v* l
@.Destination := void;/ t8 h! I; e e' n6 c2 f
if @.occupied then- v+ C6 b; ^9 \' u+ S |
part := @.cont;
( `; U c, e0 G$ m8 i @.transpOrder := void;1 h" @, f0 [! K s* [
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 U9 B3 k! X* u
@,root.eventcontroller.simTime);
- Y, K) m9 Q6 r) n, w$ x" y7 V @.HasOrder := false;
- ?! U, p2 O/ e/ Y8 ~: u8 g @.DrivingHome := true;
4 q. L$ o2 @; Y rgManager.tryToStartTransOrder;8 _3 P: }* V" f! q
if @.Destination = void V. H) I" D* m
then -- no transport order for vehicle @/ }* |/ R4 V% S% O
@.Destination :=
6 T$ ~* p; S) x; S2 S2 O1 r rgManager.nearestFreeStation(@,track.~);& z; e5 k0 r# i6 z8 `
newDirection(@); 0 E+ f+ ?0 J; h0 I0 H
if @.Destination /= void then
+ H/ }- A/ {. L6 p& x. X/ d @.Destination.NumReservation :=
/ D" j/ X" _! p+ z @.Destination.NumReservation + 1;' E- Z0 ~1 x3 g$ U+ b
end;2 B* V+ N8 E* X8 ]! _1 T$ y I
@.CurrIcon := "drivingHome";0 l8 k/ V8 S( {! }$ u8 L1 ?" }
@.DrivingHome := true;- l( P$ {7 r; ~/ j: M
end;
* M# V* D1 }0 E) ~3 t else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) v5 o8 r9 Q. d7 E8 H) S part := @.transpOrder;$ L; ~0 Y8 s/ y+ {5 k Z3 o
part.move(@);-- load part" a% x# D& \% ^& T# K$ E/ H+ L' F
@.CurrIcon := "load";$ u- V2 p& H* ~& L& i
GlobalDistObj := part.globDestination;
' a) m' g' U5 e assignLObj := rgmanager.rgAssignL;
# s; i" | _2 J; u, y' b6 | m5 a row := assignLObj.getRowNo(GlobalDistObj);) Y* h2 f+ j7 o) _$ n9 H
if Row = -1 then -- since 70
: ?* ]+ z5 k- ?$ K if lan=1 then: e! I7 @ N- O: a5 H: a: }/ Z- V
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 W- t- \; G! P' v5 t
to_str("in der Andockstation: \"",?.~.name,"\""));
( ~0 E$ ^3 i! s/ e$ e+ s# E else
3 v, _& p, ? y! @ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% f9 m+ T+ e: R6 M2 D to_str("in docking station: \"",?.~.name,"\""));
8 v; Y5 w- y E2 \9 ~- J' k end;
( j0 e4 D: X7 O: ]* N$ n! h2 Y7 G else1 ~. R1 F' C4 m; j% o0 S
@.Destination := assignLObj[1,row];
' I9 g0 I M; m1 S, w5 ^0 W end;
% m, r: y4 I o newDirection(@);
7 E x% y2 N( N- d$ n& [ @.HasOrder := true;5 o! l' A, B1 P% a; {7 y& w
end;' f" l/ v: D2 e/ |: e k
end;( B/ x9 ^" R5 C
end; -- of the method
* t8 L z) b: a7 j8 m |