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.

Changes between Version 12 and Version 13 of OfficialTolArchiveNetworkNonLinGloOpt


Ignore:
Timestamp:
Dec 1, 2010, 3:56:29 PM (14 years ago)
Author:
Víctor de Buen Remiro
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OfficialTolArchiveNetworkNonLinGloOpt

    v12 v13  
    149149  Anything target;
    150150
    151 //Initial values of variables
     151//Initial values of variables in a column matrix nx1
    152152  Matrix x0;       
    153153
     
    161161{{{
    162162#!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
    169173  Matrix lower_bounds = Rand(0,0,0,0);
    170174
    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
    172179  Matrix upper_bounds = Rand(0,0,0,0);
    173180
     
    192199  Set equations = Copy(Empty);   
    193200
    194 //Tolerance for the evaluation of inequality constraints
     201//Tolerance for the evaluation of inequality constraints to avoid 
     202//ronding errors
    195203  Real inequationTolerance = 1E-8;
    196204
    197 //Tolerance for the evaluation of the equality constraints
     205//Tolerance for the evaluation of the equality constraints to avoid 
     206//ronding errors
    198207  Real equationTolerance = 1E-8;
    199208
    200 //Relative tolerance of the stop criteria
     209//Relative tolerance of the stopping criteria
    201210  Real relativeTolerance = 1E-6;
    202211
    203 //Maximum run time
     212//Maximum run time of the stopping criteria
    204213  Real maxTime = ?;
    205214
     
    354363  Anything target = my_function;
    355364  //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);
    359368  //There are two non linear constraining inequations
    360369  Set inequations = [[
     
    425434
    426435 
    427  
    428