/* called by: entrance ctrl of the object 'track'. E Q/ [) ~; }" G: \9 F, p
*/
6 L! X* v! F7 ]8 x. W5 R) b5 f3 Bis
4 f# N! l) O' x0 E part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 y& y/ M' ~7 t% x
do O, Q7 a3 \% K
Lan := rootfolder.Internal.Tools.AOLlanguage;
: z8 z# C1 n4 M" b" S if current = @.Destination -- else return1 \* X* O& W$ o+ S4 w
then
- [ N: S8 Y+ ?/ x( `: A- W7 K$ | @.Destination := void;
; U |" m) V( n+ |( |3 A' T if @.occupied then8 C) ]% k8 \/ y/ V
part := @.cont;
, I; U7 c9 S: E @.transpOrder := void;
: R5 z% ], N2 l4 Q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- D7 X M8 \) ^2 Q: z. _ @,root.eventcontroller.simTime);7 Q) J/ ^/ `3 K# c
@.HasOrder := false;) t/ R& @2 [9 R$ a9 e; T, B/ |
@.DrivingHome := true;4 f" @' v+ d# {6 p/ b9 B' ]3 a
rgManager.tryToStartTransOrder;- L* J9 h) ^2 w! X4 \# J' g
if @.Destination = void
: ~' B) D' z' h- G* g0 z& C a, C then -- no transport order for vehicle @
/ f- I) W) G- ?" ^5 C: Z @.Destination :=) @' Z5 q1 `2 ?! B& a1 B) z: X
rgManager.nearestFreeStation(@,track.~);
X) S/ o" t2 `/ p6 B, r9 h; K newDirection(@); 0 i3 o( u. }: K/ ^
if @.Destination /= void then) g4 r5 X2 c. Y
@.Destination.NumReservation :=: c: X2 O' v7 i2 d, r4 Y
@.Destination.NumReservation + 1;
0 W0 U- ?8 c& K# T$ { end;
# f6 E! z' x0 d l/ N$ w# } @.CurrIcon := "drivingHome";2 ` j8 a1 E1 C! V1 \" p/ F
@.DrivingHome := true;
8 I, G a) X" w1 C end;* X) N1 z; {5 e
else -- the vehicle @ is empty, both vehicle and part are in the same dock station- E- C# b" X, r0 Z5 B9 o0 ~
part := @.transpOrder;) ^+ T4 p' J" z3 y# p
part.move(@);-- load part
( n& m* i6 c, [ @.CurrIcon := "load";
: ~/ i* Y8 z% v* Z GlobalDistObj := part.globDestination;8 t4 p8 R6 U/ u; C/ R
assignLObj := rgmanager.rgAssignL;+ j3 a. b& n3 e, n+ X" z. |+ a
row := assignLObj.getRowNo(GlobalDistObj);5 @( T5 T8 x; |$ K: z1 }
if Row = -1 then -- since 70- s4 X) G6 L: T @+ w. r0 H; e
if lan=1 then4 G& [" M6 ]: `: I. L
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ c8 y6 l; C1 k0 w7 L- B
to_str("in der Andockstation: \"",?.~.name,"\""));' f0 q1 C! B+ n$ _2 f5 ^+ }. {1 h
else
7 e6 _0 C) d: ^% Q" P- _& j, Q+ T promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) J5 }8 X) [+ d6 \ to_str("in docking station: \"",?.~.name,"\"")); + T x* j$ K2 C- L4 N, [
end;
& a1 }8 L5 U* D. O7 Z% I else* D% |( ?$ L; |- U
@.Destination := assignLObj[1,row];- {# S9 u- @! _* P) E7 q) D
end;
3 x5 _+ ?' _! w newDirection(@);8 A( @+ b% b8 N) k
@.HasOrder := true;
) s% \% b2 d" j end;& q. `1 v" v5 }8 c" _6 \. [
end;$ X+ K* x' V4 a4 S6 r
end; -- of the method
# k5 ]' e/ l7 a4 \) |) h0 {& V |