diff options
Diffstat (limited to 'opendc-omega')
| -rw-r--r-- | opendc-omega/src/main/kotlin/nl/atlarge/opendc/kernel/omega/OmegaKernel.kt | 3 | ||||
| -rw-r--r-- | opendc-omega/src/main/kotlin/nl/atlarge/opendc/kernel/omega/OmegaSimulation.kt | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/opendc-omega/src/main/kotlin/nl/atlarge/opendc/kernel/omega/OmegaKernel.kt b/opendc-omega/src/main/kotlin/nl/atlarge/opendc/kernel/omega/OmegaKernel.kt index 5367e674..cbc25b63 100644 --- a/opendc-omega/src/main/kotlin/nl/atlarge/opendc/kernel/omega/OmegaKernel.kt +++ b/opendc-omega/src/main/kotlin/nl/atlarge/opendc/kernel/omega/OmegaKernel.kt @@ -28,6 +28,7 @@ import nl.atlarge.opendc.kernel.Kernel import nl.atlarge.opendc.kernel.Process import nl.atlarge.opendc.kernel.Simulation import nl.atlarge.opendc.topology.Entity +import nl.atlarge.opendc.topology.MutableTopology import nl.atlarge.opendc.topology.Topology /** @@ -53,5 +54,5 @@ object OmegaKernel : Kernel { * @param topology The [Topology] to create a [Simulation] of. * @return A [Simulation] instance. */ - override fun create(topology: Topology): Simulation = OmegaSimulation(this, topology) + override fun create(topology: MutableTopology): Simulation = OmegaSimulation(this, topology) } diff --git a/opendc-omega/src/main/kotlin/nl/atlarge/opendc/kernel/omega/OmegaSimulation.kt b/opendc-omega/src/main/kotlin/nl/atlarge/opendc/kernel/omega/OmegaSimulation.kt index 67b192fb..e3477d3e 100644 --- a/opendc-omega/src/main/kotlin/nl/atlarge/opendc/kernel/omega/OmegaSimulation.kt +++ b/opendc-omega/src/main/kotlin/nl/atlarge/opendc/kernel/omega/OmegaSimulation.kt @@ -33,6 +33,7 @@ import nl.atlarge.opendc.kernel.time.Duration import nl.atlarge.opendc.kernel.time.Instant import nl.atlarge.opendc.kernel.time.TickClock import nl.atlarge.opendc.topology.Entity +import nl.atlarge.opendc.topology.MutableTopology import nl.atlarge.opendc.topology.Topology import nl.atlarge.opendc.topology.TopologyContext import java.util.* @@ -52,7 +53,7 @@ import kotlin.coroutines.experimental.* * @property clock The clock to use for simulation time. * @author Fabian Mastenbroek (f.s.mastenbroek@student.tudelft.nl) */ -internal class OmegaSimulation(override val kernel: OmegaKernel, override val topology: Topology, +internal class OmegaSimulation(override val kernel: OmegaKernel, override val topology: MutableTopology, override val clock: Clock = TickClock()) : Simulation { /** * The logger instance to use for the simulator. @@ -212,7 +213,7 @@ internal class OmegaSimulation(override val kernel: OmegaKernel, override val to /** * The [Topology] over which the simulation is run. */ - override val topology: Topology = this@OmegaSimulation.topology + override val topology = this@OmegaSimulation.topology /** * The current point in simulation time. |
