/* called by: entrance ctrl of the object 'track'- v9 p6 ^& ^7 s
*/ A6 I, H3 M) I1 Z6 D% W
is
. X- s# X; E8 I/ Y1 Y# k7 h part, GlobalDistObj, assignLObj:object;row,Lan:integer;' v& m4 k& p% p! n/ ?
do
7 f% R1 E1 U+ W/ |4 H# H Lan := rootfolder.Internal.Tools.AOLlanguage;! `9 I/ I" O2 }9 Y0 k2 v
if current = @.Destination -- else return
- r. r* e: L T+ K8 Y; w" \ then4 [) D* M- y0 X
@.Destination := void;6 @5 ?( y1 ^; @$ p& r/ U
if @.occupied then( i% Z% R6 D0 V: V* g l
part := @.cont;% {9 @4 u. }3 j6 X5 ~( I
@.transpOrder := void;/ t5 _. X0 A4 S# U& Q9 m0 x9 H0 F
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 X P* I2 U7 Z9 B# g
@,root.eventcontroller.simTime);
1 A/ u' b% h+ y2 Z: x# }" l4 ^ @.HasOrder := false;. ^& K2 h: t4 q1 W9 e# T) N7 ]0 v
@.DrivingHome := true;
1 V5 L2 N/ F# f5 j rgManager.tryToStartTransOrder;
- R) c6 D" b! n8 t2 A0 B if @.Destination = void" ~9 t4 y0 }0 v, y3 F5 i9 A* j
then -- no transport order for vehicle @
8 z/ \" L5 A, C0 s @.Destination :=) J" G9 X) J# {* ]$ s! x1 o F0 Z$ e! z
rgManager.nearestFreeStation(@,track.~);( x% p, j, d0 F) z! d4 r
newDirection(@); # ?2 K" P1 v0 A/ j8 U% X5 g
if @.Destination /= void then; O3 g1 I7 O) n. w, g* j
@.Destination.NumReservation :=
6 [( G* A# y* H6 {: o' d @.Destination.NumReservation + 1;2 o% o: \7 Z8 F; v: e2 [
end;: ^2 B7 `; ^8 ~5 K8 s
@.CurrIcon := "drivingHome";1 }+ ?* j- q' a r* i9 L
@.DrivingHome := true; d# \' p9 G ]8 F' H
end;: t5 s- q" k( v! r
else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 v# W R$ |9 {! f- f9 y
part := @.transpOrder;8 s7 }4 J6 ?8 L g- n/ {
part.move(@);-- load part- g/ I4 {8 n; t& {+ \: n, b5 D
@.CurrIcon := "load";
8 }7 |+ X6 H* E; r+ ^- S1 c- L GlobalDistObj := part.globDestination;" L/ v+ } C; e8 n8 k+ j, o8 F
assignLObj := rgmanager.rgAssignL;, Y3 Z& A) r1 } @) T/ G; e0 R
row := assignLObj.getRowNo(GlobalDistObj);3 B8 V8 D: ]: g6 o) [5 u4 K0 d! J& O
if Row = -1 then -- since 706 @( R: n& |8 u- L8 p/ `+ ?
if lan=1 then
6 x3 {- `. z' P4 J" G% }: u [ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 }% Q: k' n# _5 K6 Q to_str("in der Andockstation: \"",?.~.name,"\""));
4 K1 q6 ^# F% [; t$ Q6 \8 I else8 j/ p4 p- m; X, p6 z
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" s9 o/ }# O. e; X* |! R to_str("in docking station: \"",?.~.name,"\""));
/ X( _6 n; m/ T) p3 ^ end;
5 [# H \: ]5 X! c1 f6 V7 ? else
2 _7 g9 t5 L0 ?! x0 \" \5 X @.Destination := assignLObj[1,row];6 d( m6 S, O g) ~# t
end;
6 E$ ^3 a3 m6 g! P newDirection(@);7 d* Z* h4 z7 _; b5 K E5 J1 F2 U
@.HasOrder := true;+ j' S- z/ S' H# s: F J' G
end;3 R" W. X2 Y7 |1 P
end;
! g) J1 b4 c; N) oend; -- of the method
- j5 ^/ y$ M9 K% b. Q0 i |