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 1, 2010, 3:56:29 PM (14 years ago)
- Author:
-
Víctor de Buen Remiro
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
v12
|
v13
|
|
149 | 149 | Anything target; |
150 | 150 | |
151 | | //Initial values of variables |
| 151 | //Initial values of variables in a column matrix nx1 |
152 | 152 | Matrix x0; |
153 | 153 | |
… |
… |
|
161 | 161 | {{{ |
162 | 162 | #!cpp |
163 | | //Optimization method. If not specified the system will choose one |
164 | | //by calling method select_automatic_algorithm |
165 | | Real id_algorithm = ?; //Numerical identifier NonLinGloOpt::Algorithm |
166 | | Text co_algorithm = ""; //Codified name |
167 | | |
168 | | //Lower bounds of the variables (-1/0 if none) |
| 163 | //Optimization method. |
| 164 | //It must be an element of NonLinGloOpt::Algorithm |
| 165 | //If is not specified the system will choose one by calling method |
| 166 | //select_automatic_algorithm |
| 167 | Real id_algorithm = ?; |
| 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 | 173 | Matrix lower_bounds = Rand(0,0,0,0); |
170 | 174 | |
171 | | //Variable upper bounds (+1/0 if none) |
| 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 |
172 | 179 | Matrix upper_bounds = Rand(0,0,0,0); |
173 | 180 | |
… |
… |
|
192 | 199 | Set equations = Copy(Empty); |
193 | 200 | |
194 | | //Tolerance for the evaluation of inequality constraints |
| 201 | //Tolerance for the evaluation of inequality constraints to avoid |
| 202 | //ronding errors |
195 | 203 | Real inequationTolerance = 1E-8; |
196 | 204 | |
197 | | //Tolerance for the evaluation of the equality constraints |
| 205 | //Tolerance for the evaluation of the equality constraints to avoid |
| 206 | //ronding errors |
198 | 207 | Real equationTolerance = 1E-8; |
199 | 208 | |
200 | | //Relative tolerance of the stop criteria |
| 209 | //Relative tolerance of the stopping criteria |
201 | 210 | Real relativeTolerance = 1E-6; |
202 | 211 | |
203 | | //Maximum run time |
| 212 | //Maximum run time of the stopping criteria |
204 | 213 | Real maxTime = ?; |
205 | 214 | |
… |
… |
|
354 | 363 | Anything target = my_function; |
355 | 364 | //Lower bounds |
356 | | Matrix lower_bounds = Col(-10, 0); //x1>=-10, x2 >= 0 |
357 | | //Upper bounds |
358 | | Matrix upper_bounds = Col( 10, 10); //x1<= 10, x2 <=10 |
| 365 | Matrix lower_bounds = Col(-1/0, 0); // -x2 <= 0 |
| 366 | //No upper bounds. You can skip next line |
| 367 | Matrix upper_bounds = Col( 1/0, 1/0); |
359 | 368 | //There are two non linear constraining inequations |
360 | 369 | Set inequations = [[ |
… |
… |
|
425 | 434 | |
426 | 435 | |
427 | | |
428 | | |