/* called by: entrance ctrl of the object 'track'
/ b0 F. c" b( p! \ R N*/
/ X0 j2 r( {! `' z) f% ^5 bis
, }; m% S5 ~' k( X; o( h part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 q+ e$ G+ t2 V6 j9 J7 Mdo
% {! w" j, [! t Lan := rootfolder.Internal.Tools.AOLlanguage;
+ o1 v% D- b, f% t" P* X if current = @.Destination -- else return
4 M# Z% W; c/ H then- I( \; S4 L, w/ x' J( G
@.Destination := void;% h1 \2 a# N4 E3 v0 y' N' A
if @.occupied then
N0 Z4 W6 K" C6 C part := @.cont;
" n" u' b* w" Z" k7 T y3 v! I @.transpOrder := void;
+ v9 K6 E5 J2 w3 B part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! k, J1 W5 q& A$ P% O
@,root.eventcontroller.simTime);
% u m2 i* _0 h7 [9 [ @.HasOrder := false;
1 ?! u5 \% h! q( O @.DrivingHome := true;. R/ C @; l0 S9 V# G; Q) _ V
rgManager.tryToStartTransOrder;
' J: f U: I& e! }& f/ T+ h5 C if @.Destination = void
% J6 t1 Z1 t! S# B5 t then -- no transport order for vehicle @
3 Z7 V6 m% o4 C- d8 a4 C @.Destination :=/ S% V7 h9 e, ]7 O" f6 I& |
rgManager.nearestFreeStation(@,track.~);
$ S) t" d6 |8 `. k' C) o' N newDirection(@);
' }- u. n' x4 R# Y% e- a if @.Destination /= void then
$ Z, d$ R, f+ y7 R1 _3 v @.Destination.NumReservation :=9 v- U% p$ S/ s0 X, e
@.Destination.NumReservation + 1;
' c( m% p; D! M4 w* g+ f# g end;
j7 u: I( g0 |5 q @.CurrIcon := "drivingHome";1 V0 [6 F5 |- U& Q) E
@.DrivingHome := true;
5 R) `* e/ o/ I/ R' u end;) j9 |$ w1 s( F0 x# v' d
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; U) m! x9 _0 x part := @.transpOrder;1 T- u7 d. |& I! J
part.move(@);-- load part/ ^6 n% q; J8 m2 g/ {; R
@.CurrIcon := "load";- [5 ^* I, Z* @# h4 s4 C4 t
GlobalDistObj := part.globDestination;
( {! |9 o f8 m+ b) K( q4 d assignLObj := rgmanager.rgAssignL;
8 E/ I# {8 {% s# W& {5 W) i row := assignLObj.getRowNo(GlobalDistObj);
8 o+ [1 D0 k4 i8 i5 l if Row = -1 then -- since 70
1 x" p, D: ~4 h8 ^; k if lan=1 then
( D, h# E" C3 Z. }# U promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 i7 [5 ^. N6 U
to_str("in der Andockstation: \"",?.~.name,"\""));0 R7 I/ X; @: ^2 \
else4 }+ h$ M9 D" W- W* n
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% `1 l) ]4 ~; X1 l# U. `' C, J to_str("in docking station: \"",?.~.name,"\"")); + M& M& r- r7 B& L9 A
end;
2 o0 L x- \5 j: }# F else. H" {" {" k2 ?, k& D" P) u1 y4 P
@.Destination := assignLObj[1,row];, L+ u$ Z |4 D! t+ J) C3 @
end;
" R. e6 c5 h6 ]6 V0 e9 c newDirection(@);
! o" C( @) u7 h' W6 [$ ]. B# Z @.HasOrder := true;
1 M, L" c( n, Z3 ]6 D i3 u end;) D: ~: h" m i' s( s
end;
, }; f1 J! V' w; m p4 fend; -- of the method
6 }3 M4 J5 [ q$ }4 { |