/* called by: entrance ctrl of the object 'track'/ D k5 q) f) V! `2 `- r
*/5 {; ?& g- {0 Z r+ D5 x$ Y
is
( g) _6 M; b5 M/ D* d part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' X/ f6 G4 C" ?1 _: [% v( ddo- D6 S! I1 W: z! `; c7 h0 \, q6 S
Lan := rootfolder.Internal.Tools.AOLlanguage;" M Q2 z# }4 ` A# p- f2 X
if current = @.Destination -- else return
2 r$ w" |# K L' D4 r3 S' w6 r then
1 E2 B) ~: P! }( V9 \ @.Destination := void;
' h) C4 e7 s6 h2 T/ M if @.occupied then
, d* A, l5 O& O part := @.cont;
5 m! `! X' k& ]5 x @.transpOrder := void;: D1 I% k' o0 n; l& y3 J( h
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' J2 c: V# j$ z& V! S0 m9 i. c6 G: s
@,root.eventcontroller.simTime);* v+ _( M# }1 U! i+ ?
@.HasOrder := false;
9 F- O) _& F" t9 Y0 |4 p7 q6 @ @.DrivingHome := true;$ G1 `3 E% H2 ~
rgManager.tryToStartTransOrder;
/ I* O3 e ?- U' D. H& ?5 L( j* r if @.Destination = void' z9 ~" k$ {: u$ B! o
then -- no transport order for vehicle @8 K8 |9 w2 w( W# V
@.Destination :=
5 Q1 l: p. o5 Q) k' A rgManager.nearestFreeStation(@,track.~);
, x! x* u* N( l newDirection(@); 5 F3 V O1 F. l
if @.Destination /= void then
% y1 j! u0 l0 f3 G* C* @ @.Destination.NumReservation :=1 ]$ j M% v! K2 B9 V% H" b. {
@.Destination.NumReservation + 1;5 ^3 q9 F1 o: h/ Z2 O& u
end;8 T9 ?4 k$ t. y) T1 E3 l, e/ p
@.CurrIcon := "drivingHome";; d& v/ i7 b; e/ X
@.DrivingHome := true;
, `( q% n0 ?$ [ end;" l2 F1 \8 F0 y) M H* l Q9 O
else -- the vehicle @ is empty, both vehicle and part are in the same dock station, Y8 e6 J3 K( A# O# n
part := @.transpOrder;
8 [" E; w% p" L6 \4 v7 A5 L. O part.move(@);-- load part
* }! ~" k% ]0 Q2 v @.CurrIcon := "load";
( Z" T9 h9 p- Q3 s% T* E1 I1 r$ u GlobalDistObj := part.globDestination;
7 i! S% z+ F2 y2 `8 Q* U% `0 \: C assignLObj := rgmanager.rgAssignL;
) v9 W5 M9 F0 I: v# ] row := assignLObj.getRowNo(GlobalDistObj);; J$ X/ S/ x X. \
if Row = -1 then -- since 70% X2 J& o" a% f+ p- ?' {5 Q
if lan=1 then
1 U- y( S5 M) [: ?$ k1 U promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 B1 D$ R( K& J' |0 r0 u to_str("in der Andockstation: \"",?.~.name,"\""));, d. B$ `5 f5 w, r- |$ @4 [' _
else5 q4 B" K8 Y0 e. p# J3 Z0 s! x
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" m; e7 |" p2 G" `# i9 r0 H& t6 | to_str("in docking station: \"",?.~.name,"\""));
7 q0 M9 Z- f0 S end;
6 O* l" c8 X5 o* E3 M2 j" ~" k else
. g+ J7 L; B5 X4 g @.Destination := assignLObj[1,row];
- M# |2 M5 r* @# ~5 ]' [ end;
; G: D2 a. `( G \' L* U newDirection(@);
4 f) K$ W( D' j6 m2 F8 P6 N8 q @.HasOrder := true;/ d; n+ X2 O) h
end;
5 l: m! I# K% F& W) s, y s end;0 Y8 N( ^# l# |$ S5 m) |
end; -- of the method4 H8 T8 w, s9 P' P! S. K
|