/* called by: entrance ctrl of the object 'track'
) E4 e. @" c* G- q*/) w9 p2 S7 f' @( ^4 [5 d
is+ i$ {3 O, V) H& }8 e2 v
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* |/ p* i- t* R. o+ O" Jdo
; j- A) B- G. ^( y7 e Lan := rootfolder.Internal.Tools.AOLlanguage;
" v# }# j' m2 V5 Q( V* R/ z if current = @.Destination -- else return2 |* M% R4 p+ U
then
; Q, M! z: A9 L% ^' U @.Destination := void;# F9 ^5 ]7 r: @- E' T) o, H; L
if @.occupied then
$ u% H# n" W& i% x1 k& w' R part := @.cont;
5 V) m. x; A8 I# W5 J" n" e7 e @.transpOrder := void;+ f+ B( y* a2 D. B1 ~9 W x) _
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 z2 T6 K$ W: ^% | n) y% O8 X' C
@,root.eventcontroller.simTime);
: a& o. Q# `% ^" X. N, c7 A @.HasOrder := false;9 r- {, O: K: u# }
@.DrivingHome := true;1 Y1 s, {7 `9 H+ a) J
rgManager.tryToStartTransOrder;
* q U2 `' C7 B1 j1 L if @.Destination = void' f1 [! n/ F" W7 i
then -- no transport order for vehicle @
/ V0 b! h, ]+ V- n2 q @.Destination :=
; t0 H1 N- B) A- \3 u# v rgManager.nearestFreeStation(@,track.~);9 T8 [7 N" v1 I3 n
newDirection(@); 8 N' D% v4 ?1 z; Q- ?, ^) z
if @.Destination /= void then
2 \3 p) P. a) F; \ @.Destination.NumReservation :=
6 W8 G* r r* F, m @.Destination.NumReservation + 1;
2 d: A3 U4 V( V$ M% b7 w end;
9 q% g5 o7 m: p* n$ D @.CurrIcon := "drivingHome";
) b2 M3 e5 k9 R- D# t* b; c @.DrivingHome := true;
4 a9 X1 L* L3 [7 |& Z end;
; w4 l) P0 W8 \+ e: J$ x else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) U L5 l* v @ y- y; z$ m" f part := @.transpOrder;) {! N6 Y* M/ r2 Q1 |
part.move(@);-- load part2 G+ R' x6 _. s) @
@.CurrIcon := "load";1 |; A. k% Y% w; y/ h
GlobalDistObj := part.globDestination;
* q# y7 w% l5 [# p- A5 D assignLObj := rgmanager.rgAssignL;# d- \# r7 O' E0 |3 S
row := assignLObj.getRowNo(GlobalDistObj);
0 d t$ H, F1 n% c9 Z! k if Row = -1 then -- since 707 I# v/ B2 I& M7 g+ Y# m: @# ^* m( ]
if lan=1 then
' v. m6 M" b: u. z, _. c* A promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" N) M+ Y1 c) M% q, d# i to_str("in der Andockstation: \"",?.~.name,"\""));
6 p L/ I4 J+ i7 }7 ~$ k else
7 ?( |4 U) h5 i& e promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 V' M( f- ~% w5 p1 z
to_str("in docking station: \"",?.~.name,"\"")); ) ^8 P0 Q: C; w* v
end;
/ h8 Z+ C+ J+ S8 B else5 ~ k8 `5 |; `8 U" F! n
@.Destination := assignLObj[1,row];
' B, }1 \/ r6 O+ d& @ end;
& G: v5 z% b0 o) C+ N newDirection(@);
: y6 ~5 N2 e, l% M @.HasOrder := true;
R. M" X, b7 h2 b* d+ O, a m end;* A/ i6 ]1 i/ P) @
end;; Q* @( Q& }1 z: }( H& w- G
end; -- of the method, v8 x8 i8 J2 Q0 @! x) k7 q
|