/* called by: entrance ctrl of the object 'track'
9 \: L% a: g; g+ ]*/
5 A+ |4 E3 D6 K, W7 H) h+ Qis8 k# q( u. {1 Y. {$ C. o
part, GlobalDistObj, assignLObj:object;row,Lan:integer;) {* {" T* K( M/ ]8 V0 z O
do
" G1 I4 D2 b T% } Lan := rootfolder.Internal.Tools.AOLlanguage;
. ^5 t0 r! ]2 } if current = @.Destination -- else return
; C0 J: N2 U$ h) C then8 _ ]" Z# {0 ]8 ~5 \( o
@.Destination := void;
: t; ?$ [; ?# S if @.occupied then' a' y0 J& z7 I [( P, B5 C0 Q3 |3 q9 ?
part := @.cont;
0 R4 Q8 C" V, R2 K) a; h @.transpOrder := void;7 O9 I8 W. f9 |# L( t9 r$ X
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 B4 h# V8 o9 C) r" n @,root.eventcontroller.simTime);" x( }" h. H. X2 _' R/ A' \8 L
@.HasOrder := false;
+ ?4 o; O D1 ^! `/ I* W. F0 d4 l @.DrivingHome := true;
& F2 p8 k) u& G& E" z+ F0 s; r rgManager.tryToStartTransOrder;
; l5 U X5 R( M if @.Destination = void
i3 F; n8 S0 U( \6 d then -- no transport order for vehicle @
# V" Z9 D m; ]+ X) ?0 ~9 F @.Destination :=
1 G3 ^# S( g j" v M1 \ rgManager.nearestFreeStation(@,track.~);
7 {- P. u% [+ O1 f) K* n. d6 g newDirection(@);
, g+ j0 p/ I ^4 @9 s if @.Destination /= void then
; G" e/ [$ G% g- }) ^" g @.Destination.NumReservation :=
z2 _$ e7 ?3 l. u @.Destination.NumReservation + 1;
2 t6 F+ `, v) Q end;
# _. O4 c: A$ A* i7 k$ F @.CurrIcon := "drivingHome";# Z5 q9 c, {) T7 w1 W% m9 i$ A
@.DrivingHome := true;; W$ F5 \* W/ B+ m) N) ^ K
end;3 G$ y( r8 o o- N; S- H# ~. r
else -- the vehicle @ is empty, both vehicle and part are in the same dock station( G% i2 B+ w5 h% @. J9 N2 L1 o5 y
part := @.transpOrder;
1 a% z, W+ {% X+ L2 P part.move(@);-- load part
' _) D$ r4 j0 I* s. {# |8 D @.CurrIcon := "load";& m* h! g$ y# U# C$ y) R5 J
GlobalDistObj := part.globDestination;
6 u$ r5 S9 e D0 Q3 g% J assignLObj := rgmanager.rgAssignL;
/ |+ t0 _9 q5 [# ~* P7 D row := assignLObj.getRowNo(GlobalDistObj);
_ [# {* {( ^ if Row = -1 then -- since 70
6 Z3 i. ^0 b7 s3 @8 g, ]% Y+ v" i, } if lan=1 then. H8 C) y0 T" |3 D
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 J( M, R' _7 S; V! X. j to_str("in der Andockstation: \"",?.~.name,"\""));- p& r4 F6 B! p' b+ |* ^( c
else( n6 q$ ~( D S% x4 J0 M5 l
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 T" B. }; z1 h7 U# ^ to_str("in docking station: \"",?.~.name,"\"")); " L* F0 d2 y" \7 Y2 f4 s U
end;
7 a) G/ C$ S u3 O) w, E else
# M- M4 Z. `' O* D* i @.Destination := assignLObj[1,row];
4 r0 C& o9 W1 T* K) |- l8 F, \ end;
# ?7 l) N8 l# z newDirection(@);8 C3 Z6 g+ N p2 T% c8 x( g
@.HasOrder := true;
9 s5 k: Z+ M" V/ c8 f& o end;- f! Z& z/ b4 e/ R8 C" I& o
end;
6 [- Q z4 M% i% L( K6 W& g" aend; -- of the method; m: N* X% f, n- C2 s0 D8 a
|