/* called by: entrance ctrl of the object 'track'5 k* h! d4 r9 e- M. r
*/
. T, ^* U1 a8 ~# p/ Tis' x" @ f- n# a$ Z5 a/ l" g. X. O
part, GlobalDistObj, assignLObj:object;row,Lan:integer;! l0 I7 g& a. i) b7 Q
do( s- L& x4 ^5 Z' `, h
Lan := rootfolder.Internal.Tools.AOLlanguage;
! m0 t. b) w+ w if current = @.Destination -- else return/ m; z- |( O# ?1 S2 V' C- ~; E
then' D0 k$ A5 X( G2 i& [5 Z! N; Y
@.Destination := void;6 ~- Z5 n ?1 J% |; i
if @.occupied then
P3 @6 {. Q9 z: J4 C part := @.cont;
a R- `$ T/ i( Z4 g/ H @.transpOrder := void;
$ P' J8 b, C4 d% _; @- P, W part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# G! I6 Y" v& n- X5 `4 K
@,root.eventcontroller.simTime);
5 S; {* |9 z' f2 a% Z2 \& M" J @.HasOrder := false;
3 y7 T5 i8 w1 U. m( U4 B @.DrivingHome := true;
6 @' [- Z6 N9 j8 Y7 y9 L rgManager.tryToStartTransOrder;
- N" J7 l. }$ T' N" Q: U- h+ G if @.Destination = void
`" U$ z2 j- O. k$ X then -- no transport order for vehicle @
, j8 i& k! }/ p! ?$ Z$ i @.Destination :=1 J# R0 W9 `/ B( s# C9 v( m' w
rgManager.nearestFreeStation(@,track.~);& d, M2 B/ |- Z3 v- ^, E4 G/ ~' {
newDirection(@); 4 l5 z' w" n$ L5 |+ {8 C; L1 f
if @.Destination /= void then
: U& ]6 W4 q$ m& P# Q' ~ @.Destination.NumReservation :=
+ n" k! J% J. k r G2 X+ N @.Destination.NumReservation + 1;
& H* B, t( {" A0 G' p end;
0 l2 m; R5 @/ {$ _6 x- G8 B @.CurrIcon := "drivingHome";
8 J$ P3 }' u* }4 K6 M2 Y0 D @.DrivingHome := true;
( P: e) |9 z2 B end;$ J6 J+ d# X" y' I& I$ G( `' J
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' f, P8 ~/ ?+ L7 q part := @.transpOrder;
* W6 y- W8 I p1 E% N* v part.move(@);-- load part
: x& J- t9 V7 J/ C2 r5 B1 A8 X* { @.CurrIcon := "load";4 \8 l% _, L0 v# S3 d+ y
GlobalDistObj := part.globDestination;
7 x2 B5 T0 I# L2 s assignLObj := rgmanager.rgAssignL;- q0 m, y5 v5 t' H; A
row := assignLObj.getRowNo(GlobalDistObj);0 n+ W2 Q9 z5 \% g; L/ t G5 [
if Row = -1 then -- since 70
a* K! K$ f' u' {& `- g6 b0 f8 V if lan=1 then2 P) ?7 G# V: }9 O0 e7 j2 n
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), N/ a9 n% j9 L+ z. H- @
to_str("in der Andockstation: \"",?.~.name,"\""));& }( b0 y7 V' f" v# p: g7 G
else
0 c( H2 F! y9 S# m, A6 P promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 c2 Z% m/ S7 P9 r4 o. `
to_str("in docking station: \"",?.~.name,"\"")); 2 g( X) E6 H* |% H% l+ r7 }" W
end;2 n2 X9 C& k. o* b0 x( o# I
else7 u b5 y) Y J& C/ f
@.Destination := assignLObj[1,row];) `0 S$ }. P' ?) p+ U
end; 3 U# p: ^# M3 _- y+ J
newDirection(@);
# j: u& `+ J$ [/ _( T5 ?8 | @.HasOrder := true;
9 @7 _. o" {7 _! o end;
/ X/ ?: ]/ d- s8 s! S* \6 f0 ? end;
- e* j0 n3 T" N" D1 M8 tend; -- of the method' O& h- |/ q! b2 u# {- M
|