#![allow(clippy::all, dead_code, unused)]
use cimdecoder::CimDataset;
use crate::Violation;
use crate::helpers::*;
pub fn validate_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl(dataset: &CimDataset) -> Vec<Violation> {
let mut v = Vec::new();
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_acdc_converter_dc_terminal_acdc_term_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_active_power_limit_active_power_limi_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_apparent_power_limit_apparent_power_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_asynchronous_machine_equipment_in_se_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_asynchronous_machine_regulating_cond_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_asynchronous_machine_asynchronous_ma_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_asynchronous_machine_asynchronous_ma_etc_2(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_asynchronous_machine_rotating_machin_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_asynchronous_machine_rotating_machin_etc_2(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_battery_unit_equipment_in_service_re_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_battery_unit_battery_unit_stored_e_r_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_battery_unit_battery_unit_battery_st_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_battery_unit_battery_unit_battery_st_etc_2(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_breaker_equipment_in_service_required(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_breaker_switch_open_required(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_breaker_switch_locked_required(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_conform_load_equipment_in_service_re_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_conform_load_energy_consumer_q_required(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_conform_load_energy_consumer_p_required(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_control_area_control_area_p_toleranc_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_control_area_control_area_net_interc_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_cs_converter_cs_converter_target_alp_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_cs_converter_acdc_converter_target_p_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_cs_converter_cs_converter_operating_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_cs_converter_cs_converter_operating_etc_2(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_cs_converter_acdc_converter_target_u_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_cs_converter_cs_converter_target_gam_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_cs_converter_cs_converter_p_pcc_cont_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_cs_converter_equipment_in_service_re_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_cs_converter_cs_converter_target_idc_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_cs_converter_cs_converter_p_pcc_cont_etc_2(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_cs_converter_acdc_converter_p_required(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_cs_converter_acdc_converter_q_required(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_current_limit_current_limit_value_re_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_dc_terminal_acdc_terminal_connected_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_disconnecting_circuit_breaker_equipm_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_disconnecting_circuit_breaker_switch_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_disconnecting_circuit_breaker_switch_etc_2(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_disconnector_equipment_in_service_re_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_disconnector_switch_open_required(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_disconnector_switch_locked_required(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_energy_consumer_equipment_in_service_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_energy_consumer_energy_consumer_q_re_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_energy_consumer_energy_consumer_p_re_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_energy_source_energy_source_voltage_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_energy_source_equipment_in_service_r_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_energy_source_energy_source_active_p_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_energy_source_energy_source_reactive_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_energy_source_energy_source_voltage_etc_2(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_equipment_identified_object_m_rid_re_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_equipment_equipment_in_service_required(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_equivalent_injection_equivalent_inje_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_equivalent_injection_equivalent_inje_etc_2(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_equivalent_injection_equivalent_inje_etc_3(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_equivalent_injection_equipment_in_se_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_equivalent_injection_equivalent_inje_etc_4(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_external_network_injection_external_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_external_network_injection_external_etc_2(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_external_network_injection_equipment_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_external_network_injection_external_etc_3(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_external_network_injection_regulatin_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_fuse_equipment_in_service_required(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_fuse_switch_open_required(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_fuse_switch_locked_required(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_generating_unit_equipment_in_service_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_generating_unit_generating_unit_norm_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_ground_disconnector_equipment_in_ser_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_ground_disconnector_switch_open_requ_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_ground_disconnector_switch_locked_re_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_hydro_generating_unit_equipment_in_s_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_hydro_generating_unit_generating_uni_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_jumper_equipment_in_service_required(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_jumper_switch_open_required(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_jumper_switch_locked_required(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_linear_shunt_compensator_equipment_i_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_linear_shunt_compensator_regulating_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_linear_shunt_compensator_shunt_compe_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_load_break_switch_equipment_in_servi_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_load_break_switch_switch_open_required(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_load_break_switch_switch_locked_requ_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_non_conform_load_equipment_in_servic_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_non_conform_load_energy_consumer_q_r_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_non_conform_load_energy_consumer_p_r_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_nonlinear_shunt_compensator_equipmen_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_nonlinear_shunt_compensator_regulati_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_nonlinear_shunt_compensator_shunt_co_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_nuclear_generating_unit_equipment_in_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_nuclear_generating_unit_generating_u_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_phase_tap_changer_asymmetrical_tap_c_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_phase_tap_changer_asymmetrical_tap_c_etc_2(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_phase_tap_changer_linear_tap_changer_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_phase_tap_changer_linear_tap_changer_etc_2(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_phase_tap_changer_symmetrical_tap_ch_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_phase_tap_changer_symmetrical_tap_ch_etc_2(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_phase_tap_changer_tabular_tap_change_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_phase_tap_changer_tabular_tap_change_etc_2(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_power_electronics_connection_power_e_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_power_electronics_connection_power_e_etc_2(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_power_electronics_connection_equipme_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_power_electronics_connection_regulat_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_ratio_tap_changer_tap_changer_step_r_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_ratio_tap_changer_tap_changer_contro_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_regulating_control_regulating_contro_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_regulating_control_regulating_contro_etc_2(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_regulating_control_regulating_contro_etc_3(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_regulating_control_regulating_contro_etc_4(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_regulating_control_regulating_contro_etc_5(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_regulating_control_regulating_contro_etc_6(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_regulating_control_regulating_contro_etc_7(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_regulating_control_regulating_contro_etc_8(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_solar_generating_unit_equipment_in_s_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_solar_generating_unit_generating_uni_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_static_var_compensator_equipment_in_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_static_var_compensator_regulating_co_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_static_var_compensator_static_var_co_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_station_supply_equipment_in_service_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_station_supply_energy_consumer_q_req_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_station_supply_energy_consumer_p_req_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_switch_equipment_in_service_required(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_switch_switch_open_required(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_switch_switch_locked_required(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_synchronous_machine_rotating_machine_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_synchronous_machine_equipment_in_ser_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_synchronous_machine_synchronous_mach_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_synchronous_machine_regulating_cond_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_synchronous_machine_synchronous_mach_etc_2(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_synchronous_machine_synchronous_mach_etc_3(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_synchronous_machine_rotating_machine_etc_2(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_tap_changer_control_regulating_contr_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_tap_changer_control_regulating_contr_etc_2(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_tap_changer_control_regulating_contr_etc_3(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_tap_changer_control_regulating_contr_etc_4(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_tap_changer_control_regulating_contr_etc_5(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_tap_changer_control_regulating_contr_etc_6(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_tap_changer_control_regulating_contr_etc_7(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_tap_changer_control_regulating_contr_etc_8(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_terminal_acdc_terminal_connected_req_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_thermal_generating_unit_equipment_in_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_thermal_generating_unit_generating_u_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_voltage_limit_voltage_limit_value_re_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_vs_converter_vs_converter_target_pw_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_vs_converter_vs_converter_p_pcc_cont_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_vs_converter_vs_converter_q_pcc_cont_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_vs_converter_vs_converter_p_pcc_cont_etc_2(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_vs_converter_vs_converter_droop_max_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_vs_converter_vs_converter_q_pcc_cont_etc_2(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_vs_converter_acdc_converter_p_required(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_vs_converter_vs_converter_target_pow_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_vs_converter_acdc_converter_q_required(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_vs_converter_vs_converter_target_upc_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_vs_converter_vs_converter_target_pha_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_vs_converter_acdc_converter_target_p_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_vs_converter_vs_converter_q_share_ma_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_vs_converter_acdc_converter_target_u_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_vs_converter_equipment_in_service_re_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_vs_converter_vs_converter_droop_comp_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_vs_converter_vs_converter_target_qpc_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_wind_generating_unit_equipment_in_se_etc(dataset));
v.extend(check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_wind_generating_unit_generating_unit_etc(dataset));
v
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_acdc_converter_dc_terminal_acdc_term_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ACDCConverterDCTerminal").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ACDCConverterDCTerminal>() {
Some(o) => o, None => continue,
};
if obj.base.base.connected.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:ACDCTerminal.connected-cardinality".to_string(),
class: "ACDCConverterDCTerminal".to_string(),
property: "ACDCTerminal.connected".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCTerminal.connected-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_active_power_limit_active_power_limi_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ActivePowerLimit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ActivePowerLimit>() {
Some(o) => o, None => continue,
};
if obj.value.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:ActivePowerLimit.value-cardinality".to_string(),
class: "ActivePowerLimit".to_string(),
property: "ActivePowerLimit.value".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "ActivePowerLimit.value-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_apparent_power_limit_apparent_power_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ApparentPowerLimit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ApparentPowerLimit>() {
Some(o) => o, None => continue,
};
if obj.value.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:ApparentPowerLimit.value-cardinality".to_string(),
class: "ApparentPowerLimit".to_string(),
property: "ApparentPowerLimit.value".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "ApparentPowerLimit.value-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_asynchronous_machine_equipment_in_se_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("AsynchronousMachine").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::AsynchronousMachine>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.in_service.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Equipment.inService-cardinality".to_string(),
class: "AsynchronousMachine".to_string(),
property: "Equipment.inService".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.inService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_asynchronous_machine_regulating_cond_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("AsynchronousMachine").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::AsynchronousMachine>() {
Some(o) => o, None => continue,
};
if obj.base.base.control_enabled.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:RegulatingCondEq.controlEnabled-cardinality".to_string(),
class: "AsynchronousMachine".to_string(),
property: "RegulatingCondEq.controlEnabled".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingCondEq.controlEnabled-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_asynchronous_machine_asynchronous_ma_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["AsynchronousMachineKind.generator", "AsynchronousMachineKind.motor"];
for mrid in dataset.by_type.get("AsynchronousMachine").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::AsynchronousMachine>() {
Some(o) => o, None => continue,
};
if obj.asynchronous_machine_type.is_none() { continue; }
if !ALLOWED.contains(&obj.asynchronous_machine_type.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:AsynchronousMachine.asynchronousMachineType-datatype".to_string(),
class: "AsynchronousMachine".to_string(),
property: "AsynchronousMachine.asynchronousMachineType".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "AsynchronousMachine.asynchronousMachineType-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_asynchronous_machine_asynchronous_ma_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("AsynchronousMachine").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::AsynchronousMachine>() {
Some(o) => o, None => continue,
};
if obj.asynchronous_machine_type.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:AsynchronousMachine.asynchronousMachineType-cardinality".to_string(),
class: "AsynchronousMachine".to_string(),
property: "AsynchronousMachine.asynchronousMachineType".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "AsynchronousMachine.asynchronousMachineType-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_asynchronous_machine_rotating_machin_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("AsynchronousMachine").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::AsynchronousMachine>() {
Some(o) => o, None => continue,
};
if obj.base.p.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:RotatingMachine.p-cardinality".to_string(),
class: "AsynchronousMachine".to_string(),
property: "RotatingMachine.p".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "RotatingMachine.p-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_asynchronous_machine_rotating_machin_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("AsynchronousMachine").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::AsynchronousMachine>() {
Some(o) => o, None => continue,
};
if obj.base.q.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:RotatingMachine.q-cardinality".to_string(),
class: "AsynchronousMachine".to_string(),
property: "RotatingMachine.q".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "RotatingMachine.q-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_battery_unit_equipment_in_service_re_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BatteryUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::BatteryUnit>() {
Some(o) => o, None => continue,
};
if obj.base.base.in_service.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Equipment.inService-cardinality".to_string(),
class: "BatteryUnit".to_string(),
property: "Equipment.inService".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.inService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_battery_unit_battery_unit_stored_e_r_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BatteryUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::BatteryUnit>() {
Some(o) => o, None => continue,
};
if obj.stored_e.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:BatteryUnit.storedE-cardinality".to_string(),
class: "BatteryUnit".to_string(),
property: "BatteryUnit.storedE".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "BatteryUnit.storedE-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_battery_unit_battery_unit_battery_st_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["BatteryStateKind.charging", "BatteryStateKind.discharging", "BatteryStateKind.empty", "BatteryStateKind.waiting", "BatteryStateKind.full"];
for mrid in dataset.by_type.get("BatteryUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::BatteryUnit>() {
Some(o) => o, None => continue,
};
if obj.battery_state.is_none() { continue; }
if !ALLOWED.contains(&obj.battery_state.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:BatteryUnit.batteryState-datatype".to_string(),
class: "BatteryUnit".to_string(),
property: "BatteryUnit.batteryState".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "BatteryUnit.batteryState-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_battery_unit_battery_unit_battery_st_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("BatteryUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::BatteryUnit>() {
Some(o) => o, None => continue,
};
if obj.battery_state.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:BatteryUnit.batteryState-cardinality".to_string(),
class: "BatteryUnit".to_string(),
property: "BatteryUnit.batteryState".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "BatteryUnit.batteryState-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_breaker_equipment_in_service_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Breaker").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Breaker>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.in_service.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Equipment.inService-cardinality".to_string(),
class: "Breaker".to_string(),
property: "Equipment.inService".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.inService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_breaker_switch_open_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Breaker").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Breaker>() {
Some(o) => o, None => continue,
};
if obj.base.base.open.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Switch.open-cardinality".to_string(),
class: "Breaker".to_string(),
property: "Switch.open".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Switch.open-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_breaker_switch_locked_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Breaker").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Breaker>() {
Some(o) => o, None => continue,
};
if obj.base.base.locked.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Switch.locked-cardinality".to_string(),
class: "Breaker".to_string(),
property: "Switch.locked".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Switch.locked-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_conform_load_equipment_in_service_re_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoad").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ConformLoad>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.in_service.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Equipment.inService-cardinality".to_string(),
class: "ConformLoad".to_string(),
property: "Equipment.inService".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.inService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_conform_load_energy_consumer_q_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoad").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ConformLoad>() {
Some(o) => o, None => continue,
};
if obj.base.q.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:EnergyConsumer.q-cardinality".to_string(),
class: "ConformLoad".to_string(),
property: "EnergyConsumer.q".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "EnergyConsumer.q-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_conform_load_energy_consumer_p_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ConformLoad").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ConformLoad>() {
Some(o) => o, None => continue,
};
if obj.base.p.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:EnergyConsumer.p-cardinality".to_string(),
class: "ConformLoad".to_string(),
property: "EnergyConsumer.p".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "EnergyConsumer.p-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_control_area_control_area_p_toleranc_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ControlArea").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ControlArea.pTolerance") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:ControlArea.pTolerance-cardinality".to_string(),
class: "ControlArea".to_string(),
property: "ControlArea.pTolerance".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ControlArea.pTolerance-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_control_area_control_area_net_interc_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ControlArea").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ControlArea>() {
Some(o) => o, None => continue,
};
if obj.net_interchange.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:ControlArea.netInterchange-cardinality".to_string(),
class: "ControlArea".to_string(),
property: "ControlArea.netInterchange".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "ControlArea.netInterchange-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_cs_converter_cs_converter_target_alp_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("CsConverter.targetAlpha") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:CsConverter.targetAlpha-cardinality".to_string(),
class: "CsConverter".to_string(),
property: "CsConverter.targetAlpha".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "CsConverter.targetAlpha-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_cs_converter_acdc_converter_target_p_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ACDCConverter.targetPpcc") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:ACDCConverter.targetPpcc-cardinality".to_string(),
class: "CsConverter".to_string(),
property: "ACDCConverter.targetPpcc".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCConverter.targetPpcc-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_cs_converter_cs_converter_operating_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["CsOperatingModeKind.rectifier", "CsOperatingModeKind.inverter"];
for mrid in dataset.by_type.get("CsConverter").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::CsConverter>() {
Some(o) => o, None => continue,
};
if obj.operating_mode.is_none() { continue; }
if !ALLOWED.contains(&obj.operating_mode.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:CsConverter.operatingMode-datatype".to_string(),
class: "CsConverter".to_string(),
property: "CsConverter.operatingMode".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "CsConverter.operatingMode-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_cs_converter_cs_converter_operating_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CsConverter").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::CsConverter>() {
Some(o) => o, None => continue,
};
if obj.operating_mode.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:CsConverter.operatingMode-cardinality".to_string(),
class: "CsConverter".to_string(),
property: "CsConverter.operatingMode".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "CsConverter.operatingMode-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_cs_converter_acdc_converter_target_u_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ACDCConverter.targetUdc") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:ACDCConverter.targetUdc-cardinality".to_string(),
class: "CsConverter".to_string(),
property: "ACDCConverter.targetUdc".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCConverter.targetUdc-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_cs_converter_cs_converter_target_gam_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("CsConverter.targetGamma") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:CsConverter.targetGamma-cardinality".to_string(),
class: "CsConverter".to_string(),
property: "CsConverter.targetGamma".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "CsConverter.targetGamma-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_cs_converter_cs_converter_p_pcc_cont_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["CsPpccControlKind.activePower", "CsPpccControlKind.dcVoltage", "CsPpccControlKind.dcCurrent"];
for mrid in dataset.by_type.get("CsConverter").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::CsConverter>() {
Some(o) => o, None => continue,
};
if obj.p_pcc_control.is_none() { continue; }
if !ALLOWED.contains(&obj.p_pcc_control.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:CsConverter.pPccControl-datatype".to_string(),
class: "CsConverter".to_string(),
property: "CsConverter.pPccControl".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "CsConverter.pPccControl-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_cs_converter_equipment_in_service_re_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CsConverter").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::CsConverter>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.in_service.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Equipment.inService-cardinality".to_string(),
class: "CsConverter".to_string(),
property: "Equipment.inService".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.inService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_cs_converter_cs_converter_target_idc_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("CsConverter.targetIdc") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:CsConverter.targetIdc-cardinality".to_string(),
class: "CsConverter".to_string(),
property: "CsConverter.targetIdc".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "CsConverter.targetIdc-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_cs_converter_cs_converter_p_pcc_cont_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CsConverter").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::CsConverter>() {
Some(o) => o, None => continue,
};
if obj.p_pcc_control.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:CsConverter.pPccControl-cardinality".to_string(),
class: "CsConverter".to_string(),
property: "CsConverter.pPccControl".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "CsConverter.pPccControl-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_cs_converter_acdc_converter_p_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CsConverter").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::CsConverter>() {
Some(o) => o, None => continue,
};
if obj.base.p.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:ACDCConverter.p-cardinality".to_string(),
class: "CsConverter".to_string(),
property: "ACDCConverter.p".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCConverter.p-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_cs_converter_acdc_converter_q_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CsConverter").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::CsConverter>() {
Some(o) => o, None => continue,
};
if obj.base.q.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:ACDCConverter.q-cardinality".to_string(),
class: "CsConverter".to_string(),
property: "ACDCConverter.q".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCConverter.q-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_current_limit_current_limit_value_re_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("CurrentLimit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::CurrentLimit>() {
Some(o) => o, None => continue,
};
if obj.value.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:CurrentLimit.value-cardinality".to_string(),
class: "CurrentLimit".to_string(),
property: "CurrentLimit.value".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "CurrentLimit.value-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_dc_terminal_acdc_terminal_connected_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DCTerminal").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DCTerminal>() {
Some(o) => o, None => continue,
};
if obj.base.base.connected.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:ACDCTerminal.connected-cardinality".to_string(),
class: "DCTerminal".to_string(),
property: "ACDCTerminal.connected".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCTerminal.connected-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_disconnecting_circuit_breaker_equipm_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DisconnectingCircuitBreaker").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DisconnectingCircuitBreaker>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.in_service.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Equipment.inService-cardinality".to_string(),
class: "DisconnectingCircuitBreaker".to_string(),
property: "Equipment.inService".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.inService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_disconnecting_circuit_breaker_switch_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DisconnectingCircuitBreaker").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DisconnectingCircuitBreaker>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.open.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Switch.open-cardinality".to_string(),
class: "DisconnectingCircuitBreaker".to_string(),
property: "Switch.open".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Switch.open-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_disconnecting_circuit_breaker_switch_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("DisconnectingCircuitBreaker").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::DisconnectingCircuitBreaker>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.locked.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Switch.locked-cardinality".to_string(),
class: "DisconnectingCircuitBreaker".to_string(),
property: "Switch.locked".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Switch.locked-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_disconnector_equipment_in_service_re_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Disconnector").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Disconnector>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.in_service.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Equipment.inService-cardinality".to_string(),
class: "Disconnector".to_string(),
property: "Equipment.inService".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.inService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_disconnector_switch_open_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Disconnector").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Disconnector>() {
Some(o) => o, None => continue,
};
if obj.base.open.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Switch.open-cardinality".to_string(),
class: "Disconnector".to_string(),
property: "Switch.open".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Switch.open-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_disconnector_switch_locked_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Disconnector").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Disconnector>() {
Some(o) => o, None => continue,
};
if obj.base.locked.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Switch.locked-cardinality".to_string(),
class: "Disconnector".to_string(),
property: "Switch.locked".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Switch.locked-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_energy_consumer_equipment_in_service_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergyConsumer").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EnergyConsumer>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.in_service.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Equipment.inService-cardinality".to_string(),
class: "EnergyConsumer".to_string(),
property: "Equipment.inService".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.inService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_energy_consumer_energy_consumer_q_re_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergyConsumer").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EnergyConsumer>() {
Some(o) => o, None => continue,
};
if obj.q.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:EnergyConsumer.q-cardinality".to_string(),
class: "EnergyConsumer".to_string(),
property: "EnergyConsumer.q".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "EnergyConsumer.q-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_energy_consumer_energy_consumer_p_re_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergyConsumer").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EnergyConsumer>() {
Some(o) => o, None => continue,
};
if obj.p.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:EnergyConsumer.p-cardinality".to_string(),
class: "EnergyConsumer".to_string(),
property: "EnergyConsumer.p".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "EnergyConsumer.p-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_energy_source_energy_source_voltage_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergySource").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("EnergySource.voltageMagnitude") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:EnergySource.voltageMagnitude-cardinality".to_string(),
class: "EnergySource".to_string(),
property: "EnergySource.voltageMagnitude".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "EnergySource.voltageMagnitude-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_energy_source_equipment_in_service_r_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergySource").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EnergySource>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.in_service.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Equipment.inService-cardinality".to_string(),
class: "EnergySource".to_string(),
property: "Equipment.inService".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.inService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_energy_source_energy_source_active_p_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergySource").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EnergySource>() {
Some(o) => o, None => continue,
};
if obj.active_power.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:EnergySource.activePower-cardinality".to_string(),
class: "EnergySource".to_string(),
property: "EnergySource.activePower".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "EnergySource.activePower-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_energy_source_energy_source_reactive_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergySource").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EnergySource>() {
Some(o) => o, None => continue,
};
if obj.reactive_power.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:EnergySource.reactivePower-cardinality".to_string(),
class: "EnergySource".to_string(),
property: "EnergySource.reactivePower".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "EnergySource.reactivePower-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_energy_source_energy_source_voltage_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EnergySource").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("EnergySource.voltageAngle") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:EnergySource.voltageAngle-cardinality".to_string(),
class: "EnergySource".to_string(),
property: "EnergySource.voltageAngle".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "EnergySource.voltageAngle-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_equipment_identified_object_m_rid_re_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Equipment").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Equipment>() {
Some(o) => o, None => continue,
};
if obj.base.base.m_rid.is_empty() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ido:IdentifiedObject.mRID-cardinality".to_string(),
class: "Equipment".to_string(),
property: "IdentifiedObject.mRID".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "IdentifiedObject.mRID-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_equipment_equipment_in_service_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Equipment").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Equipment>() {
Some(o) => o, None => continue,
};
if obj.in_service.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Equipment.inService-cardinality".to_string(),
class: "Equipment".to_string(),
property: "Equipment.inService".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.inService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_equivalent_injection_equivalent_inje_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentInjection").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EquivalentInjection>() {
Some(o) => o, None => continue,
};
if obj.p.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:EquivalentInjection.p-cardinality".to_string(),
class: "EquivalentInjection".to_string(),
property: "EquivalentInjection.p".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "EquivalentInjection.p-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_equivalent_injection_equivalent_inje_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentInjection").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("EquivalentInjection.regulationTarget") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:EquivalentInjection.regulationTarget-cardinality".to_string(),
class: "EquivalentInjection".to_string(),
property: "EquivalentInjection.regulationTarget".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "EquivalentInjection.regulationTarget-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_equivalent_injection_equivalent_inje_etc_3(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentInjection").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("EquivalentInjection.regulationStatus") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:EquivalentInjection.regulationStatus-cardinality".to_string(),
class: "EquivalentInjection".to_string(),
property: "EquivalentInjection.regulationStatus".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "EquivalentInjection.regulationStatus-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_equivalent_injection_equipment_in_se_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentInjection").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EquivalentInjection>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.in_service.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Equipment.inService-cardinality".to_string(),
class: "EquivalentInjection".to_string(),
property: "Equipment.inService".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.inService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_equivalent_injection_equivalent_inje_etc_4(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("EquivalentInjection").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::EquivalentInjection>() {
Some(o) => o, None => continue,
};
if obj.q.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:EquivalentInjection.q-cardinality".to_string(),
class: "EquivalentInjection".to_string(),
property: "EquivalentInjection.q".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "EquivalentInjection.q-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_external_network_injection_external_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ExternalNetworkInjection").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ExternalNetworkInjection>() {
Some(o) => o, None => continue,
};
if obj.q.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:ExternalNetworkInjection.q-cardinality".to_string(),
class: "ExternalNetworkInjection".to_string(),
property: "ExternalNetworkInjection.q".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "ExternalNetworkInjection.q-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_external_network_injection_external_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ExternalNetworkInjection").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ExternalNetworkInjection>() {
Some(o) => o, None => continue,
};
if obj.p.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:ExternalNetworkInjection.p-cardinality".to_string(),
class: "ExternalNetworkInjection".to_string(),
property: "ExternalNetworkInjection.p".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "ExternalNetworkInjection.p-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_external_network_injection_equipment_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ExternalNetworkInjection").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ExternalNetworkInjection>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.in_service.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Equipment.inService-cardinality".to_string(),
class: "ExternalNetworkInjection".to_string(),
property: "Equipment.inService".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.inService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_external_network_injection_external_etc_3(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ExternalNetworkInjection").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ExternalNetworkInjection>() {
Some(o) => o, None => continue,
};
if obj.reference_priority.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:ExternalNetworkInjection.referencePriority-cardinality".to_string(),
class: "ExternalNetworkInjection".to_string(),
property: "ExternalNetworkInjection.referencePriority".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "ExternalNetworkInjection.referencePriority-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_external_network_injection_regulatin_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ExternalNetworkInjection").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ExternalNetworkInjection>() {
Some(o) => o, None => continue,
};
if obj.base.control_enabled.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:RegulatingCondEq.controlEnabled-cardinality".to_string(),
class: "ExternalNetworkInjection".to_string(),
property: "RegulatingCondEq.controlEnabled".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingCondEq.controlEnabled-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_fuse_equipment_in_service_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Fuse").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Fuse>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.in_service.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Equipment.inService-cardinality".to_string(),
class: "Fuse".to_string(),
property: "Equipment.inService".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.inService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_fuse_switch_open_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Fuse").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Fuse>() {
Some(o) => o, None => continue,
};
if obj.base.open.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Switch.open-cardinality".to_string(),
class: "Fuse".to_string(),
property: "Switch.open".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Switch.open-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_fuse_switch_locked_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Fuse").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Fuse>() {
Some(o) => o, None => continue,
};
if obj.base.locked.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Switch.locked-cardinality".to_string(),
class: "Fuse".to_string(),
property: "Switch.locked".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Switch.locked-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_generating_unit_equipment_in_service_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::GeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.base.in_service.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Equipment.inService-cardinality".to_string(),
class: "GeneratingUnit".to_string(),
property: "Equipment.inService".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.inService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_generating_unit_generating_unit_norm_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::GeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.normal_pf.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:GeneratingUnit.normalPF-cardinality".to_string(),
class: "GeneratingUnit".to_string(),
property: "GeneratingUnit.normalPF".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.normalPF-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_ground_disconnector_equipment_in_ser_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GroundDisconnector").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::GroundDisconnector>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.in_service.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Equipment.inService-cardinality".to_string(),
class: "GroundDisconnector".to_string(),
property: "Equipment.inService".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.inService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_ground_disconnector_switch_open_requ_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GroundDisconnector").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::GroundDisconnector>() {
Some(o) => o, None => continue,
};
if obj.base.open.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Switch.open-cardinality".to_string(),
class: "GroundDisconnector".to_string(),
property: "Switch.open".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Switch.open-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_ground_disconnector_switch_locked_re_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("GroundDisconnector").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::GroundDisconnector>() {
Some(o) => o, None => continue,
};
if obj.base.locked.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Switch.locked-cardinality".to_string(),
class: "GroundDisconnector".to_string(),
property: "Switch.locked".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Switch.locked-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_hydro_generating_unit_equipment_in_s_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::HydroGeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.base.base.in_service.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Equipment.inService-cardinality".to_string(),
class: "HydroGeneratingUnit".to_string(),
property: "Equipment.inService".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.inService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_hydro_generating_unit_generating_uni_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("HydroGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::HydroGeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.base.normal_pf.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:GeneratingUnit.normalPF-cardinality".to_string(),
class: "HydroGeneratingUnit".to_string(),
property: "GeneratingUnit.normalPF".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.normalPF-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_jumper_equipment_in_service_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Jumper").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Jumper>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.in_service.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Equipment.inService-cardinality".to_string(),
class: "Jumper".to_string(),
property: "Equipment.inService".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.inService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_jumper_switch_open_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Jumper").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Jumper>() {
Some(o) => o, None => continue,
};
if obj.base.open.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Switch.open-cardinality".to_string(),
class: "Jumper".to_string(),
property: "Switch.open".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Switch.open-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_jumper_switch_locked_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Jumper").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Jumper>() {
Some(o) => o, None => continue,
};
if obj.base.locked.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Switch.locked-cardinality".to_string(),
class: "Jumper".to_string(),
property: "Switch.locked".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Switch.locked-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_linear_shunt_compensator_equipment_i_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LinearShuntCompensator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::LinearShuntCompensator>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.in_service.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Equipment.inService-cardinality".to_string(),
class: "LinearShuntCompensator".to_string(),
property: "Equipment.inService".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.inService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_linear_shunt_compensator_regulating_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LinearShuntCompensator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::LinearShuntCompensator>() {
Some(o) => o, None => continue,
};
if obj.base.base.control_enabled.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:RegulatingCondEq.controlEnabled-cardinality".to_string(),
class: "LinearShuntCompensator".to_string(),
property: "RegulatingCondEq.controlEnabled".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingCondEq.controlEnabled-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_linear_shunt_compensator_shunt_compe_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LinearShuntCompensator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::LinearShuntCompensator>() {
Some(o) => o, None => continue,
};
if obj.base.sections.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:ShuntCompensator.sections-cardinality".to_string(),
class: "LinearShuntCompensator".to_string(),
property: "ShuntCompensator.sections".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "ShuntCompensator.sections-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_load_break_switch_equipment_in_servi_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LoadBreakSwitch").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::LoadBreakSwitch>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.in_service.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Equipment.inService-cardinality".to_string(),
class: "LoadBreakSwitch".to_string(),
property: "Equipment.inService".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.inService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_load_break_switch_switch_open_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LoadBreakSwitch").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::LoadBreakSwitch>() {
Some(o) => o, None => continue,
};
if obj.base.base.open.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Switch.open-cardinality".to_string(),
class: "LoadBreakSwitch".to_string(),
property: "Switch.open".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Switch.open-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_load_break_switch_switch_locked_requ_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("LoadBreakSwitch").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::LoadBreakSwitch>() {
Some(o) => o, None => continue,
};
if obj.base.base.locked.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Switch.locked-cardinality".to_string(),
class: "LoadBreakSwitch".to_string(),
property: "Switch.locked".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Switch.locked-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_non_conform_load_equipment_in_servic_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoad").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonConformLoad>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.in_service.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Equipment.inService-cardinality".to_string(),
class: "NonConformLoad".to_string(),
property: "Equipment.inService".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.inService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_non_conform_load_energy_consumer_q_r_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoad").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonConformLoad>() {
Some(o) => o, None => continue,
};
if obj.base.q.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:EnergyConsumer.q-cardinality".to_string(),
class: "NonConformLoad".to_string(),
property: "EnergyConsumer.q".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "EnergyConsumer.q-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_non_conform_load_energy_consumer_p_r_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonConformLoad").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonConformLoad>() {
Some(o) => o, None => continue,
};
if obj.base.p.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:EnergyConsumer.p-cardinality".to_string(),
class: "NonConformLoad".to_string(),
property: "EnergyConsumer.p".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "EnergyConsumer.p-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_nonlinear_shunt_compensator_equipmen_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonlinearShuntCompensator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonlinearShuntCompensator>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.in_service.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Equipment.inService-cardinality".to_string(),
class: "NonlinearShuntCompensator".to_string(),
property: "Equipment.inService".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.inService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_nonlinear_shunt_compensator_regulati_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonlinearShuntCompensator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonlinearShuntCompensator>() {
Some(o) => o, None => continue,
};
if obj.base.base.control_enabled.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:RegulatingCondEq.controlEnabled-cardinality".to_string(),
class: "NonlinearShuntCompensator".to_string(),
property: "RegulatingCondEq.controlEnabled".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingCondEq.controlEnabled-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_nonlinear_shunt_compensator_shunt_co_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NonlinearShuntCompensator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NonlinearShuntCompensator>() {
Some(o) => o, None => continue,
};
if obj.base.sections.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:ShuntCompensator.sections-cardinality".to_string(),
class: "NonlinearShuntCompensator".to_string(),
property: "ShuntCompensator.sections".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "ShuntCompensator.sections-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_nuclear_generating_unit_equipment_in_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NuclearGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NuclearGeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.base.base.in_service.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Equipment.inService-cardinality".to_string(),
class: "NuclearGeneratingUnit".to_string(),
property: "Equipment.inService".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.inService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_nuclear_generating_unit_generating_u_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("NuclearGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::NuclearGeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.base.normal_pf.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:GeneratingUnit.normalPF-cardinality".to_string(),
class: "NuclearGeneratingUnit".to_string(),
property: "GeneratingUnit.normalPF".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.normalPF-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_phase_tap_changer_asymmetrical_tap_c_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerAsymmetrical").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerAsymmetrical>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.step.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:TapChanger.step-cardinality".to_string(),
class: "PhaseTapChangerAsymmetrical".to_string(),
property: "TapChanger.step".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.step-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_phase_tap_changer_asymmetrical_tap_c_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerAsymmetrical").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerAsymmetrical>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.control_enabled.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:TapChanger.controlEnabled-cardinality".to_string(),
class: "PhaseTapChangerAsymmetrical".to_string(),
property: "TapChanger.controlEnabled".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.controlEnabled-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_phase_tap_changer_linear_tap_changer_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerLinear").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerLinear>() {
Some(o) => o, None => continue,
};
if obj.base.base.step.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:TapChanger.step-cardinality".to_string(),
class: "PhaseTapChangerLinear".to_string(),
property: "TapChanger.step".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.step-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_phase_tap_changer_linear_tap_changer_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerLinear").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerLinear>() {
Some(o) => o, None => continue,
};
if obj.base.base.control_enabled.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:TapChanger.controlEnabled-cardinality".to_string(),
class: "PhaseTapChangerLinear".to_string(),
property: "TapChanger.controlEnabled".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.controlEnabled-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_phase_tap_changer_symmetrical_tap_ch_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerSymmetrical").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerSymmetrical>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.step.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:TapChanger.step-cardinality".to_string(),
class: "PhaseTapChangerSymmetrical".to_string(),
property: "TapChanger.step".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.step-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_phase_tap_changer_symmetrical_tap_ch_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerSymmetrical").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerSymmetrical>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.control_enabled.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:TapChanger.controlEnabled-cardinality".to_string(),
class: "PhaseTapChangerSymmetrical".to_string(),
property: "TapChanger.controlEnabled".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.controlEnabled-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_phase_tap_changer_tabular_tap_change_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerTabular").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerTabular>() {
Some(o) => o, None => continue,
};
if obj.base.base.step.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:TapChanger.step-cardinality".to_string(),
class: "PhaseTapChangerTabular".to_string(),
property: "TapChanger.step".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.step-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_phase_tap_changer_tabular_tap_change_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PhaseTapChangerTabular").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PhaseTapChangerTabular>() {
Some(o) => o, None => continue,
};
if obj.base.base.control_enabled.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:TapChanger.controlEnabled-cardinality".to_string(),
class: "PhaseTapChangerTabular".to_string(),
property: "TapChanger.controlEnabled".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.controlEnabled-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_power_electronics_connection_power_e_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerElectronicsConnection").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PowerElectronicsConnection>() {
Some(o) => o, None => continue,
};
if obj.p.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:PowerElectronicsConnection.p-cardinality".to_string(),
class: "PowerElectronicsConnection".to_string(),
property: "PowerElectronicsConnection.p".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "PowerElectronicsConnection.p-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_power_electronics_connection_power_e_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerElectronicsConnection").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PowerElectronicsConnection>() {
Some(o) => o, None => continue,
};
if obj.q.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:PowerElectronicsConnection.q-cardinality".to_string(),
class: "PowerElectronicsConnection".to_string(),
property: "PowerElectronicsConnection.q".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "PowerElectronicsConnection.q-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_power_electronics_connection_equipme_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerElectronicsConnection").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PowerElectronicsConnection>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.in_service.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Equipment.inService-cardinality".to_string(),
class: "PowerElectronicsConnection".to_string(),
property: "Equipment.inService".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.inService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_power_electronics_connection_regulat_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("PowerElectronicsConnection").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::PowerElectronicsConnection>() {
Some(o) => o, None => continue,
};
if obj.base.control_enabled.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:RegulatingCondEq.controlEnabled-cardinality".to_string(),
class: "PowerElectronicsConnection".to_string(),
property: "RegulatingCondEq.controlEnabled".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingCondEq.controlEnabled-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_ratio_tap_changer_tap_changer_step_r_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RatioTapChanger").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RatioTapChanger>() {
Some(o) => o, None => continue,
};
if obj.base.step.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:TapChanger.step-cardinality".to_string(),
class: "RatioTapChanger".to_string(),
property: "TapChanger.step".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.step-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_ratio_tap_changer_tap_changer_contro_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RatioTapChanger").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RatioTapChanger>() {
Some(o) => o, None => continue,
};
if obj.base.control_enabled.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:TapChanger.controlEnabled-cardinality".to_string(),
class: "RatioTapChanger".to_string(),
property: "TapChanger.controlEnabled".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "TapChanger.controlEnabled-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_regulating_control_regulating_contro_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RegulatingControl").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RegulatingControl>() {
Some(o) => o, None => continue,
};
if obj.target_value.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:RegulatingControl.targetValue-cardinality".to_string(),
class: "RegulatingControl".to_string(),
property: "RegulatingControl.targetValue".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingControl.targetValue-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_regulating_control_regulating_contro_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RegulatingControl").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RegulatingControl>() {
Some(o) => o, None => continue,
};
if obj.target_value_unit_multiplier.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:RegulatingControl.targetValueUnitMultiplier-cardinality".to_string(),
class: "RegulatingControl".to_string(),
property: "RegulatingControl.targetValueUnitMultiplier".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingControl.targetValueUnitMultiplier-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_regulating_control_regulating_contro_etc_3(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RegulatingControl").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RegulatingControl>() {
Some(o) => o, None => continue,
};
if obj.enabled.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:RegulatingControl.enabled-cardinality".to_string(),
class: "RegulatingControl".to_string(),
property: "RegulatingControl.enabled".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingControl.enabled-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_regulating_control_regulating_contro_etc_4(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RegulatingControl").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("RegulatingControl.targetDeadband") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:RegulatingControl.targetDeadband-cardinality".to_string(),
class: "RegulatingControl".to_string(),
property: "RegulatingControl.targetDeadband".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingControl.targetDeadband-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_regulating_control_regulating_contro_etc_5(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["UnitMultiplier.k", "UnitMultiplier.da", "UnitMultiplier.Z", "UnitMultiplier.y", "UnitMultiplier.micro", "UnitMultiplier.Y", "UnitMultiplier.z", "UnitMultiplier.G", "UnitMultiplier.h", "UnitMultiplier.T", "UnitMultiplier.E", "UnitMultiplier.f", "UnitMultiplier.c", "UnitMultiplier.none", "UnitMultiplier.d", "UnitMultiplier.a", "UnitMultiplier.P", "UnitMultiplier.p", "UnitMultiplier.m", "UnitMultiplier.M", "UnitMultiplier.n"];
for mrid in dataset.by_type.get("RegulatingControl").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RegulatingControl>() {
Some(o) => o, None => continue,
};
if obj.target_value_unit_multiplier.is_none() { continue; }
if !ALLOWED.contains(&obj.target_value_unit_multiplier.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:RegulatingControl.targetValueUnitMultiplier-datatype".to_string(),
class: "RegulatingControl".to_string(),
property: "RegulatingControl.targetValueUnitMultiplier".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingControl.targetValueUnitMultiplier-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_regulating_control_regulating_contro_etc_6(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RegulatingControl").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::RegulatingControl>() {
Some(o) => o, None => continue,
};
if obj.discrete.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:RegulatingControl.discrete-cardinality".to_string(),
class: "RegulatingControl".to_string(),
property: "RegulatingControl.discrete".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingControl.discrete-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_regulating_control_regulating_contro_etc_7(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RegulatingControl").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("RegulatingControl.minAllowedTargetValue") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:RegulatingControl.minAllowedTargetValue-cardinality".to_string(),
class: "RegulatingControl".to_string(),
property: "RegulatingControl.minAllowedTargetValue".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingControl.minAllowedTargetValue-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_regulating_control_regulating_contro_etc_8(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("RegulatingControl").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("RegulatingControl.maxAllowedTargetValue") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:RegulatingControl.maxAllowedTargetValue-cardinality".to_string(),
class: "RegulatingControl".to_string(),
property: "RegulatingControl.maxAllowedTargetValue".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingControl.maxAllowedTargetValue-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_solar_generating_unit_equipment_in_s_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SolarGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SolarGeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.base.base.in_service.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Equipment.inService-cardinality".to_string(),
class: "SolarGeneratingUnit".to_string(),
property: "Equipment.inService".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.inService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_solar_generating_unit_generating_uni_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SolarGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SolarGeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.base.normal_pf.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:GeneratingUnit.normalPF-cardinality".to_string(),
class: "SolarGeneratingUnit".to_string(),
property: "GeneratingUnit.normalPF".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.normalPF-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_static_var_compensator_equipment_in_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("StaticVarCompensator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::StaticVarCompensator>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.in_service.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Equipment.inService-cardinality".to_string(),
class: "StaticVarCompensator".to_string(),
property: "Equipment.inService".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.inService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_static_var_compensator_regulating_co_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("StaticVarCompensator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::StaticVarCompensator>() {
Some(o) => o, None => continue,
};
if obj.base.control_enabled.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:RegulatingCondEq.controlEnabled-cardinality".to_string(),
class: "StaticVarCompensator".to_string(),
property: "RegulatingCondEq.controlEnabled".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingCondEq.controlEnabled-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_static_var_compensator_static_var_co_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("StaticVarCompensator").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::StaticVarCompensator>() {
Some(o) => o, None => continue,
};
if obj.q.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:StaticVarCompensator.q-cardinality".to_string(),
class: "StaticVarCompensator".to_string(),
property: "StaticVarCompensator.q".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "StaticVarCompensator.q-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_station_supply_equipment_in_service_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("StationSupply").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::StationSupply>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.in_service.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Equipment.inService-cardinality".to_string(),
class: "StationSupply".to_string(),
property: "Equipment.inService".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.inService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_station_supply_energy_consumer_q_req_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("StationSupply").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::StationSupply>() {
Some(o) => o, None => continue,
};
if obj.base.q.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:EnergyConsumer.q-cardinality".to_string(),
class: "StationSupply".to_string(),
property: "EnergyConsumer.q".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "EnergyConsumer.q-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_station_supply_energy_consumer_p_req_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("StationSupply").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::StationSupply>() {
Some(o) => o, None => continue,
};
if obj.base.p.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:EnergyConsumer.p-cardinality".to_string(),
class: "StationSupply".to_string(),
property: "EnergyConsumer.p".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "EnergyConsumer.p-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_switch_equipment_in_service_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Switch").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Switch>() {
Some(o) => o, None => continue,
};
if obj.base.base.in_service.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Equipment.inService-cardinality".to_string(),
class: "Switch".to_string(),
property: "Equipment.inService".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.inService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_switch_switch_open_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Switch").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Switch>() {
Some(o) => o, None => continue,
};
if obj.open.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Switch.open-cardinality".to_string(),
class: "Switch".to_string(),
property: "Switch.open".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Switch.open-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_switch_switch_locked_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Switch").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Switch>() {
Some(o) => o, None => continue,
};
if obj.locked.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Switch.locked-cardinality".to_string(),
class: "Switch".to_string(),
property: "Switch.locked".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Switch.locked-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_synchronous_machine_rotating_machine_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SynchronousMachine").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SynchronousMachine>() {
Some(o) => o, None => continue,
};
if obj.base.p.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:RotatingMachine.p-cardinality".to_string(),
class: "SynchronousMachine".to_string(),
property: "RotatingMachine.p".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "RotatingMachine.p-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_synchronous_machine_equipment_in_ser_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SynchronousMachine").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SynchronousMachine>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.base.base.in_service.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Equipment.inService-cardinality".to_string(),
class: "SynchronousMachine".to_string(),
property: "Equipment.inService".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.inService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_synchronous_machine_synchronous_mach_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SynchronousMachine").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SynchronousMachine>() {
Some(o) => o, None => continue,
};
if obj.operating_mode.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:SynchronousMachine.operatingMode-cardinality".to_string(),
class: "SynchronousMachine".to_string(),
property: "SynchronousMachine.operatingMode".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "SynchronousMachine.operatingMode-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_synchronous_machine_regulating_cond_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SynchronousMachine").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SynchronousMachine>() {
Some(o) => o, None => continue,
};
if obj.base.base.control_enabled.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:RegulatingCondEq.controlEnabled-cardinality".to_string(),
class: "SynchronousMachine".to_string(),
property: "RegulatingCondEq.controlEnabled".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingCondEq.controlEnabled-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_synchronous_machine_synchronous_mach_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["SynchronousMachineOperatingMode.generator", "SynchronousMachineOperatingMode.motor", "SynchronousMachineOperatingMode.condenser"];
for mrid in dataset.by_type.get("SynchronousMachine").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SynchronousMachine>() {
Some(o) => o, None => continue,
};
if obj.operating_mode.is_none() { continue; }
if !ALLOWED.contains(&obj.operating_mode.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:SynchronousMachine.operatingMode-datatype".to_string(),
class: "SynchronousMachine".to_string(),
property: "SynchronousMachine.operatingMode".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "SynchronousMachine.operatingMode-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_synchronous_machine_synchronous_mach_etc_3(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SynchronousMachine").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SynchronousMachine>() {
Some(o) => o, None => continue,
};
if obj.reference_priority.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:SynchronousMachine.referencePriority-cardinality".to_string(),
class: "SynchronousMachine".to_string(),
property: "SynchronousMachine.referencePriority".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "SynchronousMachine.referencePriority-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_synchronous_machine_rotating_machine_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("SynchronousMachine").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::SynchronousMachine>() {
Some(o) => o, None => continue,
};
if obj.base.q.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:RotatingMachine.q-cardinality".to_string(),
class: "SynchronousMachine".to_string(),
property: "RotatingMachine.q".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "RotatingMachine.q-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_tap_changer_control_regulating_contr_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["UnitMultiplier.k", "UnitMultiplier.da", "UnitMultiplier.Z", "UnitMultiplier.y", "UnitMultiplier.micro", "UnitMultiplier.Y", "UnitMultiplier.z", "UnitMultiplier.G", "UnitMultiplier.h", "UnitMultiplier.T", "UnitMultiplier.E", "UnitMultiplier.f", "UnitMultiplier.c", "UnitMultiplier.none", "UnitMultiplier.d", "UnitMultiplier.a", "UnitMultiplier.P", "UnitMultiplier.p", "UnitMultiplier.m", "UnitMultiplier.M", "UnitMultiplier.n"];
for mrid in dataset.by_type.get("TapChangerControl").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::TapChangerControl>() {
Some(o) => o, None => continue,
};
if obj.base.target_value_unit_multiplier.is_none() { continue; }
if !ALLOWED.contains(&obj.base.target_value_unit_multiplier.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:RegulatingControl.targetValueUnitMultiplier-datatype".to_string(),
class: "TapChangerControl".to_string(),
property: "RegulatingControl.targetValueUnitMultiplier".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingControl.targetValueUnitMultiplier-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_tap_changer_control_regulating_contr_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("TapChangerControl").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("RegulatingControl.maxAllowedTargetValue") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:RegulatingControl.maxAllowedTargetValue-cardinality".to_string(),
class: "TapChangerControl".to_string(),
property: "RegulatingControl.maxAllowedTargetValue".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingControl.maxAllowedTargetValue-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_tap_changer_control_regulating_contr_etc_3(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("TapChangerControl").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::TapChangerControl>() {
Some(o) => o, None => continue,
};
if obj.base.enabled.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:RegulatingControl.enabled-cardinality".to_string(),
class: "TapChangerControl".to_string(),
property: "RegulatingControl.enabled".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingControl.enabled-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_tap_changer_control_regulating_contr_etc_4(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("TapChangerControl").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::TapChangerControl>() {
Some(o) => o, None => continue,
};
if obj.base.discrete.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:RegulatingControl.discrete-cardinality".to_string(),
class: "TapChangerControl".to_string(),
property: "RegulatingControl.discrete".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingControl.discrete-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_tap_changer_control_regulating_contr_etc_5(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("TapChangerControl").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("RegulatingControl.targetDeadband") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:RegulatingControl.targetDeadband-cardinality".to_string(),
class: "TapChangerControl".to_string(),
property: "RegulatingControl.targetDeadband".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingControl.targetDeadband-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_tap_changer_control_regulating_contr_etc_6(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("TapChangerControl").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::TapChangerControl>() {
Some(o) => o, None => continue,
};
if obj.base.target_value_unit_multiplier.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:RegulatingControl.targetValueUnitMultiplier-cardinality".to_string(),
class: "TapChangerControl".to_string(),
property: "RegulatingControl.targetValueUnitMultiplier".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingControl.targetValueUnitMultiplier-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_tap_changer_control_regulating_contr_etc_7(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("TapChangerControl").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("RegulatingControl.minAllowedTargetValue") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:RegulatingControl.minAllowedTargetValue-cardinality".to_string(),
class: "TapChangerControl".to_string(),
property: "RegulatingControl.minAllowedTargetValue".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingControl.minAllowedTargetValue-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_tap_changer_control_regulating_contr_etc_8(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("TapChangerControl").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::TapChangerControl>() {
Some(o) => o, None => continue,
};
if obj.base.target_value.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:RegulatingControl.targetValue-cardinality".to_string(),
class: "TapChangerControl".to_string(),
property: "RegulatingControl.targetValue".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "RegulatingControl.targetValue-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_terminal_acdc_terminal_connected_req_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("Terminal").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::Terminal>() {
Some(o) => o, None => continue,
};
if obj.base.connected.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:ACDCTerminal.connected-cardinality".to_string(),
class: "Terminal".to_string(),
property: "ACDCTerminal.connected".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCTerminal.connected-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_thermal_generating_unit_equipment_in_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ThermalGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ThermalGeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.base.base.in_service.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Equipment.inService-cardinality".to_string(),
class: "ThermalGeneratingUnit".to_string(),
property: "Equipment.inService".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.inService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_thermal_generating_unit_generating_u_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("ThermalGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::ThermalGeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.base.normal_pf.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:GeneratingUnit.normalPF-cardinality".to_string(),
class: "ThermalGeneratingUnit".to_string(),
property: "GeneratingUnit.normalPF".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.normalPF-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_voltage_limit_voltage_limit_value_re_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VoltageLimit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::VoltageLimit>() {
Some(o) => o, None => continue,
};
if obj.value.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:VoltageLimit.value-cardinality".to_string(),
class: "VoltageLimit".to_string(),
property: "VoltageLimit.value".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "VoltageLimit.value-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_vs_converter_vs_converter_target_pw_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("VsConverter.targetPWMfactor") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:VsConverter.targetPWMfactor-cardinality".to_string(),
class: "VsConverter".to_string(),
property: "VsConverter.targetPWMfactor".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "VsConverter.targetPWMfactor-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_vs_converter_vs_converter_p_pcc_cont_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["VsPpccControlKind.pPccAndUdcDroopPilot", "VsPpccControlKind.pPccAndUdcDroopWithCompensation", "VsPpccControlKind.pPcc", "VsPpccControlKind.udc", "VsPpccControlKind.pPccAndUdcDroop", "VsPpccControlKind.phasePcc"];
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::VsConverter>() {
Some(o) => o, None => continue,
};
if obj.p_pcc_control.is_none() { continue; }
if !ALLOWED.contains(&obj.p_pcc_control.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:VsConverter.pPccControl-datatype".to_string(),
class: "VsConverter".to_string(),
property: "VsConverter.pPccControl".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "VsConverter.pPccControl-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_vs_converter_vs_converter_q_pcc_cont_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::VsConverter>() {
Some(o) => o, None => continue,
};
if obj.q_pcc_control.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:VsConverter.qPccControl-cardinality".to_string(),
class: "VsConverter".to_string(),
property: "VsConverter.qPccControl".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "VsConverter.qPccControl-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_vs_converter_vs_converter_p_pcc_cont_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::VsConverter>() {
Some(o) => o, None => continue,
};
if obj.p_pcc_control.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:VsConverter.pPccControl-cardinality".to_string(),
class: "VsConverter".to_string(),
property: "VsConverter.pPccControl".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "VsConverter.pPccControl-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_vs_converter_vs_converter_droop_max_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("VsConverter.droop") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:VsConverter.droop-cardinality".to_string(),
class: "VsConverter".to_string(),
property: "VsConverter.droop".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "VsConverter.droop-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_vs_converter_vs_converter_q_pcc_cont_etc_2(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
const ALLOWED: &[&str] = &["VsQpccControlKind.voltagePcc", "VsQpccControlKind.powerFactorPcc", "VsQpccControlKind.reactivePcc", "VsQpccControlKind.pulseWidthModulation"];
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::VsConverter>() {
Some(o) => o, None => continue,
};
if obj.q_pcc_control.is_none() { continue; }
if !ALLOWED.contains(&obj.q_pcc_control.as_ref().map_or("", |u| u.uri.as_str())) {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:VsConverter.qPccControl-datatype".to_string(),
class: "VsConverter".to_string(),
property: "VsConverter.qPccControl".to_string(),
message: "The datatype is not IRI (Internationalized Resource Identifier) or it is enumerated value not part of the profile.".to_string(),
severity: "sh:Violation".to_string(),
name: "VsConverter.qPccControl-datatype".to_string(),
description: "This constraint validates the datatype of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_vs_converter_acdc_converter_p_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::VsConverter>() {
Some(o) => o, None => continue,
};
if obj.base.p.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:ACDCConverter.p-cardinality".to_string(),
class: "VsConverter".to_string(),
property: "ACDCConverter.p".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCConverter.p-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_vs_converter_vs_converter_target_pow_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("VsConverter.targetPowerFactorPcc") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:VsConverter.targetPowerFactorPcc-cardinality".to_string(),
class: "VsConverter".to_string(),
property: "VsConverter.targetPowerFactorPcc".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "VsConverter.targetPowerFactorPcc-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_vs_converter_acdc_converter_q_required(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::VsConverter>() {
Some(o) => o, None => continue,
};
if obj.base.q.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:ACDCConverter.q-cardinality".to_string(),
class: "VsConverter".to_string(),
property: "ACDCConverter.q".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCConverter.q-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_vs_converter_vs_converter_target_upc_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("VsConverter.targetUpcc") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:VsConverter.targetUpcc-cardinality".to_string(),
class: "VsConverter".to_string(),
property: "VsConverter.targetUpcc".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "VsConverter.targetUpcc-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_vs_converter_vs_converter_target_pha_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("VsConverter.targetPhasePcc") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:VsConverter.targetPhasePcc-cardinality".to_string(),
class: "VsConverter".to_string(),
property: "VsConverter.targetPhasePcc".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "VsConverter.targetPhasePcc-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_vs_converter_acdc_converter_target_p_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ACDCConverter.targetPpcc") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:ACDCConverter.targetPpcc-cardinality".to_string(),
class: "VsConverter".to_string(),
property: "ACDCConverter.targetPpcc".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCConverter.targetPpcc-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_vs_converter_vs_converter_q_share_ma_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("VsConverter.qShare") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:VsConverter.qShare-cardinality".to_string(),
class: "VsConverter".to_string(),
property: "VsConverter.qShare".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "VsConverter.qShare-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_vs_converter_acdc_converter_target_u_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("ACDCConverter.targetUdc") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:ACDCConverter.targetUdc-cardinality".to_string(),
class: "VsConverter".to_string(),
property: "ACDCConverter.targetUdc".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "ACDCConverter.targetUdc-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_vs_converter_equipment_in_service_re_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::VsConverter>() {
Some(o) => o, None => continue,
};
if obj.base.base.base.in_service.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Equipment.inService-cardinality".to_string(),
class: "VsConverter".to_string(),
property: "Equipment.inService".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.inService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_vs_converter_vs_converter_droop_comp_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("VsConverter.droopCompensation") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:VsConverter.droopCompensation-cardinality".to_string(),
class: "VsConverter".to_string(),
property: "VsConverter.droopCompensation".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "VsConverter.droopCompensation-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_vs_converter_vs_converter_target_qpc_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("VsConverter").into_iter().flatten() {
if dataset.entries[mrid].block.duplicate_fields.contains("VsConverter.targetQpcc") {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:VsConverter.targetQpcc-cardinality".to_string(),
class: "VsConverter".to_string(),
property: "VsConverter.targetQpcc".to_string(),
message: "Cardinality violation. Upper bound shall be 1".to_string(),
severity: "sh:Violation".to_string(),
name: "VsConverter.targetQpcc-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_wind_generating_unit_equipment_in_se_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WindGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::WindGeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.base.base.in_service.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:Equipment.inService-cardinality".to_string(),
class: "WindGeneratingUnit".to_string(),
property: "Equipment.inService".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "Equipment.inService-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}
pub fn check_p61970_600_2_steadystatehypothesis_ap_con_simple_shacl_wind_generating_unit_generating_unit_etc(dataset: &CimDataset) -> Vec<Violation> {
let mut violations = Vec::new();
for mrid in dataset.by_type.get("WindGeneratingUnit").into_iter().flatten() {
let entry = &dataset.entries[mrid];
let obj = match entry.element.as_any()
.downcast_ref::<cimstructs::WindGeneratingUnit>() {
Some(o) => o, None => continue,
};
if obj.base.normal_pf.is_none() {
violations.push(Violation {
object_id: mrid.clone(),
rule_id: "ssh:GeneratingUnit.normalPF-cardinality".to_string(),
class: "WindGeneratingUnit".to_string(),
property: "GeneratingUnit.normalPF".to_string(),
message: "Missing required property (attribute).".to_string(),
severity: "sh:Violation".to_string(),
name: "GeneratingUnit.normalPF-cardinality".to_string(),
description: "This constraint validates the cardinality of the property (attribute).".to_string(),
});
}
}
violations
}