/* called by: entrance ctrl of the object 'track'
( R% b0 y5 A0 ~. f- m" |$ V) n*/
/ y# S1 e: |9 w9 a3 E9 N1 g6 d' dis
6 q9 h3 o6 l6 e; U# E# M+ ~ part, GlobalDistObj, assignLObj:object;row,Lan:integer;! D3 L' B7 K; f0 p& Y8 z
do
/ \5 G+ [8 Q" H4 G8 j4 h2 t$ W1 ^ Lan := rootfolder.Internal.Tools.AOLlanguage;4 `0 d. I! I3 N3 w+ Q+ q
if current = @.Destination -- else return
9 x+ B, b: I% D4 k' J then3 x2 A* q6 J8 N8 `, H6 [/ x
@.Destination := void;
5 w( v2 a9 e2 }6 y) A$ k if @.occupied then
, r3 \. J8 U9 A- b part := @.cont;1 ~' k( {4 |9 K. ]! n+ |# F
@.transpOrder := void;) Z6 F7 M; y t( u+ K4 a0 c# v
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; i6 T# I8 z( T4 R" n! g
@,root.eventcontroller.simTime);
* b1 f1 H' ~" z+ [, F b @.HasOrder := false;
7 H4 [: z! x7 c( O) _- @8 u0 H* m @.DrivingHome := true;
$ [5 J( S" d: L% h! ~! O: @/ ?4 p4 L6 D rgManager.tryToStartTransOrder;
6 H/ I% M* T& P" R e if @.Destination = void
1 P* i6 A% M& n5 o then -- no transport order for vehicle @! @2 h* C( Y% v
@.Destination :=
' n: J8 C* L- ~7 N rgManager.nearestFreeStation(@,track.~);$ {% N7 N) u& W! k( R3 M
newDirection(@); - U0 E1 j6 c: ?: F, S
if @.Destination /= void then* B' [6 U2 s9 D" v1 s' d( r
@.Destination.NumReservation :=
1 M% O5 G; T% j: D# [% b1 p @.Destination.NumReservation + 1;3 T3 Y* A; ?$ ^* Z
end;
! p# w- H! C* ~" _# @$ L @.CurrIcon := "drivingHome";) T4 u+ l3 L0 f4 k0 S
@.DrivingHome := true;1 o5 ~( w) l5 B& U$ V
end;/ \. G; c8 j& }9 p# \8 [
else -- the vehicle @ is empty, both vehicle and part are in the same dock station; v3 f7 T/ Z3 X: G
part := @.transpOrder;
% n# P( Y* J4 l1 B+ a, `# ] part.move(@);-- load part
. |: c$ `4 Q* J7 f; ~ @.CurrIcon := "load";
. N; `! [# b$ T7 s GlobalDistObj := part.globDestination;
6 F" e: E7 V# ]& t assignLObj := rgmanager.rgAssignL;
: u; ^; l6 t8 P: y/ h row := assignLObj.getRowNo(GlobalDistObj);2 r% N3 Z( w, _# b# i, W, M
if Row = -1 then -- since 70
4 w* w, ? i8 J if lan=1 then
2 ^3 R3 _ k# J6 R4 l" o& D; j promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 q6 i$ E* j- g! D- C; A2 I) b to_str("in der Andockstation: \"",?.~.name,"\""));
- v' u4 I5 A R( D2 f, {( r else
; ^- ^' V6 A- l! h5 i promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 M }0 [2 \1 t% ]4 T! I
to_str("in docking station: \"",?.~.name,"\""));
5 @5 c2 y, E/ o6 ^ end;
3 Z8 u( J: j8 ^. | else
; Y; s# h' m1 ?, q$ |' R( Z% e @.Destination := assignLObj[1,row];
7 r% u7 l! R0 Z. Z' U end;
s6 ?7 k2 \* o, b* K$ k newDirection(@);! h/ q1 E9 m! Z& U
@.HasOrder := true;( _3 _- F' G' c4 n' a
end;
' k8 ]6 }& L7 @! F end;9 m: |9 @" y8 E$ V. v
end; -- of the method
- j) R% M& E1 q- u5 L, D7 @ |