/* called by: entrance ctrl of the object 'track'
3 W- \8 p' O8 a2 \*/0 i$ u7 D( M. D; ]( a; M
is* ]- n1 r7 n$ E1 s
part, GlobalDistObj, assignLObj:object;row,Lan:integer;! P, P+ g/ Z& `. a
do" W/ u0 t5 h0 `, N
Lan := rootfolder.Internal.Tools.AOLlanguage;
: x! Z% X, b- l+ g: N- i if current = @.Destination -- else return; U$ ^9 _% e% a6 |
then
p8 r# S$ X/ O6 p" k @.Destination := void; [# K' a) V* U1 Z# ` H
if @.occupied then
* e& R, r5 L( _2 m part := @.cont;3 t+ {- W5 n2 V: S
@.transpOrder := void;; ?- C, ?' c- [7 Z# G5 u
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( b7 l' B4 m) O% m! ]/ h: {
@,root.eventcontroller.simTime);
- L, G% C5 @# ^* ]/ Q A: ^' n @.HasOrder := false;4 V- Y* m3 @9 t( f0 q5 `
@.DrivingHome := true;
+ c! j5 @! ?5 D9 Q C. P rgManager.tryToStartTransOrder;
, c4 B) W9 s. `' p+ {3 s0 J if @.Destination = void
, q: M4 J3 R! x" Y3 f r then -- no transport order for vehicle @2 z/ C" n/ t- {! q! a. X
@.Destination :=
& i. \! ?8 b9 M1 ? rgManager.nearestFreeStation(@,track.~);
5 C3 y9 q# p$ o6 I newDirection(@);
! y" J: N9 d' O/ F* m# t if @.Destination /= void then8 a, }3 u/ n7 ]+ }& o% {0 k( \8 ~
@.Destination.NumReservation :=" q9 o: E( I Z+ b0 j
@.Destination.NumReservation + 1;5 G7 g( c6 }4 c- ^) z7 m: H+ `
end;7 A0 a1 U, u4 b6 F; A/ g6 G0 ]
@.CurrIcon := "drivingHome";
) d) u9 J. S* ~' j7 Z3 x @.DrivingHome := true;+ W4 i% T: O6 j0 Y9 ~. {
end;
; S! C) @* g% e# J1 f else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* E r) W! U3 W4 o" C part := @.transpOrder;
7 K4 Q% ?! S- B. x) l9 s part.move(@);-- load part
4 D! p9 A% g+ T* X @.CurrIcon := "load";
# Q& p5 f/ c5 r" Z/ s% |# ]4 R GlobalDistObj := part.globDestination;
2 Q" y, T$ B; A# ^) ^ assignLObj := rgmanager.rgAssignL;9 K: p$ k6 ~0 O) n/ x
row := assignLObj.getRowNo(GlobalDistObj);& Y8 z1 E% l4 k+ z
if Row = -1 then -- since 70+ l; i6 P( L, @
if lan=1 then6 d8 j" w7 s6 E3 p0 M, B
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# ]0 v9 w/ [4 d. y; N
to_str("in der Andockstation: \"",?.~.name,"\""));) J% [0 O/ o& l: a% _% F
else
( f- |8 F" W3 A1 Q2 X promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: h7 _2 g$ @' n
to_str("in docking station: \"",?.~.name,"\"")); % e: \* v- L8 i+ Y- [* ?0 L3 d9 n
end;3 Y8 y% t- d" h: H/ C$ u2 Q. R' B7 a
else
/ m( E" n& C" I% l- |! q3 u @.Destination := assignLObj[1,row];" x1 l( ^5 U" r: }0 T2 H0 S! ^7 ~
end;
6 S( q. ^& P% R8 ~8 ^3 [: P* V newDirection(@);3 D) F. U& `4 ]* l- l3 ~+ v2 z
@.HasOrder := true;/ y& R$ p' ?& x& v0 a+ y5 {
end;
8 ~5 u6 X5 R/ B end;, H9 ~4 _. z! _8 B8 F& U" [
end; -- of the method
2 m4 E' G% @( Y: I$ P6 j |