/* called by: entrance ctrl of the object 'track'5 u8 Y. O- F% {" Z3 ?
*/
3 ]: S- K6 ?; M! ris
) |; N- @8 r1 N: P. p2 Y- Q part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 [, D: p" R# O; b
do
4 v, P3 ]$ i0 X" R4 O! m% t- R Lan := rootfolder.Internal.Tools.AOLlanguage;
# T8 U q" ^! B8 J- P2 g if current = @.Destination -- else return
2 q; N" U) ^4 F; V then. K0 U$ D' u" d
@.Destination := void;: }( I. q, J0 O J' @( O
if @.occupied then
7 ]# T. z; ~, t* C part := @.cont;; i) w9 ]3 G- z- u7 _/ N
@.transpOrder := void;1 n5 \% n0 B. I2 ~( `
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 J0 m& U% a7 c1 u0 v
@,root.eventcontroller.simTime);
7 h8 Y% S3 r% M @.HasOrder := false;. j/ Z; A( @* A9 u q+ l9 c: ^0 k
@.DrivingHome := true;
' `6 h. P9 C6 q/ r$ N rgManager.tryToStartTransOrder;3 P* b, _# ]+ x2 A }8 a
if @.Destination = void
4 p1 R7 m% c# i/ s; _" g then -- no transport order for vehicle @
8 t, h/ |" E( |* j, A. n @.Destination :=
, P! `) x& V, A$ u* H; c$ _( H rgManager.nearestFreeStation(@,track.~);3 S* A) `" Q7 g7 `0 T
newDirection(@);
# x9 g( K: k& S) w& g' N2 v1 e3 x- N$ V1 F if @.Destination /= void then
' ] I/ U! c) C- d @.Destination.NumReservation :=
; N+ x) {! t2 ` @.Destination.NumReservation + 1;
9 T( O9 _6 ?2 N/ e9 d8 j# K end;
! k! U: ]! U: A. j& G+ S. T, J. @ @.CurrIcon := "drivingHome";
* H7 {7 p+ D& Q3 |; w. }1 x3 T& e @.DrivingHome := true;
2 [% j* |# }. i end;
1 y1 W# [' k- s* {+ N0 K else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 D) _/ w! U7 R/ I3 [ o, @# z part := @.transpOrder;
# ^0 O9 b" t- |& j0 H part.move(@);-- load part
* N" \, `5 u* I. i2 t @.CurrIcon := "load";
5 u, p- t/ r7 X- g& M1 g GlobalDistObj := part.globDestination;0 z4 {7 `3 L: t
assignLObj := rgmanager.rgAssignL;
; P1 q8 J, L- u" h row := assignLObj.getRowNo(GlobalDistObj);3 g8 _$ }$ L/ ?. a6 e8 m
if Row = -1 then -- since 70. f$ k) e: }. e3 \
if lan=1 then. N: X' I# N$ K4 @8 u; `
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 D1 N; [% f2 i2 d2 h. | to_str("in der Andockstation: \"",?.~.name,"\""));
: O7 Y9 j$ R# j9 U) u- J else
" b; `! d8 q% ]% f9 r2 O4 ^ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! ]3 G( ?5 a+ n3 W9 k% j4 _ to_str("in docking station: \"",?.~.name,"\""));
7 [! i }3 n9 W end;9 L A9 o; h: n
else
+ Q9 Z3 b% g# H2 Q @.Destination := assignLObj[1,row];
- u) j& V( k8 F8 ~! _ end; ' a! ^* e" ]% n& ~+ s
newDirection(@);* @0 }; C1 d. d$ s/ T# M8 Z
@.HasOrder := true;
6 I `4 J& I! ^7 g v4 ` end;( q% i0 y+ c; }( ^6 [
end;( j! |1 G k9 b" w7 i W1 F8 b/ l) p
end; -- of the method
8 S$ j+ F! G9 v6 b2 L( I6 S& O |