/* called by: entrance ctrl of the object 'track'
- B8 l- D; A/ e1 A! M, }*/
& \3 H, B \% n7 {+ D3 U, N! Qis5 K% ~/ N+ d& q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 L, U5 U- L; j& T9 g# z; a
do& }! F6 y4 h8 ^2 @5 U, l/ a
Lan := rootfolder.Internal.Tools.AOLlanguage;
y5 _# P, O6 X if current = @.Destination -- else return
& b8 A3 l% v( o then: W* K$ I3 u* f
@.Destination := void;" q6 |/ q/ ?7 X# J' D
if @.occupied then) f& t. w1 \' {
part := @.cont;
3 `( {& F: C0 c* o$ D3 a( C \9 Y, k @.transpOrder := void;
; C9 j% x8 ~& S" k part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 U- I8 v% }6 J5 Q
@,root.eventcontroller.simTime);3 h4 W4 ~, x- @ m: g
@.HasOrder := false;
1 C" S& L3 e4 y% p @.DrivingHome := true;6 D( c7 f1 \7 R
rgManager.tryToStartTransOrder;
$ t, }+ S6 h& v) m1 M1 x b if @.Destination = void% t* S0 O! m! D& E- j4 {* l/ j u) e0 e
then -- no transport order for vehicle @ A7 A8 @7 ^7 i4 q
@.Destination :=
! P7 c; m: ]; ^- L. p2 H- u rgManager.nearestFreeStation(@,track.~);4 O" m) z B9 O& Q ~
newDirection(@); " a8 o0 Z% h! S, Y/ C
if @.Destination /= void then7 k7 x2 ~* c' u
@.Destination.NumReservation :=- f/ m7 }2 t+ y8 F
@.Destination.NumReservation + 1;
1 @; d- T; c* a- y end;
' {' q7 o7 U" G7 W5 n& F @.CurrIcon := "drivingHome";3 k$ ~2 S' s$ j' B8 ~$ T' A9 W
@.DrivingHome := true;
) ?3 n5 }" s3 Q8 r9 j: \9 S& B end;; M- d; s. q# H" a; \/ }0 s1 n7 b- }
else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 \3 q* ?, \0 O: m# u. K0 E L
part := @.transpOrder;0 q: i$ g3 U$ M& [6 ?; E% W7 h
part.move(@);-- load part
9 t- n* f& a- [) Z; G @.CurrIcon := "load";
# ~5 _. B/ ~/ N GlobalDistObj := part.globDestination;& a. }, l( r2 J4 s% Q
assignLObj := rgmanager.rgAssignL;
: N! O# r8 Y& k2 Q m row := assignLObj.getRowNo(GlobalDistObj);6 r# [; {% d7 t
if Row = -1 then -- since 70/ F/ ^4 r# U3 g4 l
if lan=1 then! J7 C ~4 O, k ?
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 e8 s+ A1 B! b) d u5 D
to_str("in der Andockstation: \"",?.~.name,"\""));8 [! p' u) D3 ~5 k( f
else4 h: A: F; M/ M: \; X7 f
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 X8 l+ c1 x. a) i
to_str("in docking station: \"",?.~.name,"\"")); & M3 F# Z, j' B0 z
end;; j* o! l5 q, u2 M+ _- P
else
4 C5 N' b$ o5 M; V _ @.Destination := assignLObj[1,row];6 i w' r. F9 e Q
end;
# ]% n! r7 {* ^& p1 u3 { newDirection(@);* c8 s6 j1 _" R
@.HasOrder := true;; y$ t. k* E* j* o" r: z/ ]
end;
. @! F$ u1 y" M2 V end;
" s$ @$ k: Z& f4 q9 ^end; -- of the method; L+ C$ Q6 T' o* n6 H# [. i0 a/ t
|