/* called by: entrance ctrl of the object 'track'
: x( R2 R$ w/ S' ^( x( a*/) E7 [8 V; A8 `; W0 T; N2 I
is
9 H& o& A7 S% s, ]. P part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 w5 ^6 |( z; K& }; q L- k
do
/ e i( `1 H" {* |0 _( Y Lan := rootfolder.Internal.Tools.AOLlanguage;
- I$ M2 P( F F' @ if current = @.Destination -- else return. @- b1 C& A7 P A" t* [6 @1 `
then
, U- i; ]- |; I0 [ @.Destination := void;
. f* w& H6 q" b4 X# j& ] if @.occupied then
1 f1 O! ~7 O) c1 k0 h part := @.cont;, b- b" t, T) K0 y
@.transpOrder := void;
3 C9 }8 g, o# U% W" w- {5 T" q3 Z part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; _1 ]- Z+ A* y
@,root.eventcontroller.simTime);
- @# G( y( s& a$ K @.HasOrder := false;" q. }& t% n7 M$ b8 y
@.DrivingHome := true;
( Q$ }( d% C3 f' s rgManager.tryToStartTransOrder;
& w) z; v) _; O* h3 X: |1 s- ?( P) q if @.Destination = void4 _2 { |. H& d/ t& B, D% b
then -- no transport order for vehicle @
, M2 P6 \$ B4 k; M6 I. b$ K0 l @.Destination :=
* ?+ N+ x6 t- x rgManager.nearestFreeStation(@,track.~);7 f- H+ U& A6 _2 B0 V3 H
newDirection(@);
& e2 Z5 u. l* Q" r if @.Destination /= void then
3 @* C1 J |" }3 {5 @9 p @.Destination.NumReservation :=8 r% P. Q: n o$ B7 U: a
@.Destination.NumReservation + 1;" I, Z! _2 Q+ v$ q7 G% }
end;4 L6 \9 b$ S% B9 i
@.CurrIcon := "drivingHome";
, M# [ P" ]; F% z$ Y @.DrivingHome := true;% Y5 ^9 K. d4 Z8 f
end;
; H! G) E; }- k8 j+ F+ q# j else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ H3 G! n4 M: h; P; U part := @.transpOrder;
; k* E/ m& `. I z! Q+ ] part.move(@);-- load part
1 G+ P: q$ E1 I! D$ e Y5 \- e @.CurrIcon := "load";
" y! L0 j2 K. t0 [. p' H7 @ GlobalDistObj := part.globDestination;
) [. A6 o. }( ?# L9 d assignLObj := rgmanager.rgAssignL;$ r! K" c/ \4 J
row := assignLObj.getRowNo(GlobalDistObj);
9 W3 C4 @6 R- D& g, O% `8 k6 D if Row = -1 then -- since 70
7 L! D" n6 ~6 ]5 r$ Q/ O( u4 x& M3 S c if lan=1 then8 o2 I/ ~. _- e5 {* ?9 [" }
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 Z9 d6 Q, S! b. j5 Z
to_str("in der Andockstation: \"",?.~.name,"\""));; }' _8 d0 a. }2 h5 |+ _3 t
else
, W8 s, T& [, ?4 p5 E9 f promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
n9 c; n s* o5 x to_str("in docking station: \"",?.~.name,"\"")); # }$ U) t8 F `$ t0 z
end;. ]% Q, ^# B5 Q6 p4 ?/ j5 W
else
' S+ T' ^8 ?7 M+ e4 F( Q8 X" H @.Destination := assignLObj[1,row];
$ U7 Z! }7 d8 C' ` end;
6 e3 c; @! y9 J& J1 P7 Y newDirection(@);
9 Z% v& A( B2 R: y. }' y @.HasOrder := true;; u* l+ M5 J# n
end;3 x" v% M2 n. [5 W; i$ T2 X3 g
end;6 b! \" S* Q7 d, C& r) `4 D% z+ |
end; -- of the method1 @9 A. k, ]+ g1 t
|