Uses of Class
edu.cnu.mdi.sim.SimulationContext
Packages that use SimulationContext
Package
Description
UI-independent simulation lifecycle abstractions and a background execution
engine whose listener callbacks are delivered on the Swing event thread.
Generic, maximization-oriented genetic-algorithm contracts and simulation
support.
Generic simulated annealing for minimizing finite-valued energy functions.
-
Uses of SimulationContext in edu.cnu.mdi.sim
Methods in edu.cnu.mdi.sim that return SimulationContextModifier and TypeMethodDescriptionSimulationEngine.getContext()Return theSimulationContextshared with the simulation.default SimulationContextISimulationHost.getSimulationContext()Convenience method to query the simulation context.Methods in edu.cnu.mdi.sim with parameters of type SimulationContextModifier and TypeMethodDescriptiondefault voidSimulation.cancel(SimulationContext ctx) Cancellation hook called on the simulation thread after cancel is requested.voidSimulation.init(SimulationContext ctx) Initialize simulation resources.default voidSimulationListener.onCancelRequested(SimulationContext ctx) Called when cancellation is requested viaSimulationEngine.requestCancel().default voidSimulationListener.onCompleted(SimulationContext ctx, CompletionStatus status, Throwable error) Called exactly once when the engine reaches a terminal outcome.default voidSimulationListener.onDone(SimulationContext ctx) Called when the engine ends normally (reachesSimulationState.TERMINATED).default voidSimulationListener.onFail(SimulationContext ctx, Throwable error) Called when the engine fails (reachesSimulationState.FAILED).default voidSimulationListener.onInit(SimulationContext ctx) Called after the engine transitions toSimulationState.INITIALIZING.default voidSimulationListener.onMessage(SimulationContext ctx, String message) Called for status/log messages intended for UI display.default voidSimulationListener.onPause(SimulationContext ctx) Called when the engine entersSimulationState.PAUSED.default voidSimulationListener.onProgress(SimulationContext ctx, ProgressInfo progress) Called for progress updates (indeterminate or determinate).default voidSimulationListener.onReady(SimulationContext ctx) Called when initialization completes and the engine reachesSimulationState.READY.default voidSimulationListener.onRefresh(SimulationContext ctx) Called for a graphics refresh/update event.default voidSimulationListener.onResume(SimulationContext ctx) Called when the engine resumes fromSimulationState.PAUSEDback toSimulationState.RUNNING.default voidSimulationListener.onRun(SimulationContext ctx) Called when the engine begins execution (entersSimulationState.RUNNING).default voidSimulationListener.onStateChange(SimulationContext ctx, SimulationState from, SimulationState to, String reason) Called on every state transition.default voidSimulation.shutdown(SimulationContext ctx) Shutdown hook called on the simulation thread when the engine is terminating (normal completion, stop, cancel, or failure).booleanSimulation.step(SimulationContext ctx) Execute a single step of the simulation. -
Uses of SimulationContext in edu.cnu.mdi.sim.demo.network
Methods in edu.cnu.mdi.sim.demo.network with parameters of type SimulationContextModifier and TypeMethodDescriptionvoidNetworkDeclutterSimulation.cancel(SimulationContext ctx) Cancellation hook called by the engine on the simulation thread.voidNetworkDeclutterSimulation.init(SimulationContext ctx) Initialize the simulation: reset the step counter and post an initial refresh so the user sees the starting layout before it starts moving.voidNetworkDeclutterControlPanel.onDone(SimulationContext ctx) voidNetworkDeclutterControlPanel.onFail(SimulationContext ctx, Throwable error) voidNetworkDeclutterControlPanel.onProgress(SimulationContext ctx, ProgressInfo progress) voidNetworkDeclutterControlPanel.onReady(SimulationContext ctx) protected voidNetworkDeclutterDemoView.onSimulationRefresh(SimulationContext ctx) voidNetworkDeclutterControlPanel.onStateChange(SimulationContext ctx, SimulationState from, SimulationState to, String reason) booleanNetworkDeclutterSimulation.step(SimulationContext ctx) -
Uses of SimulationContext in edu.cnu.mdi.sim.ga
Methods in edu.cnu.mdi.sim.ga with parameters of type SimulationContextModifier and TypeMethodDescriptionvoidGeneticAlgorithmSimulation.init(SimulationContext ctx) Seeds the RNG, builds the initial population viaGAProblem.initialPopulation(int, java.util.Random), evaluates and tracks the best individual, and resets the generation counter to zero.booleanGeneticAlgorithmSimulation.step(SimulationContext ctx) Advances the GA by one generation: builds an offspring pool via selection/crossover/mutation, evaluates it, replaces the population viaReplacementOperator.replace(java.util.List<T>, java.util.List<T>, double[], double[], java.util.Random), and re-evaluates the resulting generation. -
Uses of SimulationContext in edu.cnu.mdi.sim.ga.triimage
Methods in edu.cnu.mdi.sim.ga.triimage with parameters of type SimulationContextModifier and TypeMethodDescriptionprotected voidImageEvolutionDemoView.onSimulationRefresh(SimulationContext ctx) Called on the EDT before the view repaints in response to a refresh.protected voidImageEvolutionDemoView.onSimulationStateChange(SimulationContext ctx, SimulationState from, SimulationState to, String reason) voidImageEvolutionControlPanel.onStateChange(SimulationContext ctx, SimulationState from, SimulationState to, String reason) -
Uses of SimulationContext in edu.cnu.mdi.sim.simanneal
Methods in edu.cnu.mdi.sim.simanneal with parameters of type SimulationContextModifier and TypeMethodDescriptionvoidSimulatedAnnealingSimulation.init(SimulationContext ctx) Initialize the simulation.booleanSimulatedAnnealingSimulation.step(SimulationContext ctx) Perform one annealing iteration. -
Uses of SimulationContext in edu.cnu.mdi.sim.simanneal.tspdemo
Methods in edu.cnu.mdi.sim.simanneal.tspdemo with parameters of type SimulationContextModifier and TypeMethodDescriptionvoidTspDemoControlPanel.onDone(SimulationContext ctx) Called when the engine ends normally (reachesSimulationState.TERMINATED).voidTspDemoControlPanel.onFail(SimulationContext ctx, Throwable error) Called when the engine fails (reachesSimulationState.FAILED).voidTspDemoControlPanel.onProgress(SimulationContext ctx, ProgressInfo progress) Called for progress updates (indeterminate or determinate).voidTspDemoControlPanel.onReady(SimulationContext ctx) Called when initialization completes and the engine reachesSimulationState.READY.protected voidTspDemoView.onSimulationProgress(SimulationContext ctx, ProgressInfo progress) Refresh the best tour snapshot from the simulation's current best solution.voidTspDemoControlPanel.onStateChange(SimulationContext ctx, SimulationState from, SimulationState to, String reason) Called on every state transition. -
Uses of SimulationContext in edu.cnu.mdi.sim.ui
Methods in edu.cnu.mdi.sim.ui with parameters of type SimulationContextModifier and TypeMethodDescriptionvoidIconSimulationControlPanel.onCancelRequested(SimulationContext ctx) voidSimulationControlPanel.onCancelRequested(SimulationContext ctx) voidSimulationView.onCancelRequested(SimulationContext ctx) voidIconSimulationControlPanel.onDone(SimulationContext ctx) voidSimulationControlPanel.onDone(SimulationContext ctx) voidSimulationView.onDone(SimulationContext ctx) voidIconSimulationControlPanel.onFail(SimulationContext ctx, Throwable error) voidSimulationControlPanel.onFail(SimulationContext ctx, Throwable error) voidSimulationView.onFail(SimulationContext ctx, Throwable error) voidSimulationView.onInit(SimulationContext ctx) voidIconSimulationControlPanel.onMessage(SimulationContext ctx, String message) voidSimulationControlPanel.onMessage(SimulationContext ctx, String message) voidSimulationView.onMessage(SimulationContext ctx, String message) voidIconSimulationControlPanel.onPause(SimulationContext ctx) voidSimulationControlPanel.onPause(SimulationContext ctx) voidSimulationView.onPause(SimulationContext ctx) voidIconSimulationControlPanel.onProgress(SimulationContext ctx, ProgressInfo progress) voidSimulationControlPanel.onProgress(SimulationContext ctx, ProgressInfo progress) voidSimulationView.onProgress(SimulationContext ctx, ProgressInfo progress) voidSimulationView.onReady(SimulationContext ctx) voidIconSimulationControlPanel.onRefresh(SimulationContext ctx) voidSimulationView.onRefresh(SimulationContext ctx) Default refresh behavior for MDI: repaint the container component.voidIconSimulationControlPanel.onResume(SimulationContext ctx) voidSimulationControlPanel.onResume(SimulationContext ctx) voidSimulationView.onResume(SimulationContext ctx) voidIconSimulationControlPanel.onRun(SimulationContext ctx) voidSimulationControlPanel.onRun(SimulationContext ctx) voidSimulationView.onRun(SimulationContext ctx) protected voidSimulationView.onSimulationCancelRequested(SimulationContext ctx) Called on the EDT after the first cancellation request.protected voidSimulationView.onSimulationDone(SimulationContext ctx) Called on the EDT after normal termination.protected voidSimulationView.onSimulationFail(SimulationContext ctx, Throwable error) Called on the EDT after simulation failure.protected voidSimulationView.onSimulationInit(SimulationContext ctx) Called on the EDT after simulation initialization begins.protected voidSimulationView.onSimulationMessage(SimulationContext ctx, String message) Called on the EDT when the simulation posts a status message.protected voidSimulationView.onSimulationPause(SimulationContext ctx) Called on the EDT when the simulation pauses.protected voidSimulationView.onSimulationProgress(SimulationContext ctx, ProgressInfo progress) Called on the EDT when the simulation posts progress.protected voidSimulationView.onSimulationReady(SimulationContext ctx) Called on the EDT when the initialized simulation becomes ready.protected voidSimulationView.onSimulationRefresh(SimulationContext ctx) Called on the EDT before the view repaints in response to a refresh.protected voidSimulationView.onSimulationResume(SimulationContext ctx) Called on the EDT when a paused simulation resumes.protected voidSimulationView.onSimulationRun(SimulationContext ctx) Called on the EDT when the simulation first starts running.protected voidSimulationView.onSimulationStateChange(SimulationContext ctx, SimulationState from, SimulationState to, String reason) Called on the EDT after any engine state transition.voidIconSimulationControlPanel.onStateChange(SimulationContext ctx, SimulationState from, SimulationState to, String reason) voidSimulationControlPanel.onStateChange(SimulationContext ctx, SimulationState from, SimulationState to, String reason) voidSimulationView.onStateChange(SimulationContext ctx, SimulationState from, SimulationState to, String reason)