/* called by: entrance ctrl of the object 'track'
9 [! a4 e$ c; x- i. b6 `6 ?& _*/
6 P: w! u' q! i" \/ n: W* mis2 o3 m4 T; D* c3 M7 Z- d2 F0 R% Z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 H! u v. o0 N0 I- n9 Pdo
# i% C5 u2 c5 x9 L Lan := rootfolder.Internal.Tools.AOLlanguage;6 j2 w9 ~* v/ _" q
if current = @.Destination -- else return% g4 u) ]2 E+ t! G2 x
then1 K5 d3 ]* u) U; L5 l4 ~
@.Destination := void;
4 p/ h; C, Y p: [5 a3 z/ \ if @.occupied then& ~* b! z* h9 p1 j1 q
part := @.cont;7 Z! n1 m4 E0 o3 h% v. ]
@.transpOrder := void;
* b6 a4 O. U5 N# S( A Q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' v- n4 C' R. }- @3 e' }% [
@,root.eventcontroller.simTime);7 u+ w6 G) p o2 t0 w8 n. o
@.HasOrder := false;
! s( b7 p2 e# ^ @.DrivingHome := true;+ T" X2 o# H1 a: c6 g& z
rgManager.tryToStartTransOrder;
5 E+ C J. Y' v- _) Z if @.Destination = void1 U4 s- a) @) H
then -- no transport order for vehicle @9 I5 d2 \+ F- Y6 \# w( o$ ?2 @+ N
@.Destination :=+ m& z# H+ B, @4 r9 _* }7 v
rgManager.nearestFreeStation(@,track.~);; w( _$ k+ E9 C4 g" f& j
newDirection(@); ! j6 V8 ~- p; o+ ^2 q
if @.Destination /= void then/ |! Z2 H" f. j6 z: _" V+ Z: \
@.Destination.NumReservation :=2 m- N8 T. N/ t* f+ ^. j
@.Destination.NumReservation + 1;
5 W( X/ o1 v' K' Y+ p/ n end;
# ]% n+ i6 t& @: g5 q, G2 | @.CurrIcon := "drivingHome";
7 B- \7 i F! `4 l7 C* L @.DrivingHome := true;: v1 x% Y7 ]% y3 i0 b
end;3 w6 U A; h2 d. J8 i3 o2 o
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, i, R* p. K$ r$ ?/ V* D" j part := @.transpOrder;
0 a( a% O5 j0 k$ B' ]% N( ~4 D. O+ F+ V part.move(@);-- load part& W. R# @; n& A% [* T3 m/ m
@.CurrIcon := "load";* }- E) t. v o! N; `! b
GlobalDistObj := part.globDestination;! |! w: \% g/ O, M
assignLObj := rgmanager.rgAssignL;
. y8 o# j6 T3 T9 G" }" r row := assignLObj.getRowNo(GlobalDistObj);
/ c2 ~# H1 }1 Y: L& l5 l if Row = -1 then -- since 70
- x% @+ M5 ~4 a: f if lan=1 then
; x' J1 [. |$ m0 r promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," w5 E& S% H' z% ~7 Q% f( x
to_str("in der Andockstation: \"",?.~.name,"\""));
; I4 { w% R( w& N; ~. m else" y) L& C0 C; b4 z# B+ i8 v
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' l/ O0 p6 _' o1 w% K) i+ T to_str("in docking station: \"",?.~.name,"\""));
) D+ W5 s# _# R3 o end;
- Z- C1 `0 J K/ r; ]; a else
( S& G/ `, K3 _7 Y @.Destination := assignLObj[1,row];7 E: M* F1 t$ S/ j
end;
' Q" A1 A2 }: W3 W newDirection(@);
' y5 W% p" R" X& R6 x @.HasOrder := true;' o( v5 t" ?1 X
end;
/ H4 s. H% H, s( S8 `/ x end;) L6 s0 v; E3 j1 |9 `+ v
end; -- of the method
( l: ^% G8 Z* p1 C- _% A$ E0 w |