/* called by: entrance ctrl of the object 'track'& L7 \3 Z% W8 y
*/
9 v2 D0 Y7 D* V( J6 Jis7 X- l: A9 \, Z6 K2 F: O
part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 A1 Z3 [$ v* c' ^, ~
do
1 M3 l- I" a; c k4 M Lan := rootfolder.Internal.Tools.AOLlanguage;9 ?- H4 t% g) g, A; R a
if current = @.Destination -- else return
" s) B& p2 e7 b _ then# S0 W: h$ C! e1 j
@.Destination := void;
3 R, k) Z) E s if @.occupied then0 K1 | k6 b: e% @% W3 @
part := @.cont;" ` v! A) y i2 z1 L
@.transpOrder := void;
" `: F( A1 g0 T" n' _9 J part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ A4 ~' H, ]- b7 x' B, o9 _ @,root.eventcontroller.simTime);& m5 ]" \/ K7 U. O1 V. @; ~
@.HasOrder := false;& K" o8 R6 m$ p! f# b+ b& E- ]
@.DrivingHome := true;# G3 J3 _0 G! |3 `
rgManager.tryToStartTransOrder;( a9 ~7 J$ O- f! W8 C0 ^2 n
if @.Destination = void
) T8 f) p$ q9 {* O }' W then -- no transport order for vehicle @
' G" ~" G5 F" s$ K# C& E @.Destination :=
: \3 O1 h' N( `6 g7 r rgManager.nearestFreeStation(@,track.~);
/ g5 S& Z# Z8 B' w* Q newDirection(@);
0 K. y8 f& ~ K9 C, B if @.Destination /= void then
, M. {' N7 y# X/ q, ` @.Destination.NumReservation :=
* X# Z9 C/ Y6 k3 t- w# E @.Destination.NumReservation + 1;2 S1 f0 X/ w* L5 u7 {* O
end;
5 [* {8 O7 X" \% T8 J- l8 ~ @.CurrIcon := "drivingHome";+ M7 x! L5 U& z$ u3 s) i
@.DrivingHome := true;
/ _3 \. p" A- n2 j( O. M1 p4 w F end;
/ d! x j' S7 x# K6 ^0 b else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" `7 L, [/ w; q: |9 w" [# S. x part := @.transpOrder;
$ l: Z; k2 Y$ P N- b/ U part.move(@);-- load part
( e9 [# H6 Y% S% F7 J @.CurrIcon := "load";6 n( g$ c$ q) \9 Z+ o
GlobalDistObj := part.globDestination;, K! j, H9 g: `0 u2 h( U
assignLObj := rgmanager.rgAssignL;
8 A- P% V6 f1 ?# T# h) Z row := assignLObj.getRowNo(GlobalDistObj);6 P7 M" _0 Q: l. c4 j9 ?
if Row = -1 then -- since 70
' b; D; z9 ~) w' S! u. q" w: v( d if lan=1 then
: v* N. U/ P& n3 ~( m/ Z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; F7 h/ H. v0 x9 ^1 h! G. V to_str("in der Andockstation: \"",?.~.name,"\""));
! G& d6 I9 L1 ? else& x1 U$ u' h- O" B5 y# p6 T' U
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 f" N+ o4 J+ p/ y- d; X
to_str("in docking station: \"",?.~.name,"\"")); $ h7 v9 B' S: T) `* @) v
end;9 s/ L; f- D9 a/ t
else$ _2 D' y& ~; V. A6 @+ s% Z5 `" d
@.Destination := assignLObj[1,row];+ K1 V; A9 i! u' S! ]( w
end;
: B0 {2 `; G& D: \; @( Q newDirection(@);# A/ z( |6 L* \9 X0 r* Z6 ^; c# ~% P
@.HasOrder := true;
0 m- N. j* L7 _! b0 d end;
( R% A% ]" ~' _" @' n# r end;
1 q( k7 b) I) send; -- of the method
7 Q* S- P- l/ V. W7 ]# t5 |8 } |