Breaking and fixing a linac

The methods to break – and then fix – a linac are stored in the Fault objects, gathered in FaultScenario. A Fault is composed of one or several failed cavities that are fixed together. A FaultScenario is composed of one or several Fault happening at the same time.

The compensation is realized by an OptimisationAlgorithm. It will try to find the best Variables that match the Objectives while respecting the Constraints. Under the hood, it converts at each iteration the list of Variables into a SetOfCavitySettings. The latter is given as argument to the BeamCalculator.run_with_this() which gives a SimulationOutput from which the Objectives are evaluated.