Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Removed
- Removed dependency constraint [#221](https://github.com/ie3-institute/powerflow/issues/221)

### Changed
- Upgraded to `scala3` [#204](https://github.com/ie3-institute/powerflow/issues/204)

## [0.2]

### Changed
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ String featureBranchName = ""

//// gradle tasks that are executed
def gradleTasks = "--refresh-dependencies clean spotlessCheck pmdMain pmdTest check" // the gradle tasks that are executed on ALL projects
def mainProjectGradleTasks = "reportScoverage checkScoverage" // additional tasks that are only executed on project 0 (== main project)
def mainProjectGradleTasks = "reportScoverage" // additional tasks that are only executed on project 0 (== main project)

/// commit hash
def commitHash = ""
Expand Down
12 changes: 6 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ plugins {

ext {
javaVersion = JavaVersion.VERSION_17
scalaVersion = '2.13'
scalaBinaryVersion = '2.13.16'
scalaVersion = '3'
scalaBinaryVersion = '3.6.4'

scapegoatVersion = '3.1.8'

Expand Down Expand Up @@ -48,7 +48,7 @@ repositories {
dependencies {

// CORE Scala //
implementation "org.scala-lang:scala-library:${scalaBinaryVersion}"
implementation "org.scala-lang:scala3-library_3:${scalaBinaryVersion}"

// TEST Scala //
testImplementation "org.scalatest:scalatest_${scalaVersion}:3.2.15"
Expand All @@ -60,11 +60,11 @@ dependencies {
scalaCompilerPlugin "com.sksamuel.scapegoat:scalac-scapegoat-plugin_${scalaBinaryVersion}:${scapegoatVersion}" // scala scapegoat

// logging //
implementation "com.typesafe.scala-logging:scala-logging_${scalaVersion}:3.9.5" // akka scala logging
implementation "com.typesafe.scala-logging:scala-logging_${scalaVersion}:3.9.5" // pekko scala logging
implementation "ch.qos.logback:logback-classic:1.5.18"

// used for ArrayHelper
implementation('com.github.ie3-institute:PowerSystemUtils:2.2.1') {
implementation('com.github.ie3-institute:PowerSystemUtils:3.1.0') {
exclude group: 'org.apache.logging.log4j'
exclude group: 'org.slf4j'
/* Exclude our own nested dependencies */
Expand All @@ -75,7 +75,7 @@ dependencies {
implementation 'org.apache.commons:commons-math3:3.6.1'
implementation 'org.apache.commons:commons-lang3:3.17.0' // for HashCodeBuilder
implementation 'javax.measure:unit-api:2.2'
implementation 'org.scalanlp:breeze_2.13:2.1.0' // Scientific calculations
implementation "org.scalanlp:breeze_${scalaVersion}:2.1.0" // Scientific calculations
}

/* scapegoat hook configuration
Expand Down
1 change: 0 additions & 1 deletion gradle/scripts/scoverage.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*/
scoverage {
scoverageVersion = "2.3.0"
scoverageScalaVersion = scalaBinaryVersion
coverageOutputHTML = false
coverageOutputXML = true
coverageOutputCobertura = false
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/edu/ie3/powerflow/NewtonRaphsonPF.scala
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ case object NewtonRaphsonPF extends LazyLogging {
val v = StateData.extractVoltageVector(state)
val nodalPower = v *:* (admittanceMatrix * v).map(i => i.conjugate)
(state zip nodalPower.toScalaVector).map(stateAndPowerPair =>
stateAndPowerPair._1.copy(power = -1 * stateAndPowerPair._2)
stateAndPowerPair._1.copy(power = stateAndPowerPair._2 * -1)
)
}

Expand Down