Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ACS
Public
Power System Simulation and Optimization
DPsim
DPsim
Commits
10424bf9
Commit
10424bf9
authored
Mar 30, 2020
by
Markus Mirz
Browse files
Merge branch 'fix-cigre-examples' into 'master'
Fix cigre examples See merge request
!163
parents
9c783f1d
9e47b40d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Examples/Cxx/CIM/CIGRE_MV_PowerFlowTest_LoadProfiles.cpp
View file @
10424bf9
...
...
@@ -58,26 +58,31 @@ int main(int argc, char** argv){
// Find CIM files
std
::
list
<
fs
::
path
>
filenames
;
if
(
argc
<=
1
)
{
filenames
=
DPsim
::
Utils
::
findFiles
({
"Rootnet_FULL_NE_06J16h_DI.xml"
,
"Rootnet_FULL_NE_06J16h_EQ.xml"
,
"Rootnet_FULL_NE_06J16h_SV.xml"
,
"Rootnet_FULL_NE_06J16h_TP.xml"
},
"Examples/CIM/grid-data/CIGRE_MV/NEPLAN/CIGRE_MV_no_tapchanger_With_LoadFlow_Results"
,
"CIMPATH"
);
}
else
{
filenames
=
std
::
list
<
fs
::
path
>
(
argv
+
1
,
argv
+
argc
);
}
filenames
=
DPsim
::
Utils
::
findFiles
({
"Rootnet_FULL_NE_06J16h_DI.xml"
,
"Rootnet_FULL_NE_06J16h_EQ.xml"
,
"Rootnet_FULL_NE_06J16h_SV.xml"
,
"Rootnet_FULL_NE_06J16h_TP.xml"
},
"Examples/CIM/grid-data/CIGRE_MV/NEPLAN/CIGRE_MV_no_tapchanger_With_LoadFlow_Results"
,
"CIMPATH"
);
String
simName
=
"CIGRE-MV-NoTap-LoadProfiles"
;
CPS
::
Real
system_freq
=
50
;
CPS
::
Real
time_begin
=
0
;
CPS
::
Real
time_step
=
1
;
CPS
::
Real
time_end
=
300
;
if
(
argc
>
1
)
{
CommandLineArgs
args
(
argc
,
argv
);
time_step
=
args
.
timeStep
;
time_end
=
args
.
duration
;
}
CIM
::
Reader
reader
(
simName
,
Logger
::
Level
::
info
,
Logger
::
Level
::
off
);
SystemTopology
system
=
reader
.
loadCIM
(
system_freq
,
filenames
,
CPS
::
Domain
::
SP
);
CSVReader
csvreader
(
simName
,
loadProfilePath
,
assignList
,
Logger
::
Level
::
info
);
csvreader
.
assignLoadProfile
(
system
,
0
,
1.5
,
15
,
CSVReader
::
Mode
::
MANUAL
);
csvreader
.
assignLoadProfile
(
system
,
time_begin
,
time_step
,
time_end
,
CSVReader
::
Mode
::
MANUAL
);
auto
logger
=
DPsim
::
DataLogger
::
make
(
simName
);
for
(
auto
node
:
system
.
mNodes
)
...
...
@@ -137,7 +142,7 @@ int main(int argc, char** argv){
}
}
Simulation
sim
(
simName
,
system
,
1.5
,
15
,
Domain
::
SP
,
Solver
::
Type
::
NRP
,
Logger
::
Level
::
info
,
true
);
Simulation
sim
(
simName
,
system
,
time_step
,
time_end
,
Domain
::
SP
,
Solver
::
Type
::
NRP
,
Logger
::
Level
::
info
,
true
);
sim
.
addLogger
(
logger
);
sim
.
run
();
...
...
Examples/Cxx/Shmem/Shmem_CIGRE_MV_PowerFlowTest_LoadProfiles.cpp
View file @
10424bf9
...
...
@@ -66,7 +66,7 @@ int main(int argc, char** argv){
"Rootnet_FULL_NE_06J16h_EQ.xml"
,
"Rootnet_FULL_NE_06J16h_SV.xml"
,
"Rootnet_FULL_NE_06J16h_TP.xml"
},
"Examples/CIM/
CIGRE_MV_NoTap
"
,
"CIMPATH"
);
},
"Examples/CIM/
grid-data/CIGRE_MV/NEPLAN/CIGRE_MV_no_tapchanger_With_LoadFlow_Results
"
,
"CIMPATH"
);
String
simName
=
"Shmem_CIGRE-MV-NoTap"
;
CPS
::
Real
system_freq
=
50
;
...
...
@@ -75,7 +75,7 @@ int main(int argc, char** argv){
SystemTopology
sys
=
reader
.
loadCIM
(
system_freq
,
filenames
,
CPS
::
Domain
::
SP
);
CSVReader
csvreader
(
simName
,
loadProfilePath
,
assignList
,
Logger
::
Level
::
info
);
csvreader
.
assignLoadProfile
(
sys
,
1
,
1
,
args
.
duration
,
CSVReader
::
Mode
::
MANUAL
);
csvreader
.
assignLoadProfile
(
sys
,
0
,
args
.
timeStep
,
args
.
duration
,
CSVReader
::
Mode
::
MANUAL
);
RealTimeSimulation
sim
(
simName
,
sys
,
args
.
timeStep
,
args
.
duration
,
args
.
solver
.
domain
,
args
.
solver
.
type
,
args
.
logLevel
);
Interface
intf
(
"/dpsim1-villas"
,
"/villas-dpsim1"
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment