/* called by: entrance ctrl of the object 'track'3 ^0 o |$ K$ l7 s
*/( M- V' M- T' D( ^+ W
is2 G& Z6 B& k, h' u
part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 m' F2 n' U) o! F- O/ i7 K
do `/ g z$ h, ~7 E# f
Lan := rootfolder.Internal.Tools.AOLlanguage;2 G4 o$ W& u. X
if current = @.Destination -- else return, `7 z1 @9 X. |
then
/ C, B. y0 V0 h( q" B% o @.Destination := void;
, B3 Z: w: t% d if @.occupied then
1 t- `1 C( d6 Y: T- N part := @.cont;
8 K% d: Y* @* S: y+ y* { @.transpOrder := void;3 Q0 {, T+ i' f$ z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# @$ O9 K! v! @! T7 o
@,root.eventcontroller.simTime);& I2 O' z1 V3 G
@.HasOrder := false;
' j3 q# I6 P8 O7 n A @.DrivingHome := true;
, S" I/ r0 Q3 j3 `; M* Q2 w rgManager.tryToStartTransOrder;
% ]7 t e* f! ?) Y5 R+ M8 P$ ^2 S if @.Destination = void
0 ~1 m' l6 m; p then -- no transport order for vehicle @" O4 S c3 e8 w" e0 G0 Z
@.Destination :=! K: U! ?' \2 X) j& D9 t* }: u
rgManager.nearestFreeStation(@,track.~);5 N9 X! ?( s0 O& W0 v3 N$ D
newDirection(@);
1 H3 \9 f% p$ S! } if @.Destination /= void then
. |9 ?* F# w& V @.Destination.NumReservation :=' ^7 U, e7 ~' L
@.Destination.NumReservation + 1;
( |# z v4 {! l end;
" l! ]0 F C O6 M/ k @.CurrIcon := "drivingHome";9 h; Y0 s$ f J/ I" u
@.DrivingHome := true;' C! m+ {% N0 s& b8 T
end;* t4 X! v% S# f; j
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 R$ `6 b5 l5 \; J; @8 { part := @.transpOrder;
h7 z( q" }$ `$ N8 ~ part.move(@);-- load part' Z4 p- p9 U2 f3 e
@.CurrIcon := "load";8 ^9 l6 q/ A7 X- H
GlobalDistObj := part.globDestination;2 x% E7 k" |8 h% ~
assignLObj := rgmanager.rgAssignL;
8 P6 Y0 E/ c9 m: q$ j5 M row := assignLObj.getRowNo(GlobalDistObj);" |3 s2 u: G; ^5 a3 P( O$ Q) R1 k
if Row = -1 then -- since 701 V% D+ Y/ F! n. O7 j
if lan=1 then
. U- P Y4 n, z" m O promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& n: Q3 K' e4 V4 ~
to_str("in der Andockstation: \"",?.~.name,"\""));
& O# [7 j& |" S, H2 g0 d8 A5 C else
9 C/ y- P0 C0 ^# Y) r) O promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 y8 E, |/ y" P f& g3 b to_str("in docking station: \"",?.~.name,"\""));
( x. ]* R7 Y$ I& e% H3 J end;5 f2 T3 a% @$ u, c) b8 ~
else
( A. E/ I& G' m& r$ G @.Destination := assignLObj[1,row];
# U l6 I. j- v5 v/ ~ end; x6 p6 d, N" k
newDirection(@);' R& o& y( C [2 }/ o4 g+ u( [7 L
@.HasOrder := true;
0 N+ z3 J& a+ c4 G0 y) ^8 {& n end;
W: [6 r9 V+ i% o+ @2 w; V7 v end;8 m2 d, O1 Q; U8 R* U
end; -- of the method/ r8 }; n3 G# F# G5 [' A. g
|