/* called by: entrance ctrl of the object 'track'
% D6 M' U6 M6 T/ e*/
! p" u& s q* L- ~, qis+ L9 j# Y; m( `& n/ F0 d. y! Q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;, t1 B* n$ Z9 C9 [2 w( f% o2 k' x
do a: V7 J7 s+ Q; `! n
Lan := rootfolder.Internal.Tools.AOLlanguage;
. j2 | C1 t- I& c5 Y if current = @.Destination -- else return
E: x& O2 `/ [: l2 I then
~9 H, z% v/ h6 x! ~ @.Destination := void;
# [0 z# }# l; e$ p4 T1 v6 j* _ if @.occupied then
- V; D. S0 s2 w( [# V# x6 g part := @.cont;
+ @& \; t$ d: p7 I/ y @.transpOrder := void;& Q- B$ ~9 o1 O5 ~& N% J1 [
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 [' t! i+ i+ l5 h [! q @,root.eventcontroller.simTime);' E6 `0 g0 L; n" o( I- |
@.HasOrder := false;2 c8 ]5 v3 w: {+ B. k. ?' J
@.DrivingHome := true;
' i( _: q: _) x) F8 u% _. W rgManager.tryToStartTransOrder; |' _2 z; H3 t' A% t) S; Y$ P. H
if @.Destination = void
$ `9 C8 H8 Y E$ Y+ q8 Y; j then -- no transport order for vehicle @
, ^+ Q6 Z3 N9 Q1 F5 s x @.Destination :=7 c5 Q3 F( I0 `3 `7 V& u. u2 J8 g* R
rgManager.nearestFreeStation(@,track.~);
1 u' s, c9 f& r" _2 m newDirection(@); * k1 {. l* `1 R% |
if @.Destination /= void then
% v, V, s/ b0 N- N. g! R @.Destination.NumReservation :=) N% h% m3 W( _" T$ C: u, s7 p5 O
@.Destination.NumReservation + 1;7 h+ L p) d, ^, f& M- q9 \
end;7 K2 E/ i# I+ ` k, [- v. x
@.CurrIcon := "drivingHome";
: e: ]8 ~1 c" w @.DrivingHome := true;
- h/ a# n! e" j, M" S end;
0 ]& ^4 W0 u7 N9 C5 y" w else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 s3 Z6 ]! `8 }4 J2 l9 m$ }+ E
part := @.transpOrder;( e% I( _; Z/ i
part.move(@);-- load part8 \% m) z r8 T" o' p5 a
@.CurrIcon := "load";
5 f& R2 `0 D+ \ GlobalDistObj := part.globDestination;, B' @% E0 Q% ?1 H" @& ~7 w
assignLObj := rgmanager.rgAssignL;3 N$ r; S b. o' n, P7 N& ~: K3 F
row := assignLObj.getRowNo(GlobalDistObj);
( X+ D% e/ J+ Y8 y& {& @3 } if Row = -1 then -- since 70
}& `: a! W3 C i- E if lan=1 then
& K6 O ~" Z- E* z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( L, l- N8 D3 |. x# G
to_str("in der Andockstation: \"",?.~.name,"\""));. I: a: r! K8 H9 ~$ @* I3 q: e
else
: ^- N1 x: _5 r/ ?% ^# c promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 J* {+ K7 S& i: y* G to_str("in docking station: \"",?.~.name,"\""));
: y( B" r4 u. _ end;4 p9 [! N2 ~* x4 e
else
" ^" t* T* w. I6 ]/ h4 B8 g# K @.Destination := assignLObj[1,row];
9 I8 _6 f$ x+ U7 x( G5 x end; / k2 T! s; V+ ?4 F9 f
newDirection(@);$ B+ M; d* i+ b% j
@.HasOrder := true;0 x4 S( \# O; c U( b G( E* P7 Y
end;, U$ [- T1 B6 K. p5 _4 Q6 f: M
end;
/ N {% n% j" @+ a* tend; -- of the method2 S+ K, d8 @% c; Q& B1 y
|