/* called by: entrance ctrl of the object 'track'
# p8 D; }$ r8 |- H) m9 A*/" l$ C) K M* b! G/ q: h v. d( j
is p8 V$ R2 E' N3 ]% j2 c
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 C* H* Z. o& g* a9 y, P6 fdo n- x' }3 l( e$ v3 x
Lan := rootfolder.Internal.Tools.AOLlanguage;3 |* L T- V7 K; y6 H6 ^! q
if current = @.Destination -- else return
+ t* E+ `7 s; W2 ]% a then' z6 ^7 R0 S: g, g
@.Destination := void;
4 r5 p7 v& f7 @' G& S if @.occupied then
: B4 v& \- G% ~* h G1 g part := @.cont;
& q2 z/ W( R1 a2 L, z" }! S, [# U @.transpOrder := void;) C; c; N* }2 y5 C4 z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; h1 e: |. N9 T+ c
@,root.eventcontroller.simTime);: @* I/ f- Q3 J8 @+ w3 k! ~
@.HasOrder := false;
7 w# B8 B4 U& H s @.DrivingHome := true;
7 x/ [$ i- M4 V rgManager.tryToStartTransOrder;
* J/ H4 _2 h. |+ u if @.Destination = void% s+ w, P( Q0 f; V9 g
then -- no transport order for vehicle @
! x+ k& F3 ~! e8 U |) d @.Destination :=2 n( Q2 {9 P D# P) O) \
rgManager.nearestFreeStation(@,track.~);
% O: P* l5 `4 V( l newDirection(@);
7 n/ D' c7 p" j- d. c if @.Destination /= void then
' x9 W4 v3 D; o8 }0 U @.Destination.NumReservation :=
5 j2 D& ]6 X' L" E7 N! b8 @0 Z @.Destination.NumReservation + 1;5 _+ B1 k1 v7 i8 l" T8 E
end;
1 S& ?9 O; G$ m ~8 C$ A' f @.CurrIcon := "drivingHome";
( e! v2 W2 N( `* k/ E% q% y @.DrivingHome := true;
- J4 |9 q# |( | T6 z end;/ L6 T/ o" O/ x4 _
else -- the vehicle @ is empty, both vehicle and part are in the same dock station& Y- p9 e8 u' U, N, d2 u
part := @.transpOrder;- ]# |( A3 F6 I0 _2 J+ G
part.move(@);-- load part
/ q! Y% B. q* A @.CurrIcon := "load";6 ?7 Y7 E7 U' c" F) s @
GlobalDistObj := part.globDestination;8 d' s0 o7 {6 z: m
assignLObj := rgmanager.rgAssignL;1 X9 M$ a* o- q/ ?. }1 {
row := assignLObj.getRowNo(GlobalDistObj);
/ V6 x6 n! H% s! F) _ if Row = -1 then -- since 70
" k! d) t: Q& d& K {( I if lan=1 then
* i: @* A$ b5 G- | promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' w, j6 G; J6 }1 L' c to_str("in der Andockstation: \"",?.~.name,"\""));$ I3 } |& ]* S: Z4 c6 g5 d6 i: w; y
else
4 K$ W9 B* T4 W, |- a& R: Y S promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 f3 B* r6 I4 e0 @& M
to_str("in docking station: \"",?.~.name,"\""));
4 q1 ?) }8 C3 i1 p6 I end;
5 [; |+ [2 T( D& M else
) h- {( ^8 ? f! w0 [' z" V @.Destination := assignLObj[1,row];
8 _) Z8 h$ J; U; I end; * S8 y5 b3 r: m. M
newDirection(@);# c4 ^/ ^# y. i8 [2 u2 d l
@.HasOrder := true;8 ?* B9 S+ C. x. }; Q8 T
end;
, G" B1 z. y, ?0 n" M- F- V end;
6 b* Z" |# \0 ?7 {0 eend; -- of the method
0 J4 O$ @# ]7 I$ c& G! s0 ] |