/* called by: entrance ctrl of the object 'track'
* z0 m* q5 U: A( y# n* U0 a*/3 j. X6 ?, d# O1 f
is
$ {- w) `$ V9 |+ O9 i part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' l9 x4 A+ @# c- X2 }1 Y( odo# R& X5 c/ H- V. {4 J+ X
Lan := rootfolder.Internal.Tools.AOLlanguage;* G. l, o6 c$ l7 `* r
if current = @.Destination -- else return) o/ v+ k5 f, v7 h
then& }. ~% l0 Q2 J' t% I
@.Destination := void;8 B6 c; O! W2 j: G9 n
if @.occupied then
* D, A6 _& c9 _" w9 l part := @.cont;
$ H4 `+ @+ Y3 l3 R$ M @.transpOrder := void;
2 f% c" u' W& }5 x+ s part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ Y1 }, t" h9 `3 Z
@,root.eventcontroller.simTime);
3 ]+ |3 ~$ V/ |3 v8 n7 k4 h @.HasOrder := false;
+ z+ [2 c# T) c$ b3 n @.DrivingHome := true;
( r$ `$ D) |4 {$ _5 g! ~; u rgManager.tryToStartTransOrder;9 A$ C" X0 Z8 y4 i- W
if @.Destination = void
. ]( K7 `( T, n. O then -- no transport order for vehicle @% E/ p/ Z v3 y3 h
@.Destination :=6 V% \8 d9 P: T1 [9 f2 F D
rgManager.nearestFreeStation(@,track.~); i8 ~8 I) s0 f A( A/ B" T3 \
newDirection(@); % u7 a8 k( C% s
if @.Destination /= void then1 d& s" A# C6 u, G! G. E8 z1 r
@.Destination.NumReservation :=
) L; z- Z2 ]; h+ R* I1 O' M @.Destination.NumReservation + 1;
. o8 @ B( Q1 e, \! Z end;
p4 d3 Z" p; b$ ?: i @.CurrIcon := "drivingHome";9 s7 x) C' N% F+ Y2 Z2 K- p
@.DrivingHome := true;- [) p2 s0 P& ]* E: _3 t
end;
& U1 N7 \5 i/ @7 e/ U' E5 F* t( V# L0 {: f else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 \# S3 F7 i" v, G
part := @.transpOrder;
6 U- _( O) j( ?& l) x9 s part.move(@);-- load part
4 ~& M0 H+ M. w @.CurrIcon := "load";- b- ?* |# c( Q% c5 z
GlobalDistObj := part.globDestination;
7 W) K7 U" o+ q E) s* B& j0 ^ assignLObj := rgmanager.rgAssignL;
( D7 `2 m# N9 [+ c1 w row := assignLObj.getRowNo(GlobalDistObj);
2 C1 X. [# [0 w7 s+ e' u8 H if Row = -1 then -- since 70
1 R8 j6 K) x1 d: @ t3 B0 w( z9 u if lan=1 then4 W% J* i9 d- D$ t) V- }
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& l" n( H0 K# s z4 ]/ e$ N0 i: a
to_str("in der Andockstation: \"",?.~.name,"\"")); u4 Y) {3 d* [+ Z( ^- h
else
9 n0 P) m7 X) `- l, }: u6 f4 w promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 v* g; g1 O8 h
to_str("in docking station: \"",?.~.name,"\"")); 3 V' t8 g8 y0 m. F3 h q
end;
. j$ V, Z1 `6 ?( o+ x8 H4 ^1 G; B else6 l2 y1 H# _+ A0 S$ s
@.Destination := assignLObj[1,row];
2 M2 C% ]. s8 ^1 H& v5 i% V( k3 M end; $ \' |, V* B- O
newDirection(@);* v1 Q) T7 N' t, j/ ^/ ~# o
@.HasOrder := true;
. Y0 `3 Z# [% a1 s9 @ end;7 p, M8 V3 Z& Z1 W4 l% n
end;
; D( W6 y' d6 N) n* Fend; -- of the method* H) |/ H% Z. {. ~- D9 f3 \
|