/* called by: entrance ctrl of the object 'track'( C4 M c: O0 I' H
*/" K& K L) Y1 w, m0 Q+ I$ @, e
is. ?% b& b7 z5 K. Y& o4 K
part, GlobalDistObj, assignLObj:object;row,Lan:integer;* K# m" F( G8 }# ?3 H3 o
do$ L+ K4 z5 u$ Q t1 j9 e( f
Lan := rootfolder.Internal.Tools.AOLlanguage;7 k9 L" s) e8 D2 b
if current = @.Destination -- else return$ W( R/ }- e! u2 t
then
' {2 O, Y8 A0 ?& G: p# R @.Destination := void;6 _2 Z" W( y4 j1 H+ L5 ~
if @.occupied then) w( W& q" Y: E+ l4 p% o
part := @.cont;4 D9 R" M; L! L0 D, n
@.transpOrder := void;
7 g2 k# q* `3 R/ t3 E! T- y% t part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 t' u5 \9 g+ D' V% y" t4 \ @,root.eventcontroller.simTime);8 g( Y6 K4 P5 G8 m) L
@.HasOrder := false;3 I. b" t \4 P% }3 S& z
@.DrivingHome := true;
! M8 ]! U+ p) }" R% A. j rgManager.tryToStartTransOrder;! S3 a% G' N8 t) n3 }$ U$ _
if @.Destination = void
# b3 F6 N/ y$ f( h2 X8 L* G1 }' e then -- no transport order for vehicle @
8 e' Y4 l" ^9 ?6 Q# w6 y @.Destination :=
& e X5 `$ ? D. B rgManager.nearestFreeStation(@,track.~);
1 f( k: t' [; E/ U newDirection(@);
1 e' m* k2 ~/ |8 k9 R, l if @.Destination /= void then
5 e3 s/ X' V2 F3 a @.Destination.NumReservation :=3 L" t0 ?$ F8 B' |
@.Destination.NumReservation + 1;* a; u% Q8 s- y; d3 `9 |! e
end;
" v( g# W+ k' B+ e% o @.CurrIcon := "drivingHome";1 {$ K3 q2 v" P+ q4 u9 R; e% ^/ ]
@.DrivingHome := true;, B* \! D/ ^9 a- X2 q- A% S6 y
end;* y; G5 g! ^* {# J" d( C" y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station" k( _8 c$ g. ]( j; Z, z
part := @.transpOrder;
j: b+ [* ^9 J" L# G part.move(@);-- load part" p J7 [# Z+ l& `) c2 w5 x# t1 E
@.CurrIcon := "load";7 e: ?+ B- R8 a
GlobalDistObj := part.globDestination;
$ b. \4 A' A9 k assignLObj := rgmanager.rgAssignL;' D& B, G5 O T$ ]
row := assignLObj.getRowNo(GlobalDistObj);
+ M# z( S1 B. j( \3 o" {0 _& `! A$ C if Row = -1 then -- since 70# o5 o/ k {8 e, o
if lan=1 then
3 [, ]9 t! Z) A2 z2 f4 K N promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( \# r& O8 A @4 V/ j- b
to_str("in der Andockstation: \"",?.~.name,"\""));. x8 T9 ?, B8 e( ?1 G
else
4 c4 K- ~+ X& Z8 C" k; T3 Y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; f: p' {- q- b
to_str("in docking station: \"",?.~.name,"\""));
& j: u L- | P end;% C7 _9 N) ]2 e j
else5 S- @+ X- X$ q1 w. q
@.Destination := assignLObj[1,row];
6 |4 T4 f. b' i6 p/ d end;
9 {+ L5 G3 O0 I+ u+ _$ N# x7 a. g0 u newDirection(@);7 g& j/ H% _7 ]0 Q. B
@.HasOrder := true;
$ a2 g3 F* }# k) k6 g" b+ I9 @ end;
" ~4 u0 i M+ s! A2 p% g' ? end;
1 X e& C, t! oend; -- of the method
# W2 E5 \2 j5 c8 d, ^ |