ra2ce.runners package#
Submodules#
ra2ce.runners.adaptation_analysis_runner module#
- GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Risk Assessment and Adaptation for Critical Infrastructure (RA2CE). Copyright (C) 2023 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/>.
- class AdaptationAnalysisRunner(*args, **kwargs)[source]#
Bases:
SimpleAnalysisRunnerBase
- static filter_supported_analyses(analysis_collection)[source]#
Gets the supported analysis for a concrete runner.
- Return type:
list
[Adaptation
]- Parameters:
analysis_collection (AnalysisCollection)
- Args:
analysis_collection (AnalysisCollection): Collection of analyses to filter.
- Returns:
list[AnalysisProtocol]: Supported analyses from the provided collection.
ra2ce.runners.analysis_runner_factory module#
- GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Risk Assessment and Adaptation for Critical Infrastructure (RA2CE). Copyright (C) 2023 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/>.
- class AnalysisRunnerFactory[source]#
Bases:
object
- static get_supported_runners(analysis_collection)[source]#
Gets the supported analysis runners for the given input.
- Return type:
list
[AnalysisRunner
]- Parameters:
analysis_collection (AnalysisCollection)
- Args:
analysis_collection (AnalysisCollection): Collection of analyses to run.
- Returns:
list[AnalysisRunner]: Supported runners for the given configuration.
- static run(analysis_collection)[source]#
Runs the given analysis collection.
- Return type:
list
[AnalysisResultWrapper
]- Parameters:
analysis_collection (AnalysisCollection)
- Args:
analysis_collection (AnalysisCollection): Collection of analyses to run.
- Returns:
list[AnalysisResultWrapper]: List of analysis results.
ra2ce.runners.analysis_runner_protocol module#
- GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Risk Assessment and Adaptation for Critical Infrastructure (RA2CE). Copyright (C) 2023 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/>.
- class AnalysisRunner(*args, **kwargs)[source]#
Bases:
Protocol
- can_run(analysis, analysis_collection)[source]#
Validates whether the given ConfigWrapper is eligibile for this AnalysisRunner.
- Return type:
bool
- Parameters:
analysis (AnalysisProtocol)
analysis_collection (AnalysisCollection)
- Args:
analysis (AnalysisProtocol): Analysis to be run on this AnalysisRunner. analysis_collection (AnalysisCollection): Collection of analyses to be run on this AnalysisRunner.
- Returns:
bool: Whether the ConfigWrapper can be run or not.
- run(analysis_collection)[source]#
Runs this AnalysisRunner for the given analysis collection.
- Return type:
- Parameters:
analysis_collection (AnalysisCollection)
- Args:
analysis_collection (AnalysisCollection): Collection of analyses to be run on this AnalysisRunner.
- Returns:
list[AnalysisResultWrapperProtocol]: List of all results for all ran analysis.
ra2ce.runners.damages_analysis_runner module#
- GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Risk Assessment and Adaptation for Critical Infrastructure (RA2CE). Copyright (C) 2023 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/>.
- class DamagesAnalysisRunner(*args, **kwargs)[source]#
Bases:
SimpleAnalysisRunnerBase
- can_run(analysis, analysis_collection)[source]#
Validates whether the given ConfigWrapper is eligibile for this AnalysisRunner.
- Return type:
bool
- Parameters:
analysis (AnalysisProtocol)
analysis_collection (AnalysisCollection)
- Args:
analysis (AnalysisProtocol): Analysis to be run on this AnalysisRunner. analysis_collection (AnalysisCollection): Collection of analyses to be run on this AnalysisRunner.
- Returns:
bool: Whether the ConfigWrapper can be run or not.
- static filter_supported_analyses(analysis_collection)[source]#
Gets the supported analysis for a concrete runner.
- Return type:
list
[AnalysisDamagesProtocol
]- Parameters:
analysis_collection (AnalysisCollection)
- Args:
analysis_collection (AnalysisCollection): Collection of analyses to filter.
- Returns:
list[AnalysisProtocol]: Supported analyses from the provided collection.
ra2ce.runners.losses_analysis_runner module#
- GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Risk Assessment and Adaptation for Critical Infrastructure (RA2CE). Copyright (C) 2023 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/>.
- class LossesAnalysisRunner(*args, **kwargs)[source]#
Bases:
SimpleAnalysisRunnerBase
- static filter_supported_analyses(analysis_collection)[source]#
Gets the supported analysis for a concrete runner.
- Return type:
list
[AnalysisLossesProtocol
]- Parameters:
analysis_collection (AnalysisCollection)
- Args:
analysis_collection (AnalysisCollection): Collection of analyses to filter.
- Returns:
list[AnalysisProtocol]: Supported analyses from the provided collection.
ra2ce.runners.simple_analysis_runner_base module#
- GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Risk Assessment and Adaptation for Critical Infrastructure (RA2CE). Copyright (C) 2023 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/>.
- class SimpleAnalysisRunnerBase(*args, **kwargs)[source]#
Bases:
AnalysisRunner
- can_run(analysis, analysis_collection)[source]#
Validates whether the given ConfigWrapper is eligibile for this AnalysisRunner.
- Return type:
bool
- Parameters:
analysis (AnalysisProtocol)
analysis_collection (AnalysisCollection)
- Args:
analysis (AnalysisProtocol): Analysis to be run on this AnalysisRunner. analysis_collection (AnalysisCollection): Collection of analyses to be run on this AnalysisRunner.
- Returns:
bool: Whether the ConfigWrapper can be run or not.
- abstractmethod static filter_supported_analyses(analysis_collection)[source]#
Gets the supported analysis for a concrete runner.
- Return type:
list
[AnalysisProtocol
]- Parameters:
analysis_collection (AnalysisCollection)
- Args:
analysis_collection (AnalysisCollection): Collection of analyses to filter.
- Returns:
list[AnalysisProtocol]: Supported analyses from the provided collection.
- run(analysis_collection)[source]#
Runs this AnalysisRunner for the given analysis collection.
- Return type:
list
[AnalysisResultWrapper
]- Parameters:
analysis_collection (AnalysisCollection)
- Args:
analysis_collection (AnalysisCollection): Collection of analyses to be run on this AnalysisRunner.
- Returns:
list[AnalysisResultWrapperProtocol]: List of all results for all ran analysis.