XML File 1: Rosenbrock's Function (subroutine)

The XML file for OPT++ can be thought of as being broken down into blocks of XML. Each block must be "opened" and "closed". The main block is the OPT block. It has two sub-blocks, ProblemSetup and the algorithm block. Each of those has sub-blocks which contain the detailed information for OPT++.

The ProblemSetup block has four sub-blocks. The first is the function type. In this case, it is "Library" since we are using the subroutine interface. You can see the data values for the Rosenbrock's function example.

    <Library Second="false" FEval="rosen0" First="false" LibName="testexample.so" Init="init_rosen"/>

The second sub-block is the VariableClass block. It contains an array of the optimization variables. Recall that for Rosenbrock's function, there are no bounds on the variables, so the "lower" and "upper" values consist only of empty quotes.

    <VariableClass numVariables="2">
      <Array name="VariableList">
        <Variables initVal="-1.2" lower="" upper="" theName="OPT_x1"/>
        <Variables initVal="1.0" lower="" upper="" theName="OPT_x2"/>

The third and fourth sub-blocks are LConstraintClass and NLConstraintClass, respectively. Recall that there are no constraints, these blocks take the following form.

    <LConstraintClass numLConstraints="0">
      <Array name="LinearConstraint"/>
    <NLConstraintClass numNLConstraints="0">
      <Array name="NonLinearConstraints"/>

The algorithm block is named according to the algorithm that is being used. In this case, it is PDS. (The other possibilities are CG, Newton, and NIPS.) The algorithm block has three sub-blocks that contain the algorithmic parameters. There are the BasicOptions, the AdvancedOptions, and the algorithm-specific parameters. The BasicOptions and AdvancedOptions are the same for all of the algorithms. The algorithm-specific parameters vary. You can see what they are for the different algorithms by looking at the examples in the OPT++/tests/xml directory.

    <BasicOptions maxFeval="10000" outFile="tstPDSxml.out" maxIter="100" Debug="false"/>
    <AdvancedOptions maxStep="1.e3" conTol="1.49e-08" stepTol="1.49e-08" fcnTol="1.49e-08" gradTol="6.05e-06" minStep="1.49e-08"/>
    <PDSvar searchSize="64" simpType="1"/>

Next Example: XML File 2: Hock-Schittkowski Problem Number 14 (subroutine) | Back to Using the (beta) GUI/XML Interface

Bug Reports    OPT++ Developers    Copyright Information    GNU Lesser General Public License
Documentation, generated by , last revised August 30, 2006.