/* called by: entrance ctrl of the object 'track'
M) Z& \8 \2 e. ], @+ I! Q*/
2 J8 f! L# N* ^3 Sis# _3 z' q: i0 G6 F! N
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ U) v; Z Q( a- g: f0 Fdo
4 b3 [# `9 z7 Y+ n& l Lan := rootfolder.Internal.Tools.AOLlanguage;
$ @: q, }+ z. P6 i0 R- X1 r: r; T3 K if current = @.Destination -- else return6 P) M! b1 b8 r1 {& ]4 L8 G
then
" X: X& j! y3 c @.Destination := void;9 W7 F0 |7 }3 v7 `
if @.occupied then
/ W; m% Y$ O+ q4 Z% D part := @.cont;( @+ y# J0 I( n
@.transpOrder := void;
# n3 ]1 E5 y, {& e1 } part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. A. {7 H, _4 t9 `
@,root.eventcontroller.simTime);
* J. ^' N! j: G+ I7 c2 O @.HasOrder := false;
/ f; L% @" ]. v' o) d @.DrivingHome := true;: y6 r" J1 S' G1 a- U
rgManager.tryToStartTransOrder;
; o% u: ?* n+ ?) S& q if @.Destination = void
: w1 k, i. g# ]5 b% ~5 B then -- no transport order for vehicle @
& b, W5 |& B3 K V2 E @.Destination :=
; \" _3 I% l! K3 Q- ?" ?) ? rgManager.nearestFreeStation(@,track.~);$ ^* u7 j, v7 U$ I: D I
newDirection(@); 7 s( [6 }2 X. W# T' h
if @.Destination /= void then
7 V0 x+ {- T4 g! }3 V1 v/ _ @.Destination.NumReservation :=
& Y U; N- M2 S+ ] @.Destination.NumReservation + 1;6 N- ?, \4 D- n% { m
end;1 d9 O5 \5 @8 \2 R5 b8 n
@.CurrIcon := "drivingHome";7 a6 X$ a; v( g9 ^- G
@.DrivingHome := true;' k/ Y2 a- A' T7 I% T/ K- `
end;; B, j& n& c! ]& B9 o) ^2 |; `+ C
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) w6 b% P. A! t8 V8 \# H1 E5 Z part := @.transpOrder;
) N% I4 E" Y/ c! M part.move(@);-- load part+ X `8 ~) a' \8 z: H5 v) x) h3 n
@.CurrIcon := "load";
! q; L! Q" j" c; {" i" n) K GlobalDistObj := part.globDestination;
9 C2 E: i7 f8 f7 s assignLObj := rgmanager.rgAssignL;
3 g0 } j' @8 Y* E" n row := assignLObj.getRowNo(GlobalDistObj);
' k: y$ a" I' {: ]+ z) ~, [ if Row = -1 then -- since 70
' p3 K8 s8 ?" N( i' W4 ]) e if lan=1 then, j& ~4 C4 N" d% q1 }
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; J( Z$ W0 ]0 e3 g
to_str("in der Andockstation: \"",?.~.name,"\""));# K c9 q. i( h2 ?
else: V0 n$ O! I) n( Q% B- F
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 c f+ P( O/ s& C( L2 ]- f2 i
to_str("in docking station: \"",?.~.name,"\""));
( X; T4 U+ N" V3 A" v4 o end;
: r' f; r: N; s/ u* v1 g else/ J. Y) V1 B2 E/ S; i: s" A: D
@.Destination := assignLObj[1,row];' u6 ^4 s% h' G8 ^" q
end;
6 a6 \9 k( Q- U9 E newDirection(@);
1 D& q: q9 E' h1 x3 w @.HasOrder := true;7 G& H0 J+ C6 E, F& i
end;4 X& Q! {/ E, s3 ]; x
end;+ Y: X' |; {' l/ n; @$ z- `+ ^+ _
end; -- of the method9 }2 t0 Z0 T( c! ^$ Z
|