/* called by: entrance ctrl of the object 'track'
% N# k/ S0 |/ K8 P% G6 P*/$ E& a% M2 M9 `- L) h+ D* }
is' s2 G* u6 X. ?4 R3 Q7 C
part, GlobalDistObj, assignLObj:object;row,Lan:integer;: S# o8 b% s* ?& r' P9 E
do/ M+ _% W" a: W$ p9 T: L% R
Lan := rootfolder.Internal.Tools.AOLlanguage;
1 R! x3 B2 R# C/ F [+ O$ F if current = @.Destination -- else return. w2 c. }/ d) @% Z J/ b
then
5 g+ p9 Y' ~8 s t; ^3 z @.Destination := void;
8 @: h. P* f, _ if @.occupied then& Q) X$ z, w6 V1 r8 l; H
part := @.cont;
4 G% J. m. [6 X9 Z! ~5 Q# q6 _ @.transpOrder := void;
, _- g# z; E9 y4 f part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 h; L9 u, I7 W7 t
@,root.eventcontroller.simTime);
; O8 V* ~6 q/ e9 u4 V- z @.HasOrder := false;
: |9 e' k% `0 I6 U; A6 O0 e" i, J @.DrivingHome := true;
( S) s' Q- h% _5 D/ e6 m$ {$ y rgManager.tryToStartTransOrder;
8 Z5 F% z( P1 G5 `2 M if @.Destination = void5 @: k0 f6 B; J h, n/ B
then -- no transport order for vehicle @* r" T8 {. c& c! A; n! L2 p. D' B! g* \
@.Destination :=* X+ h; q- ?( P- X
rgManager.nearestFreeStation(@,track.~);4 J1 l, O/ F; c, y6 k/ a
newDirection(@);
& d7 q' Q% X1 B% T% T2 p( X) S if @.Destination /= void then5 g0 v: G" n/ `! A. n
@.Destination.NumReservation :=' Z# Z1 U$ g! V P. j! R$ k
@.Destination.NumReservation + 1; c0 u' {, M6 A% a4 L7 }4 Q4 T
end;) i- [2 a: _. q
@.CurrIcon := "drivingHome";
& y, v. G7 L1 i) N) A" [ @.DrivingHome := true;4 |+ j! f+ X! R3 V
end;6 z; ~; X$ R0 W$ d* C: m
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 N+ n2 H! w. h" s3 H% G part := @.transpOrder;
1 e% F* s" Z8 J part.move(@);-- load part
0 V- V4 @" w. ^& {* K @.CurrIcon := "load";( X) k) l* }% H6 @. l3 z; `
GlobalDistObj := part.globDestination;( F# i9 s* _! X! z% D W
assignLObj := rgmanager.rgAssignL;
4 j. l v1 I6 S% X1 k row := assignLObj.getRowNo(GlobalDistObj);: T( u( u6 J7 l
if Row = -1 then -- since 70% @3 j2 y7 N6 ?$ s' E; j$ w$ z" \- f5 z
if lan=1 then, {+ R% ?8 g" g- k$ E: b- y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% z; w& F/ M* {! R
to_str("in der Andockstation: \"",?.~.name,"\""));
0 o) B2 ]& K X# B" Y* u3 c' P else* o" ?5 s Z; _. M
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' P0 F8 U* ?& P. a: [6 J to_str("in docking station: \"",?.~.name,"\"")); R7 x6 }; e, A9 G' M
end;
! j; O- P5 ~; K! g. Z& r* L/ i else
3 Y! ~8 L U7 P0 C+ w @.Destination := assignLObj[1,row];
9 L' R5 M$ k! l; Q- S( H. k end; 5 t1 N! C. N( R/ ~
newDirection(@);
+ ~2 X- n( c1 d; S @.HasOrder := true;
. L+ v' w. U C9 U end;
4 T7 T6 R a% H: _ end;
, e. Q) V+ v% e8 \3 Lend; -- of the method
' U6 c6 T8 r/ g+ b( r* C |