/* called by: entrance ctrl of the object 'track'
0 u% W& ]1 C# @' y1 f5 E N$ H*/) H- z/ k* P3 H
is+ T: a8 O2 U3 C( t* c( {) y6 d
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: A: R: Z; @. cdo9 e% D* F8 B2 b' \0 o) u2 K! Y& J
Lan := rootfolder.Internal.Tools.AOLlanguage; @1 Q# f0 ~0 S2 I2 C+ F! F
if current = @.Destination -- else return
1 i. \4 ^6 _7 k. i! F* \9 h then
! o4 N5 r# }+ f _ V8 [ h, k* W @.Destination := void;
- g. v) e, j' ^0 j if @.occupied then
C5 Y/ v' S o( V+ ~3 H) w* [" n part := @.cont;
# C$ V! y/ k3 R) j1 G; \4 ]8 y2 `( K) Q @.transpOrder := void;
6 e: g% b. U# R& Y7 z) Q1 M part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 ~+ f8 \; r$ l) I% P
@,root.eventcontroller.simTime);
- T! z8 o& n5 [) y- W5 [3 N& ` @.HasOrder := false;
8 H" Q- [5 j# o+ F- ^ @.DrivingHome := true;
4 c* [5 N# M+ d6 c4 N# _2 s7 P rgManager.tryToStartTransOrder;
$ j; u- M' o- i- G( | if @.Destination = void( W% d" V1 H0 D
then -- no transport order for vehicle @
! _; ?% N; {; d9 |! W) L @.Destination :=
) u- b1 N6 t+ R8 d/ u3 d1 U ]0 s rgManager.nearestFreeStation(@,track.~);/ E* ^( E* c. o" O4 R" W
newDirection(@);
1 Z6 w2 I0 t8 k1 s6 a& A9 @; M if @.Destination /= void then
O' k: n% V" ]: @+ ~% E @.Destination.NumReservation :=
; k8 O p% p0 f( q4 V* d5 c @.Destination.NumReservation + 1;' K# W/ G) Z Q+ v
end;
; F7 f% J$ o! I* \; r( d @.CurrIcon := "drivingHome";
( T# R8 d7 d* W5 O# L' D @.DrivingHome := true;
/ _3 S3 v: n; X end;
% v+ _" I/ p6 P+ a. j else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ D& o6 ~2 w( i part := @.transpOrder;9 g* T# z3 m# C5 k4 L% `
part.move(@);-- load part2 i! y- @/ ~$ y7 q, H7 E. J& c
@.CurrIcon := "load";
9 H n0 [/ ~. Q% J; D GlobalDistObj := part.globDestination;
7 a1 }1 \. Z: B; }5 T _/ x assignLObj := rgmanager.rgAssignL;
0 I( @ o) G" o6 V' X row := assignLObj.getRowNo(GlobalDistObj);
1 S+ R0 b6 n/ y5 i0 d if Row = -1 then -- since 70: O$ x. ~/ y/ k8 i& r
if lan=1 then+ s* E, {. ]7 o2 b. Z- N; i
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 E* i4 g1 y2 I
to_str("in der Andockstation: \"",?.~.name,"\""));
- f9 p5 [. J( y else
( a- [8 T! ~9 C. V( j promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 P4 n1 q0 E9 a; L% j& O to_str("in docking station: \"",?.~.name,"\"")); # ] W0 E9 f; R6 f N8 R/ x
end;
& P" z* M X, n8 a else
, v; C# @' X5 h& q4 F% z% T @.Destination := assignLObj[1,row];5 j. f0 ?* v0 _' R
end; ' X4 }' C3 }. r0 N. D
newDirection(@);5 ?+ |! o7 {+ h: f
@.HasOrder := true;1 t, v$ \8 j2 A& @. I+ [" J/ S
end;
3 Z: b$ B& o' j" n" O3 X" \% t+ B end;
) X9 M6 D0 r' c, c2 v# m Jend; -- of the method
: v2 c4 T0 v9 e0 f! Y |