PREV
TOP_OF_MAIN_SECTION
arrmblsize = 200000; // use instead of
// gradient_structure::set_ARRAY_MEMBLOCK_SIZE
gradient_structure::set_GRADSTACK_BUFFER_SIZE(100000); // this may be incorrect in
// the AUTODIF manual.
gradient_structure::set_CMPDIF_BUFFER_SIZE(50000);
gradient_structure::set_MAX_NVAR_OFFSET(500); // can have up to 500
// independent variables
gradient_structure::set_MAX_NUM_DEPENDENT_VARIABLES(500); // can have up to
// 500 dependent variables
Note that within AD Model Builder one doesn't use the function gradient_structure::set_ARRAY_MEMBLOCK_SIZE to set the amount of memory available for variable arrays. Instead use the line of code arrmblsize = nnn; where nnn is the amount of memory desired.
switch (current_phase()
{
case 1:
// some action
cout << "Before phase 1 minimization " << endl;
break;
case 2: i
// some action
cout << "Before phase 2 minimization " << endl;
break;
// ....
}