Stopping Conditions

We’ve added a new feature to HASH where simulations can be stopped at a specific point by sending a stop message to the engine. This built-in message is useful for stopping a simulation after a given number of steps, or when a particular condition has been reached in the simulation.

state.addMessage("hash", "stop", { status: "success", reason: "completed the initial optimization" })

Additional logging data can be attached to the message to help with debugging. Read more about stop messages in the HASH docs.