Check(EDBA_37){
IF (CS) THEN KS END IF
Space mySpace{
Space.Floor.area > 3000 M2;
Space.usage="PerformanceHall"
OR Space.usage="AssemblyHall"
OR Space.usage="Auditorium"
OR Space.usage="ExhibitionHall"
}
}
CS{
mySpace.Floor.number< 0
}
KS{
Stair myStair{
Stair.isOutdoor = TRUE
}
Floor myFloor{
Floor.isEscape = TRUE
}
Space mySpace{
hasObject(Space, Ceiling) != TRUE
}
(isGoThrough(mySpace, myStair, myFloor)=True
OR isGoThrough(mySpace, Ramp, myFloor)=True)
AND isExternal(mySpace)=True
}
|
std_area = 3000
std_area_label = '기준 바닥면적 합계'
def Check():
for building in SELECT('building'):
bldg_use = building.SELECT('building type').STRING()
sub_use = building.SELECT('prop', '세부용도').STRING()
if not (bldg_use == '문화 및 집회시설' and sub_use in ['공연장', '집회장', '관람장', '전시장']):
continue
base_storey_exist = False
under_stories = []
for storey in building.SELECT('storey'):
if storey.SELECT('prop', '기준 지상층').BOOL():
base_storey_exist = True
break
under_stories.append(storey)
if base_storey_exist == False:
building.ERROR('지상층이 존재하지 않습니다.')
continue
if len(under_stories) == 0:
continue
area_sum = 0.0
ex_spaces = []
for storey in under_stories:
for space in storey.SELECT('space'):
area_sum += space.SELECT('area').UNIT('m2').NUMBER()
if space.SELECT('is external').BOOL():
ex_spaces.append(space)
if area_sum < std_area:
building.SUCCESS('지하공간 바닥면적 합: ' + str(area_sum) + ' < ' + str(std_area))
continue
if len(ex_spaces) == 0:
building.ERROR('지하에 천장이 개방된 외부 공간이 없습니다.')
continue
for space in ex_spaces:
for stair in space.SELECT('stair'):
if stair.SELECT('is direct').BOOL():
space.SUCCESS('피난층으로 대피할 수 있는 외부 공간이 존재합니다.')
return
ex_spaces[0].ERROR('피난층으로 대피할 수 없습니다.')
|