-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Config parameters for the component graph (#3)
This PR adds support for configuring the validation requirements of the component graph.
- Loading branch information
Showing
21 changed files
with
519 additions
and
247 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ path = "src/lib.rs" | |
|
||
[dependencies] | ||
petgraph = "0.6.5" | ||
tracing = "0.1.40" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// License: MIT | ||
// Copyright © 2024 Frequenz Energy-as-a-Service GmbH | ||
|
||
//! This module contains the configuration options for the `ComponentGraph`. | ||
/// Configuration options for the `ComponentGraph`. | ||
#[derive(Clone, Default, Debug)] | ||
pub struct ComponentGraphConfig { | ||
/// Whether to allow validation errors on components. When this is `true`, | ||
/// the graph will be built even if there are validation errors on | ||
/// components. | ||
pub allow_component_validation_failures: bool, | ||
|
||
/// Whether to allow unconnected components in the graph, that are not | ||
/// reachable from the root. | ||
pub allow_unconnected_components: bool, | ||
|
||
/// Whether to allow untyped inverters in the graph. When this is `true`, | ||
/// inverters that have `InverterType::Unspecified` will be assumed to be | ||
/// Battery inverters. | ||
pub allow_unspecified_inverters: bool, | ||
|
||
/// Whether to disable fallback components in generated formulas. When this | ||
/// is `true`, the formulas will not include fallback components. | ||
pub disable_fallback_components: bool, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.