/* called by: entrance ctrl of the object 'track'
9 O! U; I6 E( k& A( _*/; Q# f& z$ z# J. r
is3 ?) \. \$ {4 J
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' H X' C) Z+ Fdo
0 a' J, m) M5 ]% N8 g2 B9 l0 ~# t Lan := rootfolder.Internal.Tools.AOLlanguage;( R5 i! o1 P6 `5 t
if current = @.Destination -- else return
. [* a6 c2 n3 u# G, k7 p: C. Y then' C9 W0 T' I/ k* i* q9 z
@.Destination := void;
. d) W+ p. J" z# F if @.occupied then0 W2 R% l7 t. `8 Y4 U2 |2 r- R6 m
part := @.cont;$ F0 E8 l. l0 E' ]9 b
@.transpOrder := void;
$ L. p4 {+ \2 Q4 \3 s) B part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ B" L! L) `; h9 e& \ @,root.eventcontroller.simTime);
: j- d( g0 o3 }$ {# A$ t3 D @.HasOrder := false;) w. q) N% G/ i1 x6 r- @, n
@.DrivingHome := true;% b: A, h- ]+ G- `8 q2 i
rgManager.tryToStartTransOrder;. U, p9 X4 n5 x: D1 V5 N$ Q( Q1 t
if @.Destination = void
0 P. y9 r* ~6 F then -- no transport order for vehicle @
4 S, g6 ~/ F4 p6 Q o @* G3 ]% C @.Destination :=" ~' h7 t) l0 o8 z; I3 }6 T( Z
rgManager.nearestFreeStation(@,track.~);1 \* @ ?( ?5 X: U0 X
newDirection(@);
5 t1 O; Q# t: O$ t) j5 M) y if @.Destination /= void then5 |+ P j# B6 C* p3 T4 e
@.Destination.NumReservation :=$ Z, G5 w, ]. Q7 V3 ?3 u' W1 I
@.Destination.NumReservation + 1;7 x" z. s3 Z! m4 A8 e
end;
3 g6 O( S0 a# K: d$ [. F @.CurrIcon := "drivingHome";
2 c% A+ l, N; H @.DrivingHome := true;
- w' b3 Y- d8 _" M/ y end;
# T" I5 |9 Q. ~1 D else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ M, _2 W P& S7 {# \ part := @.transpOrder;
$ Q+ L( q% ~% W& j; W# o4 W6 E part.move(@);-- load part
9 d- @9 T) m1 r0 t8 B& Z/ ? @.CurrIcon := "load";) `5 a7 d6 d4 `/ A' K2 R5 W
GlobalDistObj := part.globDestination;) Y, O8 T. @+ @" s0 ?( M* }
assignLObj := rgmanager.rgAssignL;
4 o+ s& l* {! @( q" S4 \ row := assignLObj.getRowNo(GlobalDistObj);
& X/ v# _9 d7 H( O i' u. C/ t if Row = -1 then -- since 70
) Z) I& Y9 l! D& }* M2 o if lan=1 then+ ~# l$ b0 E2 A' t' X
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 B" c. G6 ~/ ]& V" k to_str("in der Andockstation: \"",?.~.name,"\""));' V3 [" d* o" P+ s, Z3 m. f1 z
else
: a, w3 d* |2 x3 B1 l promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 G X3 O, C) C3 J to_str("in docking station: \"",?.~.name,"\"")); 8 y8 R- n+ A' S/ y h( \
end;! t, L4 X4 |& {& o; o+ c
else
9 r' A1 p a1 k- ?$ X# {$ l @.Destination := assignLObj[1,row];
" K) `! ~0 `. o7 }# P8 ?* B end; - y% v( X {$ W" p0 W) H
newDirection(@);
0 L/ m) J% ]7 X# x$ @) H6 I+ ` @.HasOrder := true;* \4 ?1 H6 m' `" `% h
end;% o# z8 C; P! c3 u
end;9 f4 m: g+ z$ r8 A: \
end; -- of the method( C( a( u9 q. t5 P: z4 i
|