cancelDesignPoint

Request cancellation of the design point with the given 1-based pointId. When the request is accepted the point's outcome carries wasCancelled = true, so the commit phase fires onDesignPointCancelled instead of treating it as a failure and skips the database write entirely.

Safe to call from any thread. Returns true only when the request actually took effect. It returns false when

  • no simulate(...) is in flight, or the id is unknown;

  • the point has not been picked up by the dispatcher yet;

  • the point already finished, or was already cancelled;

  • every replication of the point has completed, so its result is owed to the caller (see below).

Once a point's replications have all finished, cancelling it would throw away a result that has already been computed, so the request is refused and the result is committed normally. The hand-off is a compare-and-set, so a cancel and a result can never both win.

Cancellation is cooperative and takes effect between replications: ConcurrentSimulationRunner checks for it before starting each one, so the replication already in progress runs to completion and none of the remaining replications start. The point's partial work is then discarded rather than committed — cancelling buys back the rest of the run, not the current replication.