/* called by: entrance ctrl of the object 'track'; ]) c% X. X3 D$ Z% Y0 m5 N7 g
*/
) x* N, A8 W' B: b$ xis/ K/ [2 I/ X* A" w2 Z2 x% g
part, GlobalDistObj, assignLObj:object;row,Lan:integer;" m! V, \. b- l
do$ r! c: H0 i0 X2 w" H5 F) ~
Lan := rootfolder.Internal.Tools.AOLlanguage;+ B, i+ w+ @0 ]6 E
if current = @.Destination -- else return
6 s2 t; Y% i. _% `; } then/ a0 p# J8 u* L+ u9 Q. n# p" g7 v
@.Destination := void;
* f1 j" x9 D8 N if @.occupied then( T8 D3 R& W7 F
part := @.cont;; ~, l1 |+ a0 ^1 {2 O# M
@.transpOrder := void;# E6 U$ b; g3 b: u
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* \& G9 C [# \0 r- @7 |# Q( c$ S @,root.eventcontroller.simTime);
" P! Y" p, q, X, u2 @ @.HasOrder := false;
4 ~' f5 G# Q! |) i+ U @.DrivingHome := true;% k9 F3 y- E# f% l0 D$ z* Q* i% H. x1 M
rgManager.tryToStartTransOrder;
$ ^+ v+ |2 \" U& O# \! P3 b" e0 y! X if @.Destination = void
$ h/ R, P, V1 o# N4 G6 j then -- no transport order for vehicle @+ i) k( `0 l* K' h4 a
@.Destination :=
8 e9 H0 ^+ f$ B5 T rgManager.nearestFreeStation(@,track.~);/ r8 Z9 l9 m' F3 L8 D6 H8 ^
newDirection(@);
1 n2 K' \4 b$ F, S/ w+ w7 D+ q6 y if @.Destination /= void then$ z2 [$ f9 d2 i/ i$ P( X2 x
@.Destination.NumReservation :=, S2 b* P+ Q* w1 f$ d+ O
@.Destination.NumReservation + 1;6 `1 C5 P' r2 q G" |
end;
- ~+ W0 I$ ?2 o- Z' {; |# ` @.CurrIcon := "drivingHome";: \/ F" X9 S1 T8 N8 T8 ]: Y
@.DrivingHome := true;% p5 Y$ h" B9 K" O
end;; y( Y, i( f; Q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, _. _9 G; I9 U% y part := @.transpOrder;
/ d9 r$ } l* K# W) b5 @" s part.move(@);-- load part; C( g( b* r# H0 I9 [0 Y0 e& R
@.CurrIcon := "load";/ Y! B/ ^" e7 Q' g- D& p9 S9 y1 j
GlobalDistObj := part.globDestination;
! q3 r) _1 l+ Z) s& C1 A/ | assignLObj := rgmanager.rgAssignL;7 N) U% l K' z' h( [! i' o
row := assignLObj.getRowNo(GlobalDistObj);
) L# ^% T' j a6 f$ h/ c if Row = -1 then -- since 70" ]8 n9 Q1 V( d0 ]. Y
if lan=1 then
2 I8 ?- z5 \8 p$ m# W/ Z8 k promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 {# w# I3 D3 p$ k
to_str("in der Andockstation: \"",?.~.name,"\""));" x+ U- \: G6 a3 e% z$ J& ~
else+ q$ M5 t$ D7 d0 S" G
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 E# ]* | L* o0 q9 }
to_str("in docking station: \"",?.~.name,"\""));
5 l5 a/ {- K9 }! G% l end;
/ c4 p% u( j7 k! G& Q$ F else
3 L' [8 e' P; m" R9 b% s @.Destination := assignLObj[1,row];
0 z9 R8 r. J# ? F end; / W' R# N- g3 m4 l, i) @( T# L" u
newDirection(@);. v7 ]* h+ h) u# Q' Q
@.HasOrder := true;9 I, j R/ y2 j, @5 u
end;
4 ?. }' r3 P; A2 ] end;9 z8 O9 R- _2 T/ V/ ]- K4 y0 y
end; -- of the method
4 K+ g( _8 q) ?& f& t) o |