/* called by: entrance ctrl of the object 'track'+ ]7 V- b# x) b9 v2 r+ W% j" ]
*/0 B+ Q2 T0 X( _
is+ Q( m* \+ ~1 L( x4 f
part, GlobalDistObj, assignLObj:object;row,Lan:integer;' q- k" a- M W% Y- k
do
4 o2 y; B& z- k& b Lan := rootfolder.Internal.Tools.AOLlanguage;
/ R+ K+ ~1 N( v; c: w8 z if current = @.Destination -- else return
8 F5 p# T: K( b5 O. E then
# R! R/ }( B/ u' M @.Destination := void;/ h6 o* a5 {/ I& _. T
if @.occupied then9 P8 I! k/ E, u+ S) V; E( f1 s; f
part := @.cont;# r3 W) w$ E+ t
@.transpOrder := void;
7 z6 `5 `' K( C4 u7 h. E* e: f part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; ` U3 R' A( L7 E: ^
@,root.eventcontroller.simTime);
3 x- a* Z5 Y" ~' p1 G @.HasOrder := false;
! _5 n8 I( h; b1 v; C+ U @.DrivingHome := true;1 f; I! q+ o% o+ a7 a& G% U {
rgManager.tryToStartTransOrder;# `9 W6 j9 Z+ E3 \% Q6 f
if @.Destination = void( P1 ^6 @. t! |# u' c- v* {! f
then -- no transport order for vehicle @
1 d1 x5 M+ \7 G @.Destination :=
+ c' T+ q9 C4 l' n rgManager.nearestFreeStation(@,track.~); w+ g7 a+ l5 J0 H g
newDirection(@);
6 s; G+ Z; t+ _; w/ z" c- G6 S if @.Destination /= void then5 i d5 Y5 Y* @: U8 |% K
@.Destination.NumReservation :=7 v. m/ t0 o+ `& Q! y
@.Destination.NumReservation + 1;
0 Y3 Z) X0 _; C7 ~8 Z4 p6 u end;! I% Z" f0 L: J# K3 L+ @- t
@.CurrIcon := "drivingHome";
. w& P* G; s6 n1 [: s @.DrivingHome := true;! E+ y3 C1 W: N2 B3 T
end;# J; T! E0 W) W! A7 G' R
else -- the vehicle @ is empty, both vehicle and part are in the same dock station [- ]! O, V+ T1 h+ g3 K
part := @.transpOrder;- M5 {* s" {. V: `- T( l; z
part.move(@);-- load part7 |* n4 m$ }* |' P% z
@.CurrIcon := "load";
4 `: R$ U( ^; b! j! C. X2 B GlobalDistObj := part.globDestination;
. x# G" l) W5 A assignLObj := rgmanager.rgAssignL;
$ p+ }* i8 c- i6 V! a row := assignLObj.getRowNo(GlobalDistObj);; [6 t( ?+ B3 H
if Row = -1 then -- since 70
- ]( z0 f1 f( X/ u- v if lan=1 then t6 ~# ]( S+ D \0 s( D( H# o- L
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: W& N) ]; U$ M to_str("in der Andockstation: \"",?.~.name,"\""));0 ~# V& u4 V/ f6 D; U
else
% b# N) d# q6 b promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ Y' m" N. Q/ W# R5 |1 ~
to_str("in docking station: \"",?.~.name,"\""));
# B1 f" m% |1 F# _3 Q8 R" M end;
# q: A }; J4 {' d' q7 z else% g+ t* G3 R. a- i& u
@.Destination := assignLObj[1,row];
5 l) ^/ {9 {* E8 ` end; * _3 B/ k) Q5 E9 x. I% L/ P
newDirection(@);
9 n' R( q4 e6 \ @.HasOrder := true;
+ A, p5 U q7 X' X0 z) H end;" _; S' j4 [! X* V) ?, p
end;1 Q" ?# t* Y9 Z: X6 R
end; -- of the method
5 e0 L( ^- y5 l) q: _ |