// 주차장법 시행규칙 3조 (주차장의 주차구획) 1항 2호
Check(ERPA_3_1_2){
KS
}
KS{
getObjectProperty(ParkingUnit.parkingType) != "ParallelParking"
}
|
def Check():
for parklot in ROOT.SELECT('parklot'):
park_type = parklot.SELECT('prop', '주차형식').STRING()
car_type = parklot.SELECT('prop', '주차단위구획').STRING()
min_w = 0.0
min_l = 0.0
if park_type == '평행주차':
if car_type == '경형':
min_w = 1.7
min_l = 4.5
elif car_type == '일반형':
min_w = 2.0
min_l = 6.0
elif car_type == '이륜자동차전용':
min_w = 1.0
min_l = 2.3
else:
continue
else:
if car_type == '경형':
min_w = 2.0
min_l = 3.6
elif car_type == '일반형':
min_w = 2.5
min_l = 5.0
elif car_type == '확장형':
min_w = 2.6
min_l = 5.2
elif car_type == '장애인전용':
min_w = 3.3
min_l = 5.0
elif car_type == '이륜자동차전용':
min_w = 1.0
min_l = 2.3
else:
continue
width = parklot.SELECT('width').UNIT('m')
length = parklot.SELECT('length').UNIT('m')
w = width.NUMBER()
l = length.NUMBER()
if w < min_w:
width.ERROR('너비: ' + str(w) + ' (< ' + str(min_w) + ')' )
elif l < min_l:
length.ERROR('길이: ' + str(l) + ' (< ' + str(min_l) + ')' )
else:
parklot.SUCCESS(str(w) + ' x ' + str(l))
|