/* called by: entrance ctrl of the object 'track'
" h( j$ n: g: u1 W- u# ^*/; `7 Y' ]* ^6 n
is
' u) @* d9 @4 j( Y r( ?' p- A; N part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) l8 U% Z, `* j0 a# Y! t6 cdo5 k/ q. x- V% Q
Lan := rootfolder.Internal.Tools.AOLlanguage;# K0 x3 w2 \2 s0 c) R8 l% l- _3 q0 \
if current = @.Destination -- else return' d7 J4 {# L$ i+ O! O3 a/ v
then
0 M# ~1 P! _" F @.Destination := void;) X' b* n1 b% M4 r- X" b W' y9 q
if @.occupied then& O2 m1 z# l" B
part := @.cont;
2 _% r' x: ]+ V @.transpOrder := void;# [, b2 N1 [1 I6 P$ L/ i
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! W6 Q3 ?- d- ` V) a
@,root.eventcontroller.simTime);
/ o5 X: e8 E7 e0 S% ]! l/ [9 f @.HasOrder := false;
8 \; \* i: G4 j$ r0 W @.DrivingHome := true;
4 C; Q ?& E3 Y% l rgManager.tryToStartTransOrder;/ c/ X5 u/ t; k# U5 X) C; d
if @.Destination = void
: S8 ~3 B2 |8 T/ O i) v then -- no transport order for vehicle @
: I: ~$ g& Y' x; N. T; H @.Destination :=
5 D) c; I0 G- e$ c% X1 J2 H5 z$ P' w rgManager.nearestFreeStation(@,track.~);
* H+ L2 S" C8 R; @3 [# l4 v, Q" p- T" g newDirection(@);
3 N) V! H; _1 E+ Q if @.Destination /= void then
$ z! Y; ? X( k- I: g; J7 F @.Destination.NumReservation :=/ r4 K, ~# B5 r. E7 T+ o5 R
@.Destination.NumReservation + 1;
9 d2 F& x& G. @+ S( a end;
+ I2 X; [( m5 V+ h" Z+ | @.CurrIcon := "drivingHome";
& L W8 `8 C" B0 _ @.DrivingHome := true;& L0 y2 o8 z7 O8 D7 J4 L% Z, X
end;$ H' W8 J( L& }6 w
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" ?2 o, x1 i- {- Q* i$ c part := @.transpOrder;
5 d" H% k1 `$ r B% m! c part.move(@);-- load part
. u l# @/ z/ J @.CurrIcon := "load";) J/ R3 D0 y# M% A6 p! o
GlobalDistObj := part.globDestination;
, E7 C6 V% |# k" k9 S% v assignLObj := rgmanager.rgAssignL;& `# G+ F( D2 e* E+ v2 \" ?: A
row := assignLObj.getRowNo(GlobalDistObj);
6 c% L2 t) P5 v( \ if Row = -1 then -- since 70
( ^4 o, |- H5 i if lan=1 then
" y6 r/ e" E- A promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 m x& \% X" f& K; [1 T+ D2 c to_str("in der Andockstation: \"",?.~.name,"\""));2 \5 b( r9 v: u. X! c% m* p; [
else% o) a& t. o' W% b: R* X9 Q3 x
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, V p& \+ ~2 [9 ]9 e
to_str("in docking station: \"",?.~.name,"\"")); * X1 W+ Z, g) H0 I9 V0 s7 d
end;- W$ Q7 B9 ]" R9 C
else
& U' d( f- ?9 ?7 Q; F @.Destination := assignLObj[1,row];0 t/ T. H! k. V" |$ B$ \
end; 0 A y& T5 @1 @0 J+ }; S' K/ C
newDirection(@);
1 |/ R' v" S& D @.HasOrder := true;' }% m8 ]9 ]4 ~: A
end;) r8 m# |9 K; _8 p* n1 B. m: x1 _$ ~1 o
end;6 _2 V |% Z0 F# |6 d0 o
end; -- of the method: r( ?- w3 e$ p; M9 b( ]- z
|