frequenz_microgrid_component_graph/config.rs
1// License: MIT
2// Copyright © 2024 Frequenz Energy-as-a-Service GmbH
3
4//! This module contains the configuration options for the `ComponentGraph`.
5
6/// Configuration options for the `ComponentGraph`.
7#[derive(Clone, Default, Debug)]
8pub struct ComponentGraphConfig {
9 /// Whether to allow validation errors on components. When this is `true`,
10 /// the graph will be built even if there are validation errors on
11 /// components.
12 pub allow_component_validation_failures: bool,
13
14 /// Whether to allow unconnected components in the graph, that are not
15 /// reachable from the root.
16 pub allow_unconnected_components: bool,
17
18 /// Whether to allow untyped inverters in the graph. When this is `true`,
19 /// inverters that have `InverterType::Unspecified` will be assumed to be
20 /// Battery inverters.
21 pub allow_unspecified_inverters: bool,
22
23 /// Whether to disable fallback components in generated formulas. When this
24 /// is `true`, the formulas will not include fallback components.
25 pub disable_fallback_components: bool,
26}