(************** Content-type: application/mathematica ************** CreatedBy='Mathematica 5.0' Mathematica-Compatible Notebook This notebook can be used with any Mathematica-compatible application, such as Mathematica, MathReader or Publicon. The data for the notebook starts with the line containing stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. *******************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 4817, 151]*) (*NotebookOutlinePosition[ 5615, 179]*) (* CellTagsIndexPosition[ 5528, 173]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["A Simple Example", "Subsection"], Cell["MathOptimizer Professional is launched by the command", "Text"], Cell[BoxData[ \(\(Needs["\"];\)\)], "Input"], Cell["\<\ Note here that the compiler-specific versions of MathOptimizer \ Professional may be denoted by added symbols. For example, the LF95 \ compiler-specific version can be invoked by \ \>", "Text"], Cell[BoxData[ \(\(Needs["\"];\)\)], "Input"], Cell["\<\ This convention supports the usage of several compiler-specific \ versions on the same machine. \ \>", "Text"], Cell["\<\ The basic definition and usage of the callLGO function can be \ retrieved by the following statement:\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(\(?callLGO\)\)], "Input"], Cell[BoxData[ \("callLGO[obj_, cons_List, varswithbounds_List, opts___]: \nobj is the \ objective function, \ncons is a list of the constraints, \nvarswithbounds are \ the variables and their bounds in the format {{variable, lower bound, initial \ value for local search, upper bound}...} or {variable, lower bound, upper \ bound}...}.\nFunction return is the value of the objective function, a list \ of rules giving the solution, and the maximum constraint violation. \nSee \ Options[callLGO] for the options and also see the usage statements of the \ various options for their possible values. For example, enter ?Method for the \ possible settings of the Method option."\)], "Print", CellTags->"Info3353818081-7249303"] }, Open ]], Cell["\<\ The first example shows the simplest usage of the callLGO function \ to solve a small constrained nonlinear optimization model:\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(result1 = callLGO[x^2 + y^2, {x + y - 1 \[Equal] 0, x^2 + 3*y \[LessEqual] 2}, {{x, \(-2\), 1, 3}, {y, \(-3\), 1, 2}}]\)], "Input"], Cell[BoxData[ \({0.49999999`, {x \[Rule] 0.499999995`, y \[Rule] 0.499999995`}, 9.999999994736442`*^-9}\)], "Output"] }, Open ]], Cell["\<\ Notice how easy it is to modify the above model statement, and then \ solve the new (substantially more difficult) model: \ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(result2 = callLGO[x^2 + y^2 + 10. *\((Sin[x + 5*y])\)^2, {x + Log[y] - 1 \[Equal] 0, x + 3*Cos[y] \[LessEqual] 2}, {{x, \(-2\), 1, 3}, {y, \(-3\), 1, 2}}]\)], "Input"], Cell[BoxData[ \({3.784720506720118`, {x \[Rule] 0.8398234068`, y \[Rule] 1.1737181234`}, 5.887978993257548`*^-11}\)], "Output"] }, Open ]], Cell["\<\ The next line shows that the constraints in the current model are \ met with high precision (when using the numerically more precise solution \ found above):\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \({x + Log[y], x + 3*Cos[y]} /. {x \[Rule] 0.8398234068, y \[Rule] 1.1737181234}\)], "Input"], Cell[BoxData[ \({1.0000000000588798`, 1.9999999999249436`}\)], "Output"] }, Open ]] }, Open ]] }, FrontEndVersion->"5.0 for Macintosh", ScreenRectangle->{{0, 1280}, {0, 790}}, WindowSize->{520, 668}, WindowMargins->{{28, Automatic}, {36, Automatic}} ] (******************************************************************* Cached data follows. If you edit this Notebook file directly, not using Mathematica, you must remove the line containing CacheID at the top of the file. The cache data will then be recreated when you save this file from within Mathematica. *******************************************************************) (*CellTagsOutline CellTagsIndex->{ "Info3353818081-7249303"->{ Cell[2577, 84, 730, 10, 231, "Print", CellTags->"Info3353818081-7249303"]} } *) (*CellTagsIndex CellTagsIndex->{ {"Info3353818081-7249303", 5417, 166} } *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[1776, 53, 38, 0, 38, "Subsection"], Cell[1817, 55, 69, 0, 47, "Text"], Cell[1889, 57, 76, 1, 39, "Input"], Cell[1968, 60, 204, 4, 73, "Text"], Cell[2175, 66, 78, 1, 27, "Input"], Cell[2256, 69, 120, 3, 47, "Text"], Cell[2379, 74, 125, 3, 50, "Text"], Cell[CellGroupData[{ Cell[2529, 81, 45, 1, 27, "Input"], Cell[2577, 84, 730, 10, 231, "Print", CellTags->"Info3353818081-7249303"] }, Open ]], Cell[3322, 97, 151, 3, 50, "Text"], Cell[CellGroupData[{ Cell[3498, 104, 182, 4, 59, "Input"], Cell[3683, 110, 128, 2, 29, "Output"] }, Open ]], Cell[3826, 115, 146, 3, 50, "Text"], Cell[CellGroupData[{ Cell[3997, 122, 229, 5, 59, "Input"], Cell[4229, 129, 140, 2, 29, "Output"] }, Open ]], Cell[4384, 134, 181, 4, 50, "Text"], Cell[CellGroupData[{ Cell[4590, 142, 120, 2, 43, "Input"], Cell[4713, 146, 76, 1, 27, "Output"] }, Open ]] }, Open ]] } ] *) (******************************************************************* End of Mathematica Notebook file. *******************************************************************)