/* called by: entrance ctrl of the object 'track'. d) @/ [$ _1 W
*/
+ ]5 v6 H* Z: e& w1 h5 bis
& }/ A4 |# G& Y7 Q8 s part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 m$ h' F* w2 {) C9 `
do
) v" _7 W6 d9 g5 l k Lan := rootfolder.Internal.Tools.AOLlanguage;
" d _. y8 g. D% r3 w if current = @.Destination -- else return
N$ ]; x) D! o then( Y/ n; U* I, A* n4 j
@.Destination := void;
5 _, i: `9 ]9 T+ Y1 z8 R' h/ j if @.occupied then( |# G$ T9 M' E" S+ c
part := @.cont; V0 U: O3 Z1 \) I5 S1 X# a: l
@.transpOrder := void;7 v) _% |" u8 m- F! Z' p$ \1 q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; `, K W0 ~; Q% a3 v* E! m8 D @,root.eventcontroller.simTime);, d' O- }3 A' a
@.HasOrder := false;
0 X/ R& q& w U+ `, e @.DrivingHome := true;
0 z, F7 ~( J) z' n! s& q rgManager.tryToStartTransOrder; j s0 _6 V9 N& P9 A
if @.Destination = void& g+ T/ o+ q" x4 T. I
then -- no transport order for vehicle @
# d, X# J6 N/ t* `" ] @.Destination :=+ A6 n' C4 Q. K& _% T
rgManager.nearestFreeStation(@,track.~); O' o! I6 n3 }3 N
newDirection(@); - f X, P6 H9 r) x
if @.Destination /= void then$ P( j1 Z, Y3 G) F2 C4 }, w
@.Destination.NumReservation :=& Q8 s2 Z' H9 T6 g S
@.Destination.NumReservation + 1;
0 N6 a+ }6 A4 N6 v S7 N end;0 f6 f( T ^9 u" }0 w: W X1 |
@.CurrIcon := "drivingHome";- h. c% `7 [; ~( P X1 {
@.DrivingHome := true;6 J9 H) L8 z; [0 ^% a. y
end;; w" ~$ V. ]' V4 r/ \0 v
else -- the vehicle @ is empty, both vehicle and part are in the same dock station( G" O5 F N# c$ A, I
part := @.transpOrder;
U) Y- u! P) ^7 r# t part.move(@);-- load part
! h- x% T# l! T2 f @.CurrIcon := "load";
6 D: { Z/ T& e GlobalDistObj := part.globDestination; f7 S( d+ n' c1 N3 p% |
assignLObj := rgmanager.rgAssignL;' i7 C. c8 {! S, _3 X% b' V1 ^& A, A
row := assignLObj.getRowNo(GlobalDistObj);
' t2 G4 _6 f, V; q3 Y if Row = -1 then -- since 70" Q4 |; `" w3 Z \& N8 E
if lan=1 then
- n" k2 L+ I! k promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ b. V( ]9 A. H5 H! u- ^
to_str("in der Andockstation: \"",?.~.name,"\""));
" ]1 l" `- T& |7 o7 x6 F! o else, T/ y4 D6 x+ M" ?3 u3 [8 f
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 r- l$ o& l7 g- r
to_str("in docking station: \"",?.~.name,"\"")); 6 W5 j6 ^4 C" y) C
end;
3 |8 b; V7 w0 U5 ?7 H else
! u- @7 E5 p: H- ?: I' s @.Destination := assignLObj[1,row];+ P8 g, ^' y. I7 H; P" v
end;
6 X$ b* e- `! t! U( A" U0 w! e* w2 N newDirection(@);
5 b7 M; V- G, _ @.HasOrder := true;% ^0 U# n2 s$ W5 W
end;
0 O" S4 T+ Z1 I end;* _* v* g2 y* N4 c6 u T
end; -- of the method
1 |; S X, E6 Y" D) ~ E2 k2 u8 b |