/* called by: entrance ctrl of the object 'track'
* V! |: a+ V$ A( E7 f" f5 O*/
7 Y5 o+ z2 J5 v+ c6 B" e% kis
4 I' l) I8 p% z2 k- T- F part, GlobalDistObj, assignLObj:object;row,Lan:integer;& \6 I8 j% v/ M; e4 A6 S
do
' a! k% ]- @6 D) b/ t# S Lan := rootfolder.Internal.Tools.AOLlanguage;0 m+ c% t3 k I5 M
if current = @.Destination -- else return
& t; a' q p! \& G" l then
) \$ Q* `+ P! c2 T3 O# D" u @.Destination := void;
* e! y) B" c5 c1 T if @.occupied then
9 Q& `9 [7 H3 k9 X( i- f* t part := @.cont;' T- \' ~" F' p, z
@.transpOrder := void;* b3 i3 [' a5 M5 u+ o$ o
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* F: J) o' ?5 }5 ?
@,root.eventcontroller.simTime);
3 {: W, L2 l2 ]$ w: _& d( y* S, ~ @.HasOrder := false;
) p6 n( x/ H; k: W. h @.DrivingHome := true;
/ t" S. q% M" R5 s! B3 r rgManager.tryToStartTransOrder;. H& e) v3 l( F5 M. u. X( Y
if @.Destination = void
6 B7 V: ?+ o6 i. C) O then -- no transport order for vehicle @
$ K/ n0 C. h6 f @.Destination :=
- i, }5 E/ Y' n2 l B7 v rgManager.nearestFreeStation(@,track.~);* D; D# X& n% A" [; ]
newDirection(@);
; [6 M0 o! e5 X/ X6 G if @.Destination /= void then
) X& {8 y/ E3 H ?2 @ @.Destination.NumReservation :=6 F \9 @& B, p# g
@.Destination.NumReservation + 1;+ x2 l5 W4 H3 s% g8 u. b2 N, C) n
end;* S: H; g% ~1 ?0 D r
@.CurrIcon := "drivingHome";
: i2 G( D3 t# T! \* R% j0 o9 M+ G& s @.DrivingHome := true;0 N) F* l4 t0 g T4 t. L
end;0 }# X1 g- B; N
else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 j* F3 J4 f0 A8 ]8 ~
part := @.transpOrder;
" j+ e8 e* v* X k; e" @ part.move(@);-- load part' k+ `, s5 W8 w) n
@.CurrIcon := "load";: ]6 r; |' J- t D3 o% \3 ~- t! c
GlobalDistObj := part.globDestination;
5 k) g% ?* Q5 I2 J assignLObj := rgmanager.rgAssignL;
, n. c6 D* F; C6 J row := assignLObj.getRowNo(GlobalDistObj);8 C4 d4 s6 ]5 z% ^
if Row = -1 then -- since 70
$ r+ I9 r4 A& z2 M" w if lan=1 then
% o+ }, r3 d6 H' }1 l9 O promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 R# c$ N$ J4 d. c" u
to_str("in der Andockstation: \"",?.~.name,"\"")); ]. p' x9 X8 n, Q
else3 j$ D; n6 k( ~! S- Z q1 k- m! S
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 Z+ d" }1 C4 P& z
to_str("in docking station: \"",?.~.name,"\"")); ; @2 M# F$ e8 n- N( \! R
end;5 n2 A2 r+ G/ |" I( O Z6 {% A( g
else
8 B, H' S" o/ s3 ?1 L* E @.Destination := assignLObj[1,row];- d4 p0 ~) E1 |* e( j( J. O: b( O7 P
end; ; v! Q& L8 e" J
newDirection(@);0 Q! `' }" i5 a: B2 \1 q; r
@.HasOrder := true;+ o, R4 M" q0 n! ~8 G2 q" U0 l
end;
: \' L( j) a* ?- b% G end;
* o, r- ? n0 a9 i. \) vend; -- of the method
' z- v7 W) Z9 a# t! d& }8 A |