/* called by: entrance ctrl of the object 'track'+ X7 Q9 S' ?, ^7 x' K9 v( y
*/( _; C V5 Z9 Z6 ~4 k, u- W
is
: H" P& g6 N1 C" Z1 p, L. } part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 J& }* b2 V8 o- x: |7 u# Y' kdo
: [/ ]6 e8 u0 t Lan := rootfolder.Internal.Tools.AOLlanguage;
! P: f1 T6 w* U5 C% G if current = @.Destination -- else return
7 h# j I. I' [4 z2 s; V8 k then3 U: w& |9 O5 n5 q C! Y( ^( N
@.Destination := void;+ ^/ Y: }& O- V& E3 f7 n; Y
if @.occupied then
3 ?, P, {. S1 p9 G1 f part := @.cont;# f% j s3 \% F) g& [
@.transpOrder := void;9 M' k1 e2 ~# {1 Z2 q3 C* g6 V+ ^
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% ]$ G0 ~8 E$ D" x) S
@,root.eventcontroller.simTime);1 _" ]" E' [) ]) |( k- _
@.HasOrder := false;1 e. {: C: t4 H2 S6 {4 y4 @& A
@.DrivingHome := true;6 p9 X! i) p% Q" w
rgManager.tryToStartTransOrder;
$ }+ J0 C F) K# }' C4 t/ @1 R if @.Destination = void
- j, @" N. A+ O- U, Z: q4 h8 D then -- no transport order for vehicle @1 D" }! u* x* }7 @, e
@.Destination :=
% `5 Z3 h1 f" V V& h' J rgManager.nearestFreeStation(@,track.~);; o0 P0 \) k# @. j* e
newDirection(@); 6 Z1 d8 d7 x8 P5 w$ ?8 w6 v& ^& H2 V
if @.Destination /= void then. d4 I; o* X( }8 _; q2 E7 H7 k
@.Destination.NumReservation :=
6 }# \1 A* T4 |* X$ i @.Destination.NumReservation + 1;& ^: V' [9 f% _8 m& V5 K5 H
end;' k2 U n0 E3 s6 K# D6 _4 h' F
@.CurrIcon := "drivingHome";
9 n) y# y7 F1 w @.DrivingHome := true;
& |" Q& \/ H4 v2 J) s; a, q end;
8 O4 x/ c" ~5 t, n1 Q) J# C+ D- m2 y5 Q else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 c- d* ~/ Q9 D: T6 `7 W
part := @.transpOrder;7 Z+ q8 m6 {- n y( N8 R
part.move(@);-- load part
O4 T5 k- C5 c, O6 y/ l1 D @.CurrIcon := "load";/ ~3 Y- ^ [5 M1 y. {
GlobalDistObj := part.globDestination;! |7 {1 A6 L$ f1 l
assignLObj := rgmanager.rgAssignL; r' f8 d7 _; ~# w) W
row := assignLObj.getRowNo(GlobalDistObj);9 i, Z) i4 Z% Q& ?: y1 b
if Row = -1 then -- since 70
9 d+ J9 a n6 A8 Z' m- d if lan=1 then z, I+ P. M9 w2 x( l
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# z1 X6 V R1 v( ]; z to_str("in der Andockstation: \"",?.~.name,"\""));
& p& K+ K; L+ W% e* W$ _) l else
8 R' Z% `( v1 T% L9 k promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& X; v/ [! R8 Z8 j4 d2 k to_str("in docking station: \"",?.~.name,"\""));
! t% L% n- I8 E1 Z- C end;* @+ T& @& j9 X7 }4 l
else
1 P' n* w- S+ w" T/ P. @ @.Destination := assignLObj[1,row];; K) e4 h" O6 e$ w' d, k
end;
5 w/ O6 t, z* {8 E5 Z" t* O! i6 B% b newDirection(@);( D- K4 Q9 p! c1 X
@.HasOrder := true;
o! x1 z$ A' m$ A h N& ~' e end;' V4 H- L7 i8 Y7 K7 c {
end;. c) J9 ]8 Y7 U+ C
end; -- of the method
1 b1 B! z- L5 ]) m2 N |