Skip to content

Commit dca321c

Browse files
committed
Correct formulas for switchedOnQAtNominalV and switchedOnSusceptance in spreadsheet configuration
Signed-off-by: achour94 <[email protected]>
1 parent 37ecff5 commit dca321c

File tree

3 files changed

+27
-2
lines changed

3 files changed

+27
-2
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
2+
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:pro="http://www.liquibase.org/xml/ns/pro" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/pro http://www.liquibase.org/xml/ns/pro/liquibase-pro-latest.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd">
3+
<changeSet author="berrahmaach" id="correct-shunt-compensator-formulas-switchedOnQAtNominalV">
4+
<comment>Correct switchedOnQAtNominalV formula - replace incorrect formula with the correct one</comment>
5+
<sql dbms="postgresql">
6+
UPDATE spreadsheet_column
7+
SET formula = '(maxQAtNominalV / maximumSectionCount) * sectionCount'
8+
WHERE column_id = 'switchedOnQAtNominalV'
9+
AND formula = 'maxQAtNominalV / maximumSectionCount';
10+
</sql>
11+
</changeSet>
12+
13+
<changeSet author="berrahmaach" id="correct-shunt-compensator-formulas-switchedOnSusceptance">
14+
<comment>Correct switchedOnSusceptance formula - replace incorrect formula with the correct one</comment>
15+
<sql dbms="postgresql">
16+
UPDATE spreadsheet_column
17+
SET formula = '(maxSusceptance / maximumSectionCount) * sectionCount'
18+
WHERE column_id = 'switchedOnSusceptance'
19+
AND formula = 'maxSusceptance / maximumSectionCount';
20+
</sql>
21+
</changeSet>
22+
</databaseChangeLog>

src/main/resources/db/changelog/db.changelog-master.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,6 @@ databaseChangeLog:
5353
- include:
5454
file: changesets/changelog_20250612T140000Z.xml
5555
relativeToChangelogFile: true
56+
- include:
57+
file: changesets/changelog_20250616T090000Z.xml
58+
relativeToChangelogFile: true

src/main/resources/default-spreadsheet-config-collection.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1338,7 +1338,7 @@
13381338
"name": "Switch-on Q at nominal voltage",
13391339
"type": "NUMBER",
13401340
"precision": 1,
1341-
"formula": "maxQAtNominalV / maximumSectionCount",
1341+
"formula": "(maxQAtNominalV / maximumSectionCount) * sectionCount",
13421342
"dependencies": null,
13431343
"id": "switchedOnQAtNominalV"
13441344
},
@@ -1354,7 +1354,7 @@
13541354
"name": "Switch-on susceptance",
13551355
"type": "NUMBER",
13561356
"precision": 5,
1357-
"formula": "maxSusceptance / maximumSectionCount",
1357+
"formula": "(maxSusceptance / maximumSectionCount) * sectionCount",
13581358
"dependencies": null,
13591359
"id": "switchedOnSusceptance"
13601360
},

0 commit comments

Comments
 (0)