/* called by: entrance ctrl of the object 'track') Q+ A4 d% d$ \* C* l- U
*/& a$ P0 Q" p% l! C. ^; S3 B$ [
is$ }0 V, ]8 R7 _* W* p: z3 {
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- F$ a* k- i' | Qdo
/ S2 C# d8 p7 K5 u& H9 r, j! ] Lan := rootfolder.Internal.Tools.AOLlanguage;, g! o) }' O& S# c# p
if current = @.Destination -- else return
8 X+ {2 Z$ T% {! m; P% s* e$ V% z then+ c4 u9 K; ]# S* g J
@.Destination := void;
( ~; [- L0 N: r+ {! i if @.occupied then; b0 c+ I: T6 G
part := @.cont;3 l: ?9 R' P$ O7 k5 o
@.transpOrder := void;
# d9 o: J! j- z part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! [2 n, z, Q% I3 \( Y3 ]4 I @,root.eventcontroller.simTime);) ~% U$ V( [* X& n! V3 W- n2 {
@.HasOrder := false;
6 L$ p; J# e$ f+ S/ \- Y* I @.DrivingHome := true;6 s% p5 Z. o# b# Y# N3 Z0 J2 G
rgManager.tryToStartTransOrder;/ X: T9 _4 f3 c
if @.Destination = void
6 c0 R! Q1 h$ C% ? then -- no transport order for vehicle @
# U+ K# X' Y8 B0 k% U) o4 H @.Destination :=! F C+ A9 p' |
rgManager.nearestFreeStation(@,track.~);( v7 d! F4 z* y4 y( h" ]# B- h, ]
newDirection(@);
7 N, O/ ?7 e& L6 E7 H3 l if @.Destination /= void then
, M$ M: S9 f& G+ Q+ a6 A6 Z @.Destination.NumReservation :=' i6 Z1 P) x3 E1 \: P' z
@.Destination.NumReservation + 1;3 f+ J ~2 Q! L$ I2 i5 ]6 k
end;( m3 F$ T7 B2 {
@.CurrIcon := "drivingHome";
* y4 O- B# X$ o7 `, ~0 G. m @.DrivingHome := true; J$ D6 l* W6 i% w8 L9 j
end;
7 b+ ]& c7 y; z& K* h else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 B; y+ Q4 ^1 F) U1 [
part := @.transpOrder;
! j* _) ?$ \6 ~% c& B7 [9 u part.move(@);-- load part
8 ?9 T& L6 a- M3 Q3 z6 A @.CurrIcon := "load";
" S. W" Y% y- q. x0 ?+ c; t GlobalDistObj := part.globDestination;5 i1 O/ E K1 R2 G r4 h. v
assignLObj := rgmanager.rgAssignL;
7 j& {) N* i6 y. c3 N4 M row := assignLObj.getRowNo(GlobalDistObj);
! `8 C! B* v4 t# }. F if Row = -1 then -- since 70
' N9 M3 F+ q4 K/ q \3 m if lan=1 then0 E' w" f3 ~) N# v3 X% s! }
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# w4 i4 y! b1 r) W* i- Y
to_str("in der Andockstation: \"",?.~.name,"\""));
& T9 C! N1 f+ M7 ~+ F; S else
7 O+ b1 U3 p% {( C promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) F7 G2 s E, c9 d* m3 F$ ~' T4 j to_str("in docking station: \"",?.~.name,"\""));
0 G9 v' P$ t1 S' `+ H# H2 v$ ? end;
, B# j* `! I8 |# R9 U else
0 O1 f6 F3 E3 H" s/ K) I; J @.Destination := assignLObj[1,row];
5 P# U$ M# V/ G end; " h0 c5 H% B) u0 J
newDirection(@);) x8 l& `/ L/ {3 z4 M3 P& u) h& G
@.HasOrder := true;# {1 _' _! H' E* }; Q$ r }
end;
& G1 ?) F& B- _5 Y end;
& t9 J* D7 }, B. V/ _9 F" hend; -- of the method s2 E$ o: _. Q9 Q) ~# U
|