/* called by: entrance ctrl of the object 'track'3 V% J6 k6 E6 _
*/
9 e% M7 W+ s: y4 r5 iis
& G1 w$ v) h& m* T/ w& ^0 W3 m part, GlobalDistObj, assignLObj:object;row,Lan:integer;: t7 ^7 V/ ?8 H5 Q
do# A; v- N+ A: r* T1 l; p
Lan := rootfolder.Internal.Tools.AOLlanguage;! f8 F! `1 _% K: i0 P' i
if current = @.Destination -- else return8 E' b, J0 _ G* G) W
then
/ _, ~- w$ d$ m3 I! J @.Destination := void;" k3 U& {$ M/ F, i5 N
if @.occupied then6 g4 C9 G' j% A+ g
part := @.cont;
7 i4 n4 a8 E) v% k) n/ h @.transpOrder := void;9 e9 a3 d! O. Z3 i
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. a6 N) E# {# Z! j) { @,root.eventcontroller.simTime);' {( J6 e0 i: g. o4 G) v9 D3 ]
@.HasOrder := false;
: T. F& d* u3 I0 ^4 u" g @.DrivingHome := true;
$ T* ^. z/ J* l: f$ f o: o: k! ?5 m5 D5 } rgManager.tryToStartTransOrder;
/ `1 g, Z A+ I' I, ` if @.Destination = void
8 t7 u4 e7 l5 i! n' e* k2 w4 B then -- no transport order for vehicle @1 Q4 n' b- Z3 P9 g" C2 j
@.Destination :=& Y- n* P" s2 h0 T
rgManager.nearestFreeStation(@,track.~);7 ~7 n" W! ?4 \+ s
newDirection(@);
/ L( O& C5 r1 ^ if @.Destination /= void then
' V3 k& h2 q/ ~0 u @.Destination.NumReservation :=
- j9 `8 d, x' }% s @.Destination.NumReservation + 1;
8 v7 K" @# y ~' @5 E end;
" e' [# ]$ q6 l' ` @.CurrIcon := "drivingHome";
: G7 p9 W1 Z% N! L1 m2 F1 J) I @.DrivingHome := true;+ q0 }% t" h0 ?! G3 v! i/ O, o
end;
8 A# M5 Q$ Q! M c) U0 ]/ I else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 N3 R8 m9 l, {2 b J v part := @.transpOrder;7 Q. J6 d/ }! }
part.move(@);-- load part
" T2 o& ^) K, A) s. x, k- F @.CurrIcon := "load";
7 o8 [* f+ |1 v3 Z/ k GlobalDistObj := part.globDestination;! @1 z4 d' h4 v4 I: [* S! N5 h; N* l
assignLObj := rgmanager.rgAssignL;
5 b* h% O& z. M0 @ row := assignLObj.getRowNo(GlobalDistObj);
; ?7 [, C6 n* | if Row = -1 then -- since 70
2 ^" c1 J& B: \* H5 _ if lan=1 then$ o( A4 ^; T D' L
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. {' a6 f* L8 b, t' ^3 | to_str("in der Andockstation: \"",?.~.name,"\""));
+ b! Z5 K, s$ Z else
3 l; U* b, b( c* b: s4 B# n. r promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& G. K" e. S" f7 B, b( D to_str("in docking station: \"",?.~.name,"\""));
. {- T8 @# H0 X; M; ]2 x end;
: ~3 v+ ], s& j- V, x else
$ C- |" k% j$ p1 k0 ~ @.Destination := assignLObj[1,row];
+ c8 t0 P6 f7 F- p$ e" R7 j end; $ `% ]$ n- ^% C. C
newDirection(@);/ N5 L) w0 o! V n' }' o F
@.HasOrder := true;2 x$ a! q: U& `' M' C* W5 W+ w6 L+ I
end;
' b; B3 G5 g; d/ c, h: U# _+ i end;
7 H1 z# `) c% I+ {/ ]$ c: ?end; -- of the method/ H7 c+ w5 ^4 W" `' [
|