/* called by: entrance ctrl of the object 'track'
' Z! H g O9 |. O5 G- S*/- q! P, }# y" ] T) X
is
( k, X* @. Y+ C. r4 r) \ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: [2 a9 L L# D/ X& }7 {do
- l7 S; Q- p7 b9 k% Y Lan := rootfolder.Internal.Tools.AOLlanguage;
' w e v7 o9 w9 X if current = @.Destination -- else return$ t/ a4 R" ]* s
then7 K% K% @% c; T8 u( ?$ Q
@.Destination := void;) a5 x+ o8 w% ?1 M) |
if @.occupied then# [6 z- C9 @+ [1 g% E- ?
part := @.cont;1 U8 I# h2 W+ C. l' t8 g! J3 G1 G
@.transpOrder := void;
1 B' C7 w3 U7 z4 S% C part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ |* j9 u; z0 W" l& l; D8 t @,root.eventcontroller.simTime);# L; T! R7 @6 e) I- n! Z+ h; w" h S
@.HasOrder := false;6 L- _( {$ x4 h' u1 i7 S5 M1 `+ L
@.DrivingHome := true;5 q) y' S u2 ]: X Q( x0 Y
rgManager.tryToStartTransOrder;
- @8 v* }: W" p% B! s$ Q- j if @.Destination = void
( `4 O; i5 G9 g then -- no transport order for vehicle @
. f: Q" `4 l: y @.Destination :=
( z7 a6 ?# l$ I Z$ i; q* S" c rgManager.nearestFreeStation(@,track.~);9 E1 O& R* k5 a, `
newDirection(@);
) Z1 O/ e" V, F# b8 b4 E if @.Destination /= void then# Y/ m0 [0 q+ l) |! b5 |
@.Destination.NumReservation :=
% y5 M w7 K* S$ ?0 A @.Destination.NumReservation + 1;- O1 m3 {. u0 q7 L& ?/ u
end;
: w' l/ o1 m; O( s @.CurrIcon := "drivingHome";( [! ?9 Y# z, F- N
@.DrivingHome := true;
- W+ `3 B2 R. a( G end;
/ u0 N+ _7 g2 b$ y else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& k u% H! ~! f part := @.transpOrder;
7 P0 r! N9 ?& a1 E) P% P1 l part.move(@);-- load part. `* [3 g& t2 B; J% y2 z
@.CurrIcon := "load";/ ^; E- G1 {, I0 i) U
GlobalDistObj := part.globDestination;
- n X% ]$ y }# Z1 {% l5 y assignLObj := rgmanager.rgAssignL;) I* q, b- b! i5 M
row := assignLObj.getRowNo(GlobalDistObj);' r( ?' g M5 _9 E- Q
if Row = -1 then -- since 702 m) s# l# `# n1 I+ Y c
if lan=1 then
2 X, \. D' B _( S promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 {2 y2 Y5 O. \& s& z; g to_str("in der Andockstation: \"",?.~.name,"\""));( S/ K7 @) s; ^5 ]
else1 [$ e2 E; S' x: H# e2 X! K
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) v" y0 `" g! C& Y# q to_str("in docking station: \"",?.~.name,"\""));
: U. M, N$ q3 i6 I' M2 V A9 f$ V end;
3 G4 h5 \+ v, m( y else
3 ?- x- l& L, P" o @.Destination := assignLObj[1,row];
/ p; |0 c. \- [, o# T: | end;
. l0 {% |' D3 e( G" n newDirection(@); m$ @4 Y0 x6 h8 ~6 B8 ]# O
@.HasOrder := true;" E* B. E9 o2 ^9 |/ Q
end;
$ O/ j2 |9 r4 O7 E3 K, @9 M end;
( X% o: b/ w" s9 |. _end; -- of the method# _) S3 N' q8 \7 l# L1 @
|