/* called by: entrance ctrl of the object 'track'
- s; J9 z# D m: o& L; n5 P*/5 r3 ^8 ~ p, D e7 ]
is
3 k1 f1 w& a8 T& V; \ part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 y2 l" F* b. n9 K- ~. w3 c
do8 W+ T- `, _& U5 D2 |
Lan := rootfolder.Internal.Tools.AOLlanguage;/ C3 W5 G( P! \+ ?
if current = @.Destination -- else return
( Z* G; s+ l3 Z7 V- s: i then
. p8 v* p7 E1 ~! N @.Destination := void;: Y0 I' w) R1 C* t. ~/ w( g
if @.occupied then/ U1 n* v( C* j0 j9 W
part := @.cont;( `5 [( g8 D) Y& ~# W
@.transpOrder := void;; i6 ~: W+ `$ n6 H( H+ Q u
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 W! I2 I5 ]* _9 `; S3 s
@,root.eventcontroller.simTime);
6 C9 f+ `1 K' S: l; e' J @.HasOrder := false;
8 L: Y0 C, i6 c% W1 ?2 V @.DrivingHome := true;
- ~9 @0 Q7 K& j0 b5 p- t8 K rgManager.tryToStartTransOrder;
" g: l( N7 G- l$ a9 ^7 f if @.Destination = void7 @! n& L; ~ \! H2 I* B
then -- no transport order for vehicle @
9 c% e. I2 e' x/ H; d/ Q, ^- j @.Destination :=, f- F$ a$ Y+ ?1 m+ y( T
rgManager.nearestFreeStation(@,track.~);
2 a4 i5 g0 T7 w) o/ u0 X newDirection(@);
0 z2 E7 U: Q- {- h; C* | if @.Destination /= void then
/ `, z/ N& T8 r' U3 [3 n @.Destination.NumReservation :=
8 | V. b& ^8 I" y( k7 O @.Destination.NumReservation + 1;
: j5 a5 P. C/ c2 V, v5 O end;) [' U7 E1 y+ G+ A8 U
@.CurrIcon := "drivingHome";
# \6 k# g( F; }& d, \ @.DrivingHome := true;
; y6 Y. D1 i/ c# e; Z6 _# a2 u end;
2 a7 k. T4 f' `' ^ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 Q8 [9 g- U( ]2 f. w part := @.transpOrder;
$ g/ h q2 N) J8 T part.move(@);-- load part
" B- O% n( J0 t* c2 h. }2 ] @.CurrIcon := "load";
2 z; x' X q4 v: F7 k4 y T GlobalDistObj := part.globDestination;+ y! G1 V9 b7 Z9 h/ U
assignLObj := rgmanager.rgAssignL;
; F0 B( ]/ }+ u: L. Y$ i$ J! c row := assignLObj.getRowNo(GlobalDistObj);
* o, e) Y$ {7 q& J- q- U if Row = -1 then -- since 70
3 [6 X& l4 f6 g/ F0 j. y if lan=1 then" I6 h2 s: @. B5 x2 e4 ~8 H
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% U% ?# [& `( M7 ? to_str("in der Andockstation: \"",?.~.name,"\""));
! |1 v) {( L- y( y1 m- N else# R3 O; c1 L- T$ o
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, J% }+ ?8 n7 D0 T to_str("in docking station: \"",?.~.name,"\"")); , }0 q5 B: X# f O3 C5 ]; a0 d3 @
end;
! K+ d3 c* ~) A, @ else4 c' d9 j9 _/ v
@.Destination := assignLObj[1,row];, s& U! o" D! G ^
end; ( M' z: Y Z* p1 x, A# N; V/ X
newDirection(@);% A5 o3 j6 ~! d- J
@.HasOrder := true;/ M4 }9 |: u" n1 G) b
end;3 _ g# R5 {: T+ f$ s
end;
8 V0 r2 P6 e: q4 {) send; -- of the method, I9 G2 u7 T* @- L& i+ H
|