From 69598598be2c248acc49e40607b3dd0998ec1ca5 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Wed, 24 Mar 2021 13:05:33 +0100 Subject: simulator: Move power models to simulator module This change moves the power models from the `opendc-compute-simulator` to the `opendc-simulator-compute` module, since it better fits the scope of the models and allows them to be re-used for other purposes. --- .../src/main/kotlin/org/opendc/format/environment/MachineDef.kt | 4 ++-- .../org/opendc/format/environment/sc18/Sc18EnvironmentReader.kt | 2 +- .../opendc/format/environment/sc20/Sc20ClusterEnvironmentReader.kt | 2 +- .../org/opendc/format/environment/sc20/Sc20EnvironmentReader.kt | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'simulator/opendc-format/src') diff --git a/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/MachineDef.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/MachineDef.kt index b5b3b84b..c7f7c4dc 100644 --- a/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/MachineDef.kt +++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/MachineDef.kt @@ -22,8 +22,8 @@ package org.opendc.format.environment -import org.opendc.compute.simulator.power.api.CpuPowerModel import org.opendc.simulator.compute.SimMachineModel +import org.opendc.simulator.compute.power.MachinePowerModel import java.util.* public data class MachineDef( @@ -31,5 +31,5 @@ public data class MachineDef( val name: String, val meta: Map, val model: SimMachineModel, - val powerModel: CpuPowerModel + val powerModel: MachinePowerModel ) diff --git a/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc18/Sc18EnvironmentReader.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc18/Sc18EnvironmentReader.kt index 3da8d0b3..1f080c2d 100644 --- a/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc18/Sc18EnvironmentReader.kt +++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc18/Sc18EnvironmentReader.kt @@ -25,13 +25,13 @@ package org.opendc.format.environment.sc18 import com.fasterxml.jackson.databind.ObjectMapper import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper import com.fasterxml.jackson.module.kotlin.readValue -import org.opendc.compute.simulator.power.models.ConstantPowerModel import org.opendc.format.environment.EnvironmentReader import org.opendc.format.environment.MachineDef import org.opendc.simulator.compute.SimMachineModel import org.opendc.simulator.compute.model.MemoryUnit import org.opendc.simulator.compute.model.ProcessingNode import org.opendc.simulator.compute.model.ProcessingUnit +import org.opendc.simulator.compute.power.ConstantPowerModel import java.io.InputStream import java.util.* diff --git a/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Sc20ClusterEnvironmentReader.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Sc20ClusterEnvironmentReader.kt index 9a06a40f..cf90da68 100644 --- a/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Sc20ClusterEnvironmentReader.kt +++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Sc20ClusterEnvironmentReader.kt @@ -22,13 +22,13 @@ package org.opendc.format.environment.sc20 -import org.opendc.compute.simulator.power.models.LinearPowerModel import org.opendc.format.environment.EnvironmentReader import org.opendc.format.environment.MachineDef import org.opendc.simulator.compute.SimMachineModel import org.opendc.simulator.compute.model.MemoryUnit import org.opendc.simulator.compute.model.ProcessingNode import org.opendc.simulator.compute.model.ProcessingUnit +import org.opendc.simulator.compute.power.LinearPowerModel import java.io.File import java.io.FileInputStream import java.io.InputStream diff --git a/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Sc20EnvironmentReader.kt b/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Sc20EnvironmentReader.kt index effd0286..c6a19430 100644 --- a/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Sc20EnvironmentReader.kt +++ b/simulator/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Sc20EnvironmentReader.kt @@ -25,13 +25,13 @@ package org.opendc.format.environment.sc20 import com.fasterxml.jackson.databind.ObjectMapper import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper import com.fasterxml.jackson.module.kotlin.readValue -import org.opendc.compute.simulator.power.models.LinearPowerModel import org.opendc.format.environment.EnvironmentReader import org.opendc.format.environment.MachineDef import org.opendc.simulator.compute.SimMachineModel import org.opendc.simulator.compute.model.MemoryUnit import org.opendc.simulator.compute.model.ProcessingNode import org.opendc.simulator.compute.model.ProcessingUnit +import org.opendc.simulator.compute.power.LinearPowerModel import java.io.InputStream import java.util.* -- cgit v1.2.3