/* called by: entrance ctrl of the object 'track'
* B& ]" n- t" C9 V* T, Y*/ j% W( P) L1 P1 ~/ F) B" l/ s
is
8 q1 }6 [# g# V: a part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; {) V; J$ m/ [$ fdo
/ j. m" U9 F/ R* s) q Lan := rootfolder.Internal.Tools.AOLlanguage;
9 Z8 `7 ^* w* p( w if current = @.Destination -- else return% ]8 y+ l9 Z2 x; m
then
- l7 v, g( ~- }# V# F @.Destination := void;3 e% O( t6 S. U" j- b4 _/ x8 d# V; x1 Y
if @.occupied then% ^& Z6 _! ]) H: |2 h) o
part := @.cont; J7 `1 h# W$ Z
@.transpOrder := void;
+ ]: q; a0 C9 I+ b" w6 d0 M$ ?0 z$ ~ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' v8 g0 X2 ~% Q% n
@,root.eventcontroller.simTime);
; Z# o9 Z' d1 a" j, M. q @.HasOrder := false;
- {1 o8 F( j* g @.DrivingHome := true;
* s% @" d% |+ o3 E$ X0 t rgManager.tryToStartTransOrder;
' J" E$ i, B2 W( X7 m if @.Destination = void, S$ s$ ~5 f' x, B
then -- no transport order for vehicle @
, m5 K+ r/ l9 u S% Q9 q9 t7 g: O @.Destination :=7 a. s" x1 n# n# Y% W
rgManager.nearestFreeStation(@,track.~);
]9 v2 q+ U5 {, ?) V newDirection(@);
7 z" f9 I9 p1 ]7 \1 I if @.Destination /= void then
/ U9 Y. L/ ~7 D l) p) K @.Destination.NumReservation :=# q7 |" f! o% M+ m' }
@.Destination.NumReservation + 1;
4 t |, o5 A8 Z end;7 k3 Z9 d0 O% T C, J1 ~) `
@.CurrIcon := "drivingHome";. Z9 U1 D* o+ u7 ?4 `$ ?7 Q0 M" a% o
@.DrivingHome := true;
, t* C, R. N' m# j, k: S2 H end;; c4 J$ J: F" X3 O( W
else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 \4 k' D' a* u+ u+ Q/ L8 Q
part := @.transpOrder;5 Q. G K `: Y& Y3 x' ^0 h) K
part.move(@);-- load part
. v. z& f& ^6 ~4 N9 j @.CurrIcon := "load";
) V* b/ j# Z& L7 W* j4 s GlobalDistObj := part.globDestination;
1 K; c( H# _% W* S assignLObj := rgmanager.rgAssignL;% J) S e! [" z
row := assignLObj.getRowNo(GlobalDistObj);/ Y1 g. t; L+ M! [7 s! l
if Row = -1 then -- since 70
# w9 B) X8 ?# N8 B4 v& S if lan=1 then: k7 ]2 G6 v/ p
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# _3 a/ L5 r8 Y( a" v: o+ A1 C$ J to_str("in der Andockstation: \"",?.~.name,"\""));
4 d1 d, C2 F9 c$ [( `9 O$ c else2 f8 `; u8 ]6 a
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; g9 k% b3 {/ A, J; |
to_str("in docking station: \"",?.~.name,"\""));
! H$ ]# p) @7 k$ Q/ X X, N5 H end;
6 D7 a/ }0 u' s/ ~9 D* _ else
# S" u1 y. D8 T$ c( K5 d( ^% l @.Destination := assignLObj[1,row];! ]1 q* V N: f1 [: x, D; O) R
end; / O, ~. y- V# K9 N0 a
newDirection(@);
; F3 d$ b2 A Q( B1 q0 Y _ @.HasOrder := true;2 C6 I8 y' t3 L" n9 x% C; s6 A9 K2 t
end;
% J7 s+ e- D8 z) |$ W9 c end;/ `4 U! ?' c+ I+ n' |) n% `! O
end; -- of the method
9 T6 t& `) N7 _7 W; u |