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
62eb1782
Commit
62eb1782
authored
Jul 20, 2019
by
Markus Mirz
Browse files
Merge branch 'fix-windows-build' into 'master'
Fix windows build See merge request acs/public/simulation/dpsim!88
parents
15656681
279f7255
Changes
9
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
62eb1782
...
...
@@ -47,6 +47,22 @@ build:linux:
tags
:
-
docker
build:windows:
stage
:
build
script
:
-
New-Item -ItemType Directory -Force -Path build
-
Set-Location -Path build
# 64 Bit Graphviz Builds for Windows:
# https://ci.appveyor.com/project/ellson/graphviz-pl238/
-
cmake .. -DGraphviz_ROOT="C:/Program Files/Graphviz 2.41.20190716.1839"
-
cmake --build . -j
24
tags
:
-
win10
cache
:
paths
:
-
build
key
:
build-win10
test:pytest:
stage
:
test
variables
:
...
...
CMakeLists.txt
View file @
62eb1782
...
...
@@ -75,17 +75,19 @@ if(WIN32)
endif
()
# Options
include
(
CMakeDependentOption
)
option
(
BUILD_SHARED_LIBS
"Build shared library"
OFF
)
option
(
BUILD_EXAMPLES
"Build C++ examples"
ON
)
option
(
COMPARE_REFERENCE
"Download reference results and compare"
OFF
)
option
(
WITH_GSL
"Enable GSL"
${
GSL_FOUND
}
)
option
(
WITH_SUNDIALS
"Enable sundials solver suite"
${
Sundials_FOUND
}
)
option
(
WITH_SHMEM
"Enable shared memory interface"
${
VILLASnode_FOUND
}
)
option
(
WITH_RT
"Enable real-time features"
${
Linux_FOUND
}
)
option
(
WITH_PYTHON
"Enable Python support"
${
Python_FOUND
}
)
option
(
WITH_CIM
"Enable support for parsing CIM files"
${
CIMpp_FOUND
}
)
option
(
WITH_OPENMP
"Enable OpenMP-based parallelisation"
${
OPENMP_FOUND
}
)
cmake_dependent_
option
(
WITH_GSL
"Enable GSL"
ON
"
GSL_FOUND
"
OFF
)
cmake_dependent_
option
(
WITH_SUNDIALS
"Enable sundials solver suite"
ON
"
Sundials_FOUND
"
OFF
)
cmake_dependent_
option
(
WITH_SHMEM
"Enable shared memory interface"
ON
"
VILLASnode_FOUND
"
OFF
)
cmake_dependent_
option
(
WITH_RT
"Enable real-time features"
ON
"
Linux_FOUND
"
OFF
)
cmake_dependent_
option
(
WITH_PYTHON
"Enable Python support"
ON
"
Python_FOUND
"
OFF
)
cmake_dependent_
option
(
WITH_CIM
"Enable support for parsing CIM files"
ON
"
CIMpp_FOUND
"
OFF
)
cmake_dependent_
option
(
WITH_OPENMP
"Enable OpenMP-based parallelisation"
ON
"
OPENMP_FOUND
"
OFF
)
configure_file
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/Include/dpsim/Config.h.in
...
...
libcps
@
173c1f5d
Compare
b16ce34d
...
173c1f5d
Subproject commit
b16ce34daf5b8f7979189f7ffe83c38064f90d84
Subproject commit
173c1f5d2ecb45345e85857ac09fc5d6c6de8081
Examples/Cxx/CIM/dpsim-cim.cpp
View file @
62eb1782
...
...
@@ -33,7 +33,7 @@ int main(int argc, char *argv[]) {
String
simName
=
"dpsim"
;
CIMReader
reader
(
simName
);
SystemTopology
sys
=
reader
.
loadCIM
(
args
.
sysFreq
,
args
.
positional
,
args
.
solver
.
domain
);
SystemTopology
sys
=
reader
.
loadCIM
(
args
.
sysFreq
,
args
.
positional
Paths
()
,
args
.
solver
.
domain
);
Simulation
sim
(
simName
,
sys
,
args
.
timeStep
,
args
.
duration
,
args
.
solver
.
domain
,
args
.
solver
.
type
);
...
...
Include/dpsim/Compat/getopt.h
View file @
62eb1782
...
...
@@ -56,7 +56,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#pragma warning(disable:4996)
;
#pragma warning(disable:4996)
#define __GETOPT_H__
...
...
Include/dpsim/Utils.h
View file @
62eb1782
...
...
@@ -90,6 +90,7 @@ public:
DPsim
::
Timer
::
StartClock
::
time_point
startTime
;
std
::
list
<
String
>
positional
;
std
::
list
<
fs
::
path
>
positionalPaths
()
const
;
std
::
map
<
String
,
Real
>
options
;
};
...
...
Source/MNASolver.cpp
View file @
62eb1782
...
...
@@ -385,7 +385,7 @@ void MnaSolver<VarType>::steadyStateInitialization() {
Int
timeStepCount
=
0
;
Real
time
=
0
;
Real
eps
=
0.0001
;
Real
maxDiff
,
max
;
Real
maxDiff
=
0
,
max
=
0
;
Matrix
diff
;
Matrix
prevLeftSideVector
=
Matrix
::
Zero
(
2
*
mNumNodes
,
1
);
...
...
Source/Python/LoadCim.cpp
View file @
62eb1782
...
...
@@ -50,7 +50,7 @@ PyObject* Python::LoadCim(PyObject* self, PyObject* args, PyObject *kwargs) {
CPS
::
Real
frequency
=
50
;
PyObject
*
filenames
;
PyBytesObject
*
filename
;
std
::
list
<
String
>
cimFiles
;
std
::
list
<
fs
::
path
>
cimFiles
;
int
logLevel
=
(
int
)
CPS
::
Logger
::
Level
::
info
;
const
char
*
name
;
...
...
@@ -65,7 +65,7 @@ PyObject* Python::LoadCim(PyObject* self, PyObject* args, PyObject *kwargs) {
PyErr_SetString
(
PyExc_TypeError
,
"First argument must be filename or list of filenames"
);
return
nullptr
;
}
cimFiles
.
push
_back
(
PyBytes_AsString
((
PyObject
*
)
filename
));
cimFiles
.
emplace
_back
(
PyBytes_AsString
((
PyObject
*
)
filename
));
Py_DECREF
(
filename
);
}
}
...
...
Source/Utils.cpp
View file @
62eb1782
...
...
@@ -246,6 +246,16 @@ void CommandLineArgs::showCopyright() {
std
::
cout
<<
" Steffen Vogel <StVogel@eonerc.rwth-aachen.de>"
<<
std
::
endl
;
}
std
::
list
<
fs
::
path
>
CommandLineArgs
::
positionalPaths
()
const
{
std
::
list
<
fs
::
path
>
paths
;
for
(
auto
p
:
positional
)
{
paths
.
emplace_back
(
p
);
}
return
paths
;
}
std
::
vector
<
std
::
string
>
DPsim
::
Utils
::
tokenize
(
std
::
string
s
,
char
delimiter
)
{
std
::
vector
<
std
::
string
>
tokens
;
...
...
@@ -306,7 +316,7 @@ fs::path DPsim::Utils::findFile(const fs::path &name, const fs::path &hint, cons
}
}
throw
std
::
runtime_error
(
fmt
::
format
(
"File not found: {}"
,
name
.
native
()));
throw
std
::
runtime_error
(
fmt
::
format
(
"File not found: {}"
,
name
.
string
()));
}
std
::
list
<
fs
::
path
>
DPsim
::
Utils
::
findFiles
(
std
::
list
<
fs
::
path
>
filennames
,
const
fs
::
path
&
hint
,
const
std
::
string
&
useEnv
)
{
...
...
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