optimisation.design_space section

This section parametrizes how the design space will be set, i.e. what are the variables, their limits and initial values, and what are the constraints and their limits. If you have any doubt, know that all these settings are passed down to DesignSpaceFactory.__init__() as design_space_kw.

There are two ways to define the design space limits and initial values; the first is to let LightWin calculate it from the nominal settings of the linac. This approach is easier to use for the first runs.

Entry

Type

Description

Allowed values

Mandatory?

from_file

bool

If files should be used

False

design_space_preset

str

What variables/constraints should be used

DESIGN_SPACE_FACTORY_PRESETS

max_increase_sync_phase_in_percent

float

Max relative increase of \(\phi_s\) wrt nominal in \(\mathrm{\%}\)

max_absolute_sync_phase_in_deg

float

Max absolute \(\phi_s\) in \(\mathrm{deg}\)

default 0.

min_absolute_sync_phase_in_deg

float

Min absolute \(\phi_s\) in \(\mathrm{deg}\)

default 90.

max_decrease_k_e_in_percent

float

Max decrease of \(k_e\) wrt nominal in \(\mathrm{\%}\)

max_increase_k_e_in_percent

float

Max increase of \(k_e\) wrt nominal in \(\mathrm{\%}\)

maximum_k_e_is_calculated_wrt_maximum_k_e_of_section

bool

If max \(k_e\) should be the same for the whole section

default False

When from_file is True, you must provide a path to a .csv file containing, for every element, every variable, its initial value and limits. If the problem is constrained, you must also provide a .csv with, for every element, the limits of every constraint. This approach is more useful when you want to fine-tune the optimisation, as you can manually edit the .csv, for example to take into account the specific multipacting barriers of a rogue cavity. To generate the .csv files with the proper format, look at examples/generate_design_space_files.py.

Entry

Type

Description

Allowed values

Mandatory?

from_file

bool

If files should be used

True

design_space_preset

str

What variables/constraints should be used

DESIGN_SPACE_FACTORY_PRESETS

variables_filepath

str

Path to the .csv holding variables

constraints_filepath

str

Path to the .csv holding constraints

Ultimately, these settings will be passed down to DesignSpaceFactory.