/* called by: entrance ctrl of the object 'track'
/ g# }1 d. y' M7 ?/ f% H*/9 @: T- D6 k' `. X" {* a$ U) h% a
is
5 {. _& v+ h" v) }6 {0 ~- } part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 r. G, f0 H5 ]% ?
do
( t0 ]$ Q# q$ ]# q Lan := rootfolder.Internal.Tools.AOLlanguage;
" a9 O3 m( W) y- H5 ~- ?/ v% i4 I. l if current = @.Destination -- else return
4 [ E. E% i) v$ y' r. p/ o then
( e& b1 R7 Z3 L9 h; Y9 q/ b4 S; [3 S5 C @.Destination := void;& g0 c' d3 O/ W8 Z- V: [% M9 Z
if @.occupied then
- } f& y: p- F! G$ Y+ ` part := @.cont;0 d8 e! O7 v: L+ z
@.transpOrder := void;% ~% [. [4 s% r4 w' x
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 ~2 P! x! e( K* { @,root.eventcontroller.simTime);1 B Q5 o# b- j" O9 Z8 F
@.HasOrder := false;
2 P- S* B5 |* X, \! z! H+ | @.DrivingHome := true;" L' T, j6 U+ Q' m
rgManager.tryToStartTransOrder;" Z b% u/ T" S% c( X; X# T1 ^
if @.Destination = void
, A4 t$ R6 A) V+ m then -- no transport order for vehicle @" L# D5 m, u% q5 Q2 A& a; H
@.Destination :=" V8 ~5 C( s- y
rgManager.nearestFreeStation(@,track.~);
. z4 ?+ ^& E2 b- i' u+ @( L# H8 P& y newDirection(@);
$ c9 L) C$ c! w" P2 x G/ J9 c/ M if @.Destination /= void then
/ y8 C6 ]. L; O7 L, V+ X& X4 t @.Destination.NumReservation :=
. I) P$ }, x+ p4 S @.Destination.NumReservation + 1;
) i( E. N% O3 F& x5 S end;$ ?. P6 c" g! A& [
@.CurrIcon := "drivingHome";
) j7 \( ~: F% j, T @.DrivingHome := true;+ N1 X) J) _& a8 M% O6 S
end;. g, j9 _# X1 G! |, j
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 g5 S: O* P; k5 A" m! Y part := @.transpOrder;
" N$ ]; \/ e W( P part.move(@);-- load part2 e. _, c7 D6 f. r" U- R8 A; C% e
@.CurrIcon := "load";1 I/ I: U" _2 y9 `5 e" Q: P4 ?! O
GlobalDistObj := part.globDestination;
# C% K9 O* ^ V! I9 j0 _) ? assignLObj := rgmanager.rgAssignL;5 Y! X$ b! l8 m/ p2 f& B* ?
row := assignLObj.getRowNo(GlobalDistObj);" s) g+ w- H' f7 t' p/ P
if Row = -1 then -- since 707 p* Q8 Y8 h8 |! }' a' ?
if lan=1 then
3 a. j# Y4 w) d; r, M promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( G D3 m. r! w to_str("in der Andockstation: \"",?.~.name,"\""));
0 b# ~7 a4 ?+ h3 L' F else
" _ D$ f. @3 U8 W! |4 ^/ A promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 \$ E; s8 c2 \& ?
to_str("in docking station: \"",?.~.name,"\""));
$ W+ [+ E4 l: \$ }$ y end;
7 N9 x& _( ]4 S/ e else7 ~/ I$ v @. `4 T# H" s. J8 F
@.Destination := assignLObj[1,row];
; @6 Y( g. q C+ m; V8 c G" J* c end; . Q" d' U1 ^0 M+ Z% S7 r( r4 @1 C1 l
newDirection(@);6 J& V7 q2 K% j8 g
@.HasOrder := true;
: _3 d( p. _; R! O% {+ |0 j end;" h5 u6 } p# B8 B: Z8 [
end;
i( k! Z m9 x2 @4 oend; -- of the method
- r' E+ y+ X( Z+ Q* ?3 P& J9 b1 s |