예제 #1
0
 def ObstacleDistanceBecomesVeryClose(self):
     if ((BBoolean(
             self.ObstacleDistance.equal(ODset.ODclose).booleanValue()
             and self.ObstacleRelativeSpeed.equal(
                 RSset.RSneg).booleanValue())).booleanValue()):
         self.ObstacleDistance = ODset.ODveryclose
         self.ObstacleStatusJustChanged = BBoolean(True)
예제 #2
0
 def ObstacleDistanceBecomesBig(self):
     if ((BBoolean(
             self.ObstacleDistance.equal(ODset.ODclose).booleanValue()
             and self.ObstacleRelativeSpeed.equal(
                 RSset.RSpos).booleanValue())).booleanValue()):
         self.ObstacleStatusJustChanged = BBoolean(True)
         self.ObstacleDistance = ODset.ODnone
         self.VehicleTryKeepTimeGap = BBoolean(False)
예제 #3
0
 def ObstacleAppearsWhenCruiseInactive(self, ors):
     if ((BBoolean(
             self.ObstaclePresent.equal(BBoolean(False)).booleanValue()
             and self.CruiseActive.equal(
                 BBoolean(False)).booleanValue())).booleanValue()):
         self.ObstaclePresent = BBoolean(True)
         self.ObstacleRelativeSpeed = ors
         self.ObstacleDistance = ODset.ODnone
예제 #4
0
 def new(self, pp):
     if ((BBoolean(
             BBoolean(
                 self._PID.elementOf(pp).booleanValue() and self.active.
                 notElementOf(pp).booleanValue()).booleanValue()
             and self._ready.union(
                 self.waiting).notElementOf(pp).booleanValue())
          ).booleanValue()):
         self.waiting = self.waiting.union(BSet(pp))
예제 #5
0
 def VehicleFallsBelowMaxCruiseSpeed(self):
     if ((self.SpeedAboveMax.equal(BBoolean(True))).booleanValue()):
         self.SpeedAboveMax = BBoolean(False)
         if ((BBoolean(
                 self.CruiseActive.equal(BBoolean(True)).booleanValue()
                 and self.CruiseSpeedAtMax.equal(
                     BBoolean(True)).booleanValue())).booleanValue()):
             self.VehicleAtCruiseSpeed = BBoolean(True)
예제 #6
0
 def VehicleLeavesCruiseSpeed(self):
     if ((BBoolean(
             BBoolean(
                 self.VehicleAtCruiseSpeed.equal(
                     BBoolean(True)).booleanValue() and BBoolean(
                         self.VehicleCanKeepSpeed.equal(
                             BBoolean(False)).booleanValue()
                         and self.VehicleTryKeepSpeed.equal(BBoolean(True)).
                         booleanValue()).booleanValue()).booleanValue()
             or self.VehicleTryKeepSpeed.equal(
                 BBoolean(False)).booleanValue())).booleanValue()):
         self.VehicleAtCruiseSpeed = BBoolean(False)
예제 #7
0
    def ObstacleDisappears(self):
        if ((self.ObstaclePresent.equal(BBoolean(True))).booleanValue()):
            self.ObstaclePresent = BBoolean(False)
            self.ObstacleRelativeSpeed = RSset.RSnone
            if ((self.CruiseActive.equal(BBoolean(True))).booleanValue()):
                self.ObstacleStatusJustChanged = BBoolean(True)

            self.ObstacleDistance = ODset.ODnone
            self.VehicleTryKeepTimeGap = BBoolean(False)
예제 #8
0
 def Update(self, pmax):
     _ld_T2_timer = self.T2_timer
     _ld_T1_timer = self.T1_timer
     self.BUSvalue = self.BUSwrite.functionCall(pmax)
     self.BUSpriority = pmax
     self.T1_timer = _ld_T1_timer.minus(BInteger(1))
     self.T2_timer = _ld_T2_timer.minus(BInteger(1))
     self.T3_evaluated = BBoolean(False)
예제 #9
0
    def __init__(self):
        self.fst = BRelation(BTuple(ROUTES.R1, BLOCKS.L), BTuple(ROUTES.R2, BLOCKS.L), BTuple(ROUTES.R3, BLOCKS.L), BTuple(ROUTES.R4, BLOCKS.M), BTuple(ROUTES.R5, BLOCKS.M), BTuple(ROUTES.R6, BLOCKS.C), BTuple(ROUTES.R7, BLOCKS.G), BTuple(ROUTES.R8, BLOCKS.N), BTuple(ROUTES.R9, BLOCKS.G), BTuple(ROUTES.R10, BLOCKS.N))
        self.lst = BRelation(BTuple(ROUTES.R1, BLOCKS.C), BTuple(ROUTES.R2, BLOCKS.G), BTuple(ROUTES.R3, BLOCKS.N), BTuple(ROUTES.R4, BLOCKS.G), BTuple(ROUTES.R5, BLOCKS.N), BTuple(ROUTES.R6, BLOCKS.L), BTuple(ROUTES.R7, BLOCKS.L), BTuple(ROUTES.R8, BLOCKS.L), BTuple(ROUTES.R9, BLOCKS.M), BTuple(ROUTES.R10, BLOCKS.M))
        self.nxt = BRelation(BTuple(ROUTES.R1, BRelation(BTuple(BLOCKS.L, BLOCKS.A), BTuple(BLOCKS.A, BLOCKS.B), BTuple(BLOCKS.B, BLOCKS.C))), BTuple(ROUTES.R2, BRelation(BTuple(BLOCKS.L, BLOCKS.A), BTuple(BLOCKS.A, BLOCKS.B), BTuple(BLOCKS.B, BLOCKS.D), BTuple(BLOCKS.D, BLOCKS.E), BTuple(BLOCKS.E, BLOCKS.F), BTuple(BLOCKS.F, BLOCKS.G))), BTuple(ROUTES.R3, BRelation(BTuple(BLOCKS.L, BLOCKS.A), BTuple(BLOCKS.A, BLOCKS.B), BTuple(BLOCKS.B, BLOCKS.D), BTuple(BLOCKS.D, BLOCKS.K), BTuple(BLOCKS.K, BLOCKS.J), BTuple(BLOCKS.J, BLOCKS.N))), BTuple(ROUTES.R4, BRelation(BTuple(BLOCKS.M, BLOCKS.H), BTuple(BLOCKS.H, BLOCKS.I), BTuple(BLOCKS.I, BLOCKS.K), BTuple(BLOCKS.K, BLOCKS.F), BTuple(BLOCKS.F, BLOCKS.G))), BTuple(ROUTES.R5, BRelation(BTuple(BLOCKS.M, BLOCKS.H), BTuple(BLOCKS.H, BLOCKS.I), BTuple(BLOCKS.I, BLOCKS.J), BTuple(BLOCKS.J, BLOCKS.N))), BTuple(ROUTES.R6, BRelation(BTuple(BLOCKS.C, BLOCKS.B), BTuple(BLOCKS.B, BLOCKS.A), BTuple(BLOCKS.A, BLOCKS.L))), BTuple(ROUTES.R7, BRelation(BTuple(BLOCKS.G, BLOCKS.F), BTuple(BLOCKS.F, BLOCKS.E), BTuple(BLOCKS.E, BLOCKS.D), BTuple(BLOCKS.D, BLOCKS.B), BTuple(BLOCKS.B, BLOCKS.A), BTuple(BLOCKS.A, BLOCKS.L))), BTuple(ROUTES.R8, BRelation(BTuple(BLOCKS.N, BLOCKS.J), BTuple(BLOCKS.J, BLOCKS.K), BTuple(BLOCKS.K, BLOCKS.D), BTuple(BLOCKS.D, BLOCKS.B), BTuple(BLOCKS.B, BLOCKS.A), BTuple(BLOCKS.A, BLOCKS.L))), BTuple(ROUTES.R9, BRelation(BTuple(BLOCKS.G, BLOCKS.F), BTuple(BLOCKS.F, BLOCKS.K), BTuple(BLOCKS.K, BLOCKS.I), BTuple(BLOCKS.I, BLOCKS.H), BTuple(BLOCKS.H, BLOCKS.M))), BTuple(ROUTES.R10, BRelation(BTuple(BLOCKS.N, BLOCKS.J), BTuple(BLOCKS.J, BLOCKS.I), BTuple(BLOCKS.I, BLOCKS.H), BTuple(BLOCKS.H, BLOCKS.M))))
        self._ic_set_0 = BRelation()
        for _ic_b_1 in self._BLOCKS:
            for _ic_r_1 in Train_1_beebook_deterministic._ROUTES:
                if(BBoolean(self.nxt.domain().elementOf(_ic_r_1).booleanValue() and BBoolean(self.nxt.functionCall(_ic_r_1).domain().elementOf(_ic_b_1).booleanValue() or self.nxt.functionCall(_ic_r_1)._range().elementOf(_ic_b_1).booleanValue()).booleanValue())).booleanValue():
                    _ic_set_0 = self._ic_set_0.union(BRelation(BTuple(_ic_b_1, _ic_r_1)))

        self.rtbl = self._ic_set_0
        self.resrt = BSet()
        self.resbl = BSet()
        self.rsrtbl = BRelation()
        self.OCC = BSet()
        self.TRK = BRelation()
        self.frm = BSet()
        self.LBT = BSet()
예제 #10
0
 def VehicleReachesCruiseSpeed(self):
     if ((BBoolean(
             BBoolean(
                 self.CruiseActive.equal(BBoolean(True)).booleanValue()
                 and self.VehicleAtCruiseSpeed.equal(
                     BBoolean(False)).booleanValue()).booleanValue()
             and self.SpeedAboveMax.equal(
                 BBoolean(False)).booleanValue())).booleanValue()):
         self.VehicleAtCruiseSpeed = BBoolean(True)
예제 #11
0
 def ObstacleAppearsWhenCruiseActive(self, ors, od):
     if ((BBoolean(
             self.ObstaclePresent.equal(BBoolean(False)).booleanValue()
             and self.CruiseActive.equal(
                 BBoolean(True)).booleanValue())).booleanValue()):
         self.ObstaclePresent = BBoolean(True)
         self.ObstacleStatusJustChanged = BBoolean(True)
         self.ObstacleRelativeSpeed = ors
         self.ObstacleDistance = od
예제 #12
0
 def __init__(self):
     NATSET = BSet.interval(BInteger(0), BInteger(5))
     self.T2v = BInteger(0)
     self.T3_evaluated = BBoolean(True)
     self.T3_enabled = BBoolean(True)
     self.T1_state = T1state.T1_EN
     self.T2_state = T2state.T2_EN
     self.T3_state = T3state.T3_READY
     self.T1_writevalue = BInteger(0)
     self.T2_writevalue = BInteger(0)
     self.T2_readvalue = BInteger(0)
     self.T2_readpriority = BInteger(0)
     self.T3_readvalue = BInteger(0)
     self.T3_readpriority = BInteger(0)
     self.T1_timer = BInteger(2)
     self.T2_timer = BInteger(3)
     self.BUSwrite = BRelation(BTuple(BInteger(0), BInteger(0)))
     self.BUSvalue = BInteger(0)
     self.BUSpriority = BInteger(0)
     self.T2_mode = T2mode.T2MODE_SENSE
예제 #13
0
    def ObstacleStartsTravelFaster(self):
        if ((BBoolean(
                self.ObstaclePresent.equal(BBoolean(True)).booleanValue()
                and self.ObstacleRelativeSpeed.equal(
                    RSset.RSequal).booleanValue())).booleanValue()):
            self.ObstacleRelativeSpeed = RSset.RSpos
            if ((self.CruiseActive.equal(BBoolean(True))).booleanValue()):
                self.ObstacleStatusJustChanged = BBoolean(True)

            if ((self.ObstacleDistance.unequal(
                    ODset.ODveryclose)).booleanValue()):
                self.VehicleTryKeepTimeGap = BBoolean(False)
예제 #14
0
파일: Sieve.py 프로젝트: favu100/b2program
    def ComputeNumberOfPrimes(self):
        while (BBoolean(
                self.cur.greater(BInteger(1)).booleanValue()
                and self.cur.multiply(self.cur).lessEqual(
                    self.limit).booleanValue())).booleanValue():
            if (self.numbers.elementOf(self.cur)).booleanValue():
                n = self.cur
                set = BSet()
                while (n.lessEqual(self.limit.divide(
                        self.cur))).booleanValue():
                    set = set.union(BSet(self.cur.multiply(n)))
                    n = n.plus(BInteger(1))

                self.numbers = self.numbers.difference(set)

            self.cur = self.cur.plus(BInteger(1))

        res = self.numbers.card()
        return res
예제 #15
0
 def cars_r(self):
     if ((BBoolean(
             self.tl_cars.equal(colors.yellow).booleanValue()
             and self.tl_peds.equal(
                 colors.red).booleanValue())).booleanValue()):
         self.tl_cars = colors.red
예제 #16
0
 def unequal(o):
     return BBoolean(self != o)
예제 #17
0
 def equal(self, o):
     return BBoolean(self == o)
예제 #18
0
 def ExternalForcesBecomesExtreme(self):
     if ((self.VehicleCanKeepSpeed.equal(BBoolean(True))).booleanValue()):
         self.VehicleCanKeepSpeed = BBoolean(False)
예제 #19
0
 def ExternalForcesBecomesNormal(self):
     if ((BBoolean(
             self.CruiseActive.equal(BBoolean(True)).booleanValue()
             and self.VehicleCanKeepSpeed.equal(
                 BBoolean(False)).booleanValue())).booleanValue()):
         self.VehicleCanKeepSpeed = BBoolean(True)
예제 #20
0
 def SetCruiseSpeed(self, vcks, csam):
     if ((self.CruiseAllowed.equal(BBoolean(True))).booleanValue()):
         _ld_NumberOfSetCruise = self.NumberOfSetCruise
         self.CruiseActive = BBoolean(True)
         self.VehicleCanKeepSpeed = vcks
         if ((self.SpeedAboveMax.equal(BBoolean(False))).booleanValue()):
             self.VehicleAtCruiseSpeed = BBoolean(True)
             self.CruiseSpeedAtMax = csam
         else:
             self.CruiseSpeedAtMax = BBoolean(True)
         self.ObstacleStatusJustChanged = BBoolean(True)
         if ((self.CruiseActive.equal(BBoolean(True))).booleanValue()):
             self.CruiseSpeedChangeInProgress = BBoolean(True)
         else:
             self.CCInitialisationInProgress = BBoolean(True)
         if ((_ld_NumberOfSetCruise.less(BInteger(1))).booleanValue()):
             self.NumberOfSetCruise = _ld_NumberOfSetCruise.plus(
                 BInteger(1))
예제 #21
0
 def CruiseBecomesNotAllowed(self):
     if ((self.CruiseAllowed.equal(BBoolean(True))).booleanValue()):
         self.CruiseAllowed = BBoolean(False)
         self.CruiseActive = BBoolean(False)
         self.VehicleCanKeepSpeed = BBoolean(False)
         self.VehicleTryKeepSpeed = BBoolean(False)
         self.VehicleAtCruiseSpeed = BBoolean(False)
         self.VehicleTryKeepTimeGap = BBoolean(False)
         self.CruiseSpeedAtMax = BBoolean(False)
         self.ObstacleDistance = ODset.ODnone
         self.NumberOfSetCruise = BInteger(0)
         self.ObstacleStatusJustChanged = BBoolean(False)
         self.CCInitialisationInProgress = BBoolean(False)
         self.CruiseSpeedChangeInProgress = BBoolean(False)
예제 #22
0
 def ObstacleBecomesOld(self):
     if ((BBoolean(
             BBoolean(
                 BBoolean(
                     BBoolean(
                         BBoolean(
                             self.ObstacleStatusJustChanged.equal(
                                 BBoolean(True)).booleanValue()
                             and BBoolean(
                                 BBoolean(
                                     BBoolean(
                                         self.VehicleTryKeepSpeed.equal(
                                             BBoolean(True)).booleanValue()
                                         or self.VehicleTryKeepTimeGap.
                                         equal(BBoolean(True)).booleanValue(
                                         )).booleanValue() or
                                     self.CCInitialisationInProgress.equal(
                                         BBoolean(True)).booleanValue()).
                                 booleanValue()
                                 or self.CruiseSpeedChangeInProgress.equal(
                                     BBoolean(True)).booleanValue()).
                             booleanValue()).booleanValue()
                         and BBoolean(not self.ObstacleDistance.equal(
                             ODset.ODnone).booleanValue()
                                      or self.VehicleTryKeepSpeed.equal(
                                          BBoolean(True)).booleanValue()).
                         booleanValue()).booleanValue()
                     and BBoolean(not BBoolean(
                         BBoolean(
                             BBoolean(
                                 self.ObstacleDistance.equal(
                                     ODset.ODclose).booleanValue() and self.
                                 ObstacleRelativeSpeed.unequal(RSset.RSpos).
                                 booleanValue()).booleanValue()
                             and self.CCInitialisationInProgress.equal(
                                 BBoolean(False)).booleanValue()).
                         booleanValue() and self.CruiseSpeedChangeInProgress
                         .equal(BBoolean(False)).booleanValue()
                     ).booleanValue() or self.VehicleTryKeepTimeGap.equal(
                         BBoolean(True)).booleanValue()).booleanValue()).
                 booleanValue() and BBoolean(not BBoolean(
                     BBoolean(
                         self.ObstacleDistance.equal(
                             ODset.ODveryclose).booleanValue()
                         and self.CCInitialisationInProgress.equal(
                             BBoolean(False)).booleanValue()).booleanValue(
                             ) and self.CruiseSpeedChangeInProgress.equal(
                                 BBoolean(False)).booleanValue()
                 ).booleanValue() or self.VehicleTryKeepTimeGap.equal(
                     BBoolean(True)).booleanValue()).booleanValue()).
             booleanValue() and BBoolean(not BBoolean(
                 BBoolean(
                     BBoolean(
                         self.ObstacleRelativeSpeed.equal(
                             RSset.RSpos).booleanValue() and
                         self.ObstacleDistance.unequal(ODset.ODveryclose).
                         booleanValue()).booleanValue()
                     and self.CCInitialisationInProgress.equal(
                         BBoolean(False)).booleanValue()).booleanValue()
                 and self.CruiseSpeedChangeInProgress.equal(
                     BBoolean(False)).booleanValue()).booleanValue()
                                         or self.VehicleTryKeepSpeed.equal(
                                             BBoolean(True)).booleanValue()
                                         ).booleanValue())).booleanValue()):
         self.ObstacleStatusJustChanged = BBoolean(False)
예제 #23
0
 def __init__(self):
     self.CruiseAllowed = BBoolean(False)
     self.CruiseActive = BBoolean(False)
     self.VehicleAtCruiseSpeed = BBoolean(False)
     self.VehicleCanKeepSpeed = BBoolean(False)
     self.VehicleTryKeepSpeed = BBoolean(False)
     self.SpeedAboveMax = BBoolean(False)
     self.VehicleTryKeepTimeGap = BBoolean(False)
     self.NumberOfSetCruise = BInteger(0)
     self.CruiseSpeedAtMax = BBoolean(False)
     self.ObstacleDistance = ODset.ODnone
     self.ObstacleStatusJustChanged = BBoolean(False)
     self.CCInitialisationInProgress = BBoolean(False)
     self.CruiseSpeedChangeInProgress = BBoolean(False)
     self.ObstaclePresent = BBoolean(False)
     self.ObstacleRelativeSpeed = RSset.RSnone
예제 #24
0
class Cruise_finite1_deterministic:

    _RSset = BSet(RSset.RSnone, RSset.RSpos, RSset.RSneg, RSset.RSequal)
    _ODset = BSet(ODset.ODnone, ODset.ODclose, ODset.ODveryclose)

    def __init__(self):
        self.CruiseAllowed = BBoolean(False)
        self.CruiseActive = BBoolean(False)
        self.VehicleAtCruiseSpeed = BBoolean(False)
        self.VehicleCanKeepSpeed = BBoolean(False)
        self.VehicleTryKeepSpeed = BBoolean(False)
        self.SpeedAboveMax = BBoolean(False)
        self.VehicleTryKeepTimeGap = BBoolean(False)
        self.NumberOfSetCruise = BInteger(0)
        self.CruiseSpeedAtMax = BBoolean(False)
        self.ObstacleDistance = ODset.ODnone
        self.ObstacleStatusJustChanged = BBoolean(False)
        self.CCInitialisationInProgress = BBoolean(False)
        self.CruiseSpeedChangeInProgress = BBoolean(False)
        self.ObstaclePresent = BBoolean(False)
        self.ObstacleRelativeSpeed = RSset.RSnone

    def CruiseBecomesNotAllowed(self):
        if ((self.CruiseAllowed.equal(BBoolean(True))).booleanValue()):
            self.CruiseAllowed = BBoolean(False)
            self.CruiseActive = BBoolean(False)
            self.VehicleCanKeepSpeed = BBoolean(False)
            self.VehicleTryKeepSpeed = BBoolean(False)
            self.VehicleAtCruiseSpeed = BBoolean(False)
            self.VehicleTryKeepTimeGap = BBoolean(False)
            self.CruiseSpeedAtMax = BBoolean(False)
            self.ObstacleDistance = ODset.ODnone
            self.NumberOfSetCruise = BInteger(0)
            self.ObstacleStatusJustChanged = BBoolean(False)
            self.CCInitialisationInProgress = BBoolean(False)
            self.CruiseSpeedChangeInProgress = BBoolean(False)

    def CruiseBecomesAllowed(self):
        if ((self.CruiseAllowed.equal(BBoolean(False))).booleanValue()):
            self.CruiseAllowed = BBoolean(True)

    def SetCruiseSpeed(self, vcks, csam):
        if ((self.CruiseAllowed.equal(BBoolean(True))).booleanValue()):
            _ld_NumberOfSetCruise = self.NumberOfSetCruise
            self.CruiseActive = BBoolean(True)
            self.VehicleCanKeepSpeed = vcks
            if ((self.SpeedAboveMax.equal(BBoolean(False))).booleanValue()):
                self.VehicleAtCruiseSpeed = BBoolean(True)
                self.CruiseSpeedAtMax = csam
            else:
                self.CruiseSpeedAtMax = BBoolean(True)
            self.ObstacleStatusJustChanged = BBoolean(True)
            if ((self.CruiseActive.equal(BBoolean(True))).booleanValue()):
                self.CruiseSpeedChangeInProgress = BBoolean(True)
            else:
                self.CCInitialisationInProgress = BBoolean(True)
            if ((_ld_NumberOfSetCruise.less(BInteger(1))).booleanValue()):
                self.NumberOfSetCruise = _ld_NumberOfSetCruise.plus(
                    BInteger(1))

    def CCInitialisationFinished(self, vtks, vtktg):
        if ((self.CCInitialisationInProgress.equal(
                BBoolean(True))).booleanValue()):
            self.VehicleTryKeepTimeGap = vtktg
            self.VehicleTryKeepSpeed = vtks

    def CCInitialisationDelayFinished(self):
        if ((BBoolean(
                BBoolean(
                    BBoolean(
                        BBoolean(
                            BBoolean(
                                self.CCInitialisationInProgress.equal(
                                    BBoolean(True)).booleanValue()
                                and BBoolean(
                                    BBoolean(
                                        BBoolean(
                                            self.VehicleTryKeepSpeed.equal(
                                                BBoolean(True)).booleanValue()
                                            or self.VehicleTryKeepTimeGap.
                                            equal(BBoolean(True)).booleanValue(
                                            )).booleanValue() or
                                        self.ObstacleStatusJustChanged.equal(
                                            BBoolean(True)).booleanValue()).
                                    booleanValue()
                                    or self.CruiseSpeedChangeInProgress.equal(
                                        BBoolean(True)).booleanValue()).
                                booleanValue()).booleanValue()
                            and BBoolean(not self.ObstacleDistance.equal(
                                ODset.ODnone).booleanValue()
                                         or self.VehicleTryKeepSpeed.equal(
                                             BBoolean(True)).booleanValue()).
                            booleanValue()).booleanValue()
                        and BBoolean(not BBoolean(
                            BBoolean(
                                BBoolean(
                                    self.ObstacleDistance.equal(
                                        ODset.ODclose).booleanValue() and self.
                                    ObstacleRelativeSpeed.unequal(RSset.RSpos).
                                    booleanValue()).booleanValue() and self.
                                ObstacleStatusJustChanged.equal(BBoolean(
                                    False)).booleanValue()).booleanValue()
                            and self.CruiseSpeedChangeInProgress.equal(
                                BBoolean(False)).booleanValue()
                        ).booleanValue() or self.VehicleTryKeepTimeGap.equal(
                            BBoolean(True)).booleanValue()).booleanValue()).
                    booleanValue() and BBoolean(not BBoolean(
                        BBoolean(
                            self.ObstacleDistance.equal(
                                ODset.ODveryclose).booleanValue()
                            and self.ObstacleStatusJustChanged.equal(
                                BBoolean(False)).booleanValue()).booleanValue(
                                ) and self.CruiseSpeedChangeInProgress.equal(
                                    BBoolean(False)).booleanValue()
                    ).booleanValue() or self.VehicleTryKeepTimeGap.equal(
                        BBoolean(True)).booleanValue()).booleanValue()).
                booleanValue() and BBoolean(not BBoolean(
                    BBoolean(
                        BBoolean(
                            self.ObstacleRelativeSpeed.equal(
                                RSset.RSpos).booleanValue() and
                            self.ObstacleDistance.unequal(ODset.ODveryclose).
                            booleanValue()).booleanValue()
                        and self.ObstacleStatusJustChanged.equal(
                            BBoolean(False)).booleanValue()).booleanValue()
                    and self.CruiseSpeedChangeInProgress.equal(
                        BBoolean(False)).booleanValue()).booleanValue()
                                            or self.VehicleTryKeepSpeed.equal(
                                                BBoolean(True)).booleanValue()
                                            ).booleanValue())).booleanValue()):
            self.CCInitialisationInProgress = BBoolean(True)

    def CruiseSpeedChangeFinished(self, vtks, vtktg):
        if ((BBoolean(
                BBoolean(
                    BBoolean(
                        BBoolean(
                            BBoolean(
                                BBoolean(
                                    BBoolean(
                                        BBoolean(
                                            BBoolean(
                                                BBoolean(
                                                    BUtils.BOOL.elementOf(
                                                        vtks).booleanValue()
                                                    and BUtils.BOOL.elementOf(
                                                        vtktg).booleanValue()).
                                                booleanValue() and BBoolean(
                                                    BBoolean(
                                                        BBoolean(
                                                            vtks.equal(
                                                                BBoolean(True)
                                                            ).booleanValue()
                                                            or vtktg.equal(
                                                                BBoolean(True)
                                                            ).booleanValue()).
                                                        booleanValue() or self.
                                                        ObstacleStatusJustChanged
                                                        .equal(BBoolean(True)).
                                                        booleanValue()).
                                                    booleanValue() or self.
                                                    CCInitialisationInProgress.
                                                    equal(BBoolean(
                                                        True)).booleanValue()).
                                                booleanValue()).booleanValue()
                                            and BBoolean(
                                                not self.ObstaclePresent.equal(
                                                    BBoolean(False)).
                                                booleanValue() or vtktg.equal(
                                                    BBoolean(False)).
                                                booleanValue()).booleanValue()
                                        ).booleanValue() and BBoolean(
                                            not self.ObstacleDistance.equal(
                                                ODset.ODnone).booleanValue()
                                            or vtks.equal(BBoolean(True)).
                                            booleanValue()).booleanValue()).
                                    booleanValue() and BBoolean(not BBoolean(
                                        BBoolean(
                                            BBoolean(
                                                self.ObstacleDistance.equal(
                                                    ODset.ODclose).
                                                booleanValue()
                                                and self.ObstacleRelativeSpeed.
                                                unequal(RSset.RSpos).
                                                booleanValue()).booleanValue()
                                            and self.ObstacleStatusJustChanged.
                                            equal(BBoolean(False)).
                                            booleanValue()).booleanValue() and
                                        self.CCInitialisationInProgress.equal(
                                            BBoolean(False)).booleanValue()
                                    ).booleanValue() or vtktg.equal(
                                        BBoolean(True)).booleanValue()).
                                    booleanValue()).booleanValue()
                                and BBoolean(not BBoolean(
                                    BBoolean(
                                        self.ObstacleDistance.equal(
                                            ODset.ODveryclose).booleanValue()
                                        and self.ObstacleStatusJustChanged.
                                        equal(BBoolean(False)).booleanValue()).
                                    booleanValue()
                                    and self.CCInitialisationInProgress.equal(
                                        BBoolean(False)).booleanValue()
                                ).booleanValue() or vtktg.equal(BBoolean(
                                    True)).booleanValue()).booleanValue()).
                            booleanValue() and BBoolean(not BBoolean(
                                BBoolean(
                                    BBoolean(
                                        self.ObstacleRelativeSpeed.equal(
                                            RSset.RSpos).booleanValue()
                                        and self.ObstacleDistance.unequal(
                                            ODset.ODveryclose).booleanValue()).
                                    booleanValue()
                                    and self.ObstacleStatusJustChanged.equal(
                                        BBoolean(False)).booleanValue()).
                                booleanValue()
                                and self.CCInitialisationInProgress.equal(
                                    BBoolean(False)).booleanValue()
                            ).booleanValue() or vtks.equal(
                                BBoolean(True)).booleanValue()).booleanValue()
                        ).booleanValue() and BBoolean(not BBoolean(
                            self.ObstacleRelativeSpeed.equal(
                                RSset.RSequal).booleanValue()
                            and self.ObstacleDistance.equal(ODset.ODnone).
                            booleanValue()).booleanValue() or vtktg.equal(
                                BBoolean(False)).booleanValue()).booleanValue(
                                )).booleanValue()
                    and BBoolean(not BBoolean(
                        self.ObstacleRelativeSpeed.equal(RSset.RSneg).
                        booleanValue() and self.ObstacleDistance.equal(
                            ODset.ODnone).booleanValue()).booleanValue()
                                 or vtktg.equal(BBoolean(False)).booleanValue(
                                 )).booleanValue()).booleanValue()
                and BBoolean(not BBoolean(
                    self.ObstacleRelativeSpeed.equal(
                        RSset.RSpos).booleanValue()
                    and self.ObstacleDistance.unequal(
                        ODset.ODveryclose).booleanValue()).booleanValue()
                             or vtktg.equal(BBoolean(False)).booleanValue()).
                booleanValue())).booleanValue()):
            if ((self.CruiseSpeedChangeInProgress.equal(
                    BBoolean(True))).booleanValue()):
                self.VehicleTryKeepTimeGap = vtktg
                self.VehicleTryKeepSpeed = vtks

    def CruiseSpeedChangeDelayFinished(self):
        if ((BBoolean(
                BBoolean(
                    BBoolean(
                        BBoolean(
                            BBoolean(
                                self.CruiseSpeedChangeInProgress.equal(
                                    BBoolean(True)).booleanValue()
                                and BBoolean(
                                    BBoolean(
                                        BBoolean(
                                            self.VehicleTryKeepSpeed.equal(
                                                BBoolean(True)).booleanValue()
                                            or self.VehicleTryKeepTimeGap.
                                            equal(BBoolean(True)).booleanValue(
                                            )).booleanValue() or
                                        self.ObstacleStatusJustChanged.equal(
                                            BBoolean(True)).booleanValue()).
                                    booleanValue()
                                    or self.CCInitialisationInProgress.equal(
                                        BBoolean(True)).booleanValue()).
                                booleanValue()).booleanValue()
                            and BBoolean(not self.ObstacleDistance.equal(
                                ODset.ODnone).booleanValue()
                                         or self.VehicleTryKeepSpeed.equal(
                                             BBoolean(True)).booleanValue()).
                            booleanValue()).booleanValue()
                        and BBoolean(not BBoolean(
                            BBoolean(
                                BBoolean(
                                    self.ObstacleDistance.equal(
                                        ODset.ODclose).booleanValue() and self.
                                    ObstacleRelativeSpeed.unequal(RSset.RSpos).
                                    booleanValue()).booleanValue() and self.
                                ObstacleStatusJustChanged.equal(BBoolean(
                                    False)).booleanValue()).booleanValue()
                            and self.CCInitialisationInProgress.equal(
                                BBoolean(False)).booleanValue()
                        ).booleanValue() or self.VehicleTryKeepTimeGap.equal(
                            BBoolean(True)).booleanValue()).booleanValue()).
                    booleanValue() and BBoolean(not BBoolean(
                        BBoolean(
                            self.ObstacleDistance.equal(
                                ODset.ODveryclose).booleanValue()
                            and self.ObstacleStatusJustChanged.equal(
                                BBoolean(False)).booleanValue()).booleanValue(
                                ) and self.CCInitialisationInProgress.equal(
                                    BBoolean(False)).booleanValue()
                    ).booleanValue() or self.VehicleTryKeepTimeGap.equal(
                        BBoolean(True)).booleanValue()).booleanValue()).
                booleanValue() and BBoolean(not BBoolean(
                    BBoolean(
                        BBoolean(
                            self.ObstacleRelativeSpeed.equal(
                                RSset.RSpos).booleanValue() and
                            self.ObstacleDistance.unequal(ODset.ODveryclose).
                            booleanValue()).booleanValue()
                        and self.ObstacleStatusJustChanged.equal(
                            BBoolean(False)).booleanValue()).booleanValue()
                    and self.CCInitialisationInProgress.equal(
                        BBoolean(False)).booleanValue()).booleanValue()
                                            or self.VehicleTryKeepSpeed.equal(
                                                BBoolean(True)).booleanValue()
                                            ).booleanValue())).booleanValue()):
            self.CruiseSpeedChangeInProgress = BBoolean(True)

    def CruiseOff(self):
        if ((self.CruiseActive.equal(BBoolean(True))).booleanValue()):
            self.CruiseActive = BBoolean(False)
            self.VehicleCanKeepSpeed = BBoolean(False)
            self.VehicleTryKeepSpeed = BBoolean(False)
            self.VehicleAtCruiseSpeed = BBoolean(False)
            self.VehicleTryKeepTimeGap = BBoolean(False)
            self.CruiseSpeedAtMax = BBoolean(False)
            self.ObstacleDistance = ODset.ODnone
            self.NumberOfSetCruise = BInteger(0)
            self.ObstacleStatusJustChanged = BBoolean(False)
            self.CCInitialisationInProgress = BBoolean(False)
            self.CruiseSpeedChangeInProgress = BBoolean(False)

    def ExternalForcesBecomesExtreme(self):
        if ((self.VehicleCanKeepSpeed.equal(BBoolean(True))).booleanValue()):
            self.VehicleCanKeepSpeed = BBoolean(False)

    def ExternalForcesBecomesNormal(self):
        if ((BBoolean(
                self.CruiseActive.equal(BBoolean(True)).booleanValue()
                and self.VehicleCanKeepSpeed.equal(
                    BBoolean(False)).booleanValue())).booleanValue()):
            self.VehicleCanKeepSpeed = BBoolean(True)

    def VehicleLeavesCruiseSpeed(self):
        if ((BBoolean(
                BBoolean(
                    self.VehicleAtCruiseSpeed.equal(
                        BBoolean(True)).booleanValue() and BBoolean(
                            self.VehicleCanKeepSpeed.equal(
                                BBoolean(False)).booleanValue()
                            and self.VehicleTryKeepSpeed.equal(BBoolean(True)).
                            booleanValue()).booleanValue()).booleanValue()
                or self.VehicleTryKeepSpeed.equal(
                    BBoolean(False)).booleanValue())).booleanValue()):
            self.VehicleAtCruiseSpeed = BBoolean(False)

    def VehicleReachesCruiseSpeed(self):
        if ((BBoolean(
                BBoolean(
                    self.CruiseActive.equal(BBoolean(True)).booleanValue()
                    and self.VehicleAtCruiseSpeed.equal(
                        BBoolean(False)).booleanValue()).booleanValue()
                and self.SpeedAboveMax.equal(
                    BBoolean(False)).booleanValue())).booleanValue()):
            self.VehicleAtCruiseSpeed = BBoolean(True)

    def VehicleExceedsMaxCruiseSpeed(self):
        if ((BBoolean(
                self.SpeedAboveMax.equal(BBoolean(False)).booleanValue()
                and BBoolean(
                    BBoolean(
                        self.CruiseActive.equal(
                            BBoolean(False)).booleanValue()
                        or self.VehicleCanKeepSpeed.equal(
                            BBoolean(False)).booleanValue()).booleanValue()
                    or BBoolean(
                        BBoolean(
                            self.ObstacleStatusJustChanged.equal(
                                BBoolean(False)).booleanValue()
                            and self.CCInitialisationInProgress.equal(
                                BBoolean(False)).booleanValue()).booleanValue(
                                ) and self.CruiseSpeedChangeInProgress.equal(
                                    BBoolean(False)).booleanValue()
                    )._not().booleanValue()).booleanValue())).booleanValue()):
            self.SpeedAboveMax = BBoolean(True)
            self.VehicleAtCruiseSpeed = BBoolean(False)

    def VehicleFallsBelowMaxCruiseSpeed(self):
        if ((self.SpeedAboveMax.equal(BBoolean(True))).booleanValue()):
            self.SpeedAboveMax = BBoolean(False)
            if ((BBoolean(
                    self.CruiseActive.equal(BBoolean(True)).booleanValue()
                    and self.CruiseSpeedAtMax.equal(
                        BBoolean(True)).booleanValue())).booleanValue()):
                self.VehicleAtCruiseSpeed = BBoolean(True)

    def ObstacleDistanceBecomesVeryClose(self):
        if ((BBoolean(
                self.ObstacleDistance.equal(ODset.ODclose).booleanValue()
                and self.ObstacleRelativeSpeed.equal(
                    RSset.RSneg).booleanValue())).booleanValue()):
            self.ObstacleDistance = ODset.ODveryclose
            self.ObstacleStatusJustChanged = BBoolean(True)

    def ObstacleDistanceBecomesClose(self):
        if ((BBoolean(
                BBoolean(
                    self.ObstaclePresent.equal(BBoolean(True)).booleanValue()
                    and self.CruiseActive.equal(
                        BBoolean(True)).booleanValue()).booleanValue()
                and BBoolean(
                    BBoolean(
                        self.ObstacleDistance.equal(
                            ODset.ODveryclose).booleanValue()
                        and self.ObstacleRelativeSpeed.equal(
                            RSset.RSpos).booleanValue()).booleanValue()
                    or BBoolean(
                        self.ObstacleDistance.equal(
                            ODset.ODnone).booleanValue()
                        and self.ObstacleRelativeSpeed.equal(
                            RSset.RSneg).booleanValue()).booleanValue()).
                booleanValue())).booleanValue()):
            self.ObstacleDistance = ODset.ODclose
            self.ObstacleStatusJustChanged = BBoolean(True)
            if ((self.ObstacleRelativeSpeed.equal(
                    RSset.RSpos)).booleanValue()):
                self.VehicleTryKeepTimeGap = BBoolean(False)

    def ObstacleDistanceBecomesBig(self):
        if ((BBoolean(
                self.ObstacleDistance.equal(ODset.ODclose).booleanValue()
                and self.ObstacleRelativeSpeed.equal(
                    RSset.RSpos).booleanValue())).booleanValue()):
            self.ObstacleStatusJustChanged = BBoolean(True)
            self.ObstacleDistance = ODset.ODnone
            self.VehicleTryKeepTimeGap = BBoolean(False)

    def ObstacleStartsTravelFaster(self):
        if ((BBoolean(
                self.ObstaclePresent.equal(BBoolean(True)).booleanValue()
                and self.ObstacleRelativeSpeed.equal(
                    RSset.RSequal).booleanValue())).booleanValue()):
            self.ObstacleRelativeSpeed = RSset.RSpos
            if ((self.CruiseActive.equal(BBoolean(True))).booleanValue()):
                self.ObstacleStatusJustChanged = BBoolean(True)

            if ((self.ObstacleDistance.unequal(
                    ODset.ODveryclose)).booleanValue()):
                self.VehicleTryKeepTimeGap = BBoolean(False)

    def ObstacleStopsTravelFaster(self):
        if ((self.ObstacleRelativeSpeed.equal(RSset.RSpos)).booleanValue()):
            self.ObstacleRelativeSpeed = RSset.RSequal
            if ((self.CruiseActive.equal(BBoolean(True))).booleanValue()):
                self.ObstacleStatusJustChanged = BBoolean(True)

    def ObstacleStartsTravelSlower(self):
        if ((self.ObstacleRelativeSpeed.equal(RSset.RSequal)).booleanValue()):
            self.ObstacleRelativeSpeed = RSset.RSneg
            if ((self.CruiseActive.equal(BBoolean(True))).booleanValue()):
                self.ObstacleStatusJustChanged = BBoolean(True)

    def ObstacleStopsTravelSlower(self):
        if ((self.ObstacleRelativeSpeed.equal(RSset.RSneg)).booleanValue()):
            self.ObstacleRelativeSpeed = RSset.RSequal
            if ((self.CruiseActive.equal(BBoolean(True))).booleanValue()):
                self.ObstacleStatusJustChanged = BBoolean(True)

    def ObstacleAppearsWhenCruiseActive(self, ors, od):
        if ((BBoolean(
                self.ObstaclePresent.equal(BBoolean(False)).booleanValue()
                and self.CruiseActive.equal(
                    BBoolean(True)).booleanValue())).booleanValue()):
            self.ObstaclePresent = BBoolean(True)
            self.ObstacleStatusJustChanged = BBoolean(True)
            self.ObstacleRelativeSpeed = ors
            self.ObstacleDistance = od

    def ObstacleAppearsWhenCruiseInactive(self, ors):
        if ((BBoolean(
                self.ObstaclePresent.equal(BBoolean(False)).booleanValue()
                and self.CruiseActive.equal(
                    BBoolean(False)).booleanValue())).booleanValue()):
            self.ObstaclePresent = BBoolean(True)
            self.ObstacleRelativeSpeed = ors
            self.ObstacleDistance = ODset.ODnone

    def ObstacleDisappears(self):
        if ((self.ObstaclePresent.equal(BBoolean(True))).booleanValue()):
            self.ObstaclePresent = BBoolean(False)
            self.ObstacleRelativeSpeed = RSset.RSnone
            if ((self.CruiseActive.equal(BBoolean(True))).booleanValue()):
                self.ObstacleStatusJustChanged = BBoolean(True)

            self.ObstacleDistance = ODset.ODnone
            self.VehicleTryKeepTimeGap = BBoolean(False)

    def VehicleManageObstacle(self, vtks, vtktg):
        if ((BBoolean(
                BBoolean(
                    BBoolean(
                        BBoolean(
                            BBoolean(
                                BBoolean(
                                    BBoolean(
                                        BBoolean(
                                            BBoolean(
                                                BBoolean(
                                                    BUtils.BOOL.elementOf(
                                                        vtks).booleanValue()
                                                    and BUtils.BOOL.elementOf(
                                                        vtktg).booleanValue()).
                                                booleanValue() and BBoolean(
                                                    BBoolean(
                                                        BBoolean(
                                                            vtks.equal(
                                                                BBoolean(True)
                                                            ).booleanValue()
                                                            or vtktg.equal(
                                                                BBoolean(True)
                                                            ).booleanValue()).
                                                        booleanValue() or self.
                                                        CCInitialisationInProgress
                                                        .equal(BBoolean(True)).
                                                        booleanValue()).
                                                    booleanValue() or self.
                                                    CruiseSpeedChangeInProgress
                                                    .equal(BBoolean(
                                                        True)).booleanValue()).
                                                booleanValue()).booleanValue()
                                            and BBoolean(
                                                not self.ObstaclePresent.equal(
                                                    BBoolean(False)).
                                                booleanValue() or vtktg.equal(
                                                    BBoolean(False)).
                                                booleanValue()).booleanValue()
                                        ).booleanValue() and BBoolean(
                                            not self.ObstacleDistance.equal(
                                                ODset.ODnone).booleanValue()
                                            or vtks.equal(BBoolean(True)).
                                            booleanValue()).booleanValue()).
                                    booleanValue() and BBoolean(not BBoolean(
                                        BBoolean(
                                            BBoolean(
                                                self.ObstacleDistance.equal(
                                                    ODset.ODclose).
                                                booleanValue()
                                                and self.ObstacleRelativeSpeed.
                                                unequal(RSset.RSpos).
                                                booleanValue()).booleanValue()
                                            and self.CCInitialisationInProgress
                                            .equal(BBoolean(False)).
                                            booleanValue()).booleanValue() and
                                        self.CruiseSpeedChangeInProgress.equal(
                                            BBoolean(False)).booleanValue()
                                    ).booleanValue() or vtktg.equal(
                                        BBoolean(True)).booleanValue()).
                                    booleanValue()).booleanValue()
                                and BBoolean(not BBoolean(
                                    BBoolean(
                                        self.ObstacleDistance.equal(
                                            ODset.ODveryclose).booleanValue()
                                        and self.CCInitialisationInProgress.
                                        equal(BBoolean(False)).booleanValue()).
                                    booleanValue()
                                    and self.CruiseSpeedChangeInProgress.equal(
                                        BBoolean(False)).booleanValue()
                                ).booleanValue() or vtktg.equal(BBoolean(
                                    True)).booleanValue()).booleanValue()).
                            booleanValue() and BBoolean(not BBoolean(
                                BBoolean(
                                    BBoolean(
                                        self.ObstacleRelativeSpeed.equal(
                                            RSset.RSpos).booleanValue()
                                        and self.ObstacleDistance.unequal(
                                            ODset.ODveryclose).booleanValue()).
                                    booleanValue()
                                    and self.CCInitialisationInProgress.equal(
                                        BBoolean(False)).booleanValue()).
                                booleanValue()
                                and self.CruiseSpeedChangeInProgress.equal(
                                    BBoolean(False)).booleanValue()
                            ).booleanValue() or vtks.equal(
                                BBoolean(True)).booleanValue()).booleanValue()
                        ).booleanValue() and BBoolean(not BBoolean(
                            self.ObstacleRelativeSpeed.equal(
                                RSset.RSequal).booleanValue()
                            and self.ObstacleDistance.equal(ODset.ODnone).
                            booleanValue()).booleanValue() or vtktg.equal(
                                BBoolean(False)).booleanValue()).booleanValue(
                                )).booleanValue()
                    and BBoolean(not BBoolean(
                        self.ObstacleRelativeSpeed.equal(RSset.RSneg).
                        booleanValue() and self.ObstacleDistance.equal(
                            ODset.ODnone).booleanValue()).booleanValue()
                                 or vtktg.equal(BBoolean(False)).booleanValue(
                                 )).booleanValue()).booleanValue()
                and BBoolean(not BBoolean(
                    self.ObstacleRelativeSpeed.equal(
                        RSset.RSpos).booleanValue()
                    and self.ObstacleDistance.unequal(
                        ODset.ODveryclose).booleanValue()).booleanValue()
                             or vtktg.equal(BBoolean(False)).booleanValue()).
                booleanValue())).booleanValue()):
            if ((self.ObstacleStatusJustChanged.equal(
                    BBoolean(True))).booleanValue()):
                self.VehicleTryKeepTimeGap = vtktg
                self.VehicleTryKeepSpeed = vtks

    def ObstacleBecomesOld(self):
        if ((BBoolean(
                BBoolean(
                    BBoolean(
                        BBoolean(
                            BBoolean(
                                self.ObstacleStatusJustChanged.equal(
                                    BBoolean(True)).booleanValue()
                                and BBoolean(
                                    BBoolean(
                                        BBoolean(
                                            self.VehicleTryKeepSpeed.equal(
                                                BBoolean(True)).booleanValue()
                                            or self.VehicleTryKeepTimeGap.
                                            equal(BBoolean(True)).booleanValue(
                                            )).booleanValue() or
                                        self.CCInitialisationInProgress.equal(
                                            BBoolean(True)).booleanValue()).
                                    booleanValue()
                                    or self.CruiseSpeedChangeInProgress.equal(
                                        BBoolean(True)).booleanValue()).
                                booleanValue()).booleanValue()
                            and BBoolean(not self.ObstacleDistance.equal(
                                ODset.ODnone).booleanValue()
                                         or self.VehicleTryKeepSpeed.equal(
                                             BBoolean(True)).booleanValue()).
                            booleanValue()).booleanValue()
                        and BBoolean(not BBoolean(
                            BBoolean(
                                BBoolean(
                                    self.ObstacleDistance.equal(
                                        ODset.ODclose).booleanValue() and self.
                                    ObstacleRelativeSpeed.unequal(RSset.RSpos).
                                    booleanValue()).booleanValue()
                                and self.CCInitialisationInProgress.equal(
                                    BBoolean(False)).booleanValue()).
                            booleanValue() and self.CruiseSpeedChangeInProgress
                            .equal(BBoolean(False)).booleanValue()
                        ).booleanValue() or self.VehicleTryKeepTimeGap.equal(
                            BBoolean(True)).booleanValue()).booleanValue()).
                    booleanValue() and BBoolean(not BBoolean(
                        BBoolean(
                            self.ObstacleDistance.equal(
                                ODset.ODveryclose).booleanValue()
                            and self.CCInitialisationInProgress.equal(
                                BBoolean(False)).booleanValue()).booleanValue(
                                ) and self.CruiseSpeedChangeInProgress.equal(
                                    BBoolean(False)).booleanValue()
                    ).booleanValue() or self.VehicleTryKeepTimeGap.equal(
                        BBoolean(True)).booleanValue()).booleanValue()).
                booleanValue() and BBoolean(not BBoolean(
                    BBoolean(
                        BBoolean(
                            self.ObstacleRelativeSpeed.equal(
                                RSset.RSpos).booleanValue() and
                            self.ObstacleDistance.unequal(ODset.ODveryclose).
                            booleanValue()).booleanValue()
                        and self.CCInitialisationInProgress.equal(
                            BBoolean(False)).booleanValue()).booleanValue()
                    and self.CruiseSpeedChangeInProgress.equal(
                        BBoolean(False)).booleanValue()).booleanValue()
                                            or self.VehicleTryKeepSpeed.equal(
                                                BBoolean(True)).booleanValue()
                                            ).booleanValue())).booleanValue()):
            self.ObstacleStatusJustChanged = BBoolean(False)

    def _get_CruiseAllowed(self):
        return self.CruiseAllowed

    def _get_CruiseActive(self):
        return self.CruiseActive

    def _get_VehicleAtCruiseSpeed(self):
        return self.VehicleAtCruiseSpeed

    def _get_VehicleCanKeepSpeed(self):
        return self.VehicleCanKeepSpeed

    def _get_VehicleTryKeepSpeed(self):
        return self.VehicleTryKeepSpeed

    def _get_SpeedAboveMax(self):
        return self.SpeedAboveMax

    def _get_VehicleTryKeepTimeGap(self):
        return self.VehicleTryKeepTimeGap

    def _get_CruiseSpeedAtMax(self):
        return self.CruiseSpeedAtMax

    def _get_ObstaclePresent(self):
        return self.ObstaclePresent

    def _get_ObstacleDistance(self):
        return self.ObstacleDistance

    def _get_ObstacleRelativeSpeed(self):
        return self.ObstacleRelativeSpeed

    def _get_ObstacleStatusJustChanged(self):
        return self.ObstacleStatusJustChanged

    def _get_CCInitialisationInProgress(self):
        return self.CCInitialisationInProgress

    def _get_CruiseSpeedChangeInProgress(self):
        return self.CruiseSpeedChangeInProgress

    def _get_NumberOfSetCruise(self):
        return self.NumberOfSetCruise
예제 #25
0
 def VehicleManageObstacle(self, vtks, vtktg):
     if ((BBoolean(
             BBoolean(
                 BBoolean(
                     BBoolean(
                         BBoolean(
                             BBoolean(
                                 BBoolean(
                                     BBoolean(
                                         BBoolean(
                                             BBoolean(
                                                 BUtils.BOOL.elementOf(
                                                     vtks).booleanValue()
                                                 and BUtils.BOOL.elementOf(
                                                     vtktg).booleanValue()).
                                             booleanValue() and BBoolean(
                                                 BBoolean(
                                                     BBoolean(
                                                         vtks.equal(
                                                             BBoolean(True)
                                                         ).booleanValue()
                                                         or vtktg.equal(
                                                             BBoolean(True)
                                                         ).booleanValue()).
                                                     booleanValue() or self.
                                                     CCInitialisationInProgress
                                                     .equal(BBoolean(True)).
                                                     booleanValue()).
                                                 booleanValue() or self.
                                                 CruiseSpeedChangeInProgress
                                                 .equal(BBoolean(
                                                     True)).booleanValue()).
                                             booleanValue()).booleanValue()
                                         and BBoolean(
                                             not self.ObstaclePresent.equal(
                                                 BBoolean(False)).
                                             booleanValue() or vtktg.equal(
                                                 BBoolean(False)).
                                             booleanValue()).booleanValue()
                                     ).booleanValue() and BBoolean(
                                         not self.ObstacleDistance.equal(
                                             ODset.ODnone).booleanValue()
                                         or vtks.equal(BBoolean(True)).
                                         booleanValue()).booleanValue()).
                                 booleanValue() and BBoolean(not BBoolean(
                                     BBoolean(
                                         BBoolean(
                                             self.ObstacleDistance.equal(
                                                 ODset.ODclose).
                                             booleanValue()
                                             and self.ObstacleRelativeSpeed.
                                             unequal(RSset.RSpos).
                                             booleanValue()).booleanValue()
                                         and self.CCInitialisationInProgress
                                         .equal(BBoolean(False)).
                                         booleanValue()).booleanValue() and
                                     self.CruiseSpeedChangeInProgress.equal(
                                         BBoolean(False)).booleanValue()
                                 ).booleanValue() or vtktg.equal(
                                     BBoolean(True)).booleanValue()).
                                 booleanValue()).booleanValue()
                             and BBoolean(not BBoolean(
                                 BBoolean(
                                     self.ObstacleDistance.equal(
                                         ODset.ODveryclose).booleanValue()
                                     and self.CCInitialisationInProgress.
                                     equal(BBoolean(False)).booleanValue()).
                                 booleanValue()
                                 and self.CruiseSpeedChangeInProgress.equal(
                                     BBoolean(False)).booleanValue()
                             ).booleanValue() or vtktg.equal(BBoolean(
                                 True)).booleanValue()).booleanValue()).
                         booleanValue() and BBoolean(not BBoolean(
                             BBoolean(
                                 BBoolean(
                                     self.ObstacleRelativeSpeed.equal(
                                         RSset.RSpos).booleanValue()
                                     and self.ObstacleDistance.unequal(
                                         ODset.ODveryclose).booleanValue()).
                                 booleanValue()
                                 and self.CCInitialisationInProgress.equal(
                                     BBoolean(False)).booleanValue()).
                             booleanValue()
                             and self.CruiseSpeedChangeInProgress.equal(
                                 BBoolean(False)).booleanValue()
                         ).booleanValue() or vtks.equal(
                             BBoolean(True)).booleanValue()).booleanValue()
                     ).booleanValue() and BBoolean(not BBoolean(
                         self.ObstacleRelativeSpeed.equal(
                             RSset.RSequal).booleanValue()
                         and self.ObstacleDistance.equal(ODset.ODnone).
                         booleanValue()).booleanValue() or vtktg.equal(
                             BBoolean(False)).booleanValue()).booleanValue(
                             )).booleanValue()
                 and BBoolean(not BBoolean(
                     self.ObstacleRelativeSpeed.equal(RSset.RSneg).
                     booleanValue() and self.ObstacleDistance.equal(
                         ODset.ODnone).booleanValue()).booleanValue()
                              or vtktg.equal(BBoolean(False)).booleanValue(
                              )).booleanValue()).booleanValue()
             and BBoolean(not BBoolean(
                 self.ObstacleRelativeSpeed.equal(
                     RSset.RSpos).booleanValue()
                 and self.ObstacleDistance.unequal(
                     ODset.ODveryclose).booleanValue()).booleanValue()
                          or vtktg.equal(BBoolean(False)).booleanValue()).
             booleanValue())).booleanValue()):
         if ((self.ObstacleStatusJustChanged.equal(
                 BBoolean(True))).booleanValue()):
             self.VehicleTryKeepTimeGap = vtktg
             self.VehicleTryKeepSpeed = vtks
예제 #26
0
 def VehicleExceedsMaxCruiseSpeed(self):
     if ((BBoolean(
             self.SpeedAboveMax.equal(BBoolean(False)).booleanValue()
             and BBoolean(
                 BBoolean(
                     self.CruiseActive.equal(
                         BBoolean(False)).booleanValue()
                     or self.VehicleCanKeepSpeed.equal(
                         BBoolean(False)).booleanValue()).booleanValue()
                 or BBoolean(
                     BBoolean(
                         self.ObstacleStatusJustChanged.equal(
                             BBoolean(False)).booleanValue()
                         and self.CCInitialisationInProgress.equal(
                             BBoolean(False)).booleanValue()).booleanValue(
                             ) and self.CruiseSpeedChangeInProgress.equal(
                                 BBoolean(False)).booleanValue()
                 )._not().booleanValue()).booleanValue())).booleanValue()):
         self.SpeedAboveMax = BBoolean(True)
         self.VehicleAtCruiseSpeed = BBoolean(False)
예제 #27
0
 def ObstacleDistanceBecomesClose(self):
     if ((BBoolean(
             BBoolean(
                 self.ObstaclePresent.equal(BBoolean(True)).booleanValue()
                 and self.CruiseActive.equal(
                     BBoolean(True)).booleanValue()).booleanValue()
             and BBoolean(
                 BBoolean(
                     self.ObstacleDistance.equal(
                         ODset.ODveryclose).booleanValue()
                     and self.ObstacleRelativeSpeed.equal(
                         RSset.RSpos).booleanValue()).booleanValue()
                 or BBoolean(
                     self.ObstacleDistance.equal(
                         ODset.ODnone).booleanValue()
                     and self.ObstacleRelativeSpeed.equal(
                         RSset.RSneg).booleanValue()).booleanValue()).
             booleanValue())).booleanValue()):
         self.ObstacleDistance = ODset.ODclose
         self.ObstacleStatusJustChanged = BBoolean(True)
         if ((self.ObstacleRelativeSpeed.equal(
                 RSset.RSpos)).booleanValue()):
             self.VehicleTryKeepTimeGap = BBoolean(False)
예제 #28
0
 def peds_g(self):
     if ((BBoolean(
             self.tl_peds.equal(colors.red).booleanValue()
             and self.tl_cars.equal(
                 colors.red).booleanValue())).booleanValue()):
         self.tl_peds = colors.green
예제 #29
0
 def CruiseBecomesAllowed(self):
     if ((self.CruiseAllowed.equal(BBoolean(False))).booleanValue()):
         self.CruiseAllowed = BBoolean(True)
예제 #30
0
 def ObstacleStopsTravelSlower(self):
     if ((self.ObstacleRelativeSpeed.equal(RSset.RSneg)).booleanValue()):
         self.ObstacleRelativeSpeed = RSset.RSequal
         if ((self.CruiseActive.equal(BBoolean(True))).booleanValue()):
             self.ObstacleStatusJustChanged = BBoolean(True)