/* called by: entrance ctrl of the object 'track'
* h, R+ F5 A2 q6 z: `*/. t8 {5 ~% v n1 ~3 W
is: O) e; n: C5 e
part, GlobalDistObj, assignLObj:object;row,Lan:integer;( J) r' H5 I! R, Z7 H
do
: ^# ^3 W ~; O8 ` Lan := rootfolder.Internal.Tools.AOLlanguage;
& B( q2 r: f. k: p/ W) c# o if current = @.Destination -- else return, _) E7 p* l8 ^& R# A
then
1 Q. g: Y2 Y, K, b6 O \ @.Destination := void;6 Q$ ~- i$ m' n8 W1 q/ w
if @.occupied then: O) V/ H, H& N2 U. S0 l
part := @.cont;, |3 A2 U) S& a1 y) j
@.transpOrder := void;# ]7 s. k1 r# ]3 f, i
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 g1 ^' T$ Z) v4 ^2 P @,root.eventcontroller.simTime);
' n$ s( r7 y7 q f @.HasOrder := false;
: I6 W3 j! P2 z& f4 ?% ?7 Y @.DrivingHome := true;
, y2 A# e& ?' `3 u# c rgManager.tryToStartTransOrder;5 D+ B' \9 v1 N% l
if @.Destination = void
1 c; G" @6 W# S" A then -- no transport order for vehicle @
% |0 J, ^; [. F4 N0 c @.Destination :=
4 G0 J1 B* O; F% ~4 ^ rgManager.nearestFreeStation(@,track.~);
( E2 r9 |* F$ T8 r$ A( U newDirection(@);
! I% f+ m3 z, d$ { if @.Destination /= void then
t; y' z, T x& V8 ~+ f; a: q; | @.Destination.NumReservation :=
0 c3 W5 }- p$ T1 D! B2 Q ~ @.Destination.NumReservation + 1;
* @ |; L- N( H3 ~. r3 H end;
+ `0 S% u0 c' w. [ @.CurrIcon := "drivingHome";
1 [4 g3 n9 E4 L+ a8 m& v' t" H, L @.DrivingHome := true;- m# m5 n C3 ~% f, o4 e* S# F, u: n
end;
9 ~% t U4 Z$ B: R" i3 P else -- the vehicle @ is empty, both vehicle and part are in the same dock station) e6 l: u Q' K* c' C/ ?2 d1 k3 `0 g: k
part := @.transpOrder;. l' }# q! D9 i$ T9 M: o
part.move(@);-- load part j Q. @. |7 d
@.CurrIcon := "load";
& o7 s6 g9 J _2 a& B; Q3 v- ~0 N0 v GlobalDistObj := part.globDestination;/ z$ b& U+ X2 z* E" x
assignLObj := rgmanager.rgAssignL;
, Z( j3 @4 Y$ G- l7 S8 s7 R B1 L7 ] row := assignLObj.getRowNo(GlobalDistObj);
$ e! m; B5 Q7 t* V if Row = -1 then -- since 70) m! U# M3 R0 x' _3 {# T7 W) K
if lan=1 then
- R% G2 J# c& u0 C! u promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 S3 u Q' U% h
to_str("in der Andockstation: \"",?.~.name,"\""));/ M& D1 h u K8 H
else
% u* n" K1 L: @. x2 f* v promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 a1 a; {% r+ K1 Z to_str("in docking station: \"",?.~.name,"\"")); ' {7 `! ?3 k- f/ ?
end;
8 G& z; i$ c- r3 }; B else
5 _" x1 J1 j3 {" b" ? @.Destination := assignLObj[1,row];
! g& f y4 d* g K1 b end; / I0 I; A! o2 j
newDirection(@);
* d" V6 E) r7 Z- _4 `+ y @.HasOrder := true;
# W. V+ E* S1 Y9 p$ f end;( Y* R% `, `* k4 l
end;
; V. ~* l% N' P$ A( P! x% i) F3 c3 Pend; -- of the method# d2 J6 m% ]$ y4 j: g
|