/* called by: entrance ctrl of the object 'track'
$ ~: s6 e3 n# P* O! S: F*/
/ M8 k; W* M% N: V6 [, tis
7 ~# K0 X* G- T P: @9 ~7 X$ A part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ D9 \3 D5 r% ^9 d0 [
do/ g6 c& E+ }4 R- `) g& y T
Lan := rootfolder.Internal.Tools.AOLlanguage;7 U6 ]8 b N- S5 |2 r G( |. E0 `
if current = @.Destination -- else return
1 ~, z& h8 [! U- h then- C' [/ } ]4 N# V5 Q( G, K7 j
@.Destination := void;* s" k6 G( v3 s9 t3 |: {# }
if @.occupied then
- }; P7 p8 b9 z. H( m part := @.cont;
' @/ h+ U" c6 r @.transpOrder := void;
" [# V% c3 B8 v) S part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% Z7 P* U2 X9 H; b3 ~
@,root.eventcontroller.simTime);
0 e6 [" S3 J! G' o" c2 f: d8 Y" A/ N @.HasOrder := false;
9 O/ C7 f. Z; f3 }7 \ \ @.DrivingHome := true;6 s& |. W0 i% b5 S# _' n4 {
rgManager.tryToStartTransOrder;8 u1 |8 r5 x2 p7 D# e" q
if @.Destination = void
% U; i# g6 z7 O8 j, v" } then -- no transport order for vehicle @. e% G! f" E& L9 Q) n! V8 |
@.Destination :=# ]- w" j, |" Q% ?( I% I
rgManager.nearestFreeStation(@,track.~);: |, O7 `+ f: _0 l$ a
newDirection(@);
" m: @9 _' x+ t9 i if @.Destination /= void then
% Q/ B o* k. M" Y, z @.Destination.NumReservation := O+ f- N4 B8 z' r! V* k9 j7 d
@.Destination.NumReservation + 1;! G! [& g" I$ {8 O( C; L8 _
end;, G" g7 R. T: |9 [+ ?
@.CurrIcon := "drivingHome";7 y) D$ ~9 R+ T; N% Y% r& u' {
@.DrivingHome := true;
/ s" w* G ~) ]* F% S- q end;; P. n+ q* N5 e( m& e8 H
else -- the vehicle @ is empty, both vehicle and part are in the same dock station- w. {, K# A4 I9 F- i3 w) z
part := @.transpOrder;% S, Z+ z3 O5 |& O$ f6 a
part.move(@);-- load part
) `% @. B# r; k7 q @.CurrIcon := "load";: u* }: w. L; U& m1 t8 t7 a8 `
GlobalDistObj := part.globDestination;
& p* T% l& z1 [! A5 Z2 Q. C+ {6 N assignLObj := rgmanager.rgAssignL;
, G* Q5 n2 Q" M) {3 e* {7 G row := assignLObj.getRowNo(GlobalDistObj);
; G6 G3 {& D" _ if Row = -1 then -- since 70/ H# M5 {! f o
if lan=1 then) S7 c/ t% Y( [
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 O# T2 g/ p3 v0 D6 t
to_str("in der Andockstation: \"",?.~.name,"\""));
1 A. s6 s" e0 s/ X else
$ i z9 H& ?- `6 K7 T5 W" ` promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) p9 R& V) R- v% q$ A& S0 S to_str("in docking station: \"",?.~.name,"\""));
& W, S. H6 Y) m" ?: S. E end;
+ m* t X1 _. I2 W7 J! U( H else
( P2 g8 m' D0 v" X8 ` @.Destination := assignLObj[1,row];
h2 a! R* _& o- d2 Y F3 T5 J end; : K' S7 x% Q6 E8 e, L" \
newDirection(@);" ^* ? e( i# U
@.HasOrder := true;
1 g6 Y" S! G- q; v6 g end;
! `6 I5 h+ f) K. p, c end;+ I* d+ X# u h" c7 ]1 N0 R( F; T
end; -- of the method
j7 g U9 n2 o. U6 i! {6 p7 T) z |