/* called by: entrance ctrl of the object 'track'
; X8 N$ `3 V X*/7 ]5 K' o9 d1 {
is
* | z2 P9 i% ]" P part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# M7 e$ M4 v4 Fdo- ^! g- |' ~& Z ~% T( F
Lan := rootfolder.Internal.Tools.AOLlanguage;
6 J0 P9 X; J$ }3 K5 X if current = @.Destination -- else return
$ F- Y5 u r' N( W/ d; p8 u _ then, E' P+ ~- R6 M5 t5 j) ~9 w: ^
@.Destination := void;/ X$ Y$ K$ b: I6 q
if @.occupied then* c& a1 n5 g, O3 L) b
part := @.cont;
0 _2 T/ t8 t. a6 M4 m0 i, |# R: s2 A( J. i @.transpOrder := void;
2 L4 U* s- @8 u2 `+ k8 x! T part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 }1 E+ ]* y' J+ u$ c. C
@,root.eventcontroller.simTime);
1 |* `$ `5 p }! I9 Y$ | @.HasOrder := false;
5 i: V# |1 d2 [) R3 ^ @.DrivingHome := true;% m# f+ b' W* E+ _+ N* ~
rgManager.tryToStartTransOrder;0 Q1 t8 v" T1 ]
if @.Destination = void T/ X2 |6 }% J" u
then -- no transport order for vehicle @3 h5 {* U4 S$ s! X
@.Destination :=
- G- c E) J( F( }7 M rgManager.nearestFreeStation(@,track.~);
, a/ ~5 X0 A, M; v3 c$ B newDirection(@); ! ?- A$ P7 c% d: l7 t5 N
if @.Destination /= void then% S2 t6 A4 m: q& E4 k1 K
@.Destination.NumReservation :=( {2 b) y& {/ A) Z: ~, F3 J) z3 q& K
@.Destination.NumReservation + 1;- c6 T3 H9 f: F( t5 } O4 Q
end;
3 T( t; g/ G ~5 f @.CurrIcon := "drivingHome";
& J% S2 L ~/ q$ ?6 m @.DrivingHome := true;; ?2 `, F4 I5 G& M# f* @+ v
end;
& [4 \+ S' Q( Y* r# k else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ u* Z$ u# R, q4 D( [, F part := @.transpOrder;8 ^4 G! [" U8 V5 j
part.move(@);-- load part
" T. _* o9 C2 s3 b# | j3 E/ [ @.CurrIcon := "load";
& n# E* V3 m0 z+ L GlobalDistObj := part.globDestination;
0 |4 |, F$ y2 \+ H: v% K assignLObj := rgmanager.rgAssignL;
! e- N! R1 J+ b1 {$ {8 K/ c row := assignLObj.getRowNo(GlobalDistObj);; G! |3 H G1 G; e3 d
if Row = -1 then -- since 70
* s' c0 C! C$ O. A6 A5 D& ? if lan=1 then
3 i% b, ?1 E$ f4 ^3 n0 S4 M: Q1 J promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: }2 E( c4 U" G" r8 k4 B, U/ Q to_str("in der Andockstation: \"",?.~.name,"\""));
2 B. m' i$ D9 f/ m else7 T6 B: S1 C, w* u( e
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- \9 M% E& p. Y1 v3 Y8 L! K to_str("in docking station: \"",?.~.name,"\""));
# |9 N0 ]$ h% n# b$ \' W0 p3 r end;
5 _( s" u W: E/ k else# U2 p9 z. U7 l1 @! h
@.Destination := assignLObj[1,row];& f1 D& F2 U+ ]6 r9 C$ O2 r
end;
! D& W5 q8 F3 T9 j5 [* c' B newDirection(@); L; s1 t. o( `+ h+ X$ P% f0 c
@.HasOrder := true;; {5 ?7 X: w, P, d( n
end;
6 }6 _ O% @; H0 p% d4 V end;
1 W1 z8 R! _2 r, oend; -- of the method7 d, O9 `& B8 K' |, J
|