close
Warning:
Can't synchronize with repository "(default)" (/var/svn/tolp does not appear to be a Subversion repository.). Look in the Trac log for more information.
- Timestamp:
-
Dec 2, 2010, 9:34:34 AM (14 years ago)
- Author:
-
Víctor de Buen Remiro
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
v13
|
v14
|
|
113 | 113 | {{{ |
114 | 114 | #!cpp |
115 | | //If you sign ==- 1 minimized, and if sign == 1 maximizes |
| 115 | //Set sign ==- 1 for minimization, sign == 1 for maximization |
116 | 116 | Real sign; |
117 | 117 | |
… |
… |
|
131 | 131 | Real id_analyticalClass; |
132 | 132 | |
133 | | //Indicates if the gradient known or unknown in an analytical or |
134 | | //numerical way. Must be one element of |
| 133 | //Indicates if the gradient is known analytically or numerically. |
| 134 | //Must be an element of |
135 | 135 | //Set NonLinGloOpt::GradientKnowneledge = |
136 | 136 | //[[ |
… |
… |
|
141 | 141 | Real id_useGradient; |
142 | 142 | |
143 | | //Target function could be a simple Code or a class method of an |
144 | | //instance owner. |
| 143 | //Target function could be a simple Code or a class method of a |
| 144 | //particular instance. |
145 | 145 | // - Real target(Matrix x, Matrix gradient) |
146 | 146 | // - Set target = [[NameBlock owner, Code method]] |
… |
… |
|
149 | 149 | Anything target; |
150 | 150 | |
151 | | //Initial values of variables in a column matrix nx1 |
| 151 | //Initial values of variables in an nx1 column matrix |
152 | 152 | Matrix x0; |
153 | 153 | |
… |
… |
|
163 | 163 | //Optimization method. |
164 | 164 | //It must be an element of NonLinGloOpt::Algorithm |
165 | | //If is not specified the system will choose one by calling method |
| 165 | //If it is not specified the system will choose one by calling method |
166 | 166 | //select_automatic_algorithm |
167 | 167 | Real id_algorithm = ?; |
168 | 168 | |
169 | | //Lower bounds of the variables |
170 | | //It must be a column matrix nx1 with the minimum values of each |
171 | | //variable or -1/0 when there is unbounded |
172 | | //If there are no lower bound for any then it's the empty matrix |
| 169 | //Lower bounds for the variables |
| 170 | //These must be specified by an nx1 column matrix with the minimum value for each |
| 171 | //variable, or -1/0 if the variable is not bounded below |
| 172 | //If there are no lower bounds at all then it's the empty matrix |
173 | 173 | Matrix lower_bounds = Rand(0,0,0,0); |
174 | 174 | |
175 | | //Variable upper bounds |
176 | | //It must be a column matrix nx1 with the minimum values of each |
177 | | //variable or -1/0 when there is unbounded |
178 | | //If there are no upper bound for any then it's the empty matrix |
| 175 | //Upper bounds for the variables |
| 176 | //These must be specified by an nx1 column matrix with the maximum value for each |
| 177 | //variable, or -1/0 if the variable is not bounded above |
| 178 | //If there are no upper bounds at all then it's the empty matrix |
179 | 179 | Matrix upper_bounds = Rand(0,0,0,0); |
180 | 180 | |
181 | 181 | //Set of inequality constraints g(x)<=0 |
182 | | //Conjunto de elementos Code o [[NameBlock owner, Code target]] para métodos |
183 | | //Constraining function could be a simple Code or a class method of an |
184 | | //instance owner. |
| 182 | //Set of Code elements or [[NameBlock owner, Code target]] for methods |
| 183 | //Constraining function could be a simple Code or a class method of a |
| 184 | //particular instance. |
185 | 185 | // - Real g (Matrix x, Matrix gradient) |
186 | 186 | // - Set g = [[NameBlock owner, Code method]] |
… |
… |
|
190 | 190 | |
191 | 191 | //Set of equality constraints h(x)<=0 |
192 | | //Conjunto de elementos Code o [[NameBlock owner, Code target]] para métodos |
193 | | //Constraining function could be a simple Code or a class method of an |
194 | | //instance owner. |
| 192 | //Set of Code elements or [[NameBlock owner, Code target]] for methods |
| 193 | //Constraining function could be a simple Code or a class method of a |
| 194 | //particular instance. |
195 | 195 | // - Real h (Matrix x, Matrix gradient) |
196 | 196 | // - Set h = [[NameBlock owner, Code method]] |
… |
… |
|
200 | 200 | |
201 | 201 | //Tolerance for the evaluation of inequality constraints to avoid |
202 | | //ronding errors |
| 202 | //rounding errors |
203 | 203 | Real inequationTolerance = 1E-8; |
204 | 204 | |
205 | 205 | //Tolerance for the evaluation of the equality constraints to avoid |
206 | | //ronding errors |
| 206 | //rounding errors |
207 | 207 | Real equationTolerance = 1E-8; |
208 | 208 | |
… |
… |
|
210 | 210 | Real relativeTolerance = 1E-6; |
211 | 211 | |
212 | | //Maximum run time of the stopping criteria |
| 212 | //Maximum run time for the stopping criteria |
213 | 213 | Real maxTime = ?; |
214 | 214 | |
215 | | //If verboseEach>0, evaluation of target funciton will be traced |
216 | | //each the specified number of evaluations. |
| 215 | //If verboseEach>0, the evaluation of the target function will be traced |
| 216 | //every "verboseEach" evaluations. |
217 | 217 | Real verboseEach = 100; |
218 | 218 | |
… |
… |
|
308 | 308 | #!cpp |
309 | 309 | //////////////////////////////////////////////////////////////////////////////// |
310 | | //When a set of constraining functions are part of a parametric family |
311 | | //of funcitons we can define a class to make an easier definition |
| 310 | //When a set of constraining functions is part of a parametric family |
| 311 | //of functions we can define a class to facilitate the definition |
312 | 312 | Class @my_inequation |
313 | 313 | //////////////////////////////////////////////////////////////////////////////// |
… |
… |
|
341 | 341 | {{{ |
342 | 342 | #!cpp |
343 | | //Don't forget require the package if it has still no been loaded |
| 343 | //Don't forget to load the package if it has not yet been loaded |
344 | 344 | #Require NonLinGloOpt; |
345 | 345 | |
… |
… |
|
377 | 377 | //Stopping criteria of maximum running time |
378 | 378 | Real maxTime = 60; |
379 | | //Funcitons will be traced each this number of evaluations |
| 379 | //Functions will be traced every "verboseEach" evaluations |
380 | 380 | Real verboseEach = 1 |
381 | 381 | ]]; |