/* called by: entrance ctrl of the object 'track'
: Q5 x$ ] d0 Z% D*/6 M3 m% ^2 {4 ^1 U8 R4 M
is; ^, F( f- @* g8 G! U; ~3 U& G7 |
part, GlobalDistObj, assignLObj:object;row,Lan:integer;% d' x+ _$ K, d' e- P; S, D
do
4 w% m+ G' d9 u7 Y2 ?8 O Lan := rootfolder.Internal.Tools.AOLlanguage;9 r- O8 R( M9 }5 e1 P
if current = @.Destination -- else return6 p- l% `7 m# w
then
0 r' r P; b! E" A: P; Q! G @.Destination := void;+ |- p8 P% d; q- y
if @.occupied then+ x+ q- e/ Y. E' c; z' f
part := @.cont;
X/ N4 u% d- P- T1 ^/ r. v @.transpOrder := void;
$ F, i! q. t) {! g8 ~1 Z part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, D& _) r' S7 Z. @6 `9 a* ]& G3 Z
@,root.eventcontroller.simTime);' i6 u9 ]2 `6 H& [: M5 j! X! d9 W) T' K
@.HasOrder := false;5 C, N% ?1 B! q: B8 T$ H
@.DrivingHome := true;
! H8 } h" e ?% I3 ` rgManager.tryToStartTransOrder;, Y4 T, i3 ?+ A/ Q* t+ P
if @.Destination = void4 r7 Y1 R- r) U
then -- no transport order for vehicle @) k( n9 v. F8 y' d: a
@.Destination :=
5 m) ? s4 f8 X/ D rgManager.nearestFreeStation(@,track.~);" G1 x1 u/ W# y8 h2 @. y
newDirection(@); 6 q q1 Q8 d" \
if @.Destination /= void then
8 @% w @+ O8 M @.Destination.NumReservation :=
/ @6 Y/ S9 B _9 g1 ?, w% I @.Destination.NumReservation + 1;: _) I: E: q6 |( [" `' X6 h: L
end;2 X) x* |/ [3 a; B# P
@.CurrIcon := "drivingHome";, U5 A0 k, i! \, g q) U
@.DrivingHome := true;( K3 N! w' a0 \4 s
end;
$ S" X* Y- V- P+ g! I; `: F else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 c, M+ K; q" v- T1 P. `: P- o part := @.transpOrder;
' | e$ K: @" P& e/ g* M( S5 @4 s9 M part.move(@);-- load part4 ]0 O# w# T! l. _3 T6 b
@.CurrIcon := "load";
' L/ ~* ^& r1 I8 U) I7 Q! S GlobalDistObj := part.globDestination;
0 O' v' Q4 U' m* e5 ]$ S assignLObj := rgmanager.rgAssignL;
3 h$ z( P. y- m; [( d( `" S row := assignLObj.getRowNo(GlobalDistObj);& N0 f1 |) h: S: R4 Z* s
if Row = -1 then -- since 70' T8 `1 K! }9 J+ Q T
if lan=1 then
5 A! ?- R6 r# g) z! ~. U% C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ O, }+ c- ]& p
to_str("in der Andockstation: \"",?.~.name,"\""));
* F1 D# P; u$ U# [$ o7 p else
, S, c3 Q7 G$ F6 S promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ P8 Z# @2 p2 @6 {# f$ J
to_str("in docking station: \"",?.~.name,"\""));
& R- L: ~) @: W4 x end;
; y! w/ ?: p9 q9 r* ^5 B else
( j: f& v3 F' b* l) @ @.Destination := assignLObj[1,row];
+ @0 D2 @8 D. F% {/ _ end;
8 I9 D1 l6 P! z% i( C. p newDirection(@);( ~* E8 f/ V: v/ H. ~2 l/ K4 y
@.HasOrder := true;' R# i- I8 X- a" ^, n- y4 ]- v
end;" V( d+ T& F. `# y4 M5 h( J
end;, Z2 m" i6 D& x" ^# P
end; -- of the method
& o2 v& \ V7 g) o( g5 U7 D) Q |