/* called by: entrance ctrl of the object 'track'
; a+ A p8 q8 l/ h*/" r, ?# q$ k/ B% n
is6 a* ~& H G4 [& Y0 g
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- R( a- [$ a5 Y) S! ydo& P5 I3 j0 l M
Lan := rootfolder.Internal.Tools.AOLlanguage;
: H% ^: A8 |, ^& i) o1 k7 ^6 E if current = @.Destination -- else return% @+ E. V* }! L) Q- g
then* N0 K- s0 D) t1 V [
@.Destination := void;
8 r, O' c. Y$ Z, S7 Y; X+ Y) R if @.occupied then
; U: }* c( ^' o# y, ]) ?. \ part := @.cont;
5 o+ O k4 G9 [$ _. N" | @.transpOrder := void;
$ D1 G0 \5 u/ E5 Y# }! n+ @ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ L( P% f7 E* Y9 \: u+ r% ?0 Z @,root.eventcontroller.simTime);
) {5 g+ m% I: E6 S) T/ N, ~/ u4 c: { @.HasOrder := false;# Z5 e. P! |7 T! j" _
@.DrivingHome := true;
6 z1 g6 T, {* T( P) { rgManager.tryToStartTransOrder;! j2 j# O9 {8 p' x/ b
if @.Destination = void
G0 a0 }: e2 I' E* \ then -- no transport order for vehicle @
( f* m% g1 c' k$ S. s8 C4 b @.Destination := X" r+ ^9 A/ \. V) n
rgManager.nearestFreeStation(@,track.~);
' ?. [- x& Z- a* o& N newDirection(@); 8 D8 J( T6 o" H2 s8 d
if @.Destination /= void then
+ g6 \/ q' H6 [ @.Destination.NumReservation :=
( r' X+ N1 C8 u# a, O5 p+ k+ { @.Destination.NumReservation + 1;% {7 B" {! j- g1 s) Y2 }
end;) l- m, ^2 u4 ], p3 H+ m
@.CurrIcon := "drivingHome";9 z0 a- P) T( d. n- c8 ?9 t L, l
@.DrivingHome := true;5 N% ]' d# M! ^! s% z6 v
end;) A6 T9 x& Z% h; h9 a* a X$ D7 v
else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 ]& |& d7 h. D
part := @.transpOrder;" D( W( L' B: \. O: i' R( t6 o7 G
part.move(@);-- load part
# k% o, p' \# q5 P$ R @.CurrIcon := "load";
$ s, Z8 H3 f! S+ u# t1 y& \ GlobalDistObj := part.globDestination;
, o6 v$ v! r3 ]1 E+ _3 ]( S. O assignLObj := rgmanager.rgAssignL;
# a" s! F+ X" K9 N row := assignLObj.getRowNo(GlobalDistObj);% M8 M' k5 B0 M+ F) V
if Row = -1 then -- since 702 \: _8 Y, A8 L- H: W
if lan=1 then
6 V% y; s$ |; X+ a# V7 \ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 g+ C' Z4 {) _ w% M
to_str("in der Andockstation: \"",?.~.name,"\""));
1 K" C) w" ?4 t. |# j% R; { else
A/ c# E8 u+ R' l. \1 d promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), I& h: a2 [3 \/ c8 ^0 C9 D, G
to_str("in docking station: \"",?.~.name,"\""));
- N" ?0 I( J, p! [ end;
! z: k! C J o6 }( |: Q else
' X$ I# V. B; i @.Destination := assignLObj[1,row];: Y- F Y6 p/ Z4 Z2 e
end; ; T: [/ Q4 J( L% g0 k: Q5 s. z
newDirection(@);
0 X8 n4 h* F7 _6 ]0 U6 | @.HasOrder := true;
; i( O3 [! F& P end;. V6 Z9 S( f2 g) p4 `
end;
5 A) a; q& c( \! @ S {$ oend; -- of the method
- o1 z* E8 q1 o4 F G6 N5 }: [ l |