/* called by: entrance ctrl of the object 'track'
" O, J, Q8 B* k7 b: y4 `: X*/
! d3 p& Y3 T# S' n, v* Fis
1 x) z" X! c- V part, GlobalDistObj, assignLObj:object;row,Lan:integer;' t& ~; t9 b( N3 P0 [3 F" d: u
do( E& [& M- U$ I/ h5 S
Lan := rootfolder.Internal.Tools.AOLlanguage;
& w: b: L# P& P' }0 b$ Q if current = @.Destination -- else return
- ?7 h7 D+ X) a# H: r3 e; B then
( r3 _& b5 Q, H( [ @.Destination := void;
5 ^* D7 t, O* a; }% w6 P/ E# A if @.occupied then
4 X. D1 F7 O! ]& L. t2 ?$ _* { part := @.cont;
7 [* B9 J4 ]' D9 J @.transpOrder := void;
& \* U1 V: L: L& b part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ @: _) R* i9 Q7 L" z9 \ @,root.eventcontroller.simTime);4 q4 @- T: I, \+ P" u3 w
@.HasOrder := false;
# G. f8 {, z, I$ D7 m0 g. m/ t @.DrivingHome := true;
7 q, `% _. m U! b c rgManager.tryToStartTransOrder;
7 x4 g5 @, m, N9 W' G6 } if @.Destination = void3 C$ [, B/ x+ g( u
then -- no transport order for vehicle @0 M4 A5 C) _) A) [
@.Destination :=
( ~1 V% O8 A6 n rgManager.nearestFreeStation(@,track.~);
, W9 n! y+ W9 t) L2 Q+ d newDirection(@); 8 y7 v5 _9 i, v, A, s, M
if @.Destination /= void then
% C/ e: c7 G8 z( B; G @.Destination.NumReservation :=: N) b% ~. c& K: A1 x7 ]/ b
@.Destination.NumReservation + 1;$ `+ y/ a2 W0 G3 y
end;; ^& E& `( L. q- }7 [7 u/ ^. x
@.CurrIcon := "drivingHome";: [; V+ l# I: j4 K! W4 T* E* \
@.DrivingHome := true;
{& q. R% z8 ~5 W! S4 F- Z end;" S# @* g3 k* g% k3 Y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 ~3 V. E, @% g( Y- H$ Z1 ^ part := @.transpOrder;
* Y7 I; E% j# e2 c0 D/ A1 b part.move(@);-- load part
, K) _$ f: ?9 I% |. ^: n @.CurrIcon := "load";7 B- I- f& A. {7 o B% Q2 y& z5 m8 w
GlobalDistObj := part.globDestination;
1 s: a( ^9 D3 ? assignLObj := rgmanager.rgAssignL;
& K, w! R7 j. ~ row := assignLObj.getRowNo(GlobalDistObj);+ a2 Y8 x1 M+ j2 Z
if Row = -1 then -- since 707 a! U! N- j8 H! k, Y, e8 R: }8 m
if lan=1 then) g! i; K* W* D% {9 E* k2 [
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# j( E' [$ ^; s3 Q# @
to_str("in der Andockstation: \"",?.~.name,"\""));4 t- @) i: f C0 ~7 b4 w; F
else- `& `- u) k) |$ g2 t) _
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ D: g9 n& R, T0 Q
to_str("in docking station: \"",?.~.name,"\"")); ( I, G% w2 q8 Y: |* o
end;$ ~, O+ d/ ` @! S' A0 z& T, j
else1 `+ y% Z4 ?8 R
@.Destination := assignLObj[1,row];. \7 B. k, N( s% s4 J9 [
end;
. k$ x) V0 Y4 v newDirection(@);3 l. \8 B) r# f7 E0 }
@.HasOrder := true;9 t" v' O _8 }0 U( K- p4 B; r
end;
# k; x+ Z# }* `: d/ |9 A end;
6 H% S! Z4 f$ kend; -- of the method
1 s( Z2 J R. i! b2 B# a |