/* called by: entrance ctrl of the object 'track'( z0 i5 b Y/ X, ]' f
*/4 m- _( ?( U% F& x7 T
is# X* ?/ V: y* q' G$ O
part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ Z0 ~1 t* p' E2 J' X3 n/ v" b9 _
do
# M! }+ T( B9 K% }# e Lan := rootfolder.Internal.Tools.AOLlanguage;
- ?7 K* J7 Q! H3 o: f: V& [ if current = @.Destination -- else return8 \- x8 M; w% ~6 I- n/ K- A! I
then
. b5 q; f+ w4 F8 R' \; e @.Destination := void;
' B, ~1 b: P, Z( r8 W; K if @.occupied then
& | a4 x8 i. i$ Z! Z( V part := @.cont;
0 I2 x. n2 |5 P' f @.transpOrder := void;
: f' z# b2 V( _. ^ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* J+ r- F9 m, O, F U* ? @,root.eventcontroller.simTime);5 ]5 o1 g, E) i5 f+ z% o; l
@.HasOrder := false;
: I& m9 N& ]8 C# a4 v2 f Y3 P+ E @.DrivingHome := true;
1 c0 h* B1 N8 x. d+ F rgManager.tryToStartTransOrder;' x' z; c4 `; ~
if @.Destination = void2 A+ O; {1 m( i* J6 c
then -- no transport order for vehicle @5 b, }3 X6 P a
@.Destination :=% f* k& [) |' v) h! c% S' v
rgManager.nearestFreeStation(@,track.~);
8 ~. D; F* A. s3 Y1 L newDirection(@);
7 |# t. E0 I4 Z+ W. t$ D if @.Destination /= void then. V9 u4 W- @# y' a! }: [
@.Destination.NumReservation :=1 h. \( R: \7 u9 m! E
@.Destination.NumReservation + 1;
1 E; E% L% @' A+ [- @9 \ end;
$ I- [0 c9 o3 ]/ r @.CurrIcon := "drivingHome";% C5 S& Q+ ^( t4 `, l8 N
@.DrivingHome := true;& O+ p3 b1 ?9 m, X
end;
4 \, m+ k$ k u- A else -- the vehicle @ is empty, both vehicle and part are in the same dock station& v3 `2 U$ ^+ N' a" a# M
part := @.transpOrder;
7 u# T# `1 g- N% F/ d+ D' ? part.move(@);-- load part
3 g5 h& q1 I% |1 o8 X) D2 U2 P1 | @.CurrIcon := "load";! ~* h! U' ?) \! I* M) t
GlobalDistObj := part.globDestination;- t) `+ H: V* t+ q+ P) X# h! [) z, f
assignLObj := rgmanager.rgAssignL;
; r( u, |9 ]9 u, i, ?7 B% z0 p5 m row := assignLObj.getRowNo(GlobalDistObj);' C% |7 w6 s- g/ i+ s% N
if Row = -1 then -- since 70. Q) X4 Z! N4 U% n8 Q/ ^* |
if lan=1 then( d/ I* K0 u! {, V: F
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 g- S( h, M) K' u3 M
to_str("in der Andockstation: \"",?.~.name,"\""));; G5 Q' q3 i0 Y% ]* y
else8 T' \) i1 E c; @
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 D$ x, b& {$ m" n to_str("in docking station: \"",?.~.name,"\""));
3 D# F- z) ?* X* ]- y end;( E! E7 [8 p: Y9 P* x9 N3 S9 |/ W' `
else
- l; q- Y" |" T2 G3 m( R6 J4 s @.Destination := assignLObj[1,row];
3 d9 Y" l* n7 j end;
; t) w0 W8 x) ~' x0 Y newDirection(@);4 ?, [/ g+ Q& G0 F- C
@.HasOrder := true;+ Y5 O* f& b; v0 d; e$ B
end;- s2 a4 }( u, R% J3 r
end;8 A! \# Z9 H4 O. h* [; x+ {: E6 Z2 ^
end; -- of the method
4 F. K) P: U( S$ d8 F: t: d- _* S- _4 H6 Q |