/* called by: entrance ctrl of the object 'track'; B) k Z; j8 k0 t! F+ J1 |
*/
6 B$ E: c- d; c! T1 ~' y2 {is
! C; F X0 y/ L! Q. s e* E% r4 Q1 N part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 l7 \, B! u* j& \& ^/ Y) }do5 g2 u$ I9 ]% \+ b4 P
Lan := rootfolder.Internal.Tools.AOLlanguage;
/ e# g) C6 A( N5 l if current = @.Destination -- else return" D. N0 y$ t4 F f5 H1 b$ X
then0 S- p0 v1 T2 f6 p" N
@.Destination := void;
2 t. O3 P# ^0 g$ l& m5 U if @.occupied then) {: f5 ]6 X# K* C
part := @.cont;
' L' b! _% m1 G) [. s' n @.transpOrder := void;9 S2 N5 i; y# ?0 h, m! j. k% P
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
m5 d/ |3 f% Z, P0 Y# X2 `" N @,root.eventcontroller.simTime);* V: {$ s: f+ g
@.HasOrder := false;
4 ]* T* z- W; Z8 P4 j$ w @.DrivingHome := true;: H6 ?5 |, T" t5 y
rgManager.tryToStartTransOrder;
; F% e" J3 f* i: A$ X8 a9 P' Y if @.Destination = void
* P' {0 @1 H1 _& v then -- no transport order for vehicle @
) S: w% P# x% }/ w3 P @.Destination :=+ X" e. L1 e8 b" v
rgManager.nearestFreeStation(@,track.~);
: Q( y& L0 T# g0 j' K newDirection(@);
( v4 T8 {* ^, J if @.Destination /= void then; \, s2 g0 X9 P$ z6 Z
@.Destination.NumReservation :=
3 v4 _) H9 A; ]4 ^4 V. H( P. ~) o7 w @.Destination.NumReservation + 1;+ V8 Y2 x! v- O2 p* B
end;
- Q# |- I9 }$ J3 H) _+ Z# A @.CurrIcon := "drivingHome";. X, L9 y6 B1 |! ?' H. c
@.DrivingHome := true;7 Q R8 w& Q5 z
end;
& x( q# b; g5 J a, B else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 I. ~ F: u, M1 w& }7 v# ~( u* T
part := @.transpOrder;
& Y. }: [4 O' f: H" y% I part.move(@);-- load part$ C C& z' Y {$ _
@.CurrIcon := "load";
* L+ `. ]3 {. I GlobalDistObj := part.globDestination;; `% A( o! K- z0 t
assignLObj := rgmanager.rgAssignL;
8 K- [9 B) p c/ {7 H row := assignLObj.getRowNo(GlobalDistObj);- @0 V0 D- y5 @
if Row = -1 then -- since 70/ c! y7 l+ c/ n+ K% M# u4 I
if lan=1 then; \# y' f @$ T& o
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% r9 K0 D: r. C/ Y P9 T to_str("in der Andockstation: \"",?.~.name,"\""));4 X. h3 f6 O5 B
else
) }1 d+ m9 b o/ ^" U promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 B# |& V8 ]! ^
to_str("in docking station: \"",?.~.name,"\"")); % C: o7 D+ M, C- e! z
end;) ]8 Q$ B5 q+ U, W# g
else
* q P; S( m; t& D9 p) D, E: E @.Destination := assignLObj[1,row];9 {# g" f% C0 t& n& j
end;
; \: B1 W: l( P$ Y5 e* z newDirection(@);
% u) ^, S) v+ Y" f; } @.HasOrder := true;/ H" l, f3 g1 C) D
end;7 v) W; K8 _+ O6 S
end;' ?1 l% S: [, y" \% _
end; -- of the method0 z- c3 }3 `+ A& @ M) J# r
|