diff options
| author | Dante Niewenhuis <d.niewenhuis@hotmail.com> | 2025-05-16 10:32:08 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-16 10:32:08 +0200 |
| commit | d70312f122d9ef7c31b05757239ffc66af832dee (patch) | |
| tree | c8eb5d86ce751b783c3f15744bcda35861eed65d /opendc-compute/opendc-compute-topology | |
| parent | 1bc17abd7691bc81f11ee125e2eeb4cb08da5245 (diff) | |
Updated website documentation (#334)
* Updated website documentation
* Updated some documentation and fixed links
* small updates
* small updates
Diffstat (limited to 'opendc-compute/opendc-compute-topology')
2 files changed, 19 insertions, 29 deletions
diff --git a/opendc-compute/opendc-compute-topology/src/main/kotlin/org/opendc/compute/topology/TopologyFactories.kt b/opendc-compute/opendc-compute-topology/src/main/kotlin/org/opendc/compute/topology/TopologyFactories.kt index cc2c4b4e..afc3ee62 100644 --- a/opendc-compute/opendc-compute-topology/src/main/kotlin/org/opendc/compute/topology/TopologyFactories.kt +++ b/opendc-compute/opendc-compute-topology/src/main/kotlin/org/opendc/compute/topology/TopologyFactories.kt @@ -129,7 +129,7 @@ private fun ClusterJSONSpec.toClusterSpec(): ClusterSpec { val powerSourceSpec = PowerSourceSpec( createUniqueName(this.powerSource.name, powerSourceNames), - totalPower = this.powerSource.totalPower, + totalPower = this.powerSource.maxPower, carbonTracePath = this.powerSource.carbonTracePath, ) @@ -140,8 +140,8 @@ private fun ClusterJSONSpec.toClusterSpec(): ClusterSpec { createUniqueName(this.battery.name, batteryNames), this.battery.capacity, this.battery.chargingSpeed, - this.battery.batteryPolicy, this.battery.initialCharge, + this.battery.batteryPolicy, this.battery.embodiedCarbon, this.battery.expectedLifetime, ) diff --git a/opendc-compute/opendc-compute-topology/src/main/kotlin/org/opendc/compute/topology/specs/TopologySpecs.kt b/opendc-compute/opendc-compute-topology/src/main/kotlin/org/opendc/compute/topology/specs/TopologySpecs.kt index 920d8373..f9675b31 100644 --- a/opendc-compute/opendc-compute-topology/src/main/kotlin/org/opendc/compute/topology/specs/TopologySpecs.kt +++ b/opendc-compute/opendc-compute-topology/src/main/kotlin/org/opendc/compute/topology/specs/TopologySpecs.kt @@ -44,7 +44,6 @@ import org.opendc.simulator.engine.engine.FlowEngine @Serializable public data class TopologySpec( val clusters: List<ClusterJSONSpec>, - val schemaVersion: Int = 1, ) /** @@ -52,7 +51,6 @@ public data class TopologySpec( * * @param name The name of the cluster. * @param hosts List of the different hosts (nodes) available in this cluster - * @param location Location of the cluster. This can impact the carbon intensity */ @Serializable public data class ClusterJSONSpec( @@ -61,7 +59,6 @@ public data class ClusterJSONSpec( val hosts: List<HostJSONSpec>, val powerSource: PowerSourceJSONSpec = PowerSourceJSONSpec.DFLT, val battery: BatteryJSONSpec? = null, - val location: String = "NL", ) /** @@ -77,46 +74,47 @@ public data class ClusterJSONSpec( public data class HostJSONSpec( val name: String = "Host", val cpu: CPUJSONSpec, + val count: Int = 1, val memory: MemoryJSONSpec, val powerModel: PowerModelSpec = PowerModelSpec.DFLT, - val count: Int = 1, ) /** * Definition of a compute CPU modeled in the simulation. * - * @param vendor The vendor of the storage device. * @param modelName The model name of the device. + * @param vendor The vendor of the storage device. * @param arch The micro-architecture of the processor node. - * @param coreCount The number of cores in the CPU - * @param coreSpeed The speed of the cores + * @param count The number of CPUs of this type in the host. + * @param coreCount The number of cores in the CPU. + * @param coreSpeed The speed of the cores. */ @Serializable public data class CPUJSONSpec( - val vendor: String = "unknown", val modelName: String = "unknown", + val vendor: String = "unknown", val arch: String = "unknown", + val count: Int = 1, val coreCount: Int, val coreSpeed: Frequency, - val count: Int = 1, ) /** * Definition of a compute Memory modeled in the simulation. * - * @param vendor The vendor of the storage device. * @param modelName The model name of the device. + * @param vendor The vendor of the storage device. * @param arch The micro-architecture of the processor node. - * @param memorySpeed The speed of the cores * @param memorySize The size of the memory Unit + * @param memorySpeed The speed of the cores */ @Serializable public data class MemoryJSONSpec( - val vendor: String = "unknown", val modelName: String = "unknown", + val vendor: String = "unknown", val arch: String = "unknown", - val memorySpeed: Frequency = Frequency.ofMHz(-1), val memorySize: DataSize, + val memorySpeed: Frequency = Frequency.ofMHz(-1), ) @Serializable @@ -145,25 +143,17 @@ public data class PowerModelSpec( /** * Definition of a power source used for JSON input. * - * @property vendor - * @property modelName - * @property arch - * @property totalPower + * @property maxPower in Watt */ @Serializable public data class PowerSourceJSONSpec( val name: String = "PowerSource", - val vendor: String = "unknown", - val modelName: String = "unknown", - val arch: String = "unknown", - val totalPower: Long = Long.MAX_VALUE, + val maxPower: Long = Long.MAX_VALUE, val carbonTracePath: String? = null, ) { public companion object { public val DFLT: PowerSourceJSONSpec = - PowerSourceJSONSpec( - totalPower = Long.MAX_VALUE, - ) + PowerSourceJSONSpec() } } @@ -172,9 +162,9 @@ public data class PowerSourceJSONSpec( * * @property name The name of the battery * @property capacity The capacity of the battery in kWh - * @property chargingSpeed The charging speed of the battery in J - * @property batteryPolicy The policy used to decide when the battery charges and discharges + * @property chargingSpeed The charging speed of the battery in W * @property initialCharge The initial charge in the battery + * @property batteryPolicy The policy used to decide when the battery charges and discharges * @property embodiedCarbon The embodied carbon needed to create the battery in gram * @property expectedLifetime The expected lifetime of the battery in years * @@ -184,8 +174,8 @@ public data class BatteryJSONSpec( val name: String = "Battery", var capacity: Double, val chargingSpeed: Double, - val batteryPolicy: BatteryPolicyJSONSpec, var initialCharge: Double = 0.0, + val batteryPolicy: BatteryPolicyJSONSpec, var embodiedCarbon: Double = 0.0, var expectedLifetime: Double = 0.0, ) |
