Priority-setting in accident prevention door