/* called by: entrance ctrl of the object 'track'
; ~8 Y$ s; U2 m& e9 q*/
' X4 t% @3 Q" s# ?is
; Z: S. `9 J1 I/ X2 r5 n' h part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 z& ]: T+ g+ P. E( R3 m+ M, n
do/ P- t2 h) }2 f1 O
Lan := rootfolder.Internal.Tools.AOLlanguage;' ]" u# ~- O2 S/ |9 V1 t
if current = @.Destination -- else return9 x% m6 _' I. K0 u) q& E
then
5 F1 s* ]5 D* a @.Destination := void;
2 }* m) W- |* D5 w0 V4 j9 } if @.occupied then
- [* [: q# @" f2 t/ g) P, D part := @.cont;1 c% w5 z+ W# X' b
@.transpOrder := void;
+ e+ R$ F- i8 n' Q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
F4 h' g& u# O- P! j8 M" K- | @,root.eventcontroller.simTime);
2 a& ~0 W9 |( m @.HasOrder := false;
! } }4 e/ M: z9 r @.DrivingHome := true;! M6 D i' F6 Y
rgManager.tryToStartTransOrder;
7 H8 V4 `$ h1 ?# i/ u if @.Destination = void' F* l0 X& ~" p' s7 [" r, {& d& p
then -- no transport order for vehicle @
# S% h5 ] F* T( }, C- m @.Destination :=
" \0 I1 D0 a! z4 e rgManager.nearestFreeStation(@,track.~);, \6 [* A3 @1 J0 [
newDirection(@);
2 [1 U: z3 D y: K3 R3 s if @.Destination /= void then8 h: U6 z+ Y w' }0 o0 a1 \: {
@.Destination.NumReservation :=
$ _7 H, j$ L' ]# o0 r @.Destination.NumReservation + 1;) c2 j8 r/ @4 j- \! ?) ?8 O
end;9 W% @0 Z. b+ k$ o5 _# k
@.CurrIcon := "drivingHome";9 q8 k9 d: x$ ^+ t, N
@.DrivingHome := true;( K; h7 ?/ e# A) V
end;
5 d3 _! S8 F( q T0 ]) ]% q else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 M) g) @! J9 ^& L1 C/ V part := @.transpOrder;
$ s2 b2 l: i) G: E0 r& y) | part.move(@);-- load part
4 w1 o. h$ V0 u2 P @.CurrIcon := "load";# f' o# E2 o5 [2 s# S) u7 E
GlobalDistObj := part.globDestination;4 y6 y- E9 Q$ e4 [+ m8 y# I0 y% k
assignLObj := rgmanager.rgAssignL;
# h2 d S" E- j row := assignLObj.getRowNo(GlobalDistObj);6 E# ~/ h K% s$ u
if Row = -1 then -- since 70
! C) v8 T4 I% I. \: l/ a if lan=1 then, \2 H2 V" H; [5 c0 i% ]# K
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 K- z- p; f& q8 t* o to_str("in der Andockstation: \"",?.~.name,"\""));: y2 a' c4 N3 A; X% l( @0 l5 a
else
- E( P+ z5 O; O- {9 ? promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! v- t& q2 r+ z4 R
to_str("in docking station: \"",?.~.name,"\""));
! d8 @ [ y- n% d* u/ s. ~) l end;
! M1 P5 L( z- o else
. c. L. d' n `# v* q @.Destination := assignLObj[1,row];
8 [' q) _9 ?. X2 N) Q' y4 O k9 E end;
1 k* ^6 u0 M0 K' K0 C* m- u newDirection(@);! C- p) R6 x# s2 p1 W& D
@.HasOrder := true;( W2 Z3 y" E: T5 \0 G+ [
end;
]* S! v, }* b: U* Y/ o end;
. F4 J+ T4 }- P0 b$ T% Tend; -- of the method
, ]6 S" Z9 ]# b- A4 Z! P% W |