/* called by: entrance ctrl of the object 'track'
) |9 {. F7 h5 _' F*/' ?+ l2 H7 a" P8 C5 a, W# h& A
is9 k" [5 d' T0 V2 B
part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 B1 B, l5 }- q% X+ \7 b( W1 {& C
do
$ O5 _' [+ ^) o5 L9 W Lan := rootfolder.Internal.Tools.AOLlanguage;- v- B( [& T, m% {' `4 I8 F
if current = @.Destination -- else return1 u) Z4 B9 |# R- v) P. ?
then! ?2 D9 M% f6 k* e
@.Destination := void;
1 N- w# Q/ K; ~! m if @.occupied then
: {+ H7 h9 m% B3 y% O1 y6 ~ part := @.cont;4 C: M5 U! s; Q; L- r8 e7 a
@.transpOrder := void;
; I! D( b7 b7 H' q( V6 Y. L part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' ]9 T* e1 z# e) Z$ S) s
@,root.eventcontroller.simTime);" f0 o$ R7 m$ h' h/ }! i& h
@.HasOrder := false;, [ [( o p6 `0 u3 V# m! G
@.DrivingHome := true;
* f& V( `, ? Y# D) c+ d* P0 p rgManager.tryToStartTransOrder;. x1 H. S! V$ N
if @.Destination = void
& }9 w1 y. K+ Y+ ]5 Z7 G. ? then -- no transport order for vehicle @5 U+ d$ [$ H" F3 L9 i$ u
@.Destination :=* n" i( [1 W# a6 \: X f5 x
rgManager.nearestFreeStation(@,track.~);) F* Q3 e; Y! V8 H, {
newDirection(@);
, W7 ~# F$ w$ I1 _+ t, q& r if @.Destination /= void then3 q$ g! `! q* A$ d3 g% G4 H
@.Destination.NumReservation :=8 t# L* @( p" M3 c
@.Destination.NumReservation + 1;- j+ [' E% A% K) F2 T) c
end;
$ t! |6 k: F3 A- | N4 \ @.CurrIcon := "drivingHome";. e; F; g6 k$ O( \) ]! J) k
@.DrivingHome := true;
+ F2 k. i7 d% W3 C# H end;( B# U- N9 n% K6 W
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) }. D! t' \& t( D3 I8 a part := @.transpOrder;! ~! b( C; p$ C, ^
part.move(@);-- load part2 P* U, S# j, W o& x" ]6 L$ ?
@.CurrIcon := "load";. ~8 \0 h# c1 G# X% m M0 k: c) s
GlobalDistObj := part.globDestination; A$ p6 |6 t& \2 K: f) |
assignLObj := rgmanager.rgAssignL;, k9 a" Q, I, z" l+ q
row := assignLObj.getRowNo(GlobalDistObj);
1 y# D {; n5 P/ T" j. R) V2 F. j( u if Row = -1 then -- since 70% r7 a2 @% R. u+ n; z
if lan=1 then; W; B6 Z) P2 n+ c3 J7 Q6 t# }
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 x1 ^* h6 @4 N1 I' _! D to_str("in der Andockstation: \"",?.~.name,"\""));
6 U L/ [1 k4 s/ V& s# e else
7 a, i) `. Q- L% c. S promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# [) E8 F- o# s! w
to_str("in docking station: \"",?.~.name,"\"")); 8 l+ X% p. \( k7 L3 c1 _
end; a% ]% Y5 v6 q2 U. G
else
1 W. c# @2 e" @" A0 i6 c6 L6 ] @.Destination := assignLObj[1,row];
6 K2 {5 Q, ^2 O* {' Q! W end; % U% ~1 m& i( z2 f' j
newDirection(@);5 k0 }; X1 M$ B; W
@.HasOrder := true;
- D* f, O0 N8 r2 a" v. T5 w# y end;
8 o" i' K9 b% } end;: @2 b3 `, f& l7 r! J
end; -- of the method
+ Q) M5 W5 N2 X! o7 d$ e- G |