/* called by: entrance ctrl of the object 'track'
. l& U5 I( ]# {% `*/
5 {! r& C/ y, W) xis
2 D' x. K' q1 \0 ]" a4 M part, GlobalDistObj, assignLObj:object;row,Lan:integer;* o% D, q3 {2 D7 d0 P3 q: } N/ B
do) n4 j- ~3 U7 u: ]. m# a7 E c
Lan := rootfolder.Internal.Tools.AOLlanguage;
8 J" y" W5 n1 |( c( x5 E! C9 C if current = @.Destination -- else return
% Y6 P7 }0 q" o9 }8 t4 R9 { then& i D6 L1 L: Q0 ~4 n. G
@.Destination := void;
) K0 x! F: F3 n% m if @.occupied then) O; T) {1 `+ l8 \
part := @.cont;* J0 p) \6 w: C8 g1 [7 d
@.transpOrder := void;
5 }2 P v% f ~9 _9 D part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 r; K( o" Y( {; c
@,root.eventcontroller.simTime);
- h2 ?/ D" t0 B; v5 [. N5 Z, | @.HasOrder := false;
* G/ ^% w. `/ z @.DrivingHome := true;
3 q \) d7 l8 ~ rgManager.tryToStartTransOrder;: o9 b) a. T1 d* ~, h
if @.Destination = void
, e8 d* X4 e/ z$ P then -- no transport order for vehicle @
7 L# @9 d: u: A" `5 A7 t5 t _ @.Destination :=0 n( X; D2 i. Q" }3 k p
rgManager.nearestFreeStation(@,track.~);
4 K& p& q; R4 I/ d" { newDirection(@); 5 g5 N, H, s! F& }+ J
if @.Destination /= void then
' d2 |3 i% u$ v" s7 Z' Z0 Y7 V @ @.Destination.NumReservation :=& q" o6 `0 n1 v" e6 w# a/ I
@.Destination.NumReservation + 1;
e7 B7 K- Z& i2 P end;
2 r' V) S4 e$ w% M1 _ @.CurrIcon := "drivingHome";. M* v3 t# f/ e: `) _+ L& t
@.DrivingHome := true;
( Y7 D) q7 [4 _3 y( t( P: C end;$ l) r+ B" g- R6 C
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; G: ]6 c- P# \/ Q part := @.transpOrder;
% n6 C- M2 _8 D% Q5 l- A part.move(@);-- load part
8 y( P t% K: U. W# z# z @.CurrIcon := "load";
" U: q9 k9 z' P3 z% v4 v GlobalDistObj := part.globDestination;
/ ?! n2 ^- ]( q8 X assignLObj := rgmanager.rgAssignL;
* j: p" g4 N: r. v( W row := assignLObj.getRowNo(GlobalDistObj);
; V* e1 D& y. H: B4 X6 v if Row = -1 then -- since 70, F5 W% a5 @9 I! c: y
if lan=1 then2 b$ z* p0 ?0 r6 R. g
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! b' L: O! J4 w# R l
to_str("in der Andockstation: \"",?.~.name,"\""));
4 j# g! l! h$ ^+ E else7 I" X5 c$ o" v
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 D, j" V) R: x1 @5 r$ z& d4 h
to_str("in docking station: \"",?.~.name,"\""));
7 D$ J5 s" v1 L end;
( K# F) ?+ Y/ f# V else* S- h7 e" f; t4 ]) ^# o( t& C8 H
@.Destination := assignLObj[1,row];% a+ t% A, ^$ H2 m! T+ x
end; 8 O) q4 `2 c7 l* K
newDirection(@);- H `6 a* p# M' r/ s5 t$ I
@.HasOrder := true;
# S( ^' J6 A @) y+ @7 | end;* ?* o, B) C- C( [ J
end;5 j- D$ w! R$ \$ a- {$ U
end; -- of the method
+ Z9 d/ w+ l9 E |