1 | <head> |
---|
2 | <title>the mad program</title> |
---|
3 | <!-- Changed by: Chris ISELIN, 27-Jan-1997 --> |
---|
4 | <!-- Changed by: Oliver Bruning, 20-Jun-2002 --> |
---|
5 | </head> |
---|
6 | |
---|
7 | <body bgcolor="#ffffff"> |
---|
8 | |
---|
9 | <center> |
---|
10 | EUROPEAN ORGANIZATION FOR NUCLEAR RESEARCH |
---|
11 | <IMG SRC="http://cern.ch/madx/icons/mx7_25.gif" align=right> |
---|
12 | <h2>Matching Methods</h2> |
---|
13 | </center> |
---|
14 | <p> |
---|
15 | MADX currently supports four different matching algorithms: |
---|
16 | <p> |
---|
17 | <ul> |
---|
18 | <li> |
---|
19 | <h2><a name=lmdif>LMDIF: Fast Gradient Minimisation</a></h2> |
---|
20 | The LMDIF command minimises the sum of squares of the constraint |
---|
21 | functions using their numerical derivatives: |
---|
22 | <pre> |
---|
23 | LMDIF,CALLS=integer,TOLERANCE=real; |
---|
24 | </pre> |
---|
25 | It is the fastest minimisation method available in MAD. |
---|
26 | The command has two attributes: |
---|
27 | <ul> |
---|
28 | <li>CALLS: |
---|
29 | The maximum number of calls to the penalty function (default: 1000). |
---|
30 | <li>TOLERANCE: |
---|
31 | The desired tolerance for the minimum (default: 10**(-6)). |
---|
32 | </ul> |
---|
33 | Example: |
---|
34 | <pre> |
---|
35 | LMDIF,CALLS=2000,TOLERANCE=1.0E-8; |
---|
36 | </pre> |
---|
37 | <li> |
---|
38 | <h2><a name=migrad>MIGRAD: Gradient Minimisation</a></h2> |
---|
39 | The MIGRAD command minimises the penalty |
---|
40 | function using the numerical derivatives of the sum of squares: |
---|
41 | <pre> |
---|
42 | MIGRAD,CALLS=integer,TOLERANCE=real,STRATEGY=1; |
---|
43 | </pre> |
---|
44 | The command has three attributes: |
---|
45 | <ul> |
---|
46 | <li>CALLS: |
---|
47 | The maximum number of calls to the penalty function (default: 1000). |
---|
48 | <li>TOLERANCE: |
---|
49 | The desired tolerance for the minimum (default: 10**(-6)). |
---|
50 | <li>STRATEGY: |
---|
51 | A code for the strategy to be used (default: 1). |
---|
52 | Details are given in <a href="bibliography.html#minuit">[James]</a>. |
---|
53 | </ul> |
---|
54 | Example: |
---|
55 | <pre> |
---|
56 | MIGRAD,CALLS=2000,TOLERANCE=1.0E-8; |
---|
57 | </pre> |
---|
58 | <li> |
---|
59 | <h2><a name=simplex>SIMPLEX: Simplex Minimisation</a></h2> |
---|
60 | The SIMPLEX command minimises the penalty |
---|
61 | function by the simplex method: |
---|
62 | <pre> |
---|
63 | SIMPLEX,CALLS=integer,TOLERANCE=real; |
---|
64 | </pre> |
---|
65 | Details are given in <a href="bibliography.html#minuit">[James]</a>. |
---|
66 | The command has two attributes: |
---|
67 | <ul> |
---|
68 | <li>CALLS: |
---|
69 | The maximum number of calls to the penalty function (default: 1000). |
---|
70 | <li>TOLERANCE: |
---|
71 | The desired tolerance for the minimum (default: 10**(-6)). |
---|
72 | </ul> |
---|
73 | Example: |
---|
74 | <pre> |
---|
75 | SIMPLEX,CALLS=2000,TOLERANCE=1.0E-8; |
---|
76 | </pre> |
---|
77 | <li> |
---|
78 | <h2><a name=jacobian>JACOBIAN: Newton Minimisation</a></h2> |
---|
79 | The JACOBIAN command minimises the penalty |
---|
80 | function calculating the Jacobian and solving the linear problem. A QR or LQ decomposition is performed when the system is over or under-determined. Before starting the matching routine two optional transformations (COOL and RANDOM) are performed. |
---|
81 | |
---|
82 | |
---|
83 | |
---|
84 | |
---|
85 | <pre> |
---|
86 | JACOBIAN,CALLS=integer,TOLERANCE=real,REPEAT=integer,STRATEGY=integer,COOL=real,BALANCE=real, random=real; |
---|
87 | </pre> |
---|
88 | The command has the attributes: |
---|
89 | <ul> |
---|
90 | <li>CALLS: |
---|
91 | The maximum number of calls to the penalty function (default: 30). |
---|
92 | <li>TOLERANCE: |
---|
93 | The desired tolerance for the minimum (default: 10**(-6)). |
---|
94 | <li>REPEAT: |
---|
95 | The number of call of the JACOBIAN routine (default: 1). |
---|
96 | <li>BISEC: |
---|
97 | Selects the maximum number of iteratation used to |
---|
98 | determin the step length which reduces the penalty function during the main |
---|
99 | iteration. A large number (i.e. 6) reduce the probability to diverge from the |
---|
100 | solution, but increase the one for being trapped in a local minum. |
---|
101 | <li>STRATEGY: |
---|
102 | A code for the strategy to be used (default: 3). If STRATEGY=1 the routine resets the values of the variables which exceeds the limits. If STRATEGY=2 the routine print the Jacobian and exit without matching. If STRATEGY=3 the routine disables the variables which exceeds the limits keeping however the number of variables greater or equal to the number of the constraints. |
---|
103 | <li>COOL, BALANCE: |
---|
104 | The factors which specify the following transformation:<pre> |
---|
105 | if "balance" >=0 |
---|
106 | newval=(1-cool)*oldval+cool*( (1-balance)*maxval+balance*minval ) |
---|
107 | else |
---|
108 | newval=(1-cool)*oldval+cool* optval |
---|
109 | </pre> |
---|
110 | where <tt>newval</tt> is the new value after the transformation, <tt>oldval</tt> is the previous value, <tt>maxval, minval, optval</tt> are the maximum value, minimum value, optimal value of the variable specified in the <a href="match_vary.html">VARY</a> command. |
---|
111 | <li>RANDOM: |
---|
112 | The factors which specify the following transformation:<pre> |
---|
113 | newval= (1+ random * rand() ) * oldval |
---|
114 | </pre> |
---|
115 | where <tt>newval</tt> is the new value after the transformation, <tt>oldval</tt> is the previous value, <tt>rand()</tt> is a stochastic variable with a uniform (-0.5,0.5) distribution. |
---|
116 | </ul> |
---|
117 | Example: |
---|
118 | <pre> |
---|
119 | JACOBIAN,CALLS=20,TOLERANCE=1.0E-8,STRATEGY=3,COOL=0.1,BALANCE=0.5,RANDOM=0.01; |
---|
120 | </pre> |
---|
121 | </ul> |
---|
122 | <hr> |
---|
123 | |
---|
124 | <address> |
---|
125 | <a href="http://bruening.home.cern.ch/bruening/">Oliver Brüning</a>, |
---|
126 | June, 2002. |
---|
127 | <a href="http://rdemaria.home.cern.ch/rdemaria/">Riccardo de Maria</a>, February, 2006. |
---|
128 | </address> |
---|
129 | |
---|
130 | </body> |
---|