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? |
---|---|---|---|---|
|
bool |
If files should be used |
|
✅ |
|
str |
What variables/constraints should be used |
✅ |
|
|
float |
Max relative increase of \(\phi_s\) wrt nominal in \(\mathrm{\%}\) |
✅ |
|
|
float |
Max absolute \(\phi_s\) in \(\mathrm{deg}\) |
default |
❌ |
|
float |
Min absolute \(\phi_s\) in \(\mathrm{deg}\) |
default |
❌ |
|
float |
Max decrease of \(k_e\) wrt nominal in \(\mathrm{\%}\) |
✅ |
|
|
float |
Max increase of \(k_e\) wrt nominal in \(\mathrm{\%}\) |
✅ |
|
|
bool |
If max \(k_e\) should be the same for the whole section |
default |
❌ |
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? |
---|---|---|---|---|
|
bool |
If files should be used |
|
✅ |
|
str |
What variables/constraints should be used |
✅ |
|
|
str |
Path to the |
✅ |
|
|
str |
Path to the |
❌ |
Ultimately, these settings will be passed down to DesignSpaceFactory
.