Progress Event
ProgressEvent family
====================These are the only messages that flow from the solver/model to the outside world. They are intentionally small and transport‑format‑neutral so the model can publish progress without knowing anything about CSV or filesystem details (that’s the View’s job).
Conventions
Every event carries:
target
:BEST
|WORST
|AVERAGE
(so the consumer can route to the right files)threadName
: purely informational; useful to keep logs readableTypical controller routing:
when (ev) {
is CardinalityResult -> view.appendCardinality(model, ev)
is TopKReplaceBatch -> view.replaceTopBatch(model, ev.blocks)
is RunCompleted -> view.closeStreams(model)
}
CardinalityResult
:AVERAGE: exactly once per K (1..#topics)
BEST/WORST: only when the per‑K representative improves in that generation
functionValuesCsvLine
andvariableValuesCsvLine
are already in the jMetal style expected by the sink; the View appends them and keeps a buffer to globally sort & rewrite on closeTopKReplaceBatch
:Emitted once per generation (and once at the very end)
Contains the set of K blocks whose content changed
Each K maps to exactly 10 pre‑sorted CSV lines (by correlation ASC)
The View overwrites the entire
-Top
file with all known blocks ordered by KRunCompleted
:Signals end‑of‑stream so the View can close writers and perform the final global sort & rewrite of
-Fun
/-Var