/* called by: entrance ctrl of the object 'track'
/ P- B5 L6 J0 T$ ~3 z1 r*/: m0 v% p: H0 A- W: \6 {- [! e) p, H* G. I
is
2 Z) G5 C: E4 G7 ^# z2 a$ x part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 Z7 X3 ?. ]# F8 [6 _
do1 g" B$ k. n1 h( O4 N; B0 z
Lan := rootfolder.Internal.Tools.AOLlanguage;# F) J% b- H ^/ n8 y
if current = @.Destination -- else return- h: g5 P2 x( n P! x! i, L* O
then! V' v' ]; [/ P+ e! m
@.Destination := void;
l g) Q, `; m4 ?& E if @.occupied then! L/ Z+ w# U( k! I0 Y- E
part := @.cont;
6 R4 l* `' C- ^1 g! e @.transpOrder := void;' S# U- q( E5 l- Y9 G5 y9 T5 a( n
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 e; C$ |9 C( y# Y8 Y, H, C @,root.eventcontroller.simTime);, D8 |' X: ?. B0 V/ M. ~
@.HasOrder := false;2 l0 a: p9 {. r" k3 _
@.DrivingHome := true;( \ i S$ o' U# a% H. ]- Z
rgManager.tryToStartTransOrder;$ ~* @3 L' v; C8 R+ T0 [* ^7 o4 M
if @.Destination = void" N" i) M% m4 |- S6 T
then -- no transport order for vehicle @
; P0 e0 |7 v" O) t* M$ ? @.Destination :=% M" b; Q' |* ~. T4 D
rgManager.nearestFreeStation(@,track.~);: [& C9 H1 ?* d4 q1 @
newDirection(@); ' T% m4 i" z& e' z
if @.Destination /= void then$ g+ P: F1 ?. r4 z
@.Destination.NumReservation :=
5 v% s& m7 F! c( J% X* t7 k5 C @.Destination.NumReservation + 1;, b! a3 `0 H3 u" Y6 p! ^9 {
end;8 L& l7 I+ o/ a
@.CurrIcon := "drivingHome";
- K- e0 @- X6 V$ s5 R; k( T @.DrivingHome := true;
- Q1 o6 C+ E6 _/ } U end;
r3 A* Z" X7 d3 a/ k else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ ^7 S$ `2 }- X) ^9 Z6 h& V( h part := @.transpOrder;
3 f' ?+ L( X' e part.move(@);-- load part
5 }( ?2 E( c; o% r @.CurrIcon := "load";
( N. s9 x2 X% Y! T% }3 _; f GlobalDistObj := part.globDestination;% J" d4 F" \! i" i
assignLObj := rgmanager.rgAssignL;
6 A# I6 \, I" S F4 r/ O5 Y row := assignLObj.getRowNo(GlobalDistObj);+ q+ ]- i/ b8 d; J6 y3 S
if Row = -1 then -- since 70* ^% k+ r* h) t4 P: s; c
if lan=1 then
6 ]. o% ]6 T7 i: [ x# i' H promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ B# y& N0 J0 v Y$ [# I! l
to_str("in der Andockstation: \"",?.~.name,"\""));$ X% L! T! V( n$ { I/ a; P+ x
else, a: p |; c; i( u9 _
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. \! l, S1 s$ _ j' `. i
to_str("in docking station: \"",?.~.name,"\"")); 4 l$ m& f: I9 Z" D$ [
end;, u7 N; r" {+ B
else$ l b' b; @* y) I, R1 M( m
@.Destination := assignLObj[1,row];
2 k" ~" t, E$ a1 Q5 X0 g end;
& E! ]" ?. g3 l' ] newDirection(@);
9 G/ S2 V8 w! W( v) X, e @.HasOrder := true;
* r F& D: H; U) y q: y1 L end;
+ |; U" T- R# `5 }; e* M end;3 z, s* P' r Q- c5 p
end; -- of the method
9 Q4 {0 Z% t3 m% N; C' o' V |