ServiceType

todo

class blocksnet.models.service_type.ServiceBrick(*, capacity: int, area: float, is_integrated: bool, parking_area: float)[source]

Bases: BaseModel

Typical service type brick or chunk, that is used in development

capacity: int
area: float

Area in hectares

is_integrated: bool

Is integrated within the building

parking_area: float
property sq_m_area

Self area in square meters

class blocksnet.models.service_type.ServiceType(*, code: str, name: str, accessibility: int, demand: int, bricks: list[blocksnet.models.service_type.ServiceBrick])[source]

Bases: BaseModel

Represents service type entity, such as schools and its parameters overall

code: str
name: str
accessibility: int
demand: int
bricks: list[blocksnet.models.service_type.ServiceBrick]
validate_bricks()[source]
calculate_in_need(population: int) int[source]

Calculate how many people in the given population are in need by this service type

__hash__()[source]

Make service type hashable to use it as a key