⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xml2.html.svn-base

📁 OPT++
💻 SVN-BASE
字号:
/** \page xml2 XML File 2:  Hock-Schittkowski Problem Number 14 (subroutine)The XML file for OPT++ can be thought of as being broken down intoblocks of XML.  Each block must be "opened" and "closed".  The mainblock is the OPT block.  It has two sub-blocks, ProblemSetup and thealgorithm block.  Each of those has sub-blocks which contain thedetailed information for OPT++.The ProblemSetup block has four sub-blocks.  The first is the functiontype.  In this case, it is "Library" since we are using the subroutineinterface.  You can see the data values for the Hock-Schittkowskiexample.<table><tr><td>\code<OPT>  <ProblemSetup>    <Library Second="false" FEval="hs14" First="true" LibName="testexample.so" Init="init_hs14"/>\endcode</table>The second sub-block is the VariableClass block.  It contains an arrayof 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.<table><tr><td>\code    <VariableClass numVariables="2">      <Array name="VariableList">        <Variables initVal="0.0" lower="" upper="" theName="OPT_x1"/>        <Variables initVal="0.0" lower="" upper="" theName="OPT_x2"/>      </Array>    </VariableClass>\endcode</table>The third sub-block is LConstraintClass.  The syntax may seem slightlyexcessive, but it if really just an array of LinearConstraint blocks,each of which is essentially a list of the variables and theircoefficients.  Each LinearConstraint also contains information aboutthe comparison operator (which can be >= or =) and the right-handside.<table><tr><td>\code    <LConstraintClass numLConstraints="1">      <Array name="LinearConstraint">        <LinearConstraint operator="=" constraintName="linear1" rhs="-1.0">          <Table name="Variables">            <Entry Variable="OPT_x1" Coefficient="1.0"/>            <Entry Variable="OPT_x2" Coefficient="-2.0"/>          </Table>        </LinearConstraint>      </Array>    </LConstraintClass>\endcode</table>The third sub-block is NLConstraintClass.  This is an array ofNonLinearConstraint blocks, each of which contains the description ofone of the nonlinear constraints.  This includes information about thecomparison operator (which can be >= or =) and the right-hand side.The desription of the constraint itself is of the same form as thatfor the function.<table><tr><td>\code    <NLConstraintClass numNLConstraints="1">      <Array name="NonLinearConstraints">        <NonLinearConstraint operator=">=" theName="nonlinear1" rhs="0.0">          <Library Second="false" FEval="ineq_hs14" First="true" LibName="testexample.so" Init="init_hs14"/>        </NonLinearConstraint>      </Array>    </NLConstraintClass>  </ProblemSetup>\endcode</table>The algorithm block is named according to the algorithm that is beingused.  In this case, it is NIPS.  (The other possibilities are CG,Newton, and PDS.)  The algorithm block has three sub-blocks thatcontain the algorithmic parameters.  There are the BasicOptions, theAdvancedOptions, and the algorithm-specific parameters.  TheBasicOptions and AdvancedOptions are the same for all of thealgorithms.  The algorithm-specific parameters vary.  You can see whatthey are for the different algorithms by looking at the examples inthe OPT++/tests/xml directory.<table><tr><td>\code  <NIPS>    <BasicOptions maxFeval="10000" outFile="tstHock14xml.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"/>    <argaezTapia lenBound="0.99995" centParm="0.2" maxBack="5"/>  </NIPS></OPT>\endcode</table><p> Previous Example:  \ref xml1 | Next Example:  \ref xml3 | Back to\ref GUI_XMLDoc </p>*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -