/* called by: entrance ctrl of the object 'track'3 M9 @! @5 t. R2 a
*/
/ @. d2 V% e1 i9 R6 l' gis; \' q. M- B! Q p! A- }+ _
part, GlobalDistObj, assignLObj:object;row,Lan:integer; z$ B) t6 H( B o
do3 k' d, E/ h+ ~$ S& \
Lan := rootfolder.Internal.Tools.AOLlanguage;
3 I# W8 ]* r X) g if current = @.Destination -- else return* E& U9 ]" [* V1 D0 R- q
then
+ t% m5 F( m3 [" U6 `' I# h3 d6 \ @.Destination := void;+ v! t! K, ^8 t6 W! Z
if @.occupied then! Y" O! o1 W3 L( ^' N4 r6 E/ G4 d
part := @.cont;) L2 m# h, |- l
@.transpOrder := void;( |$ l/ O x! x) L8 K$ K
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 r/ C0 \: f7 i9 k# v% M& | @,root.eventcontroller.simTime);
4 r1 v' n) y/ _9 z @.HasOrder := false;$ w# D. c2 \$ e+ z3 J
@.DrivingHome := true;
1 U ~4 Z8 v0 V9 C- r rgManager.tryToStartTransOrder;
6 h% g4 K* H& c; J if @.Destination = void/ K/ K% H$ ^% C. R7 i- b
then -- no transport order for vehicle @4 s) J! S" L8 u( L# i3 q
@.Destination :=
' j5 Q7 R+ r' T: n0 h, [. ~ rgManager.nearestFreeStation(@,track.~);
4 e+ ~1 v Y N1 k6 o% J; O newDirection(@);
3 Z3 p- ]& ~- d0 I2 _ if @.Destination /= void then( h9 R* r, I1 x. b% _1 b
@.Destination.NumReservation :=" M! l3 O; S- P; h1 T+ \
@.Destination.NumReservation + 1;9 \" h9 V; ~ S3 `; y4 R
end;
* E2 \8 K# _1 H, x9 q @.CurrIcon := "drivingHome";9 }8 U9 m* Z/ F- r: o' C3 `3 e% n
@.DrivingHome := true;
$ y) m5 _7 Y2 |) `( [0 y end;& \6 G5 `& i" A! e. c
else -- the vehicle @ is empty, both vehicle and part are in the same dock station) W# E, S) t* r; K
part := @.transpOrder;
6 o0 E7 w2 b. U0 M part.move(@);-- load part
; P1 K" p" b8 g) F, X @.CurrIcon := "load";' n6 L& M3 n0 g+ {- J
GlobalDistObj := part.globDestination;% \$ a* d! h4 q" |' _
assignLObj := rgmanager.rgAssignL;
% g; q+ I/ r+ p5 b row := assignLObj.getRowNo(GlobalDistObj);6 O# k8 x& J+ Z9 Z0 m1 y; o1 W: t, m
if Row = -1 then -- since 708 n8 X0 ^! f# e" G# ~0 @
if lan=1 then
. ~1 K! p! u* q- p promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; }, f. S5 M5 l7 I* ~
to_str("in der Andockstation: \"",?.~.name,"\""));6 W; w+ J+ N9 b" u' p+ ~3 X
else
; G* N: V: X6 ?9 K$ { promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: @3 _9 X! U, s. W) }8 p! H to_str("in docking station: \"",?.~.name,"\"")); 0 f8 \% l- {+ m0 W8 c3 Y0 }; O- i6 a [
end;7 A% E) Y2 {. Q
else/ {7 E8 j* t1 v8 r: b9 Q
@.Destination := assignLObj[1,row];
' q: c& P) C) v end; 2 s$ B3 ^- | u4 d) m/ X
newDirection(@);# ?' r/ f: C" f" [( }' f2 g v
@.HasOrder := true;2 k! w- n9 k; N- |
end;* h3 E8 p# M- W4 |1 ]
end;
3 z% T7 X7 l; @3 iend; -- of the method" c0 a; Q! E) k- v, @
|