/* called by: entrance ctrl of the object 'track'
, V9 t5 I4 n X" P1 E% {*/) H: W2 O+ b/ f
is! w3 y- B; i+ q% x& D
part, GlobalDistObj, assignLObj:object;row,Lan:integer;* I' `) [) f- R: \" e) `
do; @1 P% Z0 d$ A1 ]
Lan := rootfolder.Internal.Tools.AOLlanguage;
! M5 ~8 y+ k4 D8 U# m& U8 c8 B: | if current = @.Destination -- else return. @2 k8 M+ e# W% J
then
. }8 u h B: R0 r5 _% |+ C" S @.Destination := void;
- E8 J6 d+ r3 A. r' i. y+ c- j if @.occupied then7 q9 b3 {( N# C2 p/ m
part := @.cont;! U! [2 g' B' o( [
@.transpOrder := void;1 X" C! _! e, w: H4 P p8 m
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, F; W9 w$ U' Q: J6 O) R$ z
@,root.eventcontroller.simTime);. V& ~3 b! q4 V5 j) Z5 i
@.HasOrder := false;
. R6 m5 ?- l3 X2 U. A, k/ A5 W @.DrivingHome := true;5 t; N$ [' l2 ?, s
rgManager.tryToStartTransOrder;. a* i! L. n2 B* G4 y
if @.Destination = void3 L) f* l: q e* Q# ?
then -- no transport order for vehicle @2 U/ I: q9 \. R0 }+ Z% g' J
@.Destination :=
+ V! P% \* l0 ^0 h2 R1 }! f rgManager.nearestFreeStation(@,track.~);5 y% ]% j# `" H6 d. I7 |
newDirection(@); : l3 N, N3 C9 I0 z
if @.Destination /= void then7 h. m! J O* T5 {" k& `4 Y; ?
@.Destination.NumReservation :=0 e0 X$ `) `/ `3 E6 O$ Q
@.Destination.NumReservation + 1;
9 l( y W3 F2 C) f& I end;
7 B1 c% X& P3 x; B @.CurrIcon := "drivingHome";9 ]: i3 \5 v( P! r1 H- \- X3 t
@.DrivingHome := true;
4 C+ u; a- I7 F9 Q& L8 P end;8 Z' r3 @1 M1 k3 m. A* o( Z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& x d7 I3 g3 L! ^1 [ part := @.transpOrder;0 q% |5 b' w4 m0 f t, q
part.move(@);-- load part
! ?7 c7 \& ?) E0 Z @.CurrIcon := "load";3 B: A2 r% _4 S7 f; b/ R1 u- o
GlobalDistObj := part.globDestination;3 E0 Q: Y8 ]8 v, p
assignLObj := rgmanager.rgAssignL;2 N- k* M R* `/ p) L
row := assignLObj.getRowNo(GlobalDistObj);
. w; x& p: L! L. J' T if Row = -1 then -- since 70* x8 C% }1 F' a- ]; R" y5 T+ R. o0 A
if lan=1 then" T4 y; `* @) q; ~
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ R5 Q: J$ C5 {3 _. H/ \
to_str("in der Andockstation: \"",?.~.name,"\""));# B( I1 p* b% v: \/ C
else( A' q r9 D, L# R
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" U, A$ s u4 m# x to_str("in docking station: \"",?.~.name,"\"")); # A3 {) S3 n( B
end;; @1 e1 `& M3 \% ~
else
! o6 b" E. J2 v( W `5 {! I @.Destination := assignLObj[1,row];3 z- |2 d9 z, l( E% L
end; Q9 F7 a# Q- _; L9 W
newDirection(@);" `4 C, C9 V9 i
@.HasOrder := true;
8 \9 o4 m- A: \/ \" L2 C end;1 ?" i- ^" q0 ^3 Z
end;, m5 }1 Z' ~* O1 u
end; -- of the method6 T) P2 J2 d# d+ Z/ G, _4 B- v8 p+ u
|