/* called by: entrance ctrl of the object 'track'0 z3 i, y4 ]2 w9 w, o r4 b- ?
*/
( u/ W% p' k; a0 }1 Qis4 [2 ?9 v* M# K- t
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ u% C+ c% n" E$ A: e! y( h+ }# Zdo/ ~+ g. X: c5 S7 M
Lan := rootfolder.Internal.Tools.AOLlanguage;
5 l! T) s9 _5 d if current = @.Destination -- else return
( {* x& j# V7 O! ]5 c/ i0 J, x then
( G2 {! O3 H3 @& t; T/ @ @.Destination := void;
3 ^1 Z5 `% P* \2 x, J; U; \8 s if @.occupied then1 a2 Z( U9 w0 \0 l8 L; G A
part := @.cont;3 d: J1 r! k% @+ s" t, P0 n
@.transpOrder := void;
" X; i0 e# u# x) U. Z/ P2 y0 q5 c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( P0 B6 I- b4 K @,root.eventcontroller.simTime);* ?/ Y9 `5 B6 t8 }- @, T' a
@.HasOrder := false;3 E) z0 E, G5 N
@.DrivingHome := true;
' ^9 q9 A5 u1 R5 e/ y: t2 H rgManager.tryToStartTransOrder;2 {' c- o% }$ p' ^1 U# V4 [& L
if @.Destination = void" O0 N- @% [. H9 h) O
then -- no transport order for vehicle @4 V% X* J* F# A6 R& [3 Z+ k( I: p
@.Destination :=
/ F7 @6 y! H/ y" N& a rgManager.nearestFreeStation(@,track.~);
/ a4 x; Q, W8 h: J: h _ newDirection(@); 1 H. x x* \$ U" n2 R% k
if @.Destination /= void then8 C/ G( Z" I2 x ]0 h- x& e0 k: x2 x
@.Destination.NumReservation :=
" i& i; c' l! g# W+ D2 h @.Destination.NumReservation + 1;0 m; I; |4 i/ q. e' ^) k
end;
6 b! @5 w* ]! H0 P @.CurrIcon := "drivingHome";* B' Y+ [7 f% c9 a; C$ S
@.DrivingHome := true;
3 q. X/ Q: Z, a end;
* z2 u3 n6 X A: e else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* B2 P" Z' P4 O. _; o* V part := @.transpOrder;8 c0 e" m6 _! y T0 w
part.move(@);-- load part
; w5 K9 k( A# ?# I- D8 B @.CurrIcon := "load";7 y# R1 m* M) X
GlobalDistObj := part.globDestination;
& d# p% W' {1 p5 z* \ assignLObj := rgmanager.rgAssignL;
, F+ Y% A1 {% u0 n+ w ? row := assignLObj.getRowNo(GlobalDistObj);
& m3 _* c: ^# g' H" m if Row = -1 then -- since 70' s4 e3 Q5 V# I; B# k
if lan=1 then
* ?3 k8 q* P4 V3 p) M7 t promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ e6 L$ t1 V- Q$ [ u$ Z/ [6 k to_str("in der Andockstation: \"",?.~.name,"\""));6 M6 j2 F0 g; ^1 U
else
. b3 P+ \1 @. U promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, g) c6 v5 H* T+ q) x
to_str("in docking station: \"",?.~.name,"\"")); 8 q9 }2 B. `! Z2 ^3 ^/ `0 T
end;, H6 P1 h; a6 T6 N& `
else% F% m0 s9 B6 m* {- G' p1 d
@.Destination := assignLObj[1,row];
* b8 s6 Y" ^7 e- X/ W. b6 J+ K! _( g end;
" U3 B4 o, q9 e% c0 s, Z$ ?9 ~' R$ f newDirection(@);
8 u0 a1 ^5 U# d! Z% e @.HasOrder := true;3 Q) @- b4 u, w6 h
end;) W6 i2 d* }) u, B$ m
end;: { q! @3 a- |' G9 |
end; -- of the method. U% ]/ K" S4 _3 ~8 t
|