Cost report module

            GNU GENERAL PUBLIC LICENSE
              Version 3, 29 June 2007

KOSWAT, from the dutch combination of words Kosts-Wat (what are the costs) Copyright (C) 2025 Stichting Deltares

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

CostReportProtocol

Bases: Protocol

A Protocol defining the properties of a report in Koswat.

Infrastructure cost calculator

            GNU GENERAL PUBLIC LICENSE
              Version 3, 29 June 2007

KOSWAT, from the dutch combination of words Kosts-Wat (what are the costs) Copyright (C) 2025 Stichting Deltares

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

ProfileZoneCalculator dataclass

Calculator to determine the width of zones A and B of a reinforced profile (ReinforcementProfileProtocol). It requires its original base profile to be in its definition.

calculate() -> tuple[float, float]

Calculates the width of zones A and B for the defined instance of ReinforcementProfileProtocol. The calculation is as follows: - When dh0 has not varied with respect to the base profile, then zones A and B are calculated. - When dh0 has increased then only zone B is calculated.

Returns:
  • tuple[float, float]

    tuple[float, float]: Calculated zone A and B respectively.

            GNU GENERAL PUBLIC LICENSE
              Version 3, 29 June 2007

KOSWAT, from the dutch combination of words Kosts-Wat (what are the costs) Copyright (C) 2025 Stichting Deltares

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

InfrastructureProfileCostsCalculator dataclass

Calculator to generate all InfrastructureLocationCosts instances based on the locations of the contained infrastructure (SurroundingsInfrastructure.points) and the width of zone_a and zone_b.

calculate(zone_a_width: float, zone_b_width: float) -> list[InfrastructureLocationCosts]

Calculates the costs affecting this instance's infrastructure at all points where it is present.

Parameters:
  • zone_a_width (float) –

    Width of zone type A.

  • zone_b_width (float) –

    Width of zone type `B .

Returns:
  • list[InfrastructureLocationCosts]

    list[InfrastructureLocationCosts]: Resulting cost summaries.

            GNU GENERAL PUBLIC LICENSE
              Version 3, 29 June 2007

KOSWAT, from the dutch combination of words Kosts-Wat (what are the costs) Copyright (C) 2025 Stichting Deltares

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

MultiInfrastructureProfileCostsCalculator dataclass

Calculator that contains all possible "infrastructure" calculators (InfrastructureProfileCostsCalculator) one for each of the available infrastructures in the current KoswatScenario. Its calculate method only requires a reinforcement (ReinforcementProfileProtocol) to determine all infrastructures' costs.

calculate(reinforced_profile: ReinforcementProfileProtocol) -> list[InfrastructureLocationProfileCostReport]

Calculates the costs related to appyling the provided reinforcement_profile at all the locations where an infrastructure is present. It first determines zone A and B and then provides their widths to the inner infrastructure calculators (InfrastructureProfileCostsCalculator).

Parameters:
Returns:
  • list[InfrastructureLocationProfileCostReport]

    list[InfrastructureLocationProfileCostReport]: Collection of reports summarizing the cost-impact of a reinforced_profile.

            GNU GENERAL PUBLIC LICENSE
              Version 3, 29 June 2007

KOSWAT, from the dutch combination of words Kosts-Wat (what are the costs) Copyright (C) 2025 Stichting Deltares

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

MultiInfrastructureProfileCostsCalculatorBuilder dataclass

Bases: BuilderProtocol

Builder to set up "fix" information such as costs derived from the koswat settings (InfraCostsEnum, SurtaxFactorEnum) which directly determines the zone A and/or B costs that will be applied for each infrastructure.

Quantity cost parameters calculator

            GNU GENERAL PUBLIC LICENSE
              Version 3, 29 June 2007

KOSWAT, from the dutch combination of words Kosts-Wat (what are the costs) Copyright (C) 2025 Stichting Deltares

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

            GNU GENERAL PUBLIC LICENSE
              Version 3, 29 June 2007

KOSWAT, from the dutch combination of words Kosts-Wat (what are the costs) Copyright (C) 2025 Stichting Deltares

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

CostParameterProtocol

Bases: Protocol

total_cost: float property

The total cost (quantity * unit cost)

total_cost_with_surtax: float property

The total cost including surtaxes

IO

Summary

            GNU GENERAL PUBLIC LICENSE
              Version 3, 29 June 2007

KOSWAT, from the dutch combination of words Kosts-Wat (what are the costs) Copyright (C) 2025 Stichting Deltares

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Summary costs

            GNU GENERAL PUBLIC LICENSE
              Version 3, 29 June 2007

KOSWAT, from the dutch combination of words Kosts-Wat (what are the costs) Copyright (C) 2025 Stichting Deltares

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

            GNU GENERAL PUBLIC LICENSE
              Version 3, 29 June 2007

KOSWAT, from the dutch combination of words Kosts-Wat (what are the costs) Copyright (C) 2025 Stichting Deltares

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Summary infrastructure costs

            GNU GENERAL PUBLIC LICENSE
              Version 3, 29 June 2007

KOSWAT, from the dutch combination of words Kosts-Wat (what are the costs) Copyright (C) 2025 Stichting Deltares

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

            GNU GENERAL PUBLIC LICENSE
              Version 3, 29 June 2007

KOSWAT, from the dutch combination of words Kosts-Wat (what are the costs) Copyright (C) 2025 Stichting Deltares

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

SummaryInfrastructureCostsCsvFomBuilder dataclass

Summary locations

            GNU GENERAL PUBLIC LICENSE
              Version 3, 29 June 2007

KOSWAT, from the dutch combination of words Kosts-Wat (what are the costs) Copyright (C) 2025 Stichting Deltares

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

            GNU GENERAL PUBLIC LICENSE
              Version 3, 29 June 2007

KOSWAT, from the dutch combination of words Kosts-Wat (what are the costs) Copyright (C) 2025 Stichting Deltares

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

            GNU GENERAL PUBLIC LICENSE
              Version 3, 29 June 2007

KOSWAT, from the dutch combination of words Kosts-Wat (what are the costs) Copyright (C) 2025 Stichting Deltares

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

ClusterShpFom dataclass

add_neighbour_extent(left_cluster: ClusterShpFom, right_cluster: ClusterShpFom) -> None staticmethod

Adds the left and right neighbour locations to the given clusters.

Parameters:
  • left_cluster (ClusterShpFom) –

    The left cluster to add the right neighbour to.

  • right_cluster (ClusterShpFom) –

    The right cluster to add the left neighbour to.

base_geometry: LineString property

The resulting geometry of all locations excluding the profile's width.

Returns:
  • LineString( LineString ) –

    Geometry representing the cluster coordinates.

get_buffered_geometry(width: float) -> LineString

The base_geometry with an applied buffer (width) that represents the polderside's width.

Parameters:
  • width (float) –

    Profile's polderside width.

Returns:
  • LineString( LineString ) –

    Resulting base_geometry with a buffer.

new_polderside_width: float property

The new polderside width.

old_polderside_width: float property

The original polderside width.

points_with_neighbour_extent: list[Point] property

The locations including points halfway to the left and right neighbour locations, if available.

Returns:
  • list[Point]

    list[Point]: List of points with extent halfway to neighbours included.

            GNU GENERAL PUBLIC LICENSE
              Version 3, 29 June 2007

KOSWAT, from the dutch combination of words Kosts-Wat (what are the costs) Copyright (C) 2025 Stichting Deltares

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

ClusterCollectionShpFom dataclass

from_summary(koswat_summary: KoswatSummary, cluster_criteria: Callable[[StrategyLocationReinforcement], type[ReinforcementProfileProtocol]] = lambda x: x.current_selected_measure) -> ClusterCollectionShpFom classmethod

Maps the KoswatSummary into a file object model that can be exported into *.shp files.

Parameters:
  • koswat_summary (KoswatSummary) –

    The summary containing the information to export.

  • ])

    (Lambda) Function criteria to group the locations by reinforcement type.

Returns:
  • ClusterCollectionShpFom( ClusterCollectionShpFom ) –

    Dataclass instance that can be directly exported into .shp.

generate_geodataframes() -> ClusterGeoDataFrameOutputFom

Generates all geodataframes of the given clusters. The generated geodataframes correspond to the, base geometry (without buffering), the old and new geometries with their profile's width being buffered to the base geometry.

Returns:
            GNU GENERAL PUBLIC LICENSE
              Version 3, 29 June 2007

KOSWAT, from the dutch combination of words Kosts-Wat (what are the costs) Copyright (C) 2025 Stichting Deltares

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

ClusterGeoDataFrameOutputFom

Bases: FileObjectModelProtocol

Data structure to wrap the output generated by ClusterCollectionShpFom.generate_geodataframes.

is_valid() -> bool

Checks that all GeoDataFrame properties are set.

Returns:
  • bool( bool ) –

    Validation result.

            GNU GENERAL PUBLIC LICENSE
              Version 3, 29 June 2007

KOSWAT, from the dutch combination of words Kosts-Wat (what are the costs) Copyright (C) 2025 Stichting Deltares

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.