/* called by: entrance ctrl of the object 'track'2 z G5 g2 g& L, m. R R( M
*/
/ [; t+ A; n7 `7 {2 H& x& lis. V% x6 y1 ] ? u2 W
part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ X- M$ L) i$ z3 z7 A+ H/ G% i
do
$ A8 h. e" ?/ o% _, j- A Lan := rootfolder.Internal.Tools.AOLlanguage;. A8 |5 t7 ~& [3 S- q( |3 o
if current = @.Destination -- else return4 }! b. H% j: V! o( z# O$ I
then
- G1 y4 I$ o9 f% N0 J% B+ @, k @.Destination := void;( ?' t8 [# w# {4 f( F
if @.occupied then* i* w% e1 l* P! ^$ O' p
part := @.cont;
1 y7 Z1 K0 Q: Q; T& V% ] @.transpOrder := void;) F4 H' U& S+ S
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; w2 M, H3 `+ n" l C# K3 \ @,root.eventcontroller.simTime);
3 N4 P$ f- X% |5 U/ V+ m9 O @.HasOrder := false;: [' f" z2 ^6 o+ X; f5 C
@.DrivingHome := true;, P7 N) W0 ~" Z: r% S9 ?
rgManager.tryToStartTransOrder;2 [5 L9 d6 W3 K0 m7 \3 j; B3 R
if @.Destination = void
) A2 s2 W* ]9 I* |0 R6 W+ v+ u' l then -- no transport order for vehicle @
" I5 Q+ u& Q3 P2 ?& l; k# X5 h @.Destination :=/ c( _! b* Y3 s7 W+ G
rgManager.nearestFreeStation(@,track.~);
1 {1 W( Z- ^/ {; Z newDirection(@);
+ y# Q8 x0 O/ Z2 v if @.Destination /= void then
1 |1 W. r9 s' k; i9 L @.Destination.NumReservation :=3 D: L+ z$ c# Y2 z( G) o) v- l
@.Destination.NumReservation + 1;
# O6 F6 k N# S/ Q# @5 |# A4 X) w end;4 A; k4 {/ a! o7 `2 E
@.CurrIcon := "drivingHome";6 E) {8 `5 V% v. o9 ~
@.DrivingHome := true;
' C. u* r" y" ~% X! d( Q4 O end;
9 |( i$ a- y% C! X; [ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 Q& K2 k1 T w- m8 B+ X part := @.transpOrder;
! E" m8 u) j( J part.move(@);-- load part
1 k9 `7 |. b5 o8 H# @" K r- w @.CurrIcon := "load";+ `1 B) v; V6 L# n# V7 M
GlobalDistObj := part.globDestination;
* S0 t& s4 B2 q, b assignLObj := rgmanager.rgAssignL;5 O# j. O: X. f/ }2 u0 a# K2 E
row := assignLObj.getRowNo(GlobalDistObj);2 }2 O% y: P, ~6 f; n: u2 @- J
if Row = -1 then -- since 70
. q; t' q, J" a if lan=1 then6 e$ K( ^8 p+ z9 S. Y4 x
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( D. z! G4 }) v
to_str("in der Andockstation: \"",?.~.name,"\""));
# i I. h9 R0 D3 o+ g else# A/ X6 V* E1 t. T9 E
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," h; L) t/ N2 {* |5 S# J6 l
to_str("in docking station: \"",?.~.name,"\""));
. i V" ]4 {, N5 |1 r4 U- h- o end;
8 P8 B, U3 m+ u# `* p else! u) o# ?( \& ~4 D4 G) h
@.Destination := assignLObj[1,row];
1 v; x w! X& O! w7 T7 f% _ end;
0 }. t& P2 e5 _! p& X newDirection(@);! X* B: @6 ~7 h; g. S9 e
@.HasOrder := true;
( ~& X! d3 ?! r6 p" o7 C end;" X" g3 u% B8 v" g `$ a7 J7 g" O
end;
7 P1 l0 x; h( c4 p0 T" Cend; -- of the method
% \; ^3 l$ H7 V U& c |