wtf section

wtf stands for what to fit. This section parametrizes the failed cavities, as well as how they are fixed.

Entry

Type

Description

Allowed values

Mandatory?

optimisation_algorithm

str

Name of optimisation algorithm

algorithms

strategy

str

How compensating cavities are selected

strategies

id_nature

str

Indicates if failed is element index/cavity index/name

element or cavity or name

failed

list[list[int]] | list[list[str]]

Index of failed cavities

objective_preset

str

Objectives for the optimisation algorithm

objective_presets

optimisation_algorithm_kwargs

dict

Keyword arguments passed to the actual optimisation method

Each strategy entry requires specific additional arguments. As an example, with the k out of n method, you need to give LightWin k, the number of compensating cavities per failed cavity. The specific documentation can be found in failures.strategy.

You can type the index of failed cavities on several lines if you want to study several fault scenarios at once.

Example

# Indexes are cavity indexes
idx = cavity
failed = [
   [0, 1],       # First simulation first cryomodule is down
   [0],          # Second simulation only first cavity is down
   [1, 45]       # Third simulation second and 46th cavity are down
]