/* called by: entrance ctrl of the object 'track', Q/ j9 \1 `9 K5 |% z. b
*/ Q4 m1 u2 C3 j5 Y
is
5 S) z$ j7 h9 O, y! j$ m( h# ?9 Z' d8 X part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, u6 m/ t; P8 z6 W/ i" b; ndo
9 K( k8 x8 [3 _9 E Lan := rootfolder.Internal.Tools.AOLlanguage;
4 X+ ^# ]2 J& F0 @ if current = @.Destination -- else return
4 ~9 W0 H* L% d" k then, Q) f% E1 q; V0 k: D' E1 M
@.Destination := void;
6 @) v9 U. [7 E/ D8 y" g if @.occupied then7 O8 h1 U$ m: b. H1 b) @
part := @.cont;
/ L3 H R" J3 Q! _" o) ?& H! `8 d, t @.transpOrder := void;
- x0 R* \& n, x6 ?- [ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! R( e1 X# u/ {# {4 Q @,root.eventcontroller.simTime);! j6 n4 H9 b$ s/ k# [
@.HasOrder := false;
6 E p- ~8 }" [; ?# r @.DrivingHome := true;
: v, ?) J! ]4 o/ v) V rgManager.tryToStartTransOrder;
* H; _9 M8 R2 w3 D3 R4 e if @.Destination = void
( P' I9 H$ c- y" M& G! d! b; G5 v) ^3 W then -- no transport order for vehicle @- G& r9 h' M8 I* p& |
@.Destination :=2 h+ x" [9 T' y" r7 w+ Y% y9 ]- Z
rgManager.nearestFreeStation(@,track.~);( l0 o- Y9 ?) f3 D' Y1 @' x
newDirection(@); . d6 w1 K' Z- B; U0 y$ A
if @.Destination /= void then! C2 X5 j" N y: d
@.Destination.NumReservation :=' e- \; I2 U; Q; b& B* S4 t- l
@.Destination.NumReservation + 1; {1 m, F( B' V
end;$ }) t, P; Q# c% G1 g7 s- F( ?; o0 f; J
@.CurrIcon := "drivingHome";; \( i+ _' ~2 v. P. t2 L8 u
@.DrivingHome := true;" v5 S6 j$ I# G$ v# M. l' D) ~% Y5 Y
end;
; h$ r# P1 u0 D0 X( n2 R" s4 q9 C else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ H% G" A& G' l. ~7 j0 n9 y; H
part := @.transpOrder;& e: c8 m) G8 ~% S8 A( O; z
part.move(@);-- load part. {$ e, M+ O- T, [! X. J) v5 S) X3 G6 c- ?
@.CurrIcon := "load";
4 T) }# k5 t1 D: C9 z/ ? GlobalDistObj := part.globDestination;3 _6 m# Q# c. b0 h+ p
assignLObj := rgmanager.rgAssignL;
; g) H0 J' {: @% C7 v row := assignLObj.getRowNo(GlobalDistObj);
9 X$ J) }& E! G5 ] if Row = -1 then -- since 70
( e3 i$ \8 _' [ ]+ L3 r if lan=1 then7 H: {2 |. \4 \
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 |' P& r9 d* e0 Y4 P( ~% I$ t to_str("in der Andockstation: \"",?.~.name,"\"")); l$ K& C4 p* V, r. e* O
else' P+ E N6 P1 I1 k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ u5 {4 d& }/ p' O, p to_str("in docking station: \"",?.~.name,"\"")); ; u( E+ _- C0 d1 e: g
end;
( Q$ Q. U# Q& A( ~' x4 ?" _ else
+ U" _5 K4 G% S @.Destination := assignLObj[1,row];7 I2 I. j; n6 a6 _8 ]
end; : W- T* @* h8 w- O+ [# E$ l L
newDirection(@);, ] X) ]# d7 r! n0 Q/ f
@.HasOrder := true;
. H2 _; M, D4 y1 j end;1 r7 d7 G C7 j7 O) m( K2 N; G
end;
* \, ^( j- [; `( ?, ~" n; `end; -- of the method
6 G4 s$ L0 H+ y5 P" z, n |