wtf section
wtf stands for what to fit.
This section parametrizes the failed cavities, as well as how they are fixed.
k out of n method
Entry |
Type |
Description |
Mandatory? |
Allowed values |
|---|---|---|---|---|
|
|
Index/name of failed cavities. Must be a
|
✅ |
|
|
|
kwargs for the |
❌ |
|
|
|
Indicates if failed is element index/cavity index/name,
|
✅ |
(‘element’, ‘cavity’, ‘name’) |
|
|
Objectives for the optimisation algorithm. |
✅ |
(‘EnergyMismatch’, ‘EnergyPhaseMismatch’, ‘EnergySeveralMismatches’, ‘EnergySyncPhaseMismatch’, ‘experimental’, ‘rephased_ADS’, ‘simple_ADS’, ‘sync_phase_as_objective_ADS’) |
|
|
Name of optimisation algorithm. |
✅ |
(‘bayesian_optimization’, ‘differential_evolution’, ‘downhill_simplex’, ‘downhill_simplex_penalty’, ‘experimental’, ‘explorator’, ‘least_squares’, ‘least_squares_penalty’, ‘nelder_mead’, ‘nelder_mead_penalty’, ‘nsga’) |
|
|
Keyword arguments passed to the optimisation algorithm. |
❌ |
|
|
|
How compensating cavities are selected. |
✅ |
(‘k out of n’, ‘l neighboring lattices’, ‘global’, ‘global_downstream’, ‘manual’) |
|
|
How to select the compensating elements when several are equidistant to the failure. |
❌ |
(‘upstream first’, ‘downstream first’) |
|
|
Distance increase for downstream elements (
( window of compensating cavities which is not centered around the failed elements. |
❌ |
|
|
|
Number of compensating cavities per failed cavity. |
✅ |
l neighboring lattices method
Entry |
Type |
Description |
Mandatory? |
Allowed values |
|---|---|---|---|---|
|
|
Index/name of failed cavities. Must be a
|
✅ |
|
|
|
kwargs for the |
❌ |
|
|
|
Indicates if failed is element index/cavity index/name,
|
✅ |
(‘element’, ‘cavity’, ‘name’) |
|
|
Objectives for the optimisation algorithm. |
✅ |
(‘EnergyMismatch’, ‘EnergyPhaseMismatch’, ‘EnergySeveralMismatches’, ‘EnergySyncPhaseMismatch’, ‘experimental’, ‘rephased_ADS’, ‘simple_ADS’, ‘sync_phase_as_objective_ADS’) |
|
|
Name of optimisation algorithm. |
✅ |
(‘bayesian_optimization’, ‘differential_evolution’, ‘downhill_simplex’, ‘downhill_simplex_penalty’, ‘experimental’, ‘explorator’, ‘least_squares’, ‘least_squares_penalty’, ‘nelder_mead’, ‘nelder_mead_penalty’, ‘nsga’) |
|
|
Keyword arguments passed to the optimisation algorithm. |
❌ |
|
|
|
How compensating cavities are selected. |
✅ |
(‘k out of n’, ‘l neighboring lattices’, ‘global’, ‘global_downstream’, ‘manual’) |
|
|
How to select the compensating elements when several are equidistant to the failure. |
❌ |
(‘upstream first’, ‘downstream first’) |
|
|
Distance increase for downstream elements (
( window of compensating cavities which is not centered around the failed elements. |
❌ |
|
|
|
Number of compensating lattices per failed cavity. |
✅ |
|
|
|
Minimum number of compensating cavities in the lattice; when a lattice does not reach this number, we use it anyway for compensation, but we also take another lattice. Designed to remove the lattices that do not have any cavity. |
❌ |
Manual association of failed / compensating cavities
If you want to manually associate each failed cavity with its compensating cavities:
Entry |
Type |
Description |
Mandatory? |
Allowed values |
|---|---|---|---|---|
|
|
Index/name of failed cavities. Must be a
|
✅ |
|
|
|
kwargs for the |
❌ |
|
|
|
Indicates if failed is element index/cavity index/name,
|
✅ |
(‘element’, ‘cavity’, ‘name’) |
|
|
Objectives for the optimisation algorithm. |
✅ |
(‘EnergyMismatch’, ‘EnergyPhaseMismatch’, ‘EnergySeveralMismatches’, ‘EnergySyncPhaseMismatch’, ‘experimental’, ‘rephased_ADS’, ‘simple_ADS’, ‘sync_phase_as_objective_ADS’) |
|
|
Name of optimisation algorithm. |
✅ |
(‘bayesian_optimization’, ‘differential_evolution’, ‘downhill_simplex’, ‘downhill_simplex_penalty’, ‘experimental’, ‘explorator’, ‘least_squares’, ‘least_squares_penalty’, ‘nelder_mead’, ‘nelder_mead_penalty’, ‘nsga’) |
|
|
Keyword arguments passed to the optimisation algorithm. |
❌ |
|
|
|
How compensating cavities are selected. |
✅ |
(‘k out of n’, ‘l neighboring lattices’, ‘global’, ‘global_downstream’, ‘manual’) |
|
|
Index/name of failed cavities. Must be a
|
✅ |
|
|
|
Index/name of compensating cavities cavities. Must be a
number of:class: length of most outer list) must match of groups of compensating cavities (second level) must match |
✅ |
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
]
Optimisation algorithms
Here are mappings of optimisation_algorithm key to actual OptimisationAlgorithm.
Check the documentation of the optimisation algorithm you want to use, in particular if you want to tune it using optimisation_algorithm_kwargs key.
Optimisation algorithm |
Corresponding keys |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|