/* called by: entrance ctrl of the object 'track'# ~' A) t' d" `* s N
*/6 W& c. Y8 h! a7 I% T5 f% k. G
is& S; z1 j6 B3 w. d7 d
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 L+ f( \) [( c1 v: e, Mdo
# H8 i) K$ G' ^; r+ f$ u Lan := rootfolder.Internal.Tools.AOLlanguage;" e9 j% p; S, ]$ H4 a: ]' I3 L
if current = @.Destination -- else return
) j. n3 P4 G8 s2 |8 x' S then- h q4 c* D/ ?1 J
@.Destination := void;2 v {* A: [9 v$ I( @2 G
if @.occupied then
$ ] c9 j2 L0 S3 L' |" R4 I part := @.cont;: i+ ?' N: T8 t! ^* s
@.transpOrder := void;
* C7 @3 _. ?5 r$ ?7 r) } part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ ~4 r) a9 T5 X; R @,root.eventcontroller.simTime);1 G2 A' _/ M2 D* f6 }/ T- j
@.HasOrder := false;3 q) f/ p `& a3 X( Z
@.DrivingHome := true;
S4 }. Y( ?6 Q rgManager.tryToStartTransOrder;
& e6 w4 }- A, ?1 i6 Y3 U if @.Destination = void% N4 f) ? ^. z" A- Y, P
then -- no transport order for vehicle @4 ] I3 v) t. x/ q9 U4 \0 b
@.Destination :=! d/ K3 k& V- P* j9 h
rgManager.nearestFreeStation(@,track.~);( B8 ?" k' T7 q
newDirection(@); , c; j: P/ k* {. ~2 ~1 @) p9 x
if @.Destination /= void then1 X3 A; \0 D' _ L
@.Destination.NumReservation :=
: q5 M9 X" r6 {3 ~ @.Destination.NumReservation + 1;! W# _% v+ ]* Q3 k* Y9 \4 a
end;( b0 E9 @: o* }1 _' N+ A. A
@.CurrIcon := "drivingHome";$ C0 }% n, p& w" `: i& L
@.DrivingHome := true; j+ Z/ s6 X6 q
end;
" F" l) c* ]+ V [% I else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 p+ X/ K3 C J: |8 `2 p% D( L
part := @.transpOrder;+ r7 G, i+ E! p. @. N
part.move(@);-- load part; g; I% {, o4 a" d6 W, {4 c
@.CurrIcon := "load";, u! Y% E! _. `3 j* k
GlobalDistObj := part.globDestination;& Y5 D" T- L/ ?
assignLObj := rgmanager.rgAssignL;
4 q( b6 _5 u1 V7 @' H: i$ \ row := assignLObj.getRowNo(GlobalDistObj);
4 @6 T" Z/ f& u0 s5 n5 O* c if Row = -1 then -- since 70
( ~7 C1 x {6 w- F, }$ j if lan=1 then
% _6 r9 M3 q/ s promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 u) B+ [ _. e8 O: @: `
to_str("in der Andockstation: \"",?.~.name,"\""));
! l7 m/ _% v% r k else" ^; E: C/ K0 R% ]0 d7 h C ~
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 e2 K8 x6 F7 v" z9 l to_str("in docking station: \"",?.~.name,"\"")); + k" q0 B; n. _( F# m4 V
end;
$ u! p; T4 Q1 A7 ~0 q0 { else* A6 E' e9 T! e6 ]7 X) b
@.Destination := assignLObj[1,row];
' M: H z2 u' C/ [9 A end;
3 d$ X; c8 l& ?) U/ f. j6 } newDirection(@);
$ ^5 _3 ]: E9 ?' w @.HasOrder := true;
" i# k$ D9 G5 [* T end;
k5 I- a( k9 u% j8 K end;
! V. c7 ^# q5 @9 Lend; -- of the method
& I1 B+ |' G5 w; q/ F |