/* called by: entrance ctrl of the object 'track'
! [2 }9 G, t$ h' c. |*/
, W3 K2 e3 W& [is0 _# l; @/ @; ^! l6 D8 I3 G
part, GlobalDistObj, assignLObj:object;row,Lan:integer;, d3 c6 z7 b% E" D& K
do
9 w. e% X1 [- G8 e! n Lan := rootfolder.Internal.Tools.AOLlanguage;
8 |. H) N! N3 @) \4 M if current = @.Destination -- else return8 C% q- j0 p- w' `. U
then9 I, N, Z; I% x# ? v) a( h
@.Destination := void;
" r- R3 F$ a" n$ S0 ]# U4 H if @.occupied then
& X2 A' `0 n' J5 i part := @.cont;/ O7 t. h+ o+ k% f2 V/ P
@.transpOrder := void;
4 V" j- b) N2 b part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ W% \3 c" C) E @,root.eventcontroller.simTime);1 Y/ @( [8 |/ _' u9 \0 }' Y
@.HasOrder := false;
( C+ Q4 ]0 l. K' x& I1 P6 {! R @.DrivingHome := true;
K4 G$ g; P4 n rgManager.tryToStartTransOrder;
0 I1 W. l2 h3 P5 Y! r' {! | if @.Destination = void
K, [( j& I; b/ V+ {0 E then -- no transport order for vehicle @) H$ n: Y3 Q/ Q* \$ ?+ \2 M
@.Destination :=
5 B) Y+ ?& i* c8 ^5 O3 e0 P rgManager.nearestFreeStation(@,track.~);
* a0 C* v: ~% O8 b newDirection(@);
. R6 @& B% n9 \& D7 m( Y if @.Destination /= void then h8 [: y* m9 \& |0 T
@.Destination.NumReservation :=* h( g. G7 n+ k0 P
@.Destination.NumReservation + 1;( a" c- `' H* a! i* _" J
end;8 Z1 T2 J* k1 p3 M+ @6 e3 c
@.CurrIcon := "drivingHome";
3 i: ?8 ]* [' o6 q @.DrivingHome := true;
" n4 |+ A( K2 I0 O! G6 r end;
, U9 \$ i# N: m! J else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. |& I4 M `, J: u& |1 W9 x part := @.transpOrder;
3 @$ T; X7 [& s' y4 Y, e2 C1 Q- p part.move(@);-- load part/ U/ l: e& o% u0 d# H
@.CurrIcon := "load";
$ s( a2 j/ H9 K! p; \3 v- _( [ GlobalDistObj := part.globDestination;% }9 [4 n7 r) ]
assignLObj := rgmanager.rgAssignL;
- B% o$ L2 Y8 D8 V3 ?& r% ~ row := assignLObj.getRowNo(GlobalDistObj);. Q0 u e, j; U& U
if Row = -1 then -- since 70
9 i/ S0 f1 E2 d. n( m* O6 c5 | if lan=1 then
: X! \, ^- n* V promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ V5 b. L7 V8 J( f! z0 u( U5 d
to_str("in der Andockstation: \"",?.~.name,"\""));7 {. n4 ]+ L' S5 u, A
else* f I0 u$ j0 ~( c! Z4 w6 @
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, Y. b+ J3 g% I* ` to_str("in docking station: \"",?.~.name,"\"")); / ?( O7 s& z" k2 X; z
end;- J1 c- d* d9 [
else
8 L3 U! Q5 ?* t @.Destination := assignLObj[1,row];6 w) ^8 t) f5 \& Q" ^. K
end;
0 a0 O6 ]: W, d9 @ u, C* b newDirection(@);+ f* m& d' J3 ?& M
@.HasOrder := true;! \) \# M- [" z5 [# [
end;# b- c ?) W9 @5 i* l9 C. [
end;9 q) D* B2 F0 e0 F M: m9 A* K
end; -- of the method
+ w M/ f( o* S2 Y n2 Y6 N |