Ignore:
Timestamp:
05/16/12 18:04:55 (12 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
hg-Phase:
(<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
Message:

Added support for the entrance exam

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/checks.py

    r183 r184  
    750750        """Get the limit if we are in the right state."""
    751751        return aircraft.mlw if flight.stage==const.STAGE_LANDING and \
    752                                state.onTheGround else None
     752                               state.onTheGround and \
     753                               not flight.entranceExam else None
    753754
    754755#---------------------------------------------------------------------------------------
     
    762763    def getLimit(self, flight, aircraft, state):
    763764        """Get the limit if we are in the right state."""
    764         return aircraft.mtow if flight.stage==const.STAGE_TAKEOFF else None
     765        return aircraft.mtow if flight.stage==const.STAGE_TAKEOFF and \
     766                             not flight.entranceExam else None
    765767
    766768#---------------------------------------------------------------------------------------
     
    774776    def getLimit(self, flight, aircraft, state):
    775777        """Get the limit if we are in the right state."""
    776         return aircraft.mzfw
     778        return aircraft.mzfw if not flight.entranceExam else None
    777779
    778780    def getWeight(self, state):
     
    829831    def isCondition(self, flight, aircraft, oldState, state):
    830832        """Check if the fault condition holds."""
    831         return flight.stage==const.STAGE_PUSHANDTAXI and \
     833        return not flight.entranceExam and \
     834               flight.stage==const.STAGE_PUSHANDTAXI and \
    832835               PayloadChecker.isZFWFaulty(state.zfw, flight.zfw)
    833836               
Note: See TracChangeset for help on using the changeset viewer.