/* called by: entrance ctrl of the object 'track'
/ a- `- t# E/ G*// Z0 C+ ~+ r6 b
is! a; S! a4 @! U% c0 W, G) y6 E2 ]
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' V0 @; y6 H0 _" @" {do) W. l8 B6 Y, F" R
Lan := rootfolder.Internal.Tools.AOLlanguage;
6 X4 @4 Q* C* h. _! f! z if current = @.Destination -- else return" v0 c+ ~% b! l) {; ?
then- v" L" Y [( J% ^$ g
@.Destination := void;
3 q5 c1 @" X, B6 U if @.occupied then
1 w6 h8 ]" q' Q( h. o' p part := @.cont;
" o2 k) I; D2 N2 p1 Y @.transpOrder := void;7 M7 ]6 c4 M7 Z2 G2 u0 @1 J
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 n$ b5 B, N: G9 X2 ]
@,root.eventcontroller.simTime);3 t y+ k. C v# A
@.HasOrder := false;
9 y c$ Z+ U& A6 ] @.DrivingHome := true;
7 l8 m& J7 B# ^+ q/ Y7 E7 |5 e. H rgManager.tryToStartTransOrder;. \: {1 n) u5 [8 O
if @.Destination = void
: v7 Q9 u) {0 u, W8 K then -- no transport order for vehicle @! h! ^5 N, l1 Y$ d9 p, X
@.Destination :=+ y: u- r0 E" I
rgManager.nearestFreeStation(@,track.~);
: q g# K. O& [( x, x newDirection(@); ( I( g5 K4 l. W4 c j( d# f
if @.Destination /= void then! |( @* v! Y1 G
@.Destination.NumReservation :=
# m' b$ {! e$ j @.Destination.NumReservation + 1;
# X7 f7 P5 P, G, E" c5 {3 @ end;$ L9 `! r% O* {& K% U
@.CurrIcon := "drivingHome";
- u4 ]" E% C$ b% {" { @.DrivingHome := true;$ R8 r/ {+ \' F% {' Q$ A
end;
) C8 ]& l( P! y0 r else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 O6 _5 M; v m% @
part := @.transpOrder;
1 s) W: @4 b! ~( ~ part.move(@);-- load part1 C1 d3 m+ c' ]) }# v
@.CurrIcon := "load";
+ [$ y6 G l% w! c% Q GlobalDistObj := part.globDestination;+ V9 ^7 _! w" y; M) B4 M( k6 w( n
assignLObj := rgmanager.rgAssignL;/ e( @4 G% k9 c
row := assignLObj.getRowNo(GlobalDistObj);
: l2 x9 _ ^0 z; N8 p | if Row = -1 then -- since 70
7 x6 \1 T2 U( n0 m if lan=1 then1 N% m! I9 f0 h+ |' ^1 U
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 K5 ?% F9 a/ x: h0 D1 c. U7 @9 } to_str("in der Andockstation: \"",?.~.name,"\""));
1 ^, r% p* T3 y, d3 f$ ?6 X2 s else
9 N7 \. T/ c+ ?# j+ m) `1 I3 K! j promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, V @' v/ i4 p
to_str("in docking station: \"",?.~.name,"\""));
3 u' T U6 G4 R0 P. D" Q2 } end;" l; P( K! Y/ G6 Y- z& v/ m/ x1 N
else
$ @& \* o- l A- s) r# [ @.Destination := assignLObj[1,row];
$ x, d% b8 X# R, x* ]- ~- V end;
8 f7 `) U; W( p7 D/ v newDirection(@);; i1 Y: s, S! r3 G$ N
@.HasOrder := true;
8 t2 U& L/ Z+ N. |7 m7 [& b6 W6 K end;
9 t$ A2 M: c: y" [ end;' b1 O" ?* z' a# r- U4 g
end; -- of the method
- F. ?0 E' u, ^- g1 U2 ~8 [7 Q1 Z |