// Generated by cimgen — do not edit by hand.
#![allow(clippy::all, dead_code, unused)]
use cimdecoder::CimDataset;
use crate::Violation;
use crate::helpers::*;
pub fn validate_p61970_456_statevariables_ap_con_complex_shacl(dataset: &CimDataset) -> Vec<Violation> {
let mut v = Vec::new();
v.extend(check_p61970_456_statevariables_ap_con_complex_shacl_topological_island_type_min_count(dataset));
v
}
pub fn check_p61970_456_statevariables_ap_con_complex_shacl_topological_island_type_min_count(dataset: &CimDataset) -> Vec<Violation> {
let count = dataset.by_type.get("TopologicalIsland").map_or(0, |v| v.len());
let mut violations = Vec::new();
if count < 1 {
violations.push(Violation {
object_id: String::new(),
rule_id: "sv456:TopologicalIsland-instance".to_string(),
class: "TopologicalIsland".to_string(),
property: "C:456:SV:TopologicalIsland:instance".to_string(),
message: "No TopologicalIsland instantiated.".to_string(),
severity: "sh:Violation".to_string(),
name: "C:456:SV:TopologicalIsland:instance".to_string(),
description: "At least one TopologicalIsland instance shall be present per SV instance. The TopologicalIsland-s for a merged model which are defined in the state variables instance file for the merged model are created with the solving on the power flow of the merged model, i.e. there are no TopologicalIsland-s defined per MAS in a merged model. In case a solved merged model is exchanged for a single MAS the state variables instance file shall include at least one instance of TopologicalIsland.".to_string(),
});
}
violations
}