/* called by: entrance ctrl of the object 'track'
& ]9 B. E% C1 K, _, j*/% M: w8 ^- O+ @! k
is( P6 O; A' b+ I
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) o" X' Y! l( [! N6 J) r6 Odo# I; I( `+ L3 J9 ~4 ~
Lan := rootfolder.Internal.Tools.AOLlanguage;
+ Y$ D5 z8 |$ T3 I7 I8 z if current = @.Destination -- else return
: ?' B z& I9 Z5 j) q then8 o$ p$ @5 }6 b& F# N/ o
@.Destination := void;5 ]7 y2 A$ ~$ j4 C+ a
if @.occupied then
" C% ~9 j, e3 J" }3 i, A2 m1 d `- N6 O part := @.cont;
" _1 l6 |7 H% i& e' a& x @.transpOrder := void;
: G9 B, |% V+ @6 w part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," k- @( U+ Q3 R% \( W' S1 z
@,root.eventcontroller.simTime);
& ? b3 e7 h$ R \7 _8 P! R @.HasOrder := false;
$ U5 d% \% \% | @.DrivingHome := true;' L& l( I7 s5 e! N
rgManager.tryToStartTransOrder;
9 b& g' [9 l: {/ F if @.Destination = void! z! J) p1 x5 L. ?* Y
then -- no transport order for vehicle @: T4 u/ P. g- e
@.Destination :=
; l/ y ?/ t/ m. ~1 ^* O rgManager.nearestFreeStation(@,track.~);
6 I- P( r6 z- r% ]5 V newDirection(@); 6 J7 |3 J- o) a( t8 u
if @.Destination /= void then2 s6 _) t8 H1 F+ r* I
@.Destination.NumReservation :=
9 g. N* s+ i( t @.Destination.NumReservation + 1;
0 v5 Q# P/ i' K2 R5 e' K( H* s7 p0 ? end;
5 ~6 y: n' w5 Q( x @.CurrIcon := "drivingHome"; e' R9 ? X9 Z1 M6 }
@.DrivingHome := true;) d. M2 D B0 f, h( E! V% _) \1 o
end;
0 f% H4 d' ~( n: ~5 a; J* n else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 {! @$ X! _9 }! x: s
part := @.transpOrder;" V$ a; N# x$ G% D% P
part.move(@);-- load part
: @2 v2 r: V1 }( d* \/ J( m @.CurrIcon := "load";& ?+ d2 S$ ?% w) M5 W. v
GlobalDistObj := part.globDestination;
0 t, G* D4 m. {3 b) [* @. H assignLObj := rgmanager.rgAssignL;
6 K. x W0 n7 _+ U* Z9 t row := assignLObj.getRowNo(GlobalDistObj);
, I8 G' e8 }3 o, \ if Row = -1 then -- since 70
- |) X. y6 Z) s if lan=1 then2 I8 Z7 ^% [5 I# h
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 J1 m# \4 T( V% Q Z to_str("in der Andockstation: \"",?.~.name,"\""));6 ^6 d2 n6 V! o" f& q" M
else
3 r% w" L( V) J" Z& K promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( R' }* ]- O2 r: U2 O" l to_str("in docking station: \"",?.~.name,"\"")); " [9 a2 I+ o @2 i: p# {- H0 B, j
end;
; `0 J a8 M, z5 n4 U else
& e- T3 `# l; J1 b z( d* z! w( q @.Destination := assignLObj[1,row];. M8 I) q; v7 _+ m
end; {3 ~* i, o2 K/ ~6 l# C9 J
newDirection(@);+ F/ Y2 d1 G3 R) n, h& X' Z$ X
@.HasOrder := true;
9 C: q& o$ L6 F7 M5 u end;
: [; G9 H3 A7 G5 V8 h9 H' I# ] end;
" ]. n. @( U5 n0 d: R$ w' nend; -- of the method
+ z# [' m5 v+ J# c& _) W$ n4 w) J |