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
85030dd5
Commit
85030dd5
authored
Dec 21, 2017
by
Markus Mirz
Browse files
fixed signbit error
Former-commit-id:
58afa0ce
parent
c0e49ff5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Source/Simulation.cpp
View file @
85030dd5
...
@@ -264,7 +264,7 @@ void Simulation::clearFault(Int Node1, Int Node2, Int Node3) {
...
@@ -264,7 +264,7 @@ void Simulation::clearFault(Int Node1, Int Node2, Int Node3) {
if
(
signbit
(
mIfa
)
!=
signbit
(
mIfa_hist
)
&&
!
aCleared
)
{
if
(
std
::
signbit
(
mIfa
)
!=
std
::
signbit
(
mIfa_hist
)
&&
!
aCleared
)
{
mElements
.
erase
(
mElements
.
begin
()
+
1
);
mElements
.
erase
(
mElements
.
begin
()
+
1
);
addSystemTopology
(
mElements
);
addSystemTopology
(
mElements
);
switchSystemMatrix
(
mSwitchEventVector
.
size
()
+
NumClearedPhases
);
switchSystemMatrix
(
mSwitchEventVector
.
size
()
+
NumClearedPhases
);
...
@@ -272,7 +272,7 @@ void Simulation::clearFault(Int Node1, Int Node2, Int Node3) {
...
@@ -272,7 +272,7 @@ void Simulation::clearFault(Int Node1, Int Node2, Int Node3) {
aCleared
=
true
;
aCleared
=
true
;
}
}
if
(
signbit
(
mIfb
)
!=
signbit
(
mIfb_hist
)
&&
!
bCleared
)
{
if
(
std
::
signbit
(
mIfb
)
!=
std
::
signbit
(
mIfb_hist
)
&&
!
bCleared
)
{
mElements
.
erase
(
mElements
.
begin
()
+
2
);
mElements
.
erase
(
mElements
.
begin
()
+
2
);
addSystemTopology
(
mElements
);
addSystemTopology
(
mElements
);
switchSystemMatrix
(
mSwitchEventVector
.
size
()
+
NumClearedPhases
);
switchSystemMatrix
(
mSwitchEventVector
.
size
()
+
NumClearedPhases
);
...
@@ -280,7 +280,7 @@ void Simulation::clearFault(Int Node1, Int Node2, Int Node3) {
...
@@ -280,7 +280,7 @@ void Simulation::clearFault(Int Node1, Int Node2, Int Node3) {
bCleared
=
true
;
bCleared
=
true
;
}
}
if
(
signbit
(
mIfc
)
!=
signbit
(
mIfc_hist
)
&&
!
cCleared
)
{
if
(
std
::
signbit
(
mIfc
)
!=
std
::
signbit
(
mIfc_hist
)
&&
!
cCleared
)
{
mElements
.
erase
(
mElements
.
begin
()
+
1
);
mElements
.
erase
(
mElements
.
begin
()
+
1
);
addSystemTopology
(
mElements
);
addSystemTopology
(
mElements
);
switchSystemMatrix
(
mSwitchEventVector
.
size
()
+
NumClearedPhases
);
switchSystemMatrix
(
mSwitchEventVector
.
size
()
+
NumClearedPhases
);
...
...
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