Skip to content

Commit

Permalink
Merge pull request #846 from PowerGridModel/feature/only-important-in…
Browse files Browse the repository at this point in the history
…tegration-tests-3

Feature/only important integration tests 3
  • Loading branch information
TonyXiang8787 authored Nov 27, 2024
2 parents e599096 + f6cd249 commit 67b0f30
Show file tree
Hide file tree
Showing 59 changed files with 1,166 additions and 566 deletions.
1 change: 0 additions & 1 deletion tests/cpp_integration_tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

set(PROJECT_SOURCES
"test_entry_point.cpp"
"test_main_model_se.cpp"
"test_main_model.cpp"
"test_math_solver.cpp"
)
Expand Down
382 changes: 0 additions & 382 deletions tests/cpp_integration_tests/test_main_model_se.cpp

This file was deleted.

84 changes: 84 additions & 0 deletions tests/data/state_estimation/line-power-sensor/input.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"version": "1.0",
"type": "input",
"is_batch": false,
"attributes": {},
"data": {
"node": [
{
"id": 1,
"u_rated": 10000.0
},
{
"id": 2,
"u_rated": 10000.0
}
],
"line": [
{
"id": 3,
"from_node": 1,
"to_node": 2,
"from_status": 1,
"to_status": 1,
"r1": 0.01,
"x1": 0.02,
"c1": 0.0,
"tan1": 0.0,
"i_n": 1000.0
}
],
"source": [
{
"id": 4,
"node": 1,
"status": 1,
"u_ref": 1.0
}
],
"shunt": [
{
"id": 6,
"node": 2,
"status": 1,
"g1": 1.8e-5,
"b1": -1.8e-6
}
],
"sym_voltage_sensor": [
{
"id": 11,
"measured_object": 1,
"u_sigma": 100.0,
"u_measured": 10000.0,
"u_angle_measured": 0.0
}
],
"sym_power_sensor": [
{
"id": 16,
"measured_object": 6,
"measured_terminal_type": 3,
"power_sigma": 100.0,
"p_measured": 1800.0,
"q_measured": 180.0
},
{
"id": 17,
"measured_object": 3,
"measured_terminal_type": 0,
"power_sigma": 100.0,
"p_measured": 1800.0,
"q_measured": 180.0
},
{
"id": 18,
"measured_object": 3,
"measured_terminal_type": 1,
"power_sigma": 100.0,
"p_measured": -1800.0,
"q_measured": -180.0
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: Contributors to the Power Grid Model project <[email protected]>

SPDX-License-Identifier: MPL-2.0
8 changes: 8 additions & 0 deletions tests/data/state_estimation/line-power-sensor/params.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"calculation_method": ["iterative_linear", "newton_raphson"],
"rtol": 1e-03,
"atol": {
"default": 1e-05,
".+_residual": 0.1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: Contributors to the Power Grid Model project <[email protected]>

SPDX-License-Identifier: MPL-2.0
41 changes: 41 additions & 0 deletions tests/data/state_estimation/line-power-sensor/sym_output.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"version": "1.0",
"type": "sym_output",
"is_batch": false,
"attributes": {},
"data": {
"line": [
{
"id": 3,
"p_from": 1800.0,
"q_from": 180.0,
"p_to": -1800.0,
"q_to": -180.0
}
],
"shunt": [
{
"id": 6,
"p": 1800.0,
"q": 180.0
}
],
"sym_power_sensor": [
{
"id": 16,
"p_residual": 0.0,
"q_residual": 0.0
},
{
"id": 17,
"p_residual": 0.0,
"q_residual": 0.0
},
{
"id": 18,
"p_residual": 0.0,
"q_residual": 0.0
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: Contributors to the Power Grid Model project <[email protected]>

SPDX-License-Identifier: MPL-2.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"version": "1.0",
"type": "asym_output",
"is_batch": false,
"attributes": {},
"data": {
"node": [
{
"id": 1,
"p": [333.3333333, 333.3333333, 333.3333333],
"q": [33.33333333, 33.33333333, 33.33333333]
},
{
"id": 2,
"p": [-333.3333333, -333.3333333, -333.3333333],
"q": [-33.33333333, -33.33333333, -33.33333333]
}
],
"asym_gen" : [
{
"id": 5,
"p": [283.3333333, 283.3333333, 283.3333333],
"q": [28.33333333, 28.33333333, 28.33333333]
}
],
"asym_load" : [
{
"id": 6,
"p": [616.6666667, 616.6666667, 616.6666667],
"q": [61.66666667, 61.66666667, 61.66666667]
}
],
"sym_power_sensor": [
{
"id": 12,
"p_residual": [-66.6666667, -66.6666667, -66.6666667],
"q_residual": [-6.66666667, -6.66666667, -6.66666667]
},
{
"id": 15,
"p_residual": [16.66666667, 16.66666667, 16.66666667],
"q_residual": [1.666666667, 1.666666667, 1.666666667]
},
{
"id": 16,
"p_residual": [-16.66666667, -16.66666667, -16.66666667],
"q_residual": [-1.666666667, -1.666666667, -1.666666667]
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: Contributors to the Power Grid Model project <[email protected]>

SPDX-License-Identifier: MPL-2.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"version": "1.0",
"type": "input",
"is_batch": false,
"attributes": {},
"data": {
"node": [
{
"id": 1,
"u_rated": 10000.0
},
{
"id": 2,
"u_rated": 10000.0
}
],
"link": [
{
"id": 3,
"from_node": 1,
"to_node": 2,
"from_status": 1,
"to_status": 1
}
],
"source": [
{
"id": 4,
"node": 1,
"status": 1,
"u_ref": 1.0
}
],
"asym_gen": [
{
"id": 5,
"node": 2,
"status": 1,
"type": 0
}
],
"asym_load": [
{
"id": 6,
"node": 2,
"status": 1,
"type": 0
}
],
"sym_voltage_sensor": [
{
"id": 11,
"measured_object": 1,
"u_sigma": 100.0,
"u_measured": 10000.0,
"u_angle_measured": 0.0
}
],
"sym_power_sensor": [
{
"id": 12,
"measured_object": 2,
"measured_terminal_type": 9,
"power_sigma": 200.0,
"p_measured": -1200.0,
"q_measured": -120.0
},
{
"id": 15,
"measured_object": 5,
"measured_terminal_type": 5,
"power_sigma": 100.0,
"p_measured": 900.0,
"q_measured": 90.0
},
{
"id": 16,
"measured_object": 6,
"measured_terminal_type": 4,
"power_sigma": 100.0,
"p_measured": 1800.0,
"q_measured": 180.0
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: Contributors to the Power Grid Model project <[email protected]>

SPDX-License-Identifier: MPL-2.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"calculation_method": ["iterative_linear", "newton_raphson"],
"rtol": 1e-03,
"atol": {
"default": 1e-05,
".+_residual": 0.1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: Contributors to the Power Grid Model project <[email protected]>

SPDX-License-Identifier: MPL-2.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"version": "1.0",
"type": "sym_output",
"is_batch": false,
"attributes": {},
"data": {
"node": [
{
"id": 1,
"p": 1000.0,
"q": 100.0
},
{
"id": 2,
"p": -1000.0,
"q": -100.0
}
],
"asym_gen" : [
{
"id": 5,
"p": 850.0,
"q": 85.0
}
],
"asym_load" : [
{
"id": 6,
"p": 1850.0,
"q": 185.0
}
],
"sym_power_sensor": [
{
"id": 12,
"p_residual": -200.0,
"q_residual": -20.0
},
{
"id": 15,
"p_residual": 50.0,
"q_residual": 5.0
},
{
"id": 16,
"p_residual": -50.0,
"q_residual": -5.0
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: Contributors to the Power Grid Model project <[email protected]>

SPDX-License-Identifier: MPL-2.0
Loading

0 comments on commit 67b0f30

Please sign in to comment.