/* called by: entrance ctrl of the object 'track'% S9 |2 I7 D/ z: c
*/
" T, U& F, p7 d6 M. w/ K. P6 \is; `" `3 H/ `; V4 |/ Y. _4 L _
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* f0 [( G+ i9 H4 u& |" ]1 J3 wdo3 r+ a* }/ i" x. h9 X: z
Lan := rootfolder.Internal.Tools.AOLlanguage;
) } a& j% f+ v$ Y0 Z" Y V1 K M* t if current = @.Destination -- else return( u& Q' @3 ~& B
then
7 u; a. U% U7 k @.Destination := void;
8 d8 a) p5 U' z* d8 N if @.occupied then
# U) G8 \# r5 V. N# F part := @.cont;
5 r' L& g: o# d' a* L1 G* C @.transpOrder := void;
; ^& N5 e R4 R2 {& F part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ ]8 ]+ n# v* e8 S1 J5 d @,root.eventcontroller.simTime); Q# W+ e! k$ J2 k2 W9 H
@.HasOrder := false;( W3 p3 {9 y6 n! w4 a- Z8 I
@.DrivingHome := true;, \5 L4 P3 ]+ P
rgManager.tryToStartTransOrder;
4 Y& {! h# n5 z! l if @.Destination = void8 d) u Z# ?2 X9 k' s3 M
then -- no transport order for vehicle @
" l7 B& D: o0 {9 k @.Destination :=0 V# [% n% D# p6 K5 J
rgManager.nearestFreeStation(@,track.~);
) x8 M. v# r) C, b6 f& \ newDirection(@);
2 C1 Z5 B T* {2 u. y if @.Destination /= void then% [: u5 G% G/ c, w* F
@.Destination.NumReservation :=2 o% e% G$ R7 @; B
@.Destination.NumReservation + 1;
8 ~- V' _9 p% H/ H4 A4 } end;6 T0 ^1 t& |8 Z; t5 R# E8 I% [0 P9 r
@.CurrIcon := "drivingHome";
; I% D/ s; z- w6 N2 Q8 ~ @.DrivingHome := true;
$ p! M: F+ R, z& r0 j4 O! ] end;- @; ~% r- a" o# z: `
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: q Y5 Z% @* l O1 j part := @.transpOrder;
% Q; n5 F1 b0 |! l0 { part.move(@);-- load part& Q V0 I7 q. V! _1 V! `
@.CurrIcon := "load";
# g, V5 S" d _% S5 K0 T. N( ^ GlobalDistObj := part.globDestination;6 F; g7 R$ U) C$ Y7 r# g: p
assignLObj := rgmanager.rgAssignL;
+ T- @2 `, }7 ]% Y row := assignLObj.getRowNo(GlobalDistObj);) t- Z4 w4 Y; ~! |3 F) {
if Row = -1 then -- since 70
6 U+ t3 d3 q& Y( E" l% z. U if lan=1 then J9 P3 R7 `8 a5 i
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 b, J1 Y$ R9 l7 t" R' u to_str("in der Andockstation: \"",?.~.name,"\""));
3 {6 `- e" T: \! k2 T else
5 W9 w- c; s) }! u% v5 ?# D promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ I) y1 \5 }; U! U9 _; e2 Q to_str("in docking station: \"",?.~.name,"\""));
, |6 E w( e# N end;
" ]. I0 j q% s2 w! X& s! b- p else
9 y+ I1 W- C$ w O6 @4 W @.Destination := assignLObj[1,row];3 m% P+ ^1 l' D9 P& O* E+ r
end; 7 v: C- c$ P1 _/ G5 N8 C6 u! @
newDirection(@);
0 j: X/ d4 ?% u( p( K4 | @.HasOrder := true;
) L0 E Z" e/ v* H end;
5 q! N4 I0 [9 W& M, `. L( e/ m S end;, q( H$ W" v0 [" ^
end; -- of the method
+ S! Z$ C+ K: ]6 @& R, M |