/* called by: entrance ctrl of the object 'track'
8 G( Q# j. x7 f8 V*/' Q @) N! T! ^9 @5 i* L
is
1 d4 z$ N3 {$ F6 e part, GlobalDistObj, assignLObj:object;row,Lan:integer;# h# b: R) v. _' |
do
% r' H& [* \7 c" t( s$ a% M% | Lan := rootfolder.Internal.Tools.AOLlanguage;
& ^# O( c8 d) H7 q; `$ n% O) E if current = @.Destination -- else return7 G( j J( q; d+ J, O* j \2 A
then
7 K6 A9 c) j6 [, s$ d# |3 z @.Destination := void;
. ?! p* I" o) j) b, A if @.occupied then
3 r, j- P3 o9 l b1 G, }+ h part := @.cont;, l6 V4 |4 X. x
@.transpOrder := void;9 J. e% Y6 b" a& O7 A# r
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- ^$ [( ^% F: b5 N i& R! h) {$ f
@,root.eventcontroller.simTime);4 i( m4 u2 H. |% T" d3 A7 m
@.HasOrder := false;
1 F- h- j I1 a @.DrivingHome := true;3 T; X5 T5 Z, ^1 v2 q+ K0 Y' F4 Y) T
rgManager.tryToStartTransOrder;. f; J K( t" s' c |
if @.Destination = void; h1 w- w I9 i( e1 k0 \- H' s
then -- no transport order for vehicle @
% ^6 w8 z2 i; d @.Destination :=
$ a4 x+ X% V( B9 l" }9 A3 N rgManager.nearestFreeStation(@,track.~);. X8 ?3 d8 s- C% T& u/ A( W& v
newDirection(@); , h' ~1 D" N$ T
if @.Destination /= void then: o, m6 w6 k( L0 H
@.Destination.NumReservation :=: ^: e3 ^4 C: W; f
@.Destination.NumReservation + 1;. t, ~/ g8 F% n n
end;
* i1 a* E: u. e5 h/ N/ Z @.CurrIcon := "drivingHome";3 ]0 q0 ?7 R# H( j. U6 b! ~ v9 }2 B4 p
@.DrivingHome := true;* f+ }' O6 `1 y
end;6 J) b0 Z) D# {( H3 R
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 ?4 ~0 S8 G" g/ c) }. I8 x part := @.transpOrder;; V& R: h. x2 j. }4 T! I
part.move(@);-- load part
3 v, s e1 i E! a" `, V3 a @.CurrIcon := "load";( z. C2 A$ S( I% ^9 u% |
GlobalDistObj := part.globDestination;7 v0 S4 y9 {4 l8 Y
assignLObj := rgmanager.rgAssignL;
1 S4 ?" P' h3 j row := assignLObj.getRowNo(GlobalDistObj);# _5 ]: J1 Z2 S, F% S) A U) ]
if Row = -1 then -- since 70
' F1 g2 j% q* p if lan=1 then' B0 e' \' s: q4 U* [+ \, g
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 Q: d; Z v; q0 m1 s( N to_str("in der Andockstation: \"",?.~.name,"\""));
' ?: L3 Y5 M C" \4 X else
" C4 q9 C, w$ W( z# A# ] promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) x2 b1 P, v6 h0 R$ s2 L6 @ to_str("in docking station: \"",?.~.name,"\""));
- x% \% m- Q+ g0 A% p. k end;
' O; f" W4 k- p5 d6 P% [ else# P' S7 D# A: j% V3 r& j
@.Destination := assignLObj[1,row];
% @! Q7 o7 E2 }! b+ }) ]: a end; 2 \1 I; i! r& m) K2 h' L+ a3 C
newDirection(@);
" ?' O, r D2 J& J+ ]3 B4 O% A( {' E: p! n @.HasOrder := true;5 t. X- g+ k" a# H7 D
end;
; s' N" b5 S- U. r6 }* u end;" v/ {3 q: N2 m/ N
end; -- of the method
2 W( T, z/ |( Q" `$ d! y/ h# n |