/* called by: entrance ctrl of the object 'track'
8 L( i2 f2 O/ d' m0 M& f*/5 S# b( U3 L2 s0 S9 w
is
' b# {: j) D5 Z part, GlobalDistObj, assignLObj:object;row,Lan:integer;
C) z6 v2 |+ e4 e) J* pdo; O+ s# ^7 e6 |( t
Lan := rootfolder.Internal.Tools.AOLlanguage;7 M& I1 o n& E# D9 W. T& l
if current = @.Destination -- else return
/ C/ w) @ B7 i6 @/ r then0 o( ^7 i4 {$ P2 s% ]
@.Destination := void;# }! Q: C5 X% Q N( g* a4 H
if @.occupied then6 d0 Z* o% k- q3 K- ]2 M: m
part := @.cont;
0 a$ m5 M' I* m. J) k( r3 h @+ M @.transpOrder := void;5 [* c% j7 ^6 v, m
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) z# f; o4 v Y5 t. q7 [6 o
@,root.eventcontroller.simTime);7 D; x. `: H z1 e
@.HasOrder := false;( |4 z! P+ K9 P( ]$ d
@.DrivingHome := true;6 v' y, P- o* v4 Q- J
rgManager.tryToStartTransOrder;
0 B( Q( A& j: }" }, j1 E/ F if @.Destination = void
& J+ R9 p j$ f then -- no transport order for vehicle @* }$ x! V+ r4 V. ^2 e! o
@.Destination :=
# g' n9 `4 L* b" K" _% l4 N; h& K rgManager.nearestFreeStation(@,track.~);
, i- r7 e, S! z6 s newDirection(@);
/ O; y& k9 o0 D, s: x7 C# p if @.Destination /= void then
- ^# M! E+ U! M" H, T: q @.Destination.NumReservation :=
1 Z& T" R% x# G2 F; v3 @ @.Destination.NumReservation + 1;
9 g8 x' R: r7 c; o0 r& U end;
2 g3 {$ p0 d) ^- `+ X/ `& ` @.CurrIcon := "drivingHome";
) }6 t& e1 C) V6 c' ]" o& r1 j @.DrivingHome := true;8 l3 E. x5 b H t
end;2 r( A/ G5 z9 F9 G/ D
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* t7 }; s6 \5 _ part := @.transpOrder;
X Z, n0 X9 M! p H Z part.move(@);-- load part3 Y% ~1 O% R, w
@.CurrIcon := "load";
4 b D* Z+ g- J* n) |8 u8 ? GlobalDistObj := part.globDestination;
1 g, @( N% K, a& M2 N4 {; L- ? assignLObj := rgmanager.rgAssignL;: {8 D o, k2 g/ ~& }+ V& |% E+ @
row := assignLObj.getRowNo(GlobalDistObj);, Q: ~$ F# F2 |" l8 z3 C; R/ |- k
if Row = -1 then -- since 703 e6 ~) h' n( e+ L& [& X6 |
if lan=1 then
; A* E$ O5 b6 \: A. Y" ?9 g promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 E/ c2 F8 I, X+ r. n. @8 l: ^
to_str("in der Andockstation: \"",?.~.name,"\""));
: {" _8 j8 @* ~% P" q4 c- w else
- t% _, `; x' W: J- S) E, w promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 s5 _- r+ j6 S ?' H' E& A- R2 O to_str("in docking station: \"",?.~.name,"\"")); - D. U' d( S$ Q5 a5 c
end; ]8 W9 v {9 F' P. A
else6 e: y9 \# y4 M" `
@.Destination := assignLObj[1,row];9 i8 l6 Z2 F% P# ^$ d
end; ; ]0 C$ A2 O# P' C9 Z2 F
newDirection(@);
$ }( [. ?6 P0 d' g0 k3 @ @.HasOrder := true;* q6 j9 A' r# [# {. ]2 b2 B
end;
( }6 k% t6 t l$ \5 h7 f end;
' B* m+ c3 R3 G9 p- ?" b/ e7 Fend; -- of the method
( R" T6 \) z1 o |