/* called by: entrance ctrl of the object 'track' q1 V6 t; v1 g: d+ }7 a/ h- d
*/) \. a. B2 g: L, g- W3 N+ E
is
0 Z* H! m' e, D( o0 @: X& ?0 C part, GlobalDistObj, assignLObj:object;row,Lan:integer;# O' e: ~/ a! l
do
" @- n- b! ?8 t7 K9 N0 }- Z/ S! S Lan := rootfolder.Internal.Tools.AOLlanguage;
8 @* J1 g/ z( @( B* T! b, I if current = @.Destination -- else return: }- H B) H- y
then: {2 y z* a. y! i) g* E
@.Destination := void;( o) M2 U# n j0 Y% W, o
if @.occupied then
* g/ u$ | T K2 I9 M: J part := @.cont;% c% B! _; `& U5 J* v" ^0 d% Y
@.transpOrder := void;
) R+ Y8 N' Z2 \3 W' P( h part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 G9 T+ U3 v0 X6 T
@,root.eventcontroller.simTime);
3 |) i3 C* [% f @.HasOrder := false;
! D; @+ z7 b: A6 U @.DrivingHome := true;+ B2 A4 `8 j8 m
rgManager.tryToStartTransOrder;
3 R( `* u2 S( j) E% ~4 c: [5 [ if @.Destination = void
& ?" g* [' c: Y& O) \ then -- no transport order for vehicle @
3 B6 }* \' t+ u9 I T @.Destination :=- m* s! G3 d' F9 ^' c
rgManager.nearestFreeStation(@,track.~);" R9 h3 b, f, r4 {5 }$ Z" z
newDirection(@);
2 u' i# F \+ \ if @.Destination /= void then
9 p! I5 r) e$ U' W1 P/ [ @.Destination.NumReservation :=: x( A# e; _. v0 H* |6 n! M
@.Destination.NumReservation + 1;) f" `; b/ r# z/ A& f/ B0 l
end;
. z$ N% p6 X7 K: r1 K! C @.CurrIcon := "drivingHome";
* \( h% B4 P' \8 w @.DrivingHome := true;
/ E5 Z8 B8 b! { end;1 a% k/ E0 Z' H- x( D/ T! n
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. g$ c. H' M- \' Y: j: H part := @.transpOrder;
" N+ d9 P' g$ {2 [5 b part.move(@);-- load part
) t. b2 d) V/ c) B# @ @.CurrIcon := "load";( h8 ?* a7 W4 L, O0 F$ \' k
GlobalDistObj := part.globDestination;
' o5 O8 v- F5 F, Z4 [# ? assignLObj := rgmanager.rgAssignL;. \+ ?+ V) N }+ o6 l
row := assignLObj.getRowNo(GlobalDistObj);
$ |; l, y. z& }% C; k1 c if Row = -1 then -- since 70: n. O& W% l& `( b; s
if lan=1 then1 R7 `1 Y6 J- k6 h( o2 i3 R
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 e, P9 c6 }6 v& E1 Q5 U0 A
to_str("in der Andockstation: \"",?.~.name,"\""));
/ j% s9 B" M+ O else2 O( h d( o7 Z. @2 D& D
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- K$ Q+ v9 M" _' S to_str("in docking station: \"",?.~.name,"\""));
2 K$ _" Q1 v' @/ I% r. o end;
8 K. G/ [# `$ a0 n* n# X0 w else
# l, M3 O" D8 T( E4 l8 E" [ @.Destination := assignLObj[1,row];5 B3 {* @; Y8 O* f+ G; E* M5 Q8 a' h
end;
/ z( ]4 s% _ b newDirection(@);5 S% o# ?, N1 R
@.HasOrder := true;
! b; ?0 r& e. q+ K, B0 P. W5 L) F4 w end;
* V4 D/ e- \. F7 E end;
( K5 z( w2 I' Q; s7 rend; -- of the method
5 e j7 w, [: A' W |