/* called by: entrance ctrl of the object 'track' w) y) K) i* b. j7 w& N! K
*// \: P8 p: M0 d h7 V% x& K
is2 B/ o: s1 I2 F7 J. S9 ^' H
part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 e) V9 y H# Y8 O- u% P4 N
do. \. j* E4 |" Z( } k
Lan := rootfolder.Internal.Tools.AOLlanguage;" ?+ A; f: K* c7 M, g
if current = @.Destination -- else return2 P# \4 C8 m9 H% t4 r# J- L
then M, b, u% w3 g1 h+ a" H
@.Destination := void;; @3 d: \8 ^6 Y0 r9 a) ~9 n8 x
if @.occupied then
: G* \+ {9 X' ^% z part := @.cont;3 I0 T6 K( h0 Z7 E* i
@.transpOrder := void;) [& F q r/ S% @4 {; u* |
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! W& t0 v- F x7 b' ~; B @,root.eventcontroller.simTime);
9 h$ h0 v, o L& ^2 c' M' F @.HasOrder := false;
7 H* A" J: N0 p% f @.DrivingHome := true;! s( G6 J2 J Q' ]! \% ^! N7 n; E: e
rgManager.tryToStartTransOrder;$ b5 F6 `3 Q& Z
if @.Destination = void9 \! n% N' ~) P: n( p3 ~
then -- no transport order for vehicle @
1 B# t2 E4 i8 R: K" m& O; @4 \ @.Destination :=% @! H. k+ T% Z# o% y
rgManager.nearestFreeStation(@,track.~);
. ^' {0 B: _- U0 F1 u7 e, p0 M newDirection(@);
3 t7 i8 p1 c: N$ N if @.Destination /= void then9 M5 ~+ g' t7 ?. H* P5 X
@.Destination.NumReservation :=
+ s/ Z* ~5 t. |' A @.Destination.NumReservation + 1; f( g& c; T# W% q( K9 {
end;% w0 Q8 ?- \2 Q; ?# i
@.CurrIcon := "drivingHome";
0 `8 c2 x# j! [$ M6 H- y @.DrivingHome := true;
' c" ^4 |5 p4 `$ d) g end;
4 Y4 |! b" |& W+ Z! P else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) o( y* x8 @! s$ \. |4 @0 T part := @.transpOrder;
; o) z" l8 w. p part.move(@);-- load part) ~. g! T# f+ u
@.CurrIcon := "load";
8 w/ T) ^6 O; G: C. y" Y9 m GlobalDistObj := part.globDestination;0 d: h2 F; y$ v' ]
assignLObj := rgmanager.rgAssignL;1 D/ I! W; u, X k8 T0 M/ f
row := assignLObj.getRowNo(GlobalDistObj);$ R5 r* Q2 d& C1 n) i. ~
if Row = -1 then -- since 708 \! a) H3 c. O2 X
if lan=1 then
8 n5 z; `8 u8 B t, Z# ~ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, n& k4 y' w% l$ Y
to_str("in der Andockstation: \"",?.~.name,"\""));: z9 ~! ^9 Q- z3 ]" b' c
else
7 F5 `( t1 h5 X. ^( A promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ h/ c* m- r, k+ K& h to_str("in docking station: \"",?.~.name,"\"")); ' _4 O8 \/ t! d. F1 q
end;
S6 d- L1 J+ v- F: ^6 f5 l$ e9 r8 m else
4 V5 u" B. y* P5 I @.Destination := assignLObj[1,row];
8 M" S, K- H3 G9 g& D8 n- [ end;
, I3 e6 K: B9 r. g+ \7 _) e newDirection(@);$ {. v9 a2 Q( j) E
@.HasOrder := true;
! j f. V& \ Y- @3 o5 x( j; s end;
0 x8 D3 z- X8 ?5 Y end;
r# {/ c0 h" o2 h+ _. send; -- of the method& H& Q1 E8 ]; O; ^! p
|