/* called by: entrance ctrl of the object 'track'& Z/ u$ K( W6 e: s4 S
*/
: O$ }$ }& a; u% x7 I; Sis' U0 K9 F( Q) G2 u! v
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ r4 e" z- {+ e2 Y" jdo
x% C) r" {. U! a, a Lan := rootfolder.Internal.Tools.AOLlanguage;
& M; i/ K/ l& J# S! Q% E* l% S. ^ if current = @.Destination -- else return) N1 `8 n- ]5 X/ I& C) `
then( o# y' p; m+ ^- l4 q' ~. X: Z
@.Destination := void;# b8 S) M5 r4 R) Q0 q* Y- o! ~
if @.occupied then
4 O% G& G. @: k3 p part := @.cont;5 X9 u* i# i# y. J
@.transpOrder := void;' D& ] Z6 R5 l/ E& r
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ J9 d2 X8 H: X5 O* U- m @,root.eventcontroller.simTime);
8 j3 Q2 w( ?/ H I- F3 h @.HasOrder := false;
, q* W& Y+ t- B+ f @.DrivingHome := true;
6 i, T' B3 H0 n# f5 _ rgManager.tryToStartTransOrder;
6 Y! G4 G/ S5 z; T6 Z if @.Destination = void
; \/ U: v) e" q- Z: F8 f0 I then -- no transport order for vehicle @8 X7 l0 I: J! J# V* E9 \
@.Destination :=. F1 z8 p: x' p: S" Y
rgManager.nearestFreeStation(@,track.~);1 k+ j7 @2 H2 X3 ~
newDirection(@);
; g7 ?* R; D0 S8 B( Z* K+ n W if @.Destination /= void then
% ]/ G4 ~' ~) j. l4 U$ Q @.Destination.NumReservation :=6 _9 W9 u# i N- J V& y
@.Destination.NumReservation + 1;) m$ {( h, t/ [$ Y7 b- h
end;' I8 `* @6 k: e0 R6 [; s, V# n$ S
@.CurrIcon := "drivingHome";5 [! z8 q, P" Y
@.DrivingHome := true;
6 K% M; w0 f0 U) R4 N% P( C end;
& s. x& {* o" I( c! k; O else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- Z+ x7 U$ [9 V part := @.transpOrder;8 o/ B7 P9 \, C9 ?
part.move(@);-- load part
8 G0 Q5 ]7 L/ e F% p @.CurrIcon := "load";3 v7 r7 S1 o4 `2 Q
GlobalDistObj := part.globDestination;
' n/ ]; G2 k& ]( u* M' ^ assignLObj := rgmanager.rgAssignL;
5 i$ S3 Q6 \& }1 ` row := assignLObj.getRowNo(GlobalDistObj);
& g1 F$ w. J, C* q9 R* Y( I. ~ if Row = -1 then -- since 70
3 S' `1 @ D# j( g7 h" i( u if lan=1 then- @7 V7 d" O3 ]; [9 P; V
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! G3 Y) R/ V2 h) C- |: \; v1 r to_str("in der Andockstation: \"",?.~.name,"\""));! q- D) J" ~* }
else
! \6 B8 |1 R% Y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% x% a R& [( j) ]0 o2 b9 N3 ? to_str("in docking station: \"",?.~.name,"\""));
\( q+ F, e4 I% B7 y0 l% y* E end;
7 e; P% D# \( n% B l8 _ else
4 l- h3 [% m* Q1 Q! G" c* g @.Destination := assignLObj[1,row];7 I, }' }7 G" [) }( T8 Z3 N; C' I
end;
8 E9 B8 S( O( a* d1 b; A/ @' m newDirection(@);
# M3 v r8 L: o# U! Q @.HasOrder := true;7 C' w" t# q P
end;6 {7 u1 g( J6 f
end;: {! Z. H) ^0 V1 M2 |" u: A# e9 K
end; -- of the method$ w; ^4 U: S$ J: j3 ]7 [
|