/* called by: entrance ctrl of the object 'track'
0 v1 b) X' E4 c' G* z7 K5 k: p& F*/& v) _7 S) M. w* j8 b# ~
is- e+ c( T8 h# P( z. q5 V k* k
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: i- R2 t. T& Z0 l: n' @& pdo# y0 s" s7 o- e7 y8 e0 @
Lan := rootfolder.Internal.Tools.AOLlanguage;6 `* @) V% L" _% j) B1 L) M
if current = @.Destination -- else return2 Z \, R0 A. J$ O+ a, f1 G" N8 G, m
then5 N4 c6 r1 f( Y3 K# P- ^
@.Destination := void;1 H$ j0 h: m, d( U. o+ D
if @.occupied then' Q4 E( L3 v w
part := @.cont;
- V/ A) _7 o5 B9 D- N3 b' z3 w @.transpOrder := void;
3 ]" g: ~. s% Q- B part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 L+ T: H: N& n5 q
@,root.eventcontroller.simTime); l0 f. S( H5 ^' u7 a
@.HasOrder := false;( L, i' Q8 n$ [
@.DrivingHome := true;
; N4 s. q% d5 Q6 }# h8 E rgManager.tryToStartTransOrder;
- g4 h n" b2 \9 E1 ~( F6 p2 J4 U& J V if @.Destination = void
* u; j; |, g2 W1 [ b+ A then -- no transport order for vehicle @9 s5 f+ P$ F: X; M7 j w- z) z
@.Destination :=
6 w4 e" @' {6 W) z5 e rgManager.nearestFreeStation(@,track.~);
4 B ]$ { a7 Q9 T, q2 Y newDirection(@);
2 N: J/ ~9 \3 s+ f: T0 Q if @.Destination /= void then* h* f" Q- P8 a+ Y5 Y0 o
@.Destination.NumReservation :=
2 H0 p( m2 C K( E& L' e @.Destination.NumReservation + 1;
; o$ ^+ I4 ?1 H( x8 ^& X end;/ s/ {2 a* z$ |9 S+ B3 l2 U3 _
@.CurrIcon := "drivingHome";
( w" R7 l* a# }. @ @.DrivingHome := true; W3 O# B9 j, Z1 I j9 a
end;$ N' z/ C2 j \2 E8 P
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 P, x9 B! [4 i$ b+ L3 { part := @.transpOrder;$ e/ L5 g, m* M8 X
part.move(@);-- load part' T3 i0 q5 G* }& F# i! c
@.CurrIcon := "load";" h( O- a, u5 o6 \" r: m
GlobalDistObj := part.globDestination;' D: B5 X- z. a5 P4 J% W* x) P1 R
assignLObj := rgmanager.rgAssignL;
/ ^3 |" e4 |2 \" B1 j2 t row := assignLObj.getRowNo(GlobalDistObj);7 e' M; E# {* O$ ?' L
if Row = -1 then -- since 70
8 \& U6 ]( v+ Z/ o9 i if lan=1 then+ N1 P3 S3 ]! ]5 M( Z1 F
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ a$ V* n6 _- q0 T) S. G2 ] to_str("in der Andockstation: \"",?.~.name,"\""));1 H7 _: b9 O, y _
else, q+ h+ g+ v" e9 l O
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 B+ N" Y- E" [, s7 Q4 a0 x
to_str("in docking station: \"",?.~.name,"\""));
5 \/ p' K9 G8 D end;
* P( ^. ?8 [, o( l/ @ else: T' }+ P1 z! y- Y
@.Destination := assignLObj[1,row];+ |- @9 L |) G6 Q+ h: H0 |
end; # L% {4 `5 e) t# C& k! e
newDirection(@);
: q6 {( w* }0 u6 r @.HasOrder := true;5 F. }4 G! y1 Y
end;+ F1 z' y2 |: E' C
end;0 H5 t) X a( n
end; -- of the method
1 X4 f& T9 x9 }1 u8 w |