/* called by: entrance ctrl of the object 'track'
9 @3 w3 e( D. N" ^*/$ Z! N) k* W0 d
is
4 \! c5 C3 ` w$ P8 @ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ P% A$ ?# }% I0 C" [% W- pdo4 x6 M" ]' V/ Y* M2 _7 D. O
Lan := rootfolder.Internal.Tools.AOLlanguage;
$ L4 z- d& e2 c7 ^0 O" S if current = @.Destination -- else return1 K! p! G$ K- t2 k9 [* m7 f
then
' S1 S6 T, }6 w9 l5 o- l @.Destination := void;7 ?0 w: t0 @: S6 z% L2 `
if @.occupied then
: q3 f Y# j9 `, K part := @.cont;
. z# H) V5 E9 a' U6 b, w @.transpOrder := void;; f& _, q' [( z( U
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 ]2 S( G& ~- v5 D1 Z P. O @,root.eventcontroller.simTime);+ {& h& T2 T6 C$ i7 V5 [
@.HasOrder := false;
5 U w( H- q# q! j @.DrivingHome := true; u; r9 C7 Q* e7 c6 T
rgManager.tryToStartTransOrder;
; u) g4 P1 n; K6 n& D if @.Destination = void; M7 ?! V+ W8 R9 G
then -- no transport order for vehicle @: t, J8 U6 |" p
@.Destination :=
& u/ Y7 l) r( g: h8 I! W rgManager.nearestFreeStation(@,track.~);
# A# g0 v5 h: a( \ newDirection(@);
% ^$ Q5 ]5 b* k" [6 E, Q if @.Destination /= void then3 Z: S2 A. Q4 m- `/ f
@.Destination.NumReservation :=
2 Y0 C* P. ]6 S+ f% Z @.Destination.NumReservation + 1;; M [3 p: S: u) Q9 T& r3 [
end;
! ?' l8 A2 r# b3 D% g7 \ y9 q @.CurrIcon := "drivingHome"; e+ S3 F9 C2 Q& r" |6 Z7 H
@.DrivingHome := true;
q. T' }' g7 S% e# B& @6 \; u; ^ end;
1 X ?: I6 h8 c& o7 ^' \ else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 `* a6 ^' K% @
part := @.transpOrder;9 q7 N1 \& k4 \% K9 F; E, x; X' f/ C; `
part.move(@);-- load part
& V; R; w' N! E2 p/ j# J* K- M @.CurrIcon := "load";/ q& l2 i* g3 I( H: b5 }
GlobalDistObj := part.globDestination;9 b" ]2 ~; c% @) P: J B
assignLObj := rgmanager.rgAssignL;
* S E0 v8 Y D/ } row := assignLObj.getRowNo(GlobalDistObj);% f# I3 N* E2 p
if Row = -1 then -- since 70
2 ^* \6 s' n& }2 e if lan=1 then+ s8 {) d- |, |, U( p; k0 E" f
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 J% K3 {7 G/ d- a4 I0 h9 O; J1 [
to_str("in der Andockstation: \"",?.~.name,"\""));
( A7 T+ Q" q% {6 F else1 t4 f* w- o, t
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 ~7 \9 d4 I/ k% ^6 I% F to_str("in docking station: \"",?.~.name,"\"")); ) C0 n3 |$ u" C+ A3 p$ {6 N
end;5 H8 _: S9 @+ h- V' L
else
3 S( `+ Y6 p' t' A @.Destination := assignLObj[1,row];+ c7 v/ N0 Q& I9 b4 s2 b8 I
end; - S' c, \( W+ o1 X
newDirection(@);* [9 f/ _7 S2 @ K4 }, h: A
@.HasOrder := true;" t/ N; H# d4 o* c5 C8 d/ N5 } k
end;, I% I3 n$ I- Y p- N; e
end;
' _& X; j) D" G1 Y+ d# Oend; -- of the method9 K- z: X. F$ _0 U" G7 F
|