/* called by: entrance ctrl of the object 'track'
6 d5 k7 m6 r$ q G*/
8 L6 g K( m( j% J- Tis: j& n# [2 }4 F9 a
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ k1 n# d5 [- B* f8 `do( e: y4 \+ z$ ^$ Q% s
Lan := rootfolder.Internal.Tools.AOLlanguage;
9 s1 r4 e7 [# b( D+ Y if current = @.Destination -- else return2 w3 R: ^, ]' x+ b1 n
then
3 l- m( ^- Y8 N3 ~. Q3 N @.Destination := void;
& m& B: [# b* W, ` if @.occupied then0 S3 H. @8 w; O4 K8 K" M# b8 L; L
part := @.cont;: L& S0 _6 x# A7 p% e( ^$ E0 d+ l3 I
@.transpOrder := void;
, v( Y7 G6 A, _; D, }7 _! u" ` part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 e- F+ r% |+ Y! x# e+ S/ K @,root.eventcontroller.simTime);
4 r; b' `. j z8 L+ W: X @.HasOrder := false;
5 l4 n7 k& `3 e% \ @.DrivingHome := true;7 b4 i! q# w M" J% H
rgManager.tryToStartTransOrder;
5 ` r' x3 `/ S( ~& x* ] if @.Destination = void! [/ P7 A( I+ l' C
then -- no transport order for vehicle @
; p: u/ w$ R9 s @.Destination :=
5 y6 k& R4 p _5 m9 f! }$ g rgManager.nearestFreeStation(@,track.~);
; H1 H7 f3 b; g4 y newDirection(@); : h) j2 b6 U E0 O3 c8 h9 x
if @.Destination /= void then7 @4 |: n4 \" `* a) ]7 _ C! J
@.Destination.NumReservation :=8 \2 |2 U; z+ b1 |
@.Destination.NumReservation + 1;( W! F: A0 a' ?! Y
end;
- Z$ D7 L% W0 M0 K @.CurrIcon := "drivingHome";' P2 J; W9 G" @: @0 m: {
@.DrivingHome := true;: [ ~; Q6 U# H- t5 [. ~
end;
: a, O' K5 L: u/ S/ H else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% g! k+ c0 C, w part := @.transpOrder;
4 [( \4 b a6 U8 l/ D7 ? part.move(@);-- load part* g+ G9 R7 h4 t) G! y
@.CurrIcon := "load";" \- H) `* N6 `8 c- x5 Y1 I9 M
GlobalDistObj := part.globDestination;
1 e: f: |" }0 Y assignLObj := rgmanager.rgAssignL;
- c2 Z6 ^1 M- p row := assignLObj.getRowNo(GlobalDistObj);# B$ ?- `0 J2 k0 z! j* u9 f
if Row = -1 then -- since 70! t3 z7 x, R" M _) C
if lan=1 then
5 H# ~+ ^; x) R- _ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: s8 [; ~- P/ b% V. T
to_str("in der Andockstation: \"",?.~.name,"\""));
4 [5 N8 e7 x3 l _( r+ S1 I6 ] else
9 \& ~3 C( R- j7 ~! k- U* C0 B promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; N$ u; X* A( H1 k to_str("in docking station: \"",?.~.name,"\""));
. z1 ]1 b2 V4 y. x( b, A9 Y end; p/ V+ U# z* A p" R8 @5 u+ P9 }
else1 E/ d: | u% a: T6 M* `6 k
@.Destination := assignLObj[1,row];
! [$ w0 O5 L1 a9 G O end;
1 [5 `# d$ W0 F& {& B/ C7 F5 @: U newDirection(@);
7 c! z3 ?3 D ?" ^% G @.HasOrder := true;6 x: x8 b0 s4 }! j
end;) j I; V* N. T0 I2 w0 d- v
end;
g. C/ `( S) E* Qend; -- of the method
b- @* j: i. H3 j4 P9 ? |