summaryrefslogtreecommitdiff
path: root/opendc-format
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2021-06-21 20:57:06 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2021-06-21 20:57:06 +0200
commitb29f90e5ad5bcac29cde86e56c06e0b65a52cedc (patch)
tree4483016fd06b44edb57ed5d96344c2933452fdb8 /opendc-format
parentf28cc9964ad1ca1c074331ed54053d469e7373e5 (diff)
simulator: Re-organize compute simulator module
This change re-organizes the classes of the compute simulator module to make a clearer distinction between the hardware, firmware and software interfaces in this module.
Diffstat (limited to 'opendc-format')
-rw-r--r--opendc-format/src/main/kotlin/org/opendc/format/environment/MachineDef.kt4
-rw-r--r--opendc-format/src/main/kotlin/org/opendc/format/environment/sc18/Sc18EnvironmentReader.kt4
-rw-r--r--opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Sc20ClusterEnvironmentReader.kt4
-rw-r--r--opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Sc20EnvironmentReader.kt4
4 files changed, 8 insertions, 8 deletions
diff --git a/opendc-format/src/main/kotlin/org/opendc/format/environment/MachineDef.kt b/opendc-format/src/main/kotlin/org/opendc/format/environment/MachineDef.kt
index 9b799cc2..f65c4880 100644
--- a/opendc-format/src/main/kotlin/org/opendc/format/environment/MachineDef.kt
+++ b/opendc-format/src/main/kotlin/org/opendc/format/environment/MachineDef.kt
@@ -22,7 +22,7 @@
package org.opendc.format.environment
-import org.opendc.simulator.compute.SimMachineModel
+import org.opendc.simulator.compute.model.MachineModel
import org.opendc.simulator.compute.power.PowerModel
import java.util.*
@@ -30,6 +30,6 @@ public data class MachineDef(
val uid: UUID,
val name: String,
val meta: Map<String, Any>,
- val model: SimMachineModel,
+ val model: MachineModel,
val powerModel: PowerModel
)
diff --git a/opendc-format/src/main/kotlin/org/opendc/format/environment/sc18/Sc18EnvironmentReader.kt b/opendc-format/src/main/kotlin/org/opendc/format/environment/sc18/Sc18EnvironmentReader.kt
index 1f080c2d..7780a98e 100644
--- a/opendc-format/src/main/kotlin/org/opendc/format/environment/sc18/Sc18EnvironmentReader.kt
+++ b/opendc-format/src/main/kotlin/org/opendc/format/environment/sc18/Sc18EnvironmentReader.kt
@@ -27,7 +27,7 @@ import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
import com.fasterxml.jackson.module.kotlin.readValue
import org.opendc.format.environment.EnvironmentReader
import org.opendc.format.environment.MachineDef
-import org.opendc.simulator.compute.SimMachineModel
+import org.opendc.simulator.compute.model.MachineModel
import org.opendc.simulator.compute.model.MemoryUnit
import org.opendc.simulator.compute.model.ProcessingNode
import org.opendc.simulator.compute.model.ProcessingUnit
@@ -75,7 +75,7 @@ public class Sc18EnvironmentReader(input: InputStream, mapper: ObjectMapper = ja
UUID(0L, counter++.toLong()),
"node-$counter",
emptyMap(),
- SimMachineModel(cores, listOf(MemoryUnit("", "", 2300.0, 16000))),
+ MachineModel(cores, listOf(MemoryUnit("", "", 2300.0, 16000))),
ConstantPowerModel(0.0)
)
}
diff --git a/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Sc20ClusterEnvironmentReader.kt b/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Sc20ClusterEnvironmentReader.kt
index bef6b742..1efd2ddf 100644
--- a/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Sc20ClusterEnvironmentReader.kt
+++ b/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Sc20ClusterEnvironmentReader.kt
@@ -24,7 +24,7 @@ package org.opendc.format.environment.sc20
import org.opendc.format.environment.EnvironmentReader
import org.opendc.format.environment.MachineDef
-import org.opendc.simulator.compute.SimMachineModel
+import org.opendc.simulator.compute.model.MachineModel
import org.opendc.simulator.compute.model.MemoryUnit
import org.opendc.simulator.compute.model.ProcessingNode
import org.opendc.simulator.compute.model.ProcessingUnit
@@ -97,7 +97,7 @@ public class Sc20ClusterEnvironmentReader(
UUID(random.nextLong(), random.nextLong()),
"node-$clusterId-$it",
mapOf("cluster" to clusterId),
- SimMachineModel(
+ MachineModel(
List(coresPerHost) { coreId ->
ProcessingUnit(unknownProcessingNode, coreId, speed)
},
diff --git a/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Sc20EnvironmentReader.kt b/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Sc20EnvironmentReader.kt
index 2fa1caab..9b77702e 100644
--- a/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Sc20EnvironmentReader.kt
+++ b/opendc-format/src/main/kotlin/org/opendc/format/environment/sc20/Sc20EnvironmentReader.kt
@@ -27,7 +27,7 @@ import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
import com.fasterxml.jackson.module.kotlin.readValue
import org.opendc.format.environment.EnvironmentReader
import org.opendc.format.environment.MachineDef
-import org.opendc.simulator.compute.SimMachineModel
+import org.opendc.simulator.compute.model.MachineModel
import org.opendc.simulator.compute.model.MemoryUnit
import org.opendc.simulator.compute.model.ProcessingNode
import org.opendc.simulator.compute.model.ProcessingUnit
@@ -80,7 +80,7 @@ public class Sc20EnvironmentReader(input: InputStream, mapper: ObjectMapper = ja
UUID(0L, counter++.toLong()),
"node-$counter",
emptyMap(),
- SimMachineModel(cores, memories),
+ MachineModel(cores, memories),
// For now we assume a simple linear load model with an idle draw of ~200W and a maximum
// power draw of 350W.
// Source: https://stackoverflow.com/questions/6128960