/* called by: entrance ctrl of the object 'track'4 F! h6 O/ M3 Y) j" m1 p: t! b
*/
6 l/ O: Q: F; l& d/ ^$ M* {is3 W( ^ d/ [- b
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. J5 O$ X3 }. B; N1 J, Ddo; {, v/ y3 u& n5 P o$ \
Lan := rootfolder.Internal.Tools.AOLlanguage;
% n/ C8 {. z# ^1 y& [ if current = @.Destination -- else return
+ ]$ X8 z- o% T then
3 \; L X" a V0 H( Z9 D @.Destination := void;: Y1 b% U Q/ |' @5 _
if @.occupied then* `& x* Y% t+ i- v
part := @.cont;
6 V! o: T/ z8 B9 s' }% c% ~ @.transpOrder := void;( E# H) s: P% E& a& E- ?1 q5 C+ U* P
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# V) q; W9 w) b) T @,root.eventcontroller.simTime);6 ~/ y$ Q+ m& K
@.HasOrder := false;
9 X" m" Z3 K* o" @, ]/ n @.DrivingHome := true;
- [. o) ^6 z5 X" W* d* N0 P+ J* [" \ rgManager.tryToStartTransOrder;- K) x/ O; q5 o. g/ M4 l
if @.Destination = void
$ u+ q" b; x! @0 x: K6 T' P! b then -- no transport order for vehicle @5 |1 o* B9 f' m Z1 P& Z. r
@.Destination :=9 l# b+ b( ^/ j/ G' n8 h0 F
rgManager.nearestFreeStation(@,track.~);
7 k( b4 J$ t) Z5 V2 T ^ newDirection(@); ! t6 I V- e3 _$ b0 G* z+ ]3 {
if @.Destination /= void then2 F7 t: M: i- j$ B! e8 J/ u
@.Destination.NumReservation :=" R: s" f- t; U$ e
@.Destination.NumReservation + 1;
8 }" F1 Z a4 u- y end;9 w& _' [5 T7 d: S
@.CurrIcon := "drivingHome";
3 z! X; x' S/ h( k0 |% r @.DrivingHome := true;2 x- I- A. p) v& Z( E
end;
0 [$ x7 a H# _- E9 T6 L3 {* S2 N else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' J2 g0 p5 d7 h! h# W6 O) I$ [ part := @.transpOrder;0 g9 p4 v. ^* O e8 R. P1 r" R, x' |
part.move(@);-- load part
1 ?3 S) ?# v; J4 c @.CurrIcon := "load";) U0 }" U) ]6 H7 h
GlobalDistObj := part.globDestination;3 A' O b7 [1 B/ y5 _7 i3 I
assignLObj := rgmanager.rgAssignL;, q) |6 Y0 G a1 O( ?
row := assignLObj.getRowNo(GlobalDistObj);& K1 Z/ \7 v7 I2 F
if Row = -1 then -- since 70
$ T$ A, x0 i! ~) a; q" H9 } if lan=1 then
- h' A4 S) s1 Z# h" n promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ Q$ [$ k! q6 I
to_str("in der Andockstation: \"",?.~.name,"\""));
. F7 @( R/ [# o' N/ a" s: N( M else8 O8 N' A2 n+ }. M; M
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 p/ e1 T) Z) W# a2 x. K6 `- X/ V5 d& y
to_str("in docking station: \"",?.~.name,"\""));
! O+ D% V9 c1 W& g R end;1 l( `! K6 T1 h) v
else' y z% r9 k6 e$ D8 D/ j
@.Destination := assignLObj[1,row];7 A# T9 P9 f- ?* ^8 a
end; 0 z) T/ j$ _8 ]+ r' ?, K
newDirection(@);- H6 {2 _) P. l9 G; t0 m
@.HasOrder := true;+ t% ?2 n* {7 R% C( d2 b- O% @
end;9 V* j! t! A8 U
end;
; G8 c3 O6 l1 e8 h6 o6 \+ G; I5 mend; -- of the method
. H+ v1 B% h: Q [8 S# g0 [ |