/* called by: entrance ctrl of the object 'track'
; I; W5 n* z. O8 r. D*/& l5 E. A' h/ Y3 X! m% {* d( i: f
is* Y& ~( d7 H1 ~( W# E
part, GlobalDistObj, assignLObj:object;row,Lan:integer;- \) c: O& Z% q4 E) V' I$ U# ^
do
) {6 B) W, f' {, C% J4 J& @ Lan := rootfolder.Internal.Tools.AOLlanguage;/ ^2 N5 D7 j" ]8 N
if current = @.Destination -- else return
' u0 v( A u' } d( P6 O# L7 ^2 @ then* A# @& Y# C5 H) T& b% R' O( P
@.Destination := void;. I2 x* z- T+ ~4 Z+ Z3 z
if @.occupied then
& ]8 N/ u# J7 u& M1 C& S, c; E& U part := @.cont;3 `$ B3 D0 ?5 n+ h0 V
@.transpOrder := void;
# K% a; N7 Q- O part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' ~8 q9 K8 O1 F @,root.eventcontroller.simTime);- `0 N1 x# e/ [4 l; G
@.HasOrder := false;; V* v3 V2 M) f
@.DrivingHome := true;
8 P- z' Y3 \: a# a/ M2 T: O$ x rgManager.tryToStartTransOrder;
5 c* Z; B/ [# C) j+ X if @.Destination = void
2 Y+ K$ g! n9 a/ H; Y1 U then -- no transport order for vehicle @
# I* |7 t6 {$ Q7 D. m @.Destination :=* n0 P" O5 a o! `
rgManager.nearestFreeStation(@,track.~);
( A) F+ q5 X% |, [, X4 T* ? newDirection(@); ' j- b- ^6 B3 \, [; U
if @.Destination /= void then
% u) L2 m0 d/ R2 Q' J* \ @.Destination.NumReservation :=
$ j( f* H* c2 ]* J4 ? @.Destination.NumReservation + 1;3 A- o0 l. a7 ^7 X7 b# Q" O- u6 S4 f
end;7 K2 F; @* f6 G7 I# C) L
@.CurrIcon := "drivingHome";
P2 A Y2 J$ Z2 c& [ G) L9 H- J @.DrivingHome := true;. e [0 i. u. z# G3 p) T( ?
end;
) P8 c7 z9 y# O else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 \. W$ f8 u# E
part := @.transpOrder;! f/ v" u# }2 i7 z* P: v+ I
part.move(@);-- load part! ? D3 H+ y0 F( l; M
@.CurrIcon := "load";
4 R/ M( s ?9 U) s/ l( _0 v GlobalDistObj := part.globDestination;
8 n0 Z6 \! V& N4 Z- v assignLObj := rgmanager.rgAssignL; V2 n0 P) C7 p- M" @& e2 x
row := assignLObj.getRowNo(GlobalDistObj);/ E- ?4 Z$ y" G" o( x2 k
if Row = -1 then -- since 70
2 ~1 P& O$ `! w& @$ R8 } if lan=1 then
) S% e& R9 _1 l$ O promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* O/ `! l4 |5 y) {3 y l to_str("in der Andockstation: \"",?.~.name,"\""));
" e- Z) a* d) e) R0 I else6 l! P8 t+ x2 i. r6 t" v1 B
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. g! B5 X! Q% h8 N
to_str("in docking station: \"",?.~.name,"\"")); & z: ^( \8 N, z- G8 H) j; u+ f- N
end;
. w% l" Y4 ^3 V r- k9 x. S/ Z else
1 e/ y1 i" ^ l/ S% i5 S @.Destination := assignLObj[1,row];2 Q4 K: m( G9 i! M& K' c' s
end; 6 }, ]0 E; e( V# a/ L
newDirection(@);
f' V, u% [% }1 y @.HasOrder := true;
. c# P$ G, O X1 I end;6 ]0 ^0 {3 B) {: v
end;
0 y% S% x! d) ~% J3 X! s1 t1 n: Qend; -- of the method
3 @' A) H9 k2 `/ W* _. U% O |