Koswat handler¶
KoswatHandler
¶
Handler for CLI usage of Koswat
. It allows the initialization of a logger during the analysis.
__init__(log_output: Optional[str]) -> None
¶
Initializes the handler creating a log file at the optional provided directory log_output
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
log_output |
Optional[str]
|
Directory where to save the |
required |
run_analysis(analysis_file: str) -> None
¶
Runs a Koswat analysis using the provided *.ini
file analysis_file
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
analysis_file |
str
|
Location of the main koswat analysis ini file. |
required |
KoswatLogger
¶
KoswatSummary
dataclass
¶
get_infrastructure_costs() -> dict[type[ReinforcementProfileProtocol], tuple[float, float]]
¶
Gets the infrastructure costs for each profile type for those locations for which the profile type is selected.
Returns:
Type | Description |
---|---|
dict[type[ReinforcementProfileProtocol], tuple[float, float]]
|
dict[type[ReinforcementProfileProtocol], tuple[float, float]]: infrastructure costs without and with surtax per reinforcement type. |
get_report_by_profile(profile_type: type[ReinforcementProfileProtocol]) -> MultiLocationProfileCostReport | None
¶
Get the report for a specific profile type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
profile_type |
type[ReinforcementProfileProtocol]
|
Type of reinforcement profile. |
required |
Returns:
Type | Description |
---|---|
MultiLocationProfileCostReport | None
|
MultiLocationProfileCostReport | None: Report for the profile type. |
KoswatSummaryBuilder
dataclass
¶
Bases: BuilderProtocol