summaryrefslogtreecommitdiff
path: root/opendc-simulator/opendc-simulator-flow/src/test/kotlin
AgeCommit message (Collapse)Author
2024-12-06Renamed Multiplexer to FlowDistributor (#282)Dante Niewenhuis
* Restructured opendc-simulator-flow. Renamed Multiplexer to FlowDistributor. * spotless applied * Added FlowDistributor topologies back
2024-10-25Rewrote the FlowEngine (#256)Dante Niewenhuis
* Removed unused components. Updated tests. Improved checkpointing model Improved model, started with SimPowerSource implemented FailureModels and Checkpointing First working version midway commit first update All simulation are now run with a single CPU and single MemoryUnit. multi CPUs are combined into one. This is for performance and explainability. * fixed merge conflicts * Updated M3SA paths. * Fixed small typo
2024-03-05Updated package versions, updated web server tests. (#207)Dante Niewenhuis
* Updated all package versions including kotlin. Updated all web-server tests to run. * Changed the java version of the tests. OpenDC now only supports java 19. * small update * test update * new update * updated docker version to 19 * updated docker version to 19
2022-12-07bug(sim/flow): Record capacity changes on idle outletsFabian Mastenbroek
This change fixes an issue with the `ForwardingFlowMultiplexer` where the capacity of new outlets were not recorded correctly due to no handler being attached to idle outlets, causing the `pull` events to be disregarded. This bug manifested in an issue where the CPU counters where reporting negative values. This was caused by the CPU usage/demand being subtracted from a zero capacity.
2022-11-13refactor: Replace use of CoroutineContext by DispatcherFabian Mastenbroek
This change replaces the use of `CoroutineContext` for passing the `SimulationDispatcher` across the different modules of OpenDC by the lightweight `Dispatcher` interface of the OpenDC common module.
2022-11-13refactor(sim/core): Re-implement SimulationScheduler as DispatcherFabian Mastenbroek
This change updates the `SimulationScheduler` class to implement the `Dispatcher` interface from the OpenDC Common module, so that OpenDC modules only need to depend on the common module for dispatching future task (possibly in simulation).
2022-10-21refactor(sim/flow): Remove old flow simulatorFabian Mastenbroek
This change removes the old version of the flow simulator from the OpenDC repository. The old version has been replaced by the new flow2 framework which is able to simulate flows more efficiently.
2022-10-21feat(sim/flow): Add forwarding flow multiplexerFabian Mastenbroek
This change implements a new `FlowMultiplexer` that forwards the inputs directly to one of the pre-allocated outputs.
2022-10-21perf(sim/flow): Add support for multi-flow stagesFabian Mastenbroek
This change adds support for creating nodes in a flow graph that support multiple inputs and outputs directly, instead of our current approach where we need to re-implement the `FlowConsumerContext` interface in order to support multiple inputs or outputs.
2022-10-06build: Switch to Spotless for formattingFabian Mastenbroek
This change updates the build configuration to use Spotless for code formating of both Kotlin and Java.
2022-10-06style: Eliminate use of wildcard importsFabian Mastenbroek
This change updates the repository to remove the use of wildcard imports everywhere. Wildcard imports are not allowed by default by Ktlint as well as Google's Java style guide.
2022-10-05refactor(sim/core): Rename runBlockingSimulation to runSimulationFabian Mastenbroek
This change renames the method `runBlockingSimulation` to `runSimulation` to put more emphasis on the simulation part of the method. The blocking part is not that important, but this behavior is still described in the method documentation.
2022-10-05refactor(sim/core): Use SimulationScheduler in coroutine dispatcherFabian Mastenbroek
This change updates the implementation of `SimulationDispatcher` to use a (possibly user-provided) `SimulationScheduler` for managing the execution of the simulation and future tasks.
2022-02-18refactor(simulator): Remove delta parameter from flow callbacksFabian Mastenbroek
This change removes the delta parameter from the callbacks of the flow framework. This parameter was used to indicate the duration in time between the last call and the current call. However, its usefulness was limited since the actual delta values needed by implementors of this method had to be bridged across different flow callbacks.
2021-10-03feat(simulator): Expose CPU time counters directly on hypervisorFabian Mastenbroek
This change adds a new interface to the SimHypervisor interface that exposes the CPU time counters directly. These are derived from the flow counters and will be used by SimHost to expose them via telemetry.
2021-10-03perf(simulator): Make convergence callback optionalFabian Mastenbroek
This change adds two new properties for controlling whether the convergence callbacks of the source and consumer respectively should be invoked. This saves a lot of unnecessary calls for stages that do not have any implementation of the `onConvergence` method.
2021-10-03refactor(simulator): Create separate callbacks for remaining eventsFabian Mastenbroek
This change creates separate callbacks for the remaining events: onStart, onStop and onConverge.
2021-10-03refactor(simulator): Remove capacity eventFabian Mastenbroek
This change removes the Capacity entry from FlowEvent. Since the source is always pulled on a capacity change, we do not need a separate event for this.
2021-10-03refactor(simulator): Remove failure callback from FlowSourceFabian Mastenbroek
This change removes the `onFailure` method from FlowSource. Instead, the FlowConsumer will receive the reason for failure of the source.
2021-10-03refactor(simulator): Separate push and pull flagsFabian Mastenbroek
This change separates the push and pull flags in FlowConsumerContextImpl, meaning that sources can now push directly without pulling and vice versa.
2021-10-03refactor(simulator): Migrate to flow-based simulationFabian Mastenbroek
This change renames the `opendc-simulator-resources` module into the `opendc-simulator-flow` module to indicate that the core simulation model of OpenDC is based around modelling and simulating flows. Previously, the distinction between resource consumer and provider, and input and output caused some confusion. By switching to a flow-based model, this distinction is now clear (as in, the water flows from source to consumer/sink).