/* called by: entrance ctrl of the object 'track'6 S2 ~' l( C) \
*/
! u! i9 Q5 o, _3 i, j9 Qis: a0 ?! a/ c8 |, ?, I: m
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 u( n6 h* z$ Y6 Q" [$ jdo& ~ K# S* O2 r. k0 n) [
Lan := rootfolder.Internal.Tools.AOLlanguage;1 i u/ u5 H( _0 r( z" a5 d
if current = @.Destination -- else return
9 o" R9 Q* U* o; E% ?( S4 x then- {7 J: m& J/ e, Z, P+ O: J$ D6 _. c% _
@.Destination := void;
; j& g/ f+ x+ ^" S if @.occupied then. l. I9 [: D( ?% b: m6 }
part := @.cont;2 ?( q- Z- q$ ^7 T
@.transpOrder := void;
" f, ]! }" }: S% a5 E part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& G, K' H; [; |; f) G @,root.eventcontroller.simTime);2 n0 M, Y" W( f5 k: a% d# o
@.HasOrder := false;
( y7 Q& F- @9 n @.DrivingHome := true;
" a7 l( v6 l( Z$ | rgManager.tryToStartTransOrder;2 n; C P) C# p& V# C
if @.Destination = void3 }* \/ P/ o: U/ X3 A7 x# V
then -- no transport order for vehicle @
' k k7 v5 p4 d( U. C @.Destination :=
# ]. _) U: }4 Q( O4 v rgManager.nearestFreeStation(@,track.~);
, p% P# k- V6 I9 Y' @' ?1 ` newDirection(@); 2 ^! b" y, M1 S
if @.Destination /= void then
( e; o+ E9 _! B! P. A$ q, W @.Destination.NumReservation :=
1 g2 {# Z) v3 J& A W" M @.Destination.NumReservation + 1;" |9 ^+ E6 s( f% h. m
end;
0 j2 {/ i' o3 t9 |8 L @.CurrIcon := "drivingHome";* s7 e% P( |4 \( }3 A# S
@.DrivingHome := true;5 M5 o: q( L3 o; N0 V" a' k& B- N6 Y
end;, }' Z2 e- R6 F8 s; |
else -- the vehicle @ is empty, both vehicle and part are in the same dock station; S* p$ ?8 F+ }' E
part := @.transpOrder;' P. Z% @1 a+ d% j! z
part.move(@);-- load part$ c( U+ ?& k8 O
@.CurrIcon := "load";
; H$ s5 ]) l# _% H GlobalDistObj := part.globDestination;1 F: w0 z6 G% J5 S" X
assignLObj := rgmanager.rgAssignL;- k$ {0 k9 V# W1 o, Y0 P! `
row := assignLObj.getRowNo(GlobalDistObj);
! n5 \7 R) j; x( B' G4 }2 N" w if Row = -1 then -- since 70. T& j$ B7 ]$ D* O. I8 R5 r$ u
if lan=1 then* _5 |) V! g' U( n+ @* P
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 f4 b9 u9 I% K to_str("in der Andockstation: \"",?.~.name,"\""));6 D! v+ r4 b: x# f0 O
else
4 g3 ~8 e/ f3 e8 l# b. e0 `" | promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) @) ], u3 z) L# r/ f+ w5 q0 R to_str("in docking station: \"",?.~.name,"\""));
7 i/ u. k S% B end;
- ?* B9 j7 c0 w) {: Z else, h" G6 u- p" h6 k: d
@.Destination := assignLObj[1,row];
! W8 {5 B* ^$ z9 Y end;
" z# I# i3 \! j$ G4 U newDirection(@);! [* B( ^: @* F
@.HasOrder := true;. P, w5 V0 _- Y. S
end;6 h8 G7 s7 }# l6 L b2 |
end;1 B0 f7 Z' ~+ A A, U8 O) p* q
end; -- of the method3 O* }. C- c) Z9 Y7 e& D
|