/* called by: entrance ctrl of the object 'track'. U h# G4 K+ h9 J
*/# F" y, ~! r% J5 N8 {6 p# M/ g; |' |
is; S- U- b4 T" {
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: p8 z7 g! M/ r' m: E! ?do
9 A7 v }) F6 c1 V- Q Lan := rootfolder.Internal.Tools.AOLlanguage;
1 @4 ]: o- J3 P, G' r if current = @.Destination -- else return8 B( G( X$ p" y z
then
. a9 @7 B/ g' o @.Destination := void;
6 B; L% r- ?/ J' ] if @.occupied then
* {( X+ _! L: @$ h( I6 D1 F part := @.cont;2 d7 k. T, z( {1 e# d) q
@.transpOrder := void;
2 U$ {/ V/ u* m. | part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% _8 r2 q9 R2 ~& ]) M9 Z& A0 q @,root.eventcontroller.simTime);
; b- f4 h- p9 Y" ]$ n3 t @.HasOrder := false;
, I8 E I! y) E# D7 I @.DrivingHome := true;
8 b+ [ q' q& b& r8 r rgManager.tryToStartTransOrder;! [3 {, r0 G" l4 I
if @.Destination = void
8 ]4 _$ i0 M' a1 c( U: n7 u then -- no transport order for vehicle @
9 P0 _) o4 f& F7 B- d- m @.Destination :=5 d- `' O" J/ ~& `9 B
rgManager.nearestFreeStation(@,track.~);
: M5 S# G8 I9 \- Z& P7 s. F newDirection(@);
4 L- ` w. f; n5 P0 h# I if @.Destination /= void then6 e& G2 p/ H! m
@.Destination.NumReservation :=3 ^$ l8 n# K9 s" z
@.Destination.NumReservation + 1;
* \# }. W; N1 g9 @& E& Q- U end;* h/ i0 G& \" F5 \/ H m
@.CurrIcon := "drivingHome";' O/ p: Q7 m1 v9 G
@.DrivingHome := true;
! u# @: }6 l: n0 u8 z6 B+ X& D! U end;, w5 Z! P" w# ]+ ^
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) g) s, u. A' U' T9 }! l/ I part := @.transpOrder;
7 O6 [$ D* B# {7 x; m part.move(@);-- load part
4 B" Y! W: `; R5 m7 q; S& L& ]8 R; D @.CurrIcon := "load";
, n4 C: m, Y0 o, B% ?1 |* C GlobalDistObj := part.globDestination;) J& w; g! j1 k' I, V
assignLObj := rgmanager.rgAssignL;! ~( O/ Y9 x* L; s3 C) |
row := assignLObj.getRowNo(GlobalDistObj);* y( S+ i6 k9 w( F" w/ m
if Row = -1 then -- since 70
" @3 w. s2 l& g* |/ m: | if lan=1 then
3 V! b7 Y2 J v7 }2 [& H promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' b ]0 f9 _! t
to_str("in der Andockstation: \"",?.~.name,"\""));& S( O M: a" q. ]& ?( F' d
else: M# s& d1 g. E
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' X s& x0 z6 o; b% b
to_str("in docking station: \"",?.~.name,"\"")); . Y) W5 ]. f& b; _
end;; u7 S+ I$ L1 w7 F& O! N5 c% f
else
8 ?# ]: h( O9 [ {8 G @.Destination := assignLObj[1,row];
0 u9 I5 W1 p( t: R" a0 t3 \ end;
. `1 S! j/ w( \- ]! X: M4 ?) h newDirection(@);1 K8 p' D2 o" Z; K9 n# D
@.HasOrder := true;
' c; M! K. @' P! }( Y8 H1 }* p1 a end;- W- w e# n& E
end;7 b$ b8 j5 I9 _5 a5 S$ p
end; -- of the method
) W( L+ D- @# n( Y |