[
  {
    "path": ".gitignore",
    "content": "# CLion stuff\n.idea/\ncmake-build-debug/\n"
  },
  {
    "path": "CMakeLists.txt",
    "content": "#     rpg_quadrotor_mpc\n#     A model predictive control implementation for quadrotors.\n#     Copyright (C) 2017-2018 Philipp Foehn, \n#     Robotics and Perception Group, University of Zurich\n#  \n#     Intended to be used with rpg_quadrotor_control and rpg_quadrotor_common.\n#     https://github.com/uzh-rpg/rpg_quadrotor_control\n# \n#     This program is free software: you can redistribute it and/or modify\n#     it under the terms of the GNU General Public License as published by\n#     the Free Software Foundation, either version 3 of the License, or\n#     (at your option) any later version.\n# \n#     This program is distributed in the hope that it will be useful,\n#     but WITHOUT ANY WARRANTY; without even the implied warranty of\n#     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n#     GNU General Public License for more details.\n# \n#     You should have received a copy of the GNU General Public License\n#     along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\n\ncmake_minimum_required(VERSION 2.8.3)\nproject(rpg_mpc)\n\nfind_package(catkin_simple REQUIRED)\n\ncatkin_simple()\n\n# activate c++ 11\nIF(CMAKE_COMPILER_IS_GNUCC)\n  SET(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -std=c++0x\")\nELSE()\n  SET(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -std=c++11\")\nENDIF()\n\n# ARM NEON flags\nif(\"${CMAKE_HOST_SYSTEM_PROCESSOR}\" STREQUAL \"armv7l\")\n  set(CMAKE_C_FLAGS \"${CMAKE_C_FLAGS} -march=armv7-a -mfpu=neon -mfloat-abi=hard -funsafe-math-optimizations\")\n  set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -march=armv7-a -mfpu=neon -mfloat-abi=hard -funsafe-math-optimizations\")\n  message(\"enabling ARM neon optimizations\")\nendif()\n\n# flags for speed (should already be enabled by default)\nset(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -Wall -Wextra\")\nset(CMAKE_CXX_FLAGS_DEBUG \"${CMAKE_CXX_FLAGS_DEBUG} -g\")\nset(CMAKE_CXX_FLAGS_RELEASE \"${CMAKE_CXX_FLAGS_RELEASE} -fopenmp -O3\")\n\ncs_add_library(mpc_solver\n  externals/qpoases/SRC/Bounds.cpp\n  externals/qpoases/SRC/Constraints.cpp\n  externals/qpoases/SRC/CyclingManager.cpp\n  externals/qpoases/SRC/Indexlist.cpp\n  externals/qpoases/SRC/MessageHandling.cpp\n  externals/qpoases/SRC/QProblem.cpp\n  externals/qpoases/SRC/QProblemB.cpp\n  externals/qpoases/SRC/SubjectTo.cpp\n  externals/qpoases/SRC/Utils.cpp\n  externals/qpoases/SRC/EXTRAS/SolutionAnalysis.cpp\n  model/quadrotor_mpc_codegen/acado_qpoases_interface.cpp\n  model/quadrotor_mpc_codegen/acado_integrator.c\n  model/quadrotor_mpc_codegen/acado_solver.c\n  model/quadrotor_mpc_codegen/acado_auxiliary_functions.c)\n\ntarget_include_directories(mpc_solver PUBLIC\n  model/quadrotor_mpc_codegen/\n  externals/qpoases\n  externals/qpoases/INCLUDE\n  externals/qpoases/SRC)\n\ncs_add_library(mpc_wrapper\n  src/mpc_wrapper.cpp)\n\ntarget_link_libraries(mpc_wrapper\n  mpc_solver)\n\ncs_add_library(mpc_controller\n  src/mpc_controller.cpp)\n\ntarget_link_libraries(mpc_controller \n  mpc_wrapper)\n\n# make an executable\ncs_install()\ncs_export()\n\ncs_add_executable(mpc_controller_node\n  test/mpc_node.cpp)\ntarget_link_libraries(mpc_controller_node\n  mpc_controller\n  mpc_wrapper\n  mpc_solver)\n\nif(catkin_LIBRARIES MATCHES \"autopilot\")\n\n  message(\"Building with MPC Autopilot\")\n  cs_add_executable(autopilot_mpc_instance\n    src/autopilot_mpc_instance.cpp)\n  target_link_libraries(autopilot_mpc_instance\n    mpc_controller\n    mpc_wrapper\n    mpc_solver)\n\nendif(catkin_LIBRARIES MATCHES \"autopilot\")\n\ncs_install()\n\ncs_export()\n"
  },
  {
    "path": "COPYING",
    "content": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.  We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors.  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights.  Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received.  You must make sure that they, too, receive\nor can get the source code.  And you must show them these terms so they\nknow their rights.\n\n  Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n  For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software.  For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n  Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so.  This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software.  The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable.  Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts.  If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n  Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary.  To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Use with the GNU Affero General Public License.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see <https://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n    <program>  Copyright (C) <year>  <name of author>\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n<https://www.gnu.org/licenses/>.\n\n  The GNU General Public License does not permit incorporating your program\ninto proprietary programs.  If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.  But first, please read\n<https://www.gnu.org/licenses/why-not-lgpl.html>."
  },
  {
    "path": "README.md",
    "content": "# Model Predictive Control for Quadrotors with extension to Perception-Aware MPC\nModel Predictive Control for Quadrotors by \"Robotics and Perception Group\" at the Dep. of Informatics, \"University of Zurich\", and Dep. of Neuroinformatics, ETH and University of Zurich.\n\nThis MPC is intended to be used with https://github.com/uzh-rpg/rpg_quadrotor_control.\nIt is available with the extension to be used as a \"Perception Aware Model Predictive Controller\" (**PAMPC**).\n\n[**Check out our YouTube-Video, showing PAMPC in Action**](https://www.youtube.com/watch?v=9vaj829vE18)\n[![PAMPC: Perception-Aware Model Predictive Control for Quadrotors](http://rpg.ifi.uzh.ch/img/quad_control/mpc_thumb_button_small.png)](https://www.youtube.com/watch?v=9vaj829vE18)\n\n## Publication\nIf you use this code in an academic context, please cite the following [IROS 2018 paper](http://rpg.ifi.uzh.ch/docs/IROS18_Falanga.pdf).\n\nDavide Falanga, Philipp Foehn, Peng Lu, Davide Scaramuzza: **PAMPC: Perception-Aware Model Predictive Control for Quadrotors**, IEEE/RSJ Int. Conf. Intell. Robot. Syst. (IROS), 2018.\n\n```\n@InProceedings{Falanga2018\n  author = {Falanga, Davide and Foehn, Philipp and Lu, Peng and Scaramuzza, Davide},\n  title = {{PAMPC}: Perception-Aware Model Predictive Control for Quadrotors},\n  booktitle = {IEEE/RSJ Int. Conf. Intell. Robot. Syst. (IROS)},\n  year = {2018}\n}\n```\n\n\n## License\n\nCopyright (C) 2017-2018 Philipp Foehn, Robotics and Perception Group, University of Zurich\n\nThe RPG MPC repository provides packages that are intended to be used with [RPG Quadrotor Control](https://github.com/uzh-rpg/rpg_quadrotor_control) and [ROS](http://www.ros.org/). \nThis code has been tested with ROS kinetic on Ubuntu 16.04.\nThis is research code, expect that it changes often and any fitness for a particular purpose is disclaimed.\nFor a commercial license, please contact [Davide Scaramuzza](http://rpg.ifi.uzh.ch/people_scaramuzza.html).\n\n```\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program.  If not, see <http://www.gnu.org/licenses/>.\n```\n\nThis work depends on the ACADO Toolkit, developed by the Optimization in Engineering Center (OPTEC) under supervision of Moritz Diehl. Licensing detail can be found on the [ACADO licensing page](http://acado.github.io/licensing.html). It is released under GNU Lesser General Public License as published by the Free Software Foundation, version 3.\nACADO uses qpOASES by Hans Joachim Ferreau et al., released under GPL v2.1.\n\n## Installation, Usage, and Documentation\nFor detailed instructions on installation, usage, and documentation, please head to our [Wiki](../../wiki).\n\nQuick Links:\n- [Installation](../../wiki/Installation)\n- [Basic Usage](../../wiki/Basic-Usage)\n- [Code Structure](../../wiki/Code-Structure)\n- [License](../../wiki/License)\n\n## Code Structure Overview\nThe whole MPC is based on ACADO (http://acado.github.io/).\nACADO's C++ interface is used to describe the quadrotor model and parameters for transcription into a quadratic program, which is then solved with qpOASES (https://projects.coin-or.org/qpOASES). To compile and run, none of these dependencies are needed, since the generated code is already included in this repository. To modify the model and solver options, please install ACADO from http://acado.github.io/install_linux.html.\n\nThe code is organized as follows:\n\n### Solver `mpc_solver`\n\nThe auto-generated model, transcription, and solver is built as a library called `mpc_solver`.\nThis library consist of purely auto-generated code with nomenclature, code-style and structure as used in ACADO.\n\n### Wrapper `mpc_wrapper`\n\nTo wrap this into a standard interface, the library `mpc_wrapper` is used.\nACADO uses arrays with column-major format to store matrices, since this is rather inconvenient, `mpc_wrapper` provides  interfaces using Eigen objects by mapping the arrays.\n* It is written to be compatible even with changing model descriptions in the `mpc_solver`.\n* It should prevent the most common runtime errors caused by the user by doing some initialization and checks with hardcoded parameters, which are overwritten in normal usage.\n\n### Controller `mpc_controller`\n\nTo provide not only a solver, but a full controller, `mpc_controller` is a library based on the previous `mpc_solver` and `mpc_wrapper`, providing all funcitonality to implement a controller with minimal effort. It provides two main execution modes:\n\n* **Embedded**: The mpc_controller can be included in any oder controller class or copilot by generating an object with the default constructor \"MPC::MpcController<T> controller();\". It still registers node-handles to publish the predicted trajectory after each control cycle, but does nothing more. It only provides the interfaces of `ControllerBase` as in the `LargeAngleController` but without a specific class for parameters.\n\n* **Standalone (not yet provided)**: The `mpc_controller` object can be passed node-handles or creates its own, registers multiple subscribers and publishers to get a state estimate as well as the control goals (pose or trajectory) and registers a timer to run a control loop. It works as a full standalone controller which can be used with the oneliner: `MPC::MpcController<double> controller(ros::NodeHandle(), ros::NodeHandle(\"~\"));` as in `test/control_node.cpp` and `launch/mpc_controller.launch`.\n"
  },
  {
    "path": "externals/qpoases/EXAMPLES/example1.cpp",
    "content": "/*\n *\tThis file is part of qpOASES.\n *\n *\tqpOASES -- An Implementation of the Online Active Set Strategy.\n *\tCopyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.\n *\n *\tqpOASES is free software; you can redistribute it and/or\n *\tmodify it under the terms of the GNU Lesser General Public\n *\tLicense as published by the Free Software Foundation; either\n *\tversion 2.1 of the License, or (at your option) any later version.\n *\n *\tqpOASES is distributed in the hope that it will be useful,\n *\tbut WITHOUT ANY WARRANTY; without even the implied warranty of\n *\tMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *\tLesser General Public License for more details.\n *\n *\tYou should have received a copy of the GNU Lesser General Public\n *\tLicense along with qpOASES; if not, write to the Free Software\n *\tFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n *\n */\n\n\n/**\n *\t\\file EXAMPLES/example1.cpp\n *\t\\author Hans Joachim Ferreau\n *\t\\version 1.3embedded\n *\t\\date 2007-2008\n *\n *\tVery simple example for testing qpOASES (using QProblem class).\n */\n\n\n#include <QProblem.hpp>\n\n\n/** Example for qpOASES main function using the QProblem class. */\nint main( )\n{\n\t/* Setup data of first QP. */\n\treal_t H[2*2] = { 1.0, 0.0, 0.0, 0.5 };\n\treal_t A[1*2] = { 1.0, 1.0 };\n\treal_t g[2] = { 1.5, 1.0 };\n\treal_t lb[2] = { 0.5, -2.0 };\n\treal_t ub[2] = { 5.0, 2.0 };\n\treal_t lbA[1] = { -1.0 };\n\treal_t ubA[1] = { 2.0 };\n\n\t/* Setup data of second QP. */\n\treal_t g_new[2] = { 1.0, 1.5 };\n\treal_t lb_new[2] = { 0.0, -1.0 };\n\treal_t ub_new[2] = { 5.0, -0.5 };\n\treal_t lbA_new[1] = { -2.0 };\n\treal_t ubA_new[1] = { 1.0 };\n\n\n\t/* Setting up QProblem object. */\n\tQProblem example( 2,1 );\n\n\t/* Solve first QP. */\n\tint nWSR = 10;\n\texample.init( H,g,A,lb,ub,lbA,ubA, nWSR,0 );\n\n\t/* Solve second QP. */\n\tnWSR = 10;\n\texample.hotstart( g_new,lb_new,ub_new,lbA_new,ubA_new, nWSR,0 );\n\n\treturn 0;\n}\n\n\n/*\n *\tend of file\n */\n"
  },
  {
    "path": "externals/qpoases/EXAMPLES/example1b.cpp",
    "content": "/*\n *\tThis file is part of qpOASES.\n *\n *\tqpOASES -- An Implementation of the Online Active Set Strategy.\n *\tCopyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.\n *\n *\tqpOASES is free software; you can redistribute it and/or\n *\tmodify it under the terms of the GNU Lesser General Public\n *\tLicense as published by the Free Software Foundation; either\n *\tversion 2.1 of the License, or (at your option) any later version.\n *\n *\tqpOASES is distributed in the hope that it will be useful,\n *\tbut WITHOUT ANY WARRANTY; without even the implied warranty of\n *\tMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *\tLesser General Public License for more details.\n *\n *\tYou should have received a copy of the GNU Lesser General Public\n *\tLicense along with qpOASES; if not, write to the Free Software\n *\tFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n *\n */\n\n\n/**\n *\t\\file EXAMPLES/example1b.cpp\n *\t\\author Hans Joachim Ferreau\n *\t\\version 1.3\n *\t\\date 2007-2008\n *\n *\tVery simple example for testing qpOASES using the QProblemB class.\n */\n\n\n#include <QProblemB.hpp>\n\n\n/** Example for qpOASES main function using the QProblemB class. */\nint main( )\n{\n\t/* Setup data of first QP. */\n\treal_t H[2*2] = { 1.0, 0.0, 0.0, 0.5 };\n\treal_t g[2] = { 1.5, 1.0 };\n\treal_t lb[2] = { 0.5, -2.0 };\n\treal_t ub[2] = { 5.0, 2.0 };\n\n\t/* Setup data of second QP. */\n\treal_t g_new[2] = { 1.0, 1.5 };\n\treal_t lb_new[2] = { 0.0, -1.0 };\n\treal_t ub_new[2] = { 5.0, -0.5 };\n\n\n\t/* Setting up QProblemB object. */\n\tQProblemB example( 2 );\n\n\t/* Solve first QP. */\n\tint nWSR = 10;\n\texample.init( H,g,lb,ub, nWSR,0 );\n\n\t/* Solve second QP. */\n\tnWSR = 10;\n\texample.hotstart( g_new,lb_new,ub_new, nWSR,0 );\n\n\treturn 0;\n}\n\n\n/*\n *\tend of file\n */\n"
  },
  {
    "path": "externals/qpoases/INCLUDE/Bounds.hpp",
    "content": "/*\r\n *\tThis file is part of qpOASES.\r\n *\r\n *\tqpOASES -- An Implementation of the Online Active Set Strategy.\r\n *\tCopyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.\r\n *\r\n *\tqpOASES is free software; you can redistribute it and/or\r\n *\tmodify it under the terms of the GNU Lesser General Public\r\n *\tLicense as published by the Free Software Foundation; either\r\n *\tversion 2.1 of the License, or (at your option) any later version.\r\n *\r\n *\tqpOASES is distributed in the hope that it will be useful,\r\n *\tbut WITHOUT ANY WARRANTY; without even the implied warranty of\r\n *\tMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n *\tLesser General Public License for more details.\r\n *\r\n *\tYou should have received a copy of the GNU Lesser General Public\r\n *\tLicense along with qpOASES; if not, write to the Free Software\r\n *\tFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r\n *\r\n */\r\n\r\n\r\n/**\r\n *\t\\file INCLUDE/Bounds.hpp\r\n *\t\\author Hans Joachim Ferreau\r\n *\t\\version 1.3embedded\r\n *\t\\date 2007-2008\r\n *\r\n *\tDeclaration of the Bounds class designed to manage working sets of\r\n *\tbounds within a QProblem.\r\n */\r\n\r\n\r\n#ifndef QPOASES_BOUNDS_HPP\r\n#define QPOASES_BOUNDS_HPP\r\n\r\n\r\n#include <SubjectTo.hpp>\r\n\r\n\r\n\r\n/** This class manages working sets of bounds by storing\r\n *\tindex sets and other status information.\r\n *\r\n *\t\\author Hans Joachim Ferreau\r\n *\t\\version 1.3embedded\r\n *\t\\date 2007-2008\r\n */\r\nclass Bounds : public SubjectTo\r\n{\r\n\t/*\r\n\t *\tPUBLIC MEMBER FUNCTIONS\r\n\t */\r\n\tpublic:\r\n\t\t/** Default constructor. */\r\n\t\tBounds( );\r\n\r\n\t\t/** Copy constructor (deep copy). */\r\n\t\tBounds(\tconst Bounds& rhs\t/**< Rhs object. */\r\n\t\t\t\t);\r\n\r\n\t\t/** Destructor. */\r\n\t\t~Bounds( );\r\n\r\n\t\t/** Assignment operator (deep copy). */\r\n\t\tBounds& operator=(\tconst Bounds& rhs\t/**< Rhs object. */\r\n\t\t\t\t\t\t\t);\r\n\r\n\r\n\t\t/** Pseudo-constructor takes the number of bounds.\r\n\t\t *\t\\return SUCCESSFUL_RETURN */\r\n\t\treturnValue init(\tint n\t/**< Number of bounds. */\r\n\t\t\t\t\t\t\t);\r\n\r\n\r\n\t\t/** Initially adds number of a new (i.e. not yet in the list) bound to\r\n\t\t *  given index set.\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t \t\t\tRET_SETUP_BOUND_FAILED \\n\r\n\t\t\t\t\tRET_INDEX_OUT_OF_BOUNDS \\n\r\n\t\t\t\t\tRET_INVALID_ARGUMENTS */\r\n\t\treturnValue setupBound(\tint _number,\t\t\t\t\t/**< Number of new bound. */\r\n\t\t\t\t\t\t\t\tSubjectToStatus _status\t\t\t/**< Status of new bound. */\r\n\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Initially adds all numbers of new (i.e. not yet in the list) bounds to\r\n\t\t *  to the index set of free bounds; the order depends on the SujectToType\r\n\t\t *  of each index.\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t \t\t\tRET_SETUP_BOUND_FAILED */\r\n\t\treturnValue setupAllFree( );\r\n\r\n\r\n\t\t/** Moves index of a bound from index list of fixed to that of free bounds.\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t \t\t\tRET_MOVING_BOUND_FAILED \\n\r\n\t\t\t\t\tRET_INDEX_OUT_OF_BOUNDS */\r\n\t\treturnValue moveFixedToFree(\tint _number\t\t\t\t/**< Number of bound to be freed. */\r\n\t\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Moves index of a bound from index list of free to that of fixed bounds.\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t \t\t\tRET_MOVING_BOUND_FAILED \\n\r\n\t\t\t\t\tRET_INDEX_OUT_OF_BOUNDS */\r\n\t\treturnValue moveFreeToFixed(\tint _number,\t\t\t/**< Number of bound to be fixed. */\r\n\t\t\t\t\t\t\t\t\t\tSubjectToStatus _status\t/**< Status of bound to be fixed. */\r\n\t\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Swaps the indices of two free bounds within the index set.\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t \t\t\tRET_SWAPINDEX_FAILED */\r\n\t\treturnValue swapFree(\tint number1,\t\t\t\t\t/**< Number of first constraint or bound. */\r\n\t\t\t\t\t\t\t\tint number2\t\t\t\t\t\t/**< Number of second constraint or bound. */\r\n\t\t\t\t\t\t\t\t);\r\n\r\n\r\n\t\t/** Returns number of variables.\r\n\t\t *\t\\return Number of variables. */\r\n\t\tinline int getNV( ) const;\r\n\r\n\t\t/** Returns number of implicitly fixed variables.\r\n\t\t *\t\\return Number of implicitly fixed variables. */\r\n\t\tinline int getNFV( ) const;\r\n\r\n\t\t/** Returns number of bounded (but possibly free) variables.\r\n\t\t *\t\\return Number of bounded (but possibly free) variables. */\r\n\t\tinline int getNBV( ) const;\r\n\r\n\t\t/** Returns number of unbounded variables.\r\n\t\t *\t\\return Number of unbounded variables. */\r\n\t\tinline int getNUV( ) const;\r\n\r\n\r\n\t\t/** Sets number of implicitly fixed variables.\r\n\t\t *\t\\return SUCCESSFUL_RETURN */\r\n\t\tinline returnValue setNFV(\tint n\t/**< Number of implicitly fixed variables. */\r\n\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Sets number of bounded (but possibly free) variables.\r\n\t\t *\t\\return SUCCESSFUL_RETURN */\r\n\t\tinline returnValue setNBV(\tint n\t/**< Number of bounded (but possibly free) variables. */\r\n\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Sets number of unbounded variables.\r\n\t\t *\t\\return SUCCESSFUL_RETURN */\r\n\t\tinline returnValue setNUV(\tint n\t/**< Number of unbounded variables */\r\n\t\t\t\t\t\t\t\t\t);\r\n\r\n\r\n\t\t/** Returns number of free variables.\r\n\t\t *\t\\return Number of free variables. */\r\n\t\tinline int getNFR( );\r\n\r\n\t\t/** Returns number of fixed variables.\r\n\t\t *\t\\return Number of fixed variables. */\r\n\t\tinline int getNFX( );\r\n\r\n\r\n\t\t/** Returns a pointer to free variables index list.\r\n\t\t *\t\\return Pointer to free variables index list. */\r\n\t\tinline Indexlist* getFree( );\r\n\r\n\t\t/** Returns a pointer to fixed variables index list.\r\n\t\t *\t\\return Pointer to fixed variables index list. */\r\n\t\tinline Indexlist* getFixed( );\r\n\r\n\r\n\t/*\r\n\t *\tPROTECTED MEMBER VARIABLES\r\n\t */\r\n\tprotected:\r\n\t\tint nV;\t\t\t\t\t/**< Number of variables (nV = nFV + nBV + nUV). */\r\n\t\tint nFV;\t\t\t\t/**< Number of implicitly fixed variables. */\r\n\t\tint\tnBV;\t\t\t\t/**< Number of bounded (but possibly free) variables. */\r\n\t\tint nUV;\t\t\t\t/**< Number of unbounded variables. */\r\n\r\n\t\tIndexlist free;\t\t\t/**< Index list of free variables. */\r\n\t\tIndexlist fixed;\t\t/**< Index list of fixed variables. */\r\n};\r\n\r\n#include <Bounds.ipp>\r\n\r\n#endif\t/* QPOASES_BOUNDS_HPP */\r\n\r\n\r\n/*\r\n *\tend of file\r\n */\r\n"
  },
  {
    "path": "externals/qpoases/INCLUDE/Constants.hpp",
    "content": "/*\r\n *\tThis file is part of qpOASES.\r\n *\r\n *\tqpOASES -- An Implementation of the Online Active Set Strategy.\r\n *\tCopyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.\r\n *\r\n *\tqpOASES is free software; you can redistribute it and/or\r\n *\tmodify it under the terms of the GNU Lesser General Public\r\n *\tLicense as published by the Free Software Foundation; either\r\n *\tversion 2.1 of the License, or (at your option) any later version.\r\n *\r\n *\tqpOASES is distributed in the hope that it will be useful,\r\n *\tbut WITHOUT ANY WARRANTY; without even the implied warranty of\r\n *\tMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n *\tLesser General Public License for more details.\r\n *\r\n *\tYou should have received a copy of the GNU Lesser General Public\r\n *\tLicense along with qpOASES; if not, write to the Free Software\r\n *\tFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r\n *\r\n */\r\n\r\n\r\n/**\r\n *\t\\file INCLUDE/Constants.hpp\r\n *\t\\author Hans Joachim Ferreau\r\n *\t\\version 1.3embedded\r\n *\t\\date 2008\r\n *\r\n *\tDefinition of all global constants.\r\n */\r\n\r\n\r\n#ifndef QPOASES_CONSTANTS_HPP\r\n#define QPOASES_CONSTANTS_HPP\r\n\r\n#ifndef QPOASES_CUSTOM_INTERFACE\r\n#include \"acado_qpoases_interface.hpp\"\r\n#else\r\n  #define XSTR(x) #x\r\n  #define STR(x) XSTR(x)\r\n  #include STR(QPOASES_CUSTOM_INTERFACE)\r\n#endif\r\n\r\n/** Maximum number of variables within a QP formulation.\r\n\tNote: this value has to be positive! */\r\nconst int NVMAX = QPOASES_NVMAX;\r\n\r\n/** Maximum number of constraints within a QP formulation.\r\n\tNote: this value has to be positive! */\r\nconst int NCMAX = QPOASES_NCMAX;\r\n\r\n/** Redefinition of NCMAX used for memory allocation, to avoid zero sized arrays\r\n    and compiler errors. */\r\nconst int NCMAX_ALLOC = (NCMAX == 0) ? 1 : NCMAX;\r\n\r\n/**< Maximum number of working set recalculations.\r\n\tNote: this value has to be positive! */\r\nconst int NWSRMAX = QPOASES_NWSRMAX;\r\n\r\n/** Desired KKT tolerance of QP solution; a warning RET_INACCURATE_SOLUTION is\r\n *  issued if this tolerance is not met.\r\n *\tNote: this value has to be positive! */\r\nconst real_t DESIREDACCURACY = (real_t) 1.0e-3;\r\n\r\n/** Critical KKT tolerance of QP solution; an error is issued if this\r\n *  tolerance is not met.\r\n *\tNote: this value has to be positive! */\r\nconst real_t CRITICALACCURACY = (real_t) 1.0e-2;\r\n\r\n\r\n\r\n/** Numerical value of machine precision (min eps, s.t. 1+eps > 1).\r\n\tNote: this value has to be positive! */\r\nconst real_t EPS = (real_t) QPOASES_EPS;\r\n\r\n/** Numerical value of zero (for situations in which it would be\r\n *\tunreasonable to compare with 0.0).\r\n *\tNote: this value has to be positive! */\r\nconst real_t ZERO = (real_t) 1.0e-50;\r\n\r\n/** Numerical value of infinity (e.g. for non-existing bounds).\r\n *\tNote: this value has to be positive! */\r\nconst real_t INFTY = (real_t) 1.0e12;\r\n\r\n\r\n/** Lower/upper (constraints') bound tolerance (an inequality constraint\r\n *\twhose lower and upper bound differ by less than BOUNDTOL is regarded\r\n *\tto be an equality constraint).\r\n *\tNote: this value has to be positive! */\r\nconst real_t BOUNDTOL = (real_t) 1.0e-10;\r\n\r\n/** Offset for relaxing (constraints') bounds at beginning of an initial homotopy.\r\n *\tNote: this value has to be positive! */\r\nconst real_t BOUNDRELAXATION = (real_t) 1.0e3;\r\n\r\n\r\n/** Factor that determines physical lengths of index lists.\r\n *\tNote: this value has to be greater than 1! */\r\nconst int INDEXLISTFACTOR = 5;\r\n\r\n\r\n#endif\t/* QPOASES_CONSTANTS_HPP */\r\n\r\n\r\n/*\r\n *\tend of file\r\n */\r\n"
  },
  {
    "path": "externals/qpoases/INCLUDE/Constraints.hpp",
    "content": "/*\r\n *\tThis file is part of qpOASES.\r\n *\r\n *\tqpOASES -- An Implementation of the Online Active Set Strategy.\r\n *\tCopyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.\r\n *\r\n *\tqpOASES is free software; you can redistribute it and/or\r\n *\tmodify it under the terms of the GNU Lesser General Public\r\n *\tLicense as published by the Free Software Foundation; either\r\n *\tversion 2.1 of the License, or (at your option) any later version.\r\n *\r\n *\tqpOASES is distributed in the hope that it will be useful,\r\n *\tbut WITHOUT ANY WARRANTY; without even the implied warranty of\r\n *\tMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n *\tLesser General Public License for more details.\r\n *\r\n *\tYou should have received a copy of the GNU Lesser General Public\r\n *\tLicense along with qpOASES; if not, write to the Free Software\r\n *\tFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r\n *\r\n */\r\n\r\n\r\n/**\r\n *\t\\file INCLUDE/Constraints.hpp\r\n *\t\\author Hans Joachim Ferreau\r\n *\t\\version 1.3embedded\r\n *\t\\date 2007-2008\r\n *\r\n *\tDeclaration of the Constraints class designed to manage working sets of\r\n *\tconstraints within a QProblem.\r\n */\r\n\r\n\r\n#ifndef QPOASES_CONSTRAINTS_HPP\r\n#define QPOASES_CONSTRAINTS_HPP\r\n\r\n\r\n#include <SubjectTo.hpp>\r\n\r\n\r\n\r\n/** This class manages working sets of constraints by storing\r\n *\tindex sets and other status information.\r\n *\r\n *\t\\author Hans Joachim Ferreau\r\n *\t\\version 1.3embedded\r\n *\t\\date 2007-2008\r\n */\r\nclass Constraints : public SubjectTo\r\n{\r\n\t/*\r\n\t *\tPUBLIC MEMBER FUNCTIONS\r\n\t */\r\n\tpublic:\r\n\t\t/** Default constructor. */\r\n\t\tConstraints( );\r\n\r\n\t\t/** Copy constructor (deep copy). */\r\n\t\tConstraints(\tconst Constraints& rhs\t/**< Rhs object. */\r\n\t\t\t\t\t\t);\r\n\r\n\t\t/** Destructor. */\r\n\t\t~Constraints( );\r\n\r\n\t\t/** Assignment operator (deep copy). */\r\n\t\tConstraints& operator=(\tconst Constraints& rhs\t/**< Rhs object. */\r\n\t\t\t\t\t\t\t\t);\r\n\r\n\r\n\t\t/** Pseudo-constructor takes the number of constraints.\r\n\t\t *\t\\return SUCCESSFUL_RETURN */\r\n\t\treturnValue init(\tint n\t/**< Number of constraints. */\r\n\t\t\t\t\t\t\t);\r\n\r\n\r\n\t\t/** Initially adds number of a new (i.e. not yet in the list) constraint to\r\n\t\t *  a given index set.\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t \t\t\tRET_SETUP_CONSTRAINT_FAILED \\n\r\n\t\t\t\t\tRET_INDEX_OUT_OF_BOUNDS \\n\r\n\t\t\t\t\tRET_INVALID_ARGUMENTS */\r\n\t\treturnValue setupConstraint(\tint _number,\t\t\t\t/**< Number of new constraint. */\r\n\t\t\t\t\t\t\t\t\t\tSubjectToStatus _status\t\t/**< Status of new constraint. */\r\n\t\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Initially adds all enabled numbers of new (i.e. not yet in the list) constraints to\r\n\t\t *  to the index set of inactive constraints; the order depends on the SujectToType\r\n\t\t *  of each index. Only disabled constraints are added to index set of disabled constraints!\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t \t\t\tRET_SETUP_CONSTRAINT_FAILED */\r\n\t\treturnValue setupAllInactive( );\r\n\r\n\r\n\t\t/** Moves index of a constraint from index list of active to that of inactive constraints.\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t \t\t\tRET_MOVING_CONSTRAINT_FAILED */\r\n\t\treturnValue moveActiveToInactive(\tint _number\t\t\t\t/**< Number of constraint to become inactive. */\r\n\t\t\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Moves index of a constraint from index list of inactive to that of active constraints.\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t \t\t\tRET_MOVING_CONSTRAINT_FAILED */\r\n\t\treturnValue moveInactiveToActive(\tint _number,\t\t\t/**< Number of constraint to become active. */\r\n\t\t\t\t\t\t\t\t\t\t\tSubjectToStatus _status\t/**< Status of constraint to become active. */\r\n\t\t\t\t\t\t\t\t\t\t\t);\r\n\r\n\r\n\t\t/** Returns the number of constraints.\r\n\t\t *\t\\return Number of constraints. */\r\n\t\tinline int getNC( ) const;\r\n\r\n\t\t/** Returns the number of implicit equality constraints.\r\n\t\t *\t\\return Number of implicit equality constraints. */\r\n\t\tinline int getNEC( ) const;\r\n\r\n\t\t/** Returns the number of \"real\" inequality constraints.\r\n\t\t *\t\\return Number of \"real\" inequality constraints. */\r\n\t\tinline int getNIC( ) const;\r\n\r\n\t\t/** Returns the number of unbounded constraints (i.e. without any bounds).\r\n\t\t *\t\\return Number of unbounded constraints (i.e. without any bounds). */\r\n\t\tinline int getNUC( ) const;\r\n\r\n\r\n\t\t/** Sets number of implicit equality constraints.\r\n\t\t *\t\\return SUCCESSFUL_RETURN */\r\n\t\tinline returnValue setNEC(\tint n\t/**< Number of implicit equality constraints. */\r\n\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Sets number of \"real\" inequality constraints.\r\n\t\t *\t\\return SUCCESSFUL_RETURN */\r\n\t\tinline returnValue setNIC(\tint n\t/**< Number of \"real\" inequality constraints. */\r\n\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Sets number of unbounded constraints (i.e. without any bounds).\r\n\t\t *\t\\return SUCCESSFUL_RETURN */\r\n\t\tinline returnValue setNUC(\tint n\t/**< Number of unbounded constraints (i.e. without any bounds). */\r\n\t\t\t\t\t\t\t\t\t);\r\n\r\n\r\n\t\t/** Returns the number of active constraints.\r\n\t\t *\t\\return Number of constraints. */\r\n\t\tinline int getNAC( );\r\n\r\n\t\t/** Returns the number of inactive constraints.\r\n\t\t *\t\\return Number of constraints. */\r\n\t\tinline int getNIAC( );\r\n\r\n\r\n\t\t/** Returns a pointer to active constraints index list.\r\n\t\t *\t\\return Pointer to active constraints index list. */\r\n\t\tinline Indexlist* getActive( );\r\n\r\n\t\t/** Returns a pointer to inactive constraints index list.\r\n\t\t *\t\\return Pointer to inactive constraints index list. */\r\n\t\tinline Indexlist* getInactive( );\r\n\r\n\r\n\t/*\r\n\t *\tPROTECTED MEMBER VARIABLES\r\n\t */\r\n\tprotected:\r\n\t\tint nC;\t\t\t\t\t/**< Number of constraints (nC = nEC + nIC + nUC). */\r\n\t\tint nEC;\t\t\t\t/**< Number of implicit equality constraints. */\r\n\t\tint\tnIC;\t\t\t\t/**< Number of \"real\" inequality constraints. */\r\n\t\tint nUC;\t\t\t\t/**< Number of unbounded constraints (i.e. without any bounds). */\r\n\r\n\t\tIndexlist active;\t\t/**< Index list of active constraints. */\r\n\t\tIndexlist inactive;\t\t/**< Index list of inactive constraints. */\r\n};\r\n\r\n\r\n#include <Constraints.ipp>\r\n\r\n#endif\t/* QPOASES_CONSTRAINTS_HPP */\r\n\r\n\r\n/*\r\n *\tend of file\r\n */\r\n"
  },
  {
    "path": "externals/qpoases/INCLUDE/CyclingManager.hpp",
    "content": "/*\r\n *\tThis file is part of qpOASES.\r\n *\r\n *\tqpOASES -- An Implementation of the Online Active Set Strategy.\r\n *\tCopyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.\r\n *\r\n *\tqpOASES is free software; you can redistribute it and/or\r\n *\tmodify it under the terms of the GNU Lesser General Public\r\n *\tLicense as published by the Free Software Foundation; either\r\n *\tversion 2.1 of the License, or (at your option) any later version.\r\n *\r\n *\tqpOASES is distributed in the hope that it will be useful,\r\n *\tbut WITHOUT ANY WARRANTY; without even the implied warranty of\r\n *\tMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n *\tLesser General Public License for more details.\r\n *\r\n *\tYou should have received a copy of the GNU Lesser General Public\r\n *\tLicense along with qpOASES; if not, write to the Free Software\r\n *\tFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r\n *\r\n */\r\n\r\n\r\n/**\r\n *\t\\file INCLUDE/CyclingManager.hpp\r\n *\t\\author Hans Joachim Ferreau\r\n *\t\\version 1.3embedded\r\n *\t\\date 2007-2008\r\n *\r\n *\tDeclaration of the CyclingManager class designed to detect\r\n *\tand handle possible cycling during QP iterations.\r\n */\r\n\r\n\r\n#ifndef QPOASES_CYCLINGMANAGER_HPP\r\n#define QPOASES_CYCLINGMANAGER_HPP\r\n\r\n\r\n#include <Utils.hpp>\r\n\r\n\r\n\r\n/** This class is intended to detect and handle possible cycling during QP iterations.\r\n *\tAs cycling seems to occur quite rarely, this class is NOT FULLY IMPLEMENTED YET!\r\n *\r\n *\t\\author Hans Joachim Ferreau\r\n *\t\\version 1.3embedded\r\n *\t\\date 2007-2008\r\n */\r\nclass CyclingManager\r\n{\r\n\t/*\r\n\t *\tPUBLIC MEMBER FUNCTIONS\r\n\t */\r\n\tpublic:\r\n\t\t/** Default constructor. */\r\n\t\tCyclingManager( );\r\n\r\n\t\t/** Copy constructor (deep copy). */\r\n\t\tCyclingManager(\tconst CyclingManager& rhs\t/**< Rhs object. */\r\n\t\t\t\t\t\t);\r\n\r\n\t\t/** Destructor. */\r\n\t\t~CyclingManager( );\r\n\r\n\t\t/** Copy asingment operator (deep copy). */\r\n\t\tCyclingManager& operator=(\tconst CyclingManager& rhs\t/**< Rhs object. */\r\n\t\t\t\t\t\t\t\t\t);\r\n\r\n\r\n\t\t/** Pseudo-constructor which takes the number of bounds/constraints.\r\n\t\t *\t\\return SUCCESSFUL_RETURN */\r\n\t\treturnValue init(\tint _nV,\t/**< Number of bounds to be managed. */\r\n\t\t\t\t\t\t\tint _nC\t\t/**< Number of constraints to be managed. */\r\n\t\t\t\t\t\t\t);\r\n\r\n\r\n\t\t/** Stores index of a bound/constraint that might cause cycling.\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t\t\t\tRET_INDEX_OUT_OF_BOUNDS */\r\n\t\treturnValue setCyclingStatus(\tint number,\t\t\t\t/**< Number of bound/constraint. */\r\n\t\t\t\t\t\t\t\t\t\tBooleanType isBound,\t/**< Flag that indicates if given number corresponds to a\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t *   bound (BT_TRUE) or a constraint (BT_FALSE). */\r\n\t\t\t\t\t\t\t\t\t\tCyclingStatus _status\t/**< Cycling status of bound/constraint. */\r\n\t\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Returns if bound/constraint might cause cycling.\r\n\t\t *\t\\return BT_TRUE: bound/constraint might cause cycling \\n\r\n\t\t \t\t\tBT_FALSE: otherwise */\r\n\t\tCyclingStatus getCyclingStatus(\tint number,\t\t\t/**< Number of bound/constraint. */\r\n\t\t\t\t\t\t\t\t\t\tBooleanType isBound\t/**< Flag that indicates if given number corresponds to\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t *   a bound (BT_TRUE) or a constraint (BT_FALSE). */\r\n\t\t\t\t\t\t\t\t\t\t) const;\r\n\r\n\r\n\t\t/** Clears all previous cycling information.\r\n\t\t *\t\\return SUCCESSFUL_RETURN */\r\n\t\treturnValue clearCyclingData( );\r\n\r\n\r\n\t\t/** Returns if cycling was detected.\r\n\t\t *\t\\return BT_TRUE iff cycling was detected. */\r\n\t\tinline BooleanType isCyclingDetected( ) const;\r\n\r\n\r\n\t/*\r\n\t *\tPROTECTED MEMBER VARIABLES\r\n\t */\r\n\tprotected:\r\n\t\tint\tnV;\t\t\t\t\t\t\t\t\t/**< Number of managed bounds. */\r\n\t\tint\tnC;\t\t\t\t\t\t\t\t\t/**< Number of managed constraints. */\r\n\r\n\t\tCyclingStatus status[NVMAX+NCMAX];\t\t/**< Array to store cycling status of all bounds/constraints. */\r\n\r\n\t\tBooleanType cyclingDetected;\t\t\t/**< Flag if cycling was detected. */\r\n};\r\n\r\n\r\n#include <CyclingManager.ipp>\r\n\r\n#endif\t/* QPOASES_CYCLINGMANAGER_HPP */\r\n\r\n\r\n/*\r\n *\tend of file\r\n */\r\n"
  },
  {
    "path": "externals/qpoases/INCLUDE/EXTRAS/SolutionAnalysis.hpp",
    "content": "/*\n *\tThis file is part of qpOASES.\n *\n *\tqpOASES -- An Implementation of the Online Active Set Strategy.\n *\tCopyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.\n *\n *\tqpOASES is free software; you can redistribute it and/or\n *\tmodify it under the terms of the GNU Lesser General Public\n *\tLicense as published by the Free Software Foundation; either\n *\tversion 2.1 of the License, or (at your option) any later version.\n *\n *\tqpOASES is distributed in the hope that it will be useful,\n *\tbut WITHOUT ANY WARRANTY; without even the implied warranty of\n *\tMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *\tLesser General Public License for more details.\n *\n *\tYou should have received a copy of the GNU Lesser General Public\n *\tLicense along with qpOASES; if not, write to the Free Software\n *\tFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n *\n */\n\n\n/**\n *\t\\file INCLUDE/EXTRAS/SolutionAnalysis.hpp\n *\t\\author Milan Vukov, Boris Houska, Hans Joachim Ferreau\n *\t\\version 1.3embedded\n *\t\\date 2012\n *\n *\tSolution analysis class, based on a class in the standard version of the qpOASES\n */\n\n\n//\n\n#ifndef QPOASES_SOLUTIONANALYSIS_HPP\n#define QPOASES_SOLUTIONANALYSIS_HPP\n\n#include <QProblem.hpp>\n\n/** Enables the computation of variance as is in the standard version of qpOASES */\n#define QPOASES_USE_OLD_VERSION 0\n\n#if QPOASES_USE_OLD_VERSION\n#define KKT_DIM (2 * NVMAX + NCMAX)\n#endif\n\nclass SolutionAnalysis\n{\npublic:\n\t\n\t/** Default constructor. */\n\tSolutionAnalysis( );\n\t\n\t/** Copy constructor (deep copy). */\n\tSolutionAnalysis( \tconst SolutionAnalysis& rhs\t/**< Rhs object. */\n\t\t\t\t\t\t);\n\t\n\t/** Destructor. */\n\t~SolutionAnalysis( );\n\t\n\t/** Copy asingment operator (deep copy). */\n\tSolutionAnalysis& operator=(\tconst SolutionAnalysis& rhs\t/**< Rhs object. */\n\t\t\t\t\t\t\t\t\t);\n\t\n\t/** A routine for computation of inverse of the Hessian matrix. */\n\treturnValue getHessianInverse(\n\t\t\t\t\t\t\t\t\tQProblem* qp,\t\t\t/** QP */\n\t\t\t\t\t\t\t\t\treal_t* hessianInverse\t/** Inverse of the Hessian matrix*/\n\t\t\t\t\t\t\t\t\t);\n\t\n\t/** A routine for computation of inverse of the Hessian matrix. */\n\treturnValue getHessianInverse(\tQProblemB* qp,\t\t\t/** QP */\n\t\t\t\t\t\t\t\t\treal_t* hessianInverse\t/** Inverse of the Hessian matrix*/\n\t\t\t\t\t\t\t\t\t);\n\n#if QPOASES_USE_OLD_VERSION\n\treturnValue getVarianceCovariance(\n\t\t\t\t\t\t\t\t\t\tQProblem* qp,\n\t\t\t\t\t\t\t\t\t\treal_t* g_b_bA_VAR,\n\t\t\t\t\t\t\t\t\t\treal_t* Primal_Dual_VAR\n\t\t\t\t\t\t\t\t\t\t);\n#endif\n\t\nprivate:\n\t\n\treal_t delta_g_cov[ NVMAX ];\t\t/** A covariance-vector of g */\n\treal_t delta_lb_cov[ NVMAX ];\t\t/** A covariance-vector of lb */\n\treal_t delta_ub_cov[ NVMAX ];\t\t/** A covariance-vector of ub */\n\treal_t delta_lbA_cov[ NCMAX_ALLOC ];\t\t/** A covariance-vector of lbA */\n\treal_t delta_ubA_cov[ NCMAX_ALLOC ];\t\t/** A covariance-vector of ubA */\n\t\n#if QPOASES_USE_OLD_VERSION\n\treal_t K[KKT_DIM * KKT_DIM];\t\t/** A matrix to store an intermediate result */\n#endif\n\t\n\tint FR_idx[ NVMAX ];\t\t\t\t/** Index array for free variables */\n\tint FX_idx[ NVMAX ];\t\t\t\t/** Index array for fixed variables */\n\tint AC_idx[ NCMAX_ALLOC ];\t\t\t\t/** Index array for active constraints */\n\t\n\treal_t delta_xFR[ NVMAX ];\t\t\t/** QP reaction, primal, w.r.t. free */\n\treal_t delta_xFX[ NVMAX ];\t\t\t/** QP reaction, primal, w.r.t. fixed */\n\treal_t delta_yAC[ NVMAX ];\t\t\t/** QP reaction, dual, w.r.t. active */\n\treal_t delta_yFX[ NVMAX ];\t\t\t/** QP reaction, dual, w.r.t. fixed*/\n};\n\n#endif // QPOASES_SOLUTIONANALYSIS_HPP\n"
  },
  {
    "path": "externals/qpoases/INCLUDE/Indexlist.hpp",
    "content": "/*\r\n *\tThis file is part of qpOASES.\r\n *\r\n *\tqpOASES -- An Implementation of the Online Active Set Strategy.\r\n *\tCopyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.\r\n *\r\n *\tqpOASES is free software; you can redistribute it and/or\r\n *\tmodify it under the terms of the GNU Lesser General Public\r\n *\tLicense as published by the Free Software Foundation; either\r\n *\tversion 2.1 of the License, or (at your option) any later version.\r\n *\r\n *\tqpOASES is distributed in the hope that it will be useful,\r\n *\tbut WITHOUT ANY WARRANTY; without even the implied warranty of\r\n *\tMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n *\tLesser General Public License for more details.\r\n *\r\n *\tYou should have received a copy of the GNU Lesser General Public\r\n *\tLicense along with qpOASES; if not, write to the Free Software\r\n *\tFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r\n *\r\n */\r\n\r\n\r\n/**\r\n *\t\\file INCLUDE/Indexlist.hpp\r\n *\t\\author Hans Joachim Ferreau\r\n *\t\\version 1.3embedded\r\n *\t\\date 2007-2008\r\n *\r\n *\tDeclaration of the Indexlist class designed to manage index lists of\r\n *\tconstraints and bounds within a SubjectTo object.\r\n */\r\n\r\n\r\n#ifndef QPOASES_INDEXLIST_HPP\r\n#define QPOASES_INDEXLIST_HPP\r\n\r\n\r\n#include <Utils.hpp>\r\n\r\n\r\n/** This class manages index lists.\r\n *\r\n *\t\\author Hans Joachim Ferreau\r\n *\t\\version 1.3embedded\r\n *\t\\date 2007-2008\r\n */\r\nclass Indexlist\r\n{\r\n\t/*\r\n\t *\tPUBLIC MEMBER FUNCTIONS\r\n\t */\r\n\tpublic:\r\n\t\t/** Default constructor. */\r\n\t\tIndexlist( );\r\n\r\n\t\t/** Copy constructor (deep copy). */\r\n\t\tIndexlist(\tconst Indexlist& rhs\t/**< Rhs object. */\r\n\t\t\t\t\t);\r\n\r\n\t\t/** Destructor. */\r\n\t\t~Indexlist( );\r\n\r\n\t\t/** Assingment operator (deep copy). */\r\n\t\tIndexlist& operator=(\tconst Indexlist& rhs\t/**< Rhs object. */\r\n\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Pseudo-constructor.\r\n\t\t *\t\\return SUCCESSFUL_RETURN */\r\n\t\treturnValue init( );\r\n\r\n\r\n\t\t/** Creates an array of all numbers within the index set in correct order.\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t \t\t\tRET_INDEXLIST_CORRUPTED */\r\n\t\treturnValue\tgetNumberArray(\tint* const numberarray\t/**< Output: Array of numbers (NULL on error). */\r\n\t\t\t\t\t\t\t\t\t) const;\r\n\r\n\r\n\t\t/** Determines the index within the index list at with a given number is stored.\r\n\t\t *\t\\return >= 0: Index of given number. \\n\r\n\t\t \t\t\t-1: Number not found. */\r\n\t\tint\tgetIndex(\tint givennumber\t/**< Number whose index shall be determined. */\r\n\t\t\t\t\t\t) const;\r\n\r\n\t\t/** Determines the physical index within the index list at with a given number is stored.\r\n\t\t *\t\\return >= 0: Index of given number. \\n\r\n\t\t \t\t\t-1: Number not found. */\r\n\t\tint\tgetPhysicalIndex(\tint givennumber\t/**< Number whose physical index shall be determined. */\r\n\t\t\t\t\t\t\t\t) const;\r\n\r\n\t\t/** Returns the number stored at a given physical index.\r\n\t\t *\t\\return >= 0: Number stored at given physical index. \\n\r\n\t\t \t\t\t-RET_INDEXLIST_OUTOFBOUNDS */\r\n\t\tint\tgetNumber(\tint physicalindex\t/**< Physical index of the number to be returned. */\r\n\t\t\t\t\t\t) const;\r\n\r\n\r\n\t\t/** Returns the current length of the index list.\r\n\t\t *\t\\return Current length of the index list. */\r\n\t\tinline int getLength( );\r\n\r\n\t\t/** Returns last number within the index list.\r\n\t\t *\t\\return Last number within the index list. */\r\n\t\tinline int getLastNumber( ) const;\r\n\r\n\r\n\t\t/** Adds number to index list.\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t \t\t\tRET_INDEXLIST_MUST_BE_REORDERD \\n\r\n\t\t \t\t\tRET_INDEXLIST_EXCEEDS_MAX_LENGTH */\r\n\t\treturnValue addNumber(\tint addnumber\t/**< Number to be added. */\r\n\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Removes number from index list.\r\n\t\t *\t\\return SUCCESSFUL_RETURN */\r\n\t\treturnValue removeNumber(\tint removenumber\t/**< Number to be removed. */\r\n\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Swaps two numbers within index list.\r\n\t\t *\t\\return SUCCESSFUL_RETURN */\r\n\t\treturnValue swapNumbers(\tint number1,/**< First number for swapping. */\r\n\t\t\t\t\t\t\t\t\tint number2\t/**< Second number for swapping. */\r\n\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Determines if a given number is contained in the index set.\r\n\t\t *\t\\return BT_TRUE iff number is contain in the index set */\r\n\t\tinline BooleanType isMember(\tint _number\t/**< Number to be tested for membership. */\r\n\t\t\t\t\t\t\t\t\t\t) const;\r\n\r\n\r\n\t/*\r\n\t *\tPROTECTED MEMBER VARIABLES\r\n\t */\r\n\tprotected:\r\n\t\tint number[INDEXLISTFACTOR*(NVMAX+NCMAX)];\t\t/**< Array to store numbers of constraints or bounds. */\r\n\t\tint next[INDEXLISTFACTOR*(NVMAX+NCMAX)];\t\t/**< Array to store physical index of successor. */\r\n\t\tint previous[INDEXLISTFACTOR*(NVMAX+NCMAX)];\t/**< Array to store physical index of predecossor. */\r\n\t\tint\tlength;\t\t\t\t\t\t\t\t\t\t/**< Length of index list. */\r\n\t\tint\tfirst;\t\t\t\t\t\t\t\t\t\t/**< Physical index of first element. */\r\n\t\tint\tlast;\t\t\t\t\t\t\t\t\t\t/**< Physical index of last element. */\r\n\t\tint\tlastusedindex;\t\t\t\t\t\t\t\t/**< Physical index of last entry in index list. */\r\n\t\tint\tphysicallength;\t\t\t\t\t\t\t\t/**< Physical length of index list. */\r\n};\r\n\r\n\r\n#include <Indexlist.ipp>\r\n\r\n#endif\t/* QPOASES_INDEXLIST_HPP */\r\n\r\n\r\n/*\r\n *\tend of file\r\n */\r\n"
  },
  {
    "path": "externals/qpoases/INCLUDE/MessageHandling.hpp",
    "content": "/*\r\n *\tThis file is part of qpOASES.\r\n *\r\n *\tqpOASES -- An Implementation of the Online Active Set Strategy.\r\n *\tCopyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.\r\n *\r\n *\tqpOASES is free software; you can redistribute it and/or\r\n *\tmodify it under the terms of the GNU Lesser General Public\r\n *\tLicense as published by the Free Software Foundation; either\r\n *\tversion 2.1 of the License, or (at your option) any later version.\r\n *\r\n *\tqpOASES is distributed in the hope that it will be useful,\r\n *\tbut WITHOUT ANY WARRANTY; without even the implied warranty of\r\n *\tMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n *\tLesser General Public License for more details.\r\n *\r\n *\tYou should have received a copy of the GNU Lesser General Public\r\n *\tLicense along with qpOASES; if not, write to the Free Software\r\n *\tFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r\n *\r\n */\r\n\r\n\r\n/**\r\n *\t\\file INCLUDE/MessageHandling.hpp\r\n *\t\\author Hans Joachim Ferreau\r\n *\t\\version 1.3embedded\r\n *\t\\date 2007-2008\r\n *\r\n *\tDeclaration of the MessageHandling class including global return values.\r\n */\r\n\r\n\r\n#ifndef QPOASES_MESSAGEHANDLING_HPP\r\n#define QPOASES_MESSAGEHANDLING_HPP\r\n\r\n// #define PC_DEBUG\r\n\r\n#ifdef PC_DEBUG\r\n  #include <stdio.h>\r\n\r\n  /** Defines an alias for  FILE  from stdio.h. */\r\n  #define myFILE FILE\r\n  /** Defines an alias for  stderr  from stdio.h. */\r\n  #define myStderr stderr\r\n  /** Defines an alias for  stdout  from stdio.h. */\r\n  #define myStdout stdout\r\n#else\r\n  /** Defines an alias for  FILE  from stdio.h. */\r\n  #define myFILE int\r\n  /** Defines an alias for  stderr  from stdio.h. */\r\n  #define myStderr 0\r\n  /** Defines an alias for  stdout  from stdio.h. */\r\n  #define myStdout 0\r\n#endif\r\n\r\n\r\n#include <Types.hpp>\r\n#include <Constants.hpp>\r\n\r\n\r\n/** Defines symbols for global return values. \\n\r\n *  Important: All return values are assumed to be nonnegative! */\r\nenum returnValue\r\n{\r\nTERMINAL_LIST_ELEMENT = -1,\t\t\t\t\t\t/**< Terminal list element, internal usage only! */\r\n/* miscellaneous */\r\nSUCCESSFUL_RETURN = 0,\t\t\t\t\t\t\t/**< Successful return. */\r\nRET_DIV_BY_ZERO,\t\t   \t\t\t\t\t\t/**< Division by zero. */\r\nRET_INDEX_OUT_OF_BOUNDS,\t\t\t\t\t\t/**< Index out of bounds. */\r\nRET_INVALID_ARGUMENTS,\t\t\t\t\t\t\t/**< At least one of the arguments is invalid. */\r\nRET_ERROR_UNDEFINED,\t\t\t\t\t\t\t/**< Error number undefined. */\r\nRET_WARNING_UNDEFINED,\t\t\t\t\t\t\t/**< Warning number undefined. */\r\nRET_INFO_UNDEFINED,\t\t\t\t\t\t\t\t/**< Info number undefined. */\r\nRET_EWI_UNDEFINED,\t\t\t\t\t\t\t\t/**< Error/warning/info number undefined. */\r\nRET_AVAILABLE_WITH_LINUX_ONLY,\t\t\t\t\t/**< This function is available under Linux only. */\r\nRET_UNKNOWN_BUG,\t\t\t\t\t\t\t\t/**< The error occured is not yet known. */\r\nRET_PRINTLEVEL_CHANGED,\t\t\t\t\t\t\t/**< 10 Print level changed. */\r\nRET_NOT_YET_IMPLEMENTED,\t\t\t\t\t\t/**< Requested function is not yet implemented in this version of qpOASES. */\r\n/* Indexlist */\r\nRET_INDEXLIST_MUST_BE_REORDERD,\t\t\t\t\t/**< Index list has to be reordered. */\r\nRET_INDEXLIST_EXCEEDS_MAX_LENGTH,\t\t\t\t/**< Index list exceeds its maximal physical length. */\r\nRET_INDEXLIST_CORRUPTED,\t\t\t\t\t\t/**< Index list corrupted. */\r\nRET_INDEXLIST_OUTOFBOUNDS,\t\t\t\t\t\t/**< Physical index is out of bounds. */\r\nRET_INDEXLIST_ADD_FAILED,\t\t\t\t\t\t/**< Adding indices from another index set failed. */\r\nRET_INDEXLIST_INTERSECT_FAILED,\t\t\t\t\t/**< Intersection with another index set failed. */\r\n/* SubjectTo / Bounds / Constraints */\r\nRET_INDEX_ALREADY_OF_DESIRED_STATUS,\t\t\t/**< Index is already of desired status. */\r\nRET_ADDINDEX_FAILED,\t\t\t\t\t\t\t/**< Cannot swap between different indexsets. */\r\nRET_SWAPINDEX_FAILED,\t\t\t\t\t\t\t/**< 20 Adding index to index set failed. */\r\nRET_NOTHING_TO_DO,\t\t\t\t\t\t\t\t/**< Nothing to do. */\r\nRET_SETUP_BOUND_FAILED,\t\t\t\t\t\t\t/**< Setting up bound index failed. */\r\nRET_SETUP_CONSTRAINT_FAILED,\t\t\t\t\t/**< Setting up constraint index failed. */\r\nRET_MOVING_BOUND_FAILED,\t\t\t\t\t\t/**< Moving bound between index sets failed. */\r\nRET_MOVING_CONSTRAINT_FAILED,\t\t\t\t\t/**< Moving constraint between index sets failed. */\r\n/* QProblem */\r\nRET_QP_ALREADY_INITIALISED,\t\t\t\t\t\t/**< QProblem has already been initialised. */\r\nRET_NO_INIT_WITH_STANDARD_SOLVER,\t\t\t\t/**< Initialisation via extern QP solver is not yet implemented. */\r\nRET_RESET_FAILED,\t\t\t\t\t\t\t\t/**< Reset failed. */\r\nRET_INIT_FAILED,\t\t\t\t\t\t\t\t/**< Initialisation failed. */\r\nRET_INIT_FAILED_TQ,\t\t\t\t\t\t\t\t/**< 30 Initialisation failed due to TQ factorisation. */\r\nRET_INIT_FAILED_CHOLESKY,\t\t\t\t\t\t/**< Initialisation failed due to Cholesky decomposition. */\r\nRET_INIT_FAILED_HOTSTART,\t\t\t\t\t\t/**< Initialisation failed! QP could not be solved! */\r\nRET_INIT_FAILED_INFEASIBILITY,\t\t\t\t\t/**< Initial QP could not be solved due to infeasibility! */\r\nRET_INIT_FAILED_UNBOUNDEDNESS,\t\t\t\t\t/**< Initial QP could not be solved due to unboundedness! */\r\nRET_INIT_SUCCESSFUL,\t\t\t\t\t\t\t/**< Initialisation done. */\r\nRET_OBTAINING_WORKINGSET_FAILED,\t\t\t\t/**< Failed to obtain working set for auxiliary QP. */\r\nRET_SETUP_WORKINGSET_FAILED,\t\t\t\t\t/**< Failed to setup working set for auxiliary QP. */\r\nRET_SETUP_AUXILIARYQP_FAILED,\t\t\t\t\t/**< Failed to setup auxiliary QP for initialised homotopy. */\r\nRET_NO_EXTERN_SOLVER,\t\t\t\t\t\t\t/**< No extern QP solver available. */\r\nRET_QP_UNBOUNDED,\t\t\t\t\t\t\t\t/**< 40 QP is unbounded. */\r\nRET_QP_INFEASIBLE,\t\t\t\t\t\t\t\t/**< QP is infeasible. */\r\nRET_QP_NOT_SOLVED,\t\t\t\t\t\t\t\t/**< Problems occured while solving QP with standard solver. */\r\nRET_QP_SOLVED,\t\t\t\t\t\t\t\t\t/**< QP successfully solved. */\r\nRET_UNABLE_TO_SOLVE_QP,\t\t\t\t\t\t\t/**< Problems occured while solving QP. */\r\nRET_INITIALISATION_STARTED,\t\t\t\t\t\t/**< Starting problem initialisation. */\r\nRET_HOTSTART_FAILED,\t\t\t\t\t\t\t/**< Unable to perform homotopy due to internal error. */\r\nRET_HOTSTART_FAILED_TO_INIT,\t\t\t\t\t/**< Unable to initialise problem. */\r\nRET_HOTSTART_FAILED_AS_QP_NOT_INITIALISED,\t\t/**< Unable to perform homotopy as previous QP is not solved. */\r\nRET_ITERATION_STARTED,\t\t\t\t\t\t\t/**< Iteration... */\r\nRET_SHIFT_DETERMINATION_FAILED,\t\t\t\t\t/**< 50 Determination of shift of the QP data failed. */\r\nRET_STEPDIRECTION_DETERMINATION_FAILED,\t\t\t/**< Determination of step direction failed. */\r\nRET_STEPLENGTH_DETERMINATION_FAILED,\t\t\t/**< Determination of step direction failed. */\r\nRET_OPTIMAL_SOLUTION_FOUND,\t\t\t\t\t\t/**< Optimal solution of neighbouring QP found. */\r\nRET_HOMOTOPY_STEP_FAILED,\t\t\t\t\t\t/**< Unable to perform homotopy step. */\r\nRET_HOTSTART_STOPPED_INFEASIBILITY,\t\t\t\t/**< Premature homotopy termination because QP is infeasible. */\r\nRET_HOTSTART_STOPPED_UNBOUNDEDNESS,\t\t\t\t/**< Premature homotopy termination because QP is unbounded. */\r\nRET_WORKINGSET_UPDATE_FAILED,\t\t\t\t\t/**< Unable to update working sets according to initial guesses. */\r\nRET_MAX_NWSR_REACHED,\t\t\t\t\t\t\t/**< Maximum number of working set recalculations performed. */\r\nRET_CONSTRAINTS_NOT_SPECIFIED,\t\t\t\t\t/**< Problem does comprise constraints! You also have to specify new constraints' bounds. */\r\nRET_INVALID_FACTORISATION_FLAG,\t\t\t\t\t/**< 60 Invalid factorisation flag. */\r\nRET_UNABLE_TO_SAVE_QPDATA,\t\t\t\t\t\t/**< Unable to save QP data. */\r\nRET_STEPDIRECTION_FAILED_TQ,\t\t\t\t\t/**< Abnormal termination due to TQ factorisation. */\r\nRET_STEPDIRECTION_FAILED_CHOLESKY,\t\t\t\t/**< Abnormal termination due to Cholesky factorisation. */\r\nRET_CYCLING_DETECTED,\t\t\t\t\t\t\t/**< Cycling detected. */\r\nRET_CYCLING_NOT_RESOLVED,\t\t\t\t\t\t/**< Cycling cannot be resolved, QP probably infeasible. */\r\nRET_CYCLING_RESOLVED,\t\t\t\t\t\t\t/**< Cycling probably resolved. */\r\nRET_STEPSIZE,\t\t\t\t\t\t\t\t\t/**< For displaying performed stepsize. */\r\nRET_STEPSIZE_NONPOSITIVE,\t\t\t\t\t\t/**< For displaying non-positive stepsize. */\r\nRET_SETUPSUBJECTTOTYPE_FAILED,\t\t\t\t\t/**< Setup of SubjectToTypes failed. */\r\nRET_ADDCONSTRAINT_FAILED,\t\t\t\t\t\t/**< 70 Addition of constraint to working set failed. */\r\nRET_ADDCONSTRAINT_FAILED_INFEASIBILITY,\t\t\t/**< Addition of constraint to working set failed (due to QP infeasibility). */\r\nRET_ADDBOUND_FAILED,\t\t\t\t\t\t\t/**< Addition of bound to working set failed. */\r\nRET_ADDBOUND_FAILED_INFEASIBILITY,\t\t\t\t/**< Addition of bound to working set failed (due to QP infeasibility). */\r\nRET_REMOVECONSTRAINT_FAILED,\t\t\t\t\t/**< Removal of constraint from working set failed. */\r\nRET_REMOVEBOUND_FAILED,\t\t\t\t\t\t\t/**< Removal of bound from working set failed. */\r\nRET_REMOVE_FROM_ACTIVESET,\t\t\t\t\t\t/**< Removing from active set... */\r\nRET_ADD_TO_ACTIVESET,\t\t\t\t\t\t\t/**< Adding to active set... */\r\nRET_REMOVE_FROM_ACTIVESET_FAILED,\t\t\t\t/**< Removing from active set failed. */\r\nRET_ADD_TO_ACTIVESET_FAILED,\t\t\t\t\t/**< Adding to active set failed. */\r\nRET_CONSTRAINT_ALREADY_ACTIVE,\t\t\t\t\t/**< 80 Constraint is already active. */\r\nRET_ALL_CONSTRAINTS_ACTIVE,\t\t\t\t\t\t/**< All constraints are active, no further constraint can be added. */\r\nRET_LINEARLY_DEPENDENT,\t\t\t\t\t\t\t/**< New bound/constraint is linearly dependent. */\r\nRET_LINEARLY_INDEPENDENT,\t\t\t\t\t\t/**< New bound/constraint is linearly independent. */\r\nRET_LI_RESOLVED,\t\t\t\t\t\t\t\t/**< Linear independence of active contraint matrix successfully resolved. */\r\nRET_ENSURELI_FAILED,\t\t\t\t\t\t\t/**< Failed to ensure linear indepence of active contraint matrix. */\r\nRET_ENSURELI_FAILED_TQ,\t\t\t\t\t\t\t/**< Abnormal termination due to TQ factorisation. */\r\nRET_ENSURELI_FAILED_NOINDEX,\t\t\t\t\t/**< No index found, QP probably infeasible. */\r\nRET_ENSURELI_FAILED_CYCLING,\t\t\t\t\t/**< Cycling detected, QP probably infeasible. */\r\nRET_BOUND_ALREADY_ACTIVE,\t\t\t\t\t\t/**< Bound is already active. */\r\nRET_ALL_BOUNDS_ACTIVE,\t\t\t\t\t\t\t/**< 90 All bounds are active, no further bound can be added. */\r\nRET_CONSTRAINT_NOT_ACTIVE,\t\t\t\t\t\t/**< Constraint is not active. */\r\nRET_BOUND_NOT_ACTIVE,\t\t\t\t\t\t\t/**< Bound is not active. */\r\nRET_HESSIAN_NOT_SPD,\t\t\t\t\t\t\t/**< Projected Hessian matrix not positive definite. */\r\nRET_MATRIX_SHIFT_FAILED,\t\t\t\t\t\t/**< Unable to update matrices or to transform vectors. */\r\nRET_MATRIX_FACTORISATION_FAILED,\t\t\t\t/**< Unable to calculate new matrix factorisations. */\r\nRET_PRINT_ITERATION_FAILED,\t\t\t\t\t\t/**< Unable to print information on current iteration. */\r\nRET_NO_GLOBAL_MESSAGE_OUTPUTFILE,\t\t\t\t/**< No global message output file initialised. */\r\n/* Utils */\r\nRET_UNABLE_TO_OPEN_FILE,\t\t\t\t\t\t/**< Unable to open file. */\r\nRET_UNABLE_TO_WRITE_FILE,\t\t\t\t\t\t/**< Unable to write into file. */\r\nRET_UNABLE_TO_READ_FILE,\t\t\t\t\t\t/**< 100 Unable to read from file. */\r\nRET_FILEDATA_INCONSISTENT,\t\t\t\t\t\t/**< File contains inconsistent data. */\r\n/* SolutionAnalysis */\r\nRET_NO_SOLUTION, \t\t\t\t\t\t\t\t/**< QP solution does not satisfy KKT optimality conditions. */\r\nRET_INACCURATE_SOLUTION\t\t\t\t\t\t\t/**< KKT optimality conditions not satisfied to sufficient accuracy. */\r\n};\r\n\r\n\r\n\r\n/** This class handles all kinds of messages (errors, warnings, infos) initiated\r\n *  by qpOASES modules and stores the correspoding global preferences.\r\n *\r\n *\t\\author Hans Joachim Ferreau (special thanks to Leonard Wirsching)\r\n *\t\\version 1.3embedded\r\n *\t\\date 2007-2008\r\n */\r\nclass MessageHandling\r\n{\r\n\t/*\r\n\t *\tINTERNAL DATA STRUCTURES\r\n\t */\r\n\tpublic:\r\n\t\t/** Data structure for entries in global message list. */\r\n\t\ttypedef struct {\r\n\t\t\treturnValue key;\t\t\t\t\t\t\t/**< Global return value. */\r\n\t\t\tconst char* data;\t\t\t\t\t\t\t/**< Corresponding message. */\r\n\t\t\tVisibilityStatus globalVisibilityStatus; \t/**< Determines if message can be printed.\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t* \t If this value is set to VS_HIDDEN, no message is printed! */\r\n\t\t} ReturnValueList;\r\n\r\n\r\n\t/*\r\n\t *\tPUBLIC MEMBER FUNCTIONS\r\n\t */\r\n\tpublic:\r\n\t\t/** Default constructor. */\r\n\t\tMessageHandling( );\r\n\r\n\t\t/** Constructor which takes the desired output file. */\r\n\t\tMessageHandling(  myFILE* _outputFile\t\t\t\t\t/**< Output file. */\r\n\t\t\t\t\t\t  );\r\n\r\n\t\t/** Constructor which takes the desired visibility states. */\r\n\t\tMessageHandling(\tVisibilityStatus _errorVisibility,\t/**< Visibility status for error messages. */\r\n\t\t\t\t\t\t\tVisibilityStatus _warningVisibility,/**< Visibility status for warning messages. */\r\n\t\t\t\t\t\t\tVisibilityStatus _infoVisibility\t/**< Visibility status for info messages. */\r\n\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Constructor which takes the desired output file and desired visibility states. */\r\n\t\tMessageHandling(\tmyFILE* _outputFile,\t\t\t\t/**< Output file. */\r\n\t\t\t\t\t\t\tVisibilityStatus _errorVisibility,\t/**< Visibility status for error messages. */\r\n\t\t\t\t\t\t\tVisibilityStatus _warningVisibility,/**< Visibility status for warning messages. */\r\n\t\t\t\t\t\t\tVisibilityStatus _infoVisibility\t/**< Visibility status for info messages. */\r\n\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Copy constructor (deep copy). */\r\n\t\tMessageHandling(\tconst MessageHandling& rhs\t/**< Rhs object. */\r\n\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Destructor. */\r\n\t\t~MessageHandling( );\r\n\r\n\t\t/** Assignment operator (deep copy). */\r\n\t\tMessageHandling& operator=(\tconst MessageHandling& rhs\t/**< Rhs object. */\r\n\t\t\t\t\t\t\t\t\t);\r\n\r\n\r\n\t\t/** Prints an error message(a simplified macro THROWERROR is also provided). \\n\r\n\t\t *  Errors are definied as abnormal events which cause an immediate termination of the current (sub) function.\r\n\t\t *  Errors of a sub function should be commented by the calling function by means of a warning message\r\n\t\t *  (if this error does not cause an error of the calling function, either)!\r\n\t\t *  \\return Error number returned by sub function call\r\n\t\t */\r\n\t\treturnValue throwError(\r\n\t\t\treturnValue Enumber,\t\t\t\t\t/**< Error number returned by sub function call. */\r\n\t\t\tconst char* additionaltext,\t\t\t\t/**< Additional error text (0, if none). */\r\n\t\t\tconst char* functionname,\t\t\t\t/**< Name of function which caused the error. */\r\n\t\t\tconst char* filename,\t\t\t\t\t/**< Name of file which caused the error. */\r\n\t\t\tconst unsigned long linenumber,\t\t\t/**< Number of line which caused the error.incompatible binary file */\r\n\t\t\tVisibilityStatus localVisibilityStatus\t/**< Determines (locally) if error message can be printed to myStderr.\r\n\t\t\t   \t\t\t\t\t\t\t\t\t *   If GLOBAL visibility status of the message is set to VS_HIDDEN,\r\n\t   \t\t\t \t\t\t\t\t\t\t\t *   no message is printed, anyway! */\r\n\t\t);\r\n\r\n\t\t/** Prints a warning message (a simplified macro THROWWARNING is also provided).\r\n\t\t *  Warnings are definied as abnormal events which does NOT cause an immediate termination of the current (sub) function.\r\n\t\t *  \\return Warning number returned by sub function call\r\n\t\t */\r\n\t\treturnValue throwWarning(\r\n\t\t\treturnValue Wnumber,\t \t\t\t\t/**< Warning number returned by sub function call. */\r\n\t\t\tconst char* additionaltext,\t\t\t\t/**< Additional warning text (0, if none). */\r\n\t\t\tconst char* functionname,\t\t\t\t/**< Name of function which caused the warning. */\r\n\t\t\tconst char* filename,   \t\t\t\t/**< Name of file which caused the warning. */\r\n\t\t\tconst unsigned long linenumber,\t \t\t/**< Number of line which caused the warning. */\r\n\t\t\tVisibilityStatus localVisibilityStatus\t/**< Determines (locally) if warning message can be printed to myStderr.\r\n\t\t   \t\t  \t\t\t\t\t\t\t\t\t *   If GLOBAL visibility status of the message is set to VS_HIDDEN,\r\n\t\t\t\t\t \t\t\t\t\t\t\t\t *   no message is printed, anyway! */\r\n\t\t\t);\r\n\r\n\t   /** Prints a info message (a simplified macro THROWINFO is also provided).\r\n\t\t *  \\return Info number returned by sub function call\r\n\t\t */\r\n\t\treturnValue throwInfo(\r\n\t\t\treturnValue Inumber,\t \t\t\t\t/**< Info number returned by sub function call. */\r\n\t\t\tconst char* additionaltext,\t \t\t\t/**< Additional warning text (0, if none). */\r\n\t\t\tconst char* functionname,\t\t\t\t/**< Name of function which submitted the info. */\r\n\t\t\tconst char* filename,   \t\t\t\t/**< Name of file which submitted the info. */\r\n\t\t\tconst unsigned long linenumber,\t\t\t/**< Number of line which submitted the info. */\r\n\t\t\tVisibilityStatus localVisibilityStatus\t/**< Determines (locally) if info message can be printed to myStderr.\r\n\t\t\t\t  \t\t\t\t\t\t\t\t\t *   If GLOBAL visibility status of the message is set to VS_HIDDEN,\r\n\t\t\t\t   \t\t\t\t\t\t\t\t\t *   no message is printed, anyway! */\r\n\t\t\t);\r\n\r\n\r\n\t\t/** Resets all preferences to default values.\r\n\t\t *\t\\return SUCCESSFUL_RETURN */\r\n\t\treturnValue reset( );\r\n\r\n\r\n\t\t/** Prints a complete list of all messages to output file.\r\n\t\t *\t\\return SUCCESSFUL_RETURN */\r\n\t\treturnValue listAllMessages( );\r\n\r\n\r\n\t\t/** Returns visibility status for error messages.\r\n\t\t *\t\\return Visibility status for error messages. */\r\n\t\tinline VisibilityStatus getErrorVisibilityStatus( ) const;\r\n\r\n\t\t/** Returns visibility status for warning messages.\r\n\t\t *\t\\return Visibility status for warning messages. */\r\n\t\tinline VisibilityStatus getWarningVisibilityStatus( ) const;\r\n\r\n\t\t/** Returns visibility status for info messages.\r\n\t\t *\t\\return Visibility status for info messages. */\r\n\t\tinline VisibilityStatus getInfoVisibilityStatus( ) const;\r\n\r\n\t\t/** Returns pointer to output file.\r\n\t\t *\t\\return Pointer to output file. */\r\n\t\tinline myFILE* getOutputFile( ) const;\r\n\r\n\t\t/** Returns error count value.\r\n\t\t *\t\\return Error count value. */\r\n\t\tinline int getErrorCount( ) const;\r\n\r\n\r\n\t\t/** Changes visibility status for error messages. */\r\n\t\tinline void setErrorVisibilityStatus(\tVisibilityStatus _errorVisibility\t/**< New visibility status for error messages. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Changes visibility status for warning messages. */\r\n\t\tinline void setWarningVisibilityStatus(\tVisibilityStatus _warningVisibility\t/**< New visibility status for warning messages. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Changes visibility status for info messages. */\r\n\t\tinline void setInfoVisibilityStatus(\tVisibilityStatus _infoVisibility\t/**< New visibility status for info messages. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Changes output file for messages. */\r\n\t\tinline void setOutputFile(\tmyFILE* _outputFile\t/**< New output file for messages. */\r\n\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Changes error count.\r\n\t\t * \\return SUCCESSFUL_RETURN \\n\r\n\t\t *\t\t   RET_INVALID_ARGUMENT */\r\n\t\tinline returnValue setErrorCount(\tint _errorCount\t/**< New error count value. */\r\n\t\t\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Return the error code string. */\r\n\t\tstatic const char* getErrorString(int error);\r\n\r\n\t/*\r\n\t *\tPROTECTED MEMBER FUNCTIONS\r\n\t */\r\n\tprotected:\r\n\t\t/** Prints a info message to myStderr (auxiliary function).\r\n\t\t *  \\return Error/warning/info number returned by sub function call\r\n\t\t */\r\n\t\treturnValue throwMessage(\r\n\t\t\treturnValue RETnumber,\t \t\t\t\t/**< Error/warning/info number returned by sub function call. */\r\n\t\t\tconst char* additionaltext,\t\t\t\t/**< Additional warning text (0, if none). */\r\n\t\t\tconst char* functionname,\t\t\t\t/**< Name of function which caused the error/warning/info. */\r\n\t\t\tconst char* filename,   \t\t\t\t/**< Name of file which caused the error/warning/info. */\r\n\t\t\tconst unsigned long linenumber,\t\t\t/**< Number of line which caused the error/warning/info. */\r\n\t\t\tVisibilityStatus localVisibilityStatus,\t/**< Determines (locally) if info message can be printed to myStderr.\r\n\t\t\t\t\t  \t\t\t\t\t\t\t\t *   If GLOBAL visibility status of the message is set to VS_HIDDEN,\r\n\t\t\t\t   \t\t\t\t\t\t\t\t\t *   no message is printed, anyway! */\r\n\t\t\tconst char* RETstring\t\t\t\t\t/**< Leading string of error/warning/info message. */\r\n\t\t\t);\r\n\r\n\r\n\t/*\r\n\t *\tPROTECTED MEMBER VARIABLES\r\n\t */\r\n\tprotected:\r\n\t\tVisibilityStatus errorVisibility;\t\t/**< Error messages visible? */\r\n\t\tVisibilityStatus warningVisibility;\t\t/**< Warning messages visible? */\r\n\t\tVisibilityStatus infoVisibility;\t\t/**< Info messages visible? */\r\n\r\n\t\tmyFILE* outputFile;\t\t\t\t\t\t/**< Output file for messages. */\r\n\r\n\t\tint errorCount; \t\t\t\t\t\t/**< Counts number of errors (for nicer output only). */\r\n};\r\n\r\n\r\n#ifndef __FUNCTION__\r\n  /** Ensures that __FUNCTION__ macro is defined. */\r\n  #define __FUNCTION__ 0\r\n#endif\r\n\r\n#ifndef __FILE__\r\n  /** Ensures that __FILE__ macro is defined. */\r\n  #define __FILE__ 0\r\n#endif\r\n\r\n#ifndef __LINE__\r\n  /** Ensures that __LINE__ macro is defined. */\r\n  #define __LINE__ 0\r\n#endif\r\n\r\n\r\n/** Short version of throwError with default values, only returnValue is needed */\r\n#define THROWERROR(retval) ( getGlobalMessageHandler( )->throwError((retval),0,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE) )\r\n\r\n/** Short version of throwWarning with default values, only returnValue is needed */\r\n#define THROWWARNING(retval) ( getGlobalMessageHandler( )->throwWarning((retval),0,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE) )\r\n\r\n/** Short version of throwInfo with default values, only returnValue is needed */\r\n#define THROWINFO(retval) ( getGlobalMessageHandler( )->throwInfo((retval),0,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE) )\r\n\r\n\r\n/** Returns a pointer to global message handler.\r\n *  \\return Pointer to global message handler.\r\n */\r\nMessageHandling* getGlobalMessageHandler( );\r\n\r\n\r\n#include <MessageHandling.ipp>\r\n\r\n#endif /* QPOASES_MESSAGEHANDLING_HPP */\r\n\r\n\r\n/*\r\n *\tend of file\r\n */\r\n"
  },
  {
    "path": "externals/qpoases/INCLUDE/QProblem.hpp",
    "content": "/*\r\n *\tThis file is part of qpOASES.\r\n *\r\n *\tqpOASES -- An Implementation of the Online Active Set Strategy.\r\n *\tCopyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.\r\n *\r\n *\tqpOASES is free software; you can redistribute it and/or\r\n *\tmodify it under the terms of the GNU Lesser General Public\r\n *\tLicense as published by the Free Software Foundation; either\r\n *\tversion 2.1 of the License, or (at your option) any later version.\r\n *\r\n *\tqpOASES is distributed in the hope that it will be useful,\r\n *\tbut WITHOUT ANY WARRANTY; without even the implied warranty of\r\n *\tMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n *\tLesser General Public License for more details.\r\n *\r\n *\tYou should have received a copy of the GNU Lesser General Public\r\n *\tLicense along with qpOASES; if not, write to the Free Software\r\n *\tFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r\n *\r\n */\r\n\r\n\r\n/**\r\n *\t\\file INCLUDE/QProblem.hpp\r\n *\t\\author Hans Joachim Ferreau\r\n *\t\\version 1.3embedded\r\n *\t\\date 2007-2008\r\n *\r\n *\tDeclaration of the QProblem class which is able to use the newly\r\n *\tdeveloped online active set strategy for parametric quadratic programming.\r\n */\r\n\r\n\r\n\r\n#ifndef QPOASES_QPROBLEM_HPP\r\n#define QPOASES_QPROBLEM_HPP\r\n\r\n\r\n#include <QProblemB.hpp>\r\n#include <Constraints.hpp>\r\n#include <CyclingManager.hpp>\r\n\r\n\r\n/** A class for setting up and solving quadratic programs. The main feature is\r\n *\tthe possibily to use the newly developed online active set strategy for\r\n * \tparametric quadratic programming.\r\n *\r\n *\t\\author Hans Joachim Ferreau\r\n *\t\\version 1.3embedded\r\n *\t\\date 2007-2008\r\n */\r\nclass QProblem : public QProblemB\r\n{\r\n\t/* allow SolutionAnalysis class to access private members */\r\n\tfriend class SolutionAnalysis;\r\n\t\r\n\t/*\r\n\t *\tPUBLIC MEMBER FUNCTIONS\r\n\t */\r\n\tpublic:\r\n\t\t/** Default constructor. */\r\n\t\tQProblem( );\r\n\r\n\t\t/** Constructor which takes the QP dimensions only. */\r\n\t\tQProblem(\tint _nV,\t  \t\t\t\t/**< Number of variables. */\r\n\t\t\t\t\tint _nC  \t\t\t\t\t/**< Number of constraints. */\r\n\t\t\t\t\t);\r\n\r\n\t\t/** Copy constructor (deep copy). */\r\n\t\tQProblem(\tconst QProblem& rhs\t/**< Rhs object. */\r\n\t\t\t\t\t);\r\n\r\n\t\t/** Destructor. */\r\n\t\t~QProblem( );\r\n\r\n\t\t/** Assignment operator (deep copy). */\r\n\t\tQProblem& operator=(\tconst QProblem& rhs\t\t/**< Rhs object. */\r\n\t\t\t\t\t\t\t\t);\r\n\r\n\r\n\t\t/** Clears all data structures of QProblemB except for QP data.\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t\t\t\tRET_RESET_FAILED */\r\n\t\treturnValue reset( );\r\n\r\n\r\n\t\t/** Initialises a QProblem with given QP data and solves it\r\n\t\t *\tusing an initial homotopy with empty working set (at most nWSR iterations).\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t\t\t\tRET_INIT_FAILED \\n\r\n\t\t\t\t\tRET_INIT_FAILED_CHOLESKY \\n\r\n\t\t\t\t\tRET_INIT_FAILED_TQ \\n\r\n\t\t\t\t\tRET_INIT_FAILED_HOTSTART \\n\r\n\t\t\t\t\tRET_INIT_FAILED_INFEASIBILITY \\n\r\n\t\t\t\t\tRET_INIT_FAILED_UNBOUNDEDNESS \\n\r\n\t\t\t\t\tRET_MAX_NWSR_REACHED \\n\r\n\t\t\t\t\tRET_INVALID_ARGUMENTS \\n\r\n\t\t\t\t\tRET_INACCURATE_SOLUTION \\n\r\n\t\t \t\t\tRET_NO_SOLUTION */\r\n\t\treturnValue init(\tconst real_t* const _H, \t\t/**< Hessian matrix. */\r\n\t\t\t\t\t\t\tconst real_t* const _g, \t\t/**< Gradient vector. */\r\n\t\t\t\t\t\t\tconst real_t* const _A,  \t\t/**< Constraint matrix. */\r\n\t\t\t\t\t\t\tconst real_t* const _lb,\t\t/**< Lower bound vector (on variables). \\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tIf no lower bounds exist, a NULL pointer can be passed. */\r\n\t\t\t\t\t\t\tconst real_t* const _ub,\t\t/**< Upper bound vector (on variables). \\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tIf no upper bounds exist, a NULL pointer can be passed. */\r\n\t\t\t\t\t\t\tconst real_t* const _lbA,\t\t/**< Lower constraints' bound vector. \\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tIf no lower constraints' bounds exist, a NULL pointer can be passed. */\r\n\t\t\t\t\t\t\tconst real_t* const _ubA,\t\t/**< Upper constraints' bound vector. \\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tIf no lower constraints' bounds exist, a NULL pointer can be passed. */\r\n\t\t\t\t\t\t\tint& nWSR,\t\t\t\t\t\t/**< Input: Maximum number of working set recalculations when using initial homotopy.\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tOutput: Number of performed working set recalculations. */\r\n\t\t\t\t\t\t\tconst real_t* const yOpt = 0,\t/**< Initial guess for dual solution vector. */\r\n\t\t\t\t\t\t\treal_t* const cputime = 0\t\t/**< Output: CPU time required to initialise QP. */\r\n\t\t\t\t\t\t\t);\r\n\r\n\r\n\t\t/** Initialises a QProblem with given QP data and solves it\r\n\t\t *\tusing an initial homotopy with empty working set (at most nWSR iterations).\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t\t\t\tRET_INIT_FAILED \\n\r\n\t\t\t\t\tRET_INIT_FAILED_CHOLESKY \\n\r\n\t\t\t\t\tRET_INIT_FAILED_TQ \\n\r\n\t\t\t\t\tRET_INIT_FAILED_HOTSTART \\n\r\n\t\t\t\t\tRET_INIT_FAILED_INFEASIBILITY \\n\r\n\t\t\t\t\tRET_INIT_FAILED_UNBOUNDEDNESS \\n\r\n\t\t\t\t\tRET_MAX_NWSR_REACHED \\n\r\n\t\t\t\t\tRET_INVALID_ARGUMENTS \\n\r\n\t\t\t\t\tRET_INACCURATE_SOLUTION \\n\r\n\t\t \t\t\tRET_NO_SOLUTION */\r\n\t\treturnValue init(\tconst real_t* const _H, \t\t/**< Hessian matrix. */\r\n\t\t\t\t\t\t\tconst real_t* const _R, \t\t/**< Cholesky factorization of the Hessian matrix. */\r\n\t\t\t\t\t\t\tconst real_t* const _g, \t\t/**< Gradient vector. */\r\n\t\t\t\t\t\t\tconst real_t* const _A,  \t\t/**< Constraint matrix. */\r\n\t\t\t\t\t\t\tconst real_t* const _lb,\t\t/**< Lower bound vector (on variables). \\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tIf no lower bounds exist, a NULL pointer can be passed. */\r\n\t\t\t\t\t\t\tconst real_t* const _ub,\t\t/**< Upper bound vector (on variables). \\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tIf no upper bounds exist, a NULL pointer can be passed. */\r\n\t\t\t\t\t\t\tconst real_t* const _lbA,\t\t/**< Lower constraints' bound vector. \\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tIf no lower constraints' bounds exist, a NULL pointer can be passed. */\r\n\t\t\t\t\t\t\tconst real_t* const _ubA,\t\t/**< Upper constraints' bound vector. \\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tIf no lower constraints' bounds exist, a NULL pointer can be passed. */\r\n\t\t\t\t\t\t\tint& nWSR,\t\t\t\t\t\t/**< Input: Maximum number of working set recalculations when using initial homotopy.\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tOutput: Number of performed working set recalculations. */\r\n\t\t\t\t\t\t\tconst real_t* const yOpt = 0,\t/**< Initial guess for dual solution vector. */\r\n\t\t\t\t\t\t\treal_t* const cputime = 0\t\t/**< Output: CPU time required to initialise QP. */\r\n\t\t\t\t\t\t\t);\r\n\r\n\r\n\t\t/** Solves QProblem using online active set strategy.\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t \t\t\tRET_MAX_NWSR_REACHED \\n\r\n\t\t \t\t\tRET_HOTSTART_FAILED_AS_QP_NOT_INITIALISED \\n\r\n\t\t\t\t\tRET_HOTSTART_FAILED \\n\r\n\t\t\t\t\tRET_SHIFT_DETERMINATION_FAILED \\n\r\n\t\t\t\t\tRET_STEPDIRECTION_DETERMINATION_FAILED \\n\r\n\t\t\t\t\tRET_STEPLENGTH_DETERMINATION_FAILED \\n\r\n\t\t\t\t\tRET_HOMOTOPY_STEP_FAILED \\n\r\n\t\t\t\t\tRET_HOTSTART_STOPPED_INFEASIBILITY \\n\r\n\t\t\t\t\tRET_HOTSTART_STOPPED_UNBOUNDEDNESS \\n\r\n\t\t\t\t\tRET_INACCURATE_SOLUTION \\n\r\n\t\t \t\t\tRET_NO_SOLUTION */\r\n\t\treturnValue hotstart(\tconst real_t* const g_new,\t\t/**< Gradient of neighbouring QP to be solved. */\r\n\t\t\t\t\t\t\t\tconst real_t* const lb_new,\t\t/**< Lower bounds of neighbouring QP to be solved. \\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t \t If no lower bounds exist, a NULL pointer can be passed. */\r\n\t\t\t\t\t\t\t\tconst real_t* const ub_new,\t\t/**< Upper bounds of neighbouring QP to be solved. \\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t \t If no upper bounds exist, a NULL pointer can be passed. */\r\n\t\t\t\t\t\t\t\tconst real_t* const lbA_new,\t/**< Lower constraints' bounds of neighbouring QP to be solved. \\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t \t If no lower constraints' bounds exist, a NULL pointer can be passed. */\r\n\t\t\t\t\t\t\t\tconst real_t* const ubA_new,\t/**< Upper constraints' bounds of neighbouring QP to be solved. \\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t \t If no upper constraints' bounds exist, a NULL pointer can be passed. */\r\n\t\t\t\t\t\t\t\tint& nWSR,\t\t\t\t\t\t/**< Input: Maximum number of working set recalculations; \\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t Output: Number of performed working set recalculations. */\r\n\t\t\t\t\t\t\t\treal_t* const cputime\t\t\t/**< Output: CPU time required to solve QP (or to perform nWSR iterations). */\r\n\t\t\t\t\t\t\t\t);\r\n\r\n\r\n\t\t/** Returns constraint matrix of the QP (deep copy).\r\n\t\t  *\t\\return SUCCESSFUL_RETURN */\r\n\t\tinline returnValue getA(\treal_t* const _A\t/**< Array of appropriate dimension for copying constraint matrix.*/\r\n\t\t\t\t\t\t\t\t\t) const;\r\n\r\n\t\t/** Returns a single row of constraint matrix of the QP (deep copy).\r\n\t\t  *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t\t\t\tRET_INDEX_OUT_OF_BOUNDS */\r\n\t\tinline returnValue getA(\tint number,\t\t\t/**< Number of entry to be returned. */\r\n\t\t\t\t\t\t\t\t\treal_t* const row\t/**< Array of appropriate dimension for copying (number)th constraint. */\r\n\t\t\t\t\t\t\t\t\t) const;\r\n\r\n\t\t/** Returns lower constraints' bound vector of the QP (deep copy).\r\n\t\t  *\t\\return SUCCESSFUL_RETURN */\r\n\t\tinline returnValue getLBA(\treal_t* const _lbA\t/**< Array of appropriate dimension for copying lower constraints' bound vector.*/\r\n\t\t\t\t\t\t\t\t\t) const;\r\n\r\n\t\t/** Returns single entry of lower constraints' bound vector of the QP.\r\n\t\t  *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t\t\t\tRET_INDEX_OUT_OF_BOUNDS */\r\n\t\tinline returnValue getLBA(\tint number,\t\t/**< Number of entry to be returned. */\r\n\t\t\t\t\t\t\t\t\treal_t& value\t/**< Output: lbA[number].*/\r\n\t\t\t\t\t\t\t\t\t) const;\r\n\r\n\t\t/** Returns upper constraints' bound vector of the QP (deep copy).\r\n\t\t  *\t\\return SUCCESSFUL_RETURN */\r\n\t\tinline returnValue getUBA(\treal_t* const _ubA\t/**< Array of appropriate dimension for copying upper constraints' bound vector.*/\r\n\t\t\t\t\t\t\t\t\t) const;\r\n\r\n\t\t/** Returns single entry of upper constraints' bound vector of the QP.\r\n\t\t  *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t\t\t\tRET_INDEX_OUT_OF_BOUNDS */\r\n\t\tinline returnValue getUBA(\tint number,\t\t/**< Number of entry to be returned. */\r\n\t\t\t\t\t\t\t\t\treal_t& value\t/**< Output: ubA[number].*/\r\n\t\t\t\t\t\t\t\t\t) const;\r\n\r\n\r\n\t\t/** Returns current constraints object of the QP (deep copy).\r\n\t\t  *\t\\return SUCCESSFUL_RETURN */\r\n\t\tinline returnValue getConstraints(\tConstraints* const _constraints\t/** Output: Constraints object. */\r\n\t\t\t\t\t\t\t\t\t\t\t) const;\r\n\r\n\r\n\t\t/** Returns the number of constraints.\r\n\t\t *\t\\return Number of constraints. */\r\n\t\tinline int getNC( ) const;\r\n\r\n\t\t/** Returns the number of (implicitly defined) equality constraints.\r\n\t\t *\t\\return Number of (implicitly defined) equality constraints. */\r\n\t\tinline int getNEC( ) const;\r\n\r\n\t\t/** Returns the number of active constraints.\r\n\t\t *\t\\return Number of active constraints. */\r\n\t\tinline int getNAC( );\r\n\r\n\t\t/** Returns the number of inactive constraints.\r\n\t\t *\t\\return Number of inactive constraints. */\r\n\t\tinline int getNIAC( );\r\n\r\n\t\t/** Returns the dimension of null space.\r\n\t\t *\t\\return Dimension of null space. */\r\n\t\tint getNZ( );\r\n\r\n\r\n\t\t/** Returns the dual solution vector (deep copy).\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t\t\t\tRET_QP_NOT_SOLVED */\r\n\t\treturnValue getDualSolution(\treal_t* const yOpt\t/**< Output: Dual solution vector (if QP has been solved). */\r\n\t\t\t\t\t\t\t\t\t\t) const;\r\n\r\n\r\n\t/*\r\n\t *\tPROTECTED MEMBER FUNCTIONS\r\n\t */\r\n\tprotected:\r\n\t\t/** Determines type of constraints and bounds (i.e. implicitly fixed, unbounded etc.).\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t\t\t\tRET_SETUPSUBJECTTOTYPE_FAILED */\r\n\t\treturnValue setupSubjectToType( );\r\n\r\n\t\t/** Computes the Cholesky decomposition R of the projected Hessian (i.e. R^T*R = Z^T*H*Z).\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t *\t\t\tRET_INDEXLIST_CORRUPTED */\r\n\t\treturnValue setupCholeskyDecompositionProjected( );\r\n\r\n\t\t/** Initialises TQ factorisation of A (i.e. A*Q = [0 T]) if NO constraint is active.\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t \t\t\tRET_INDEXLIST_CORRUPTED */\r\n\t\treturnValue setupTQfactorisation( );\r\n\r\n\r\n\t\t/** Solves a QProblem whose QP data is assumed to be stored in the member variables.\r\n\t\t *  A guess for its primal/dual optimal solution vectors and the corresponding\r\n\t\t *  working sets of bounds and constraints can be provided.\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t\t\t\tRET_INIT_FAILED \\n\r\n\t\t\t\t\tRET_INIT_FAILED_CHOLESKY \\n\r\n\t\t\t\t\tRET_INIT_FAILED_TQ \\n\r\n\t\t\t\t\tRET_INIT_FAILED_HOTSTART \\n\r\n\t\t\t\t\tRET_INIT_FAILED_INFEASIBILITY \\n\r\n\t\t\t\t\tRET_INIT_FAILED_UNBOUNDEDNESS \\n\r\n\t\t\t\t\tRET_MAX_NWSR_REACHED */\r\n\t\treturnValue solveInitialQP(\tconst real_t* const xOpt,\t\t\t\t\t\t/**< Optimal primal solution vector.\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t *\t A NULL pointer can be passed. */\r\n\t\t\t\t\t\t\t\t\tconst real_t* const yOpt,\t\t\t\t\t\t/**< Optimal dual solution vector.\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t *\t A NULL pointer can be passed. */\r\n\t\t\t\t\t\t\t\t\tconst Bounds* const guessedBounds,\t\t\t\t/**< Guessed working set of bounds for solution (xOpt,yOpt).\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t *\t A NULL pointer can be passed. */\r\n\t\t\t\t\t\t\t\t\tconst Constraints* const guessedConstraints,\t/**< Optimal working set of constraints for solution (xOpt,yOpt).\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t *\t A NULL pointer can be passed. */\r\n\t\t\t\t\t\t\t\t\tint& nWSR, \t\t\t\t\t\t\t\t\t\t/**< Input: Maximum number of working set recalculations; \\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t *\t Output: Number of performed working set recalculations. */\r\n\t\t\t\t\t\t\t\t\treal_t* const cputime\t\t\t\t\t\t\t/**< Output: CPU time required to solve QP (or to perform nWSR iterations). */\r\n\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Obtains the desired working set for the auxiliary initial QP in\r\n\t\t *  accordance with the user specifications\r\n\t\t *  (assumes that member AX has already been initialised!)\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t\t\t\tRET_OBTAINING_WORKINGSET_FAILED \\n\r\n\t\t\t\t\tRET_INVALID_ARGUMENTS */\r\n\t\treturnValue obtainAuxiliaryWorkingSet(\tconst real_t* const xOpt,\t\t\t\t\t\t/**< Optimal primal solution vector.\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t *\t If a NULL pointer is passed, all entries are assumed to be zero. */\r\n\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const yOpt,\t\t\t\t\t\t/**< Optimal dual solution vector.\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t *\t If a NULL pointer is passed, all entries are assumed to be zero. */\r\n\t\t\t\t\t\t\t\t\t\t\t\tconst Bounds* const guessedBounds,\t\t\t\t/**< Guessed working set of bounds for solution (xOpt,yOpt). */\r\n\t\t\t\t\t\t\t\t\t\t\t\tconst Constraints* const guessedConstraints,\t/**< Guessed working set for solution (xOpt,yOpt). */\r\n\t\t\t\t\t\t\t\t\t\t\t\tBounds* auxiliaryBounds,\t\t\t\t\t\t/**< Input: Allocated bound object. \\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t *\t Ouput: Working set of constraints for auxiliary QP. */\r\n\t\t\t\t\t\t\t\t\t\t\t\tConstraints* auxiliaryConstraints\t\t\t\t/**< Input: Allocated bound object. \\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t *\t Ouput: Working set for auxiliary QP. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t) const;\r\n\r\n\t\t/** Setups bound and constraints data structures according to auxiliaryBounds/Constraints.\r\n\t\t *  (If the working set shall be setup afresh, make sure that\r\n\t\t *  bounds and constraints data structure have been resetted\r\n\t\t *  and the TQ factorisation has been initialised!)\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t\t\t\tRET_SETUP_WORKINGSET_FAILED \\n\r\n\t\t\t\t\tRET_INVALID_ARGUMENTS \\n\r\n\t\t\t\t\tRET_UNKNOWN BUG */\r\n\t\treturnValue setupAuxiliaryWorkingSet(\tconst Bounds* const auxiliaryBounds,\t\t\t/**< Working set of bounds for auxiliary QP. */\r\n\t\t\t\t\t\t\t\t\t\t\t\tconst Constraints* const auxiliaryConstraints,\t/**< Working set of constraints for auxiliary QP. */\r\n\t\t\t\t\t\t\t\t\t\t\t\tBooleanType setupAfresh\t\t\t\t\t\t\t/**< Flag indicating if given working set shall be\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t *    setup afresh or by updating the current one. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Setups the optimal primal/dual solution of the auxiliary initial QP.\r\n\t\t *\t\\return SUCCESSFUL_RETURN */\r\n\t\treturnValue setupAuxiliaryQPsolution(\tconst real_t* const xOpt,\t\t\t/**< Optimal primal solution vector.\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t*\t If a NULL pointer is passed, all entries are set to zero. */\r\n\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const yOpt\t\t\t/**< Optimal dual solution vector.\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t *\t If a NULL pointer is passed, all entries are set to zero. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Setups gradient of the auxiliary initial QP for given\r\n\t\t *  optimal primal/dual solution and given initial working set\r\n\t\t *  (assumes that members X, Y and BOUNDS, CONSTRAINTS have already been initialised!).\r\n\t\t *\t\\return SUCCESSFUL_RETURN */\r\n\t\treturnValue setupAuxiliaryQPgradient( );\r\n\r\n\t\t/** Setups (constraints') bounds of the auxiliary initial QP for given\r\n\t\t *  optimal primal/dual solution and given initial working set\r\n\t\t *  (assumes that members X, Y and BOUNDS, CONSTRAINTS have already been initialised!).\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t\t\t\tRET_UNKNOWN BUG */\r\n\t\treturnValue setupAuxiliaryQPbounds(\tconst Bounds* const auxiliaryBounds,\t\t\t/**< Working set of bounds for auxiliary QP. */\r\n\t\t\t\t\t\t\t\t\t\t\tconst Constraints* const auxiliaryConstraints,\t/**< Working set of constraints for auxiliary QP. */\r\n\t\t\t\t\t\t\t\t\t\t\tBooleanType useRelaxation\t\t\t\t\t\t/**< Flag indicating if inactive (constraints') bounds shall be relaxed. */\r\n\t\t\t\t\t\t\t\t\t\t\t);\r\n\r\n\r\n\t\t/** Adds a constraint to active set.\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t \t\t\tRET_ADDCONSTRAINT_FAILED \\n\r\n\t\t\t\t\tRET_ADDCONSTRAINT_FAILED_INFEASIBILITY \\n\r\n\t\t\t\t\tRET_ENSURELI_FAILED */\r\n\t\treturnValue addConstraint(\tint number,\t\t\t\t\t/**< Number of constraint to be added to active set. */\r\n\t\t\t\t\t\t\t\t\tSubjectToStatus C_status,\t/**< Status of new active constraint. */\r\n\t\t\t\t\t\t\t\t\tBooleanType updateCholesky\t/**< Flag indicating if Cholesky decomposition shall be updated. */\r\n\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Checks if new active constraint to be added is linearly dependent from\r\n\t\t *\tfrom row of the active constraints matrix.\r\n\t\t *\t\\return\t RET_LINEARLY_DEPENDENT \\n\r\n\t\t \t\t\t RET_LINEARLY_INDEPENDENT \\n\r\n\t\t\t\t\t RET_INDEXLIST_CORRUPTED */\r\n\t\treturnValue addConstraint_checkLI(\tint number\t\t\t/**< Number of constraint to be added to active set. */\r\n\t\t\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Ensures linear independence of constraint matrix when a new constraint is added.\r\n\t\t * \tTo this end a bound or constraint is removed simultaneously if necessary.\r\n\t\t *\t\\return\t SUCCESSFUL_RETURN \\n\r\n\t\t \t\t\t RET_LI_RESOLVED \\n\r\n\t\t\t\t\t RET_ENSURELI_FAILED \\n\r\n\t\t\t\t\t RET_ENSURELI_FAILED_TQ \\n\r\n\t\t\t\t\t RET_ENSURELI_FAILED_NOINDEX \\n\r\n\t\t\t\t\t RET_REMOVE_FROM_ACTIVESET */\r\n\t\treturnValue addConstraint_ensureLI(\tint number,\t\t\t\t\t/**< Number of constraint to be added to active set. */\r\n\t\t\t\t\t\t\t\t\t\t\tSubjectToStatus C_status\t/**< Status of new active bound. */\r\n\t\t\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Adds a bound to active set.\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t \t\t\tRET_ADDBOUND_FAILED \\n\r\n\t\t\t\t\tRET_ADDBOUND_FAILED_INFEASIBILITY \\n\r\n\t\t\t\t\tRET_ENSURELI_FAILED */\r\n\t\treturnValue addBound(\tint number,\t\t\t\t\t/**< Number of bound to be added to active set. */\r\n\t\t\t\t\t\t\t\tSubjectToStatus B_status,\t/**< Status of new active bound. */\r\n\t\t\t\t\t\t\t\tBooleanType updateCholesky\t/**< Flag indicating if Cholesky decomposition shall be updated. */\r\n\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Checks if new active bound to be added is linearly dependent from\r\n\t\t *\tfrom row of the active constraints matrix.\r\n\t\t *\t\\return\t RET_LINEARLY_DEPENDENT \\n\r\n\t\t \t\t\t RET_LINEARLY_INDEPENDENT */\r\n\t\treturnValue addBound_checkLI(\tint number\t\t\t/**< Number of bound to be added to active set. */\r\n\t\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Ensures linear independence of constraint matrix when a new bound is added.\r\n\t\t *\tTo this end a bound or constraint is removed simultaneously if necessary.\r\n\t\t *\t\\return\t SUCCESSFUL_RETURN \\n\r\n\t\t \t\t\t RET_LI_RESOLVED \\n\r\n\t\t\t\t\t RET_ENSURELI_FAILED \\n\r\n\t\t\t\t\t RET_ENSURELI_FAILED_TQ \\n\r\n\t\t\t\t\t RET_ENSURELI_FAILED_NOINDEX \\n\r\n\t\t\t\t\t RET_REMOVE_FROM_ACTIVESET */\r\n\t\treturnValue addBound_ensureLI(\tint number,\t\t\t\t\t/**< Number of bound to be added to active set. */\r\n\t\t\t\t\t\t\t\t\t\tSubjectToStatus B_status\t/**< Status of new active bound. */\r\n\t\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Removes a constraint from active set.\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t \t\t\tRET_CONSTRAINT_NOT_ACTIVE \\n\r\n\t\t\t\t\tRET_REMOVECONSTRAINT_FAILED \\n\r\n\t\t\t\t\tRET_HESSIAN_NOT_SPD */\r\n\t\treturnValue removeConstraint(\tint number,\t\t\t\t\t/**< Number of constraint to be removed from active set. */\r\n\t\t\t\t\t\t\t\t\t\tBooleanType updateCholesky\t/**< Flag indicating if Cholesky decomposition shall be updated. */\r\n\t\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Removes a bounds from active set.\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t \t\t\tRET_BOUND_NOT_ACTIVE \\n\r\n\t\t\t\t\tRET_HESSIAN_NOT_SPD \\n\r\n\t\t\t\t\tRET_REMOVEBOUND_FAILED */\r\n\t\treturnValue removeBound(\tint number,\t\t\t\t\t/**< Number of bound to be removed from active set. */\r\n\t\t\t\t\t\t\t\t\tBooleanType updateCholesky\t/**< Flag indicating if Cholesky decomposition shall be updated. */\r\n\t\t\t\t\t\t\t\t\t);\r\n\r\n\r\n\t\t/** Solves the system Ra = b or R^Ta = b where R is an upper triangular matrix.\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t\t\t\tRET_DIV_BY_ZERO */\r\n\t\treturnValue backsolveR(\tconst real_t* const b,\t/**< Right hand side vector. */\r\n\t\t\t\t\t\t\t\tBooleanType transposed,\t/**< Indicates if the transposed system shall be solved. */\r\n\t\t\t\t\t\t\t\treal_t* const a \t\t/**< Output: Solution vector */\r\n\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Solves the system Ra = b or R^Ta = b where R is an upper triangular matrix. \\n\r\n\t\t *  Special variant for the case that this function is called from within \"removeBound()\".\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t\t\t\tRET_DIV_BY_ZERO */\r\n\t\treturnValue backsolveR(\tconst real_t* const b,\t\t/**< Right hand side vector. */\r\n\t\t\t\t\t\t\t\tBooleanType transposed,\t\t/**< Indicates if the transposed system shall be solved. */\r\n\t\t\t\t\t\t\t\tBooleanType removingBound,\t/**< Indicates if function is called from \"removeBound()\". */\r\n\t\t\t\t\t\t\t\treal_t* const a \t\t\t/**< Output: Solution vector */\r\n\t\t\t\t\t\t\t\t);\r\n\r\n\r\n\t\t/** Solves the system Ta = b or T^Ta = b where T is a reverse upper triangular matrix.\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t \t\t\tRET_DIV_BY_ZERO */\r\n\t\treturnValue backsolveT(\tconst real_t* const b,\t/**< Right hand side vector. */\r\n\t\t\t\t\t\t\t\tBooleanType transposed,\t/**< Indicates if the transposed system shall be solved. */\r\n\t\t\t\t\t\t\t\treal_t* const a \t\t/**< Output: Solution vector */\r\n\t\t\t\t\t\t\t\t);\r\n\r\n\r\n\t\t/** Determines step direction of the shift of the QP data.\r\n\t\t *\t\\return SUCCESSFUL_RETURN */\r\n\t\treturnValue hotstart_determineDataShift(const int* const FX_idx, \t/**< Index array of fixed variables. */\r\n\t\t\t\t\t\t\t\t\t\t\t\tconst int* const AC_idx, \t/**< Index array of active constraints. */\r\n\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const g_new,\t/**< New gradient vector. */\r\n\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const lbA_new,/**< New lower constraints' bounds. */\r\n\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const ubA_new,/**< New upper constraints' bounds. */\r\n\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const lb_new,\t/**< New lower bounds. */\r\n\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const ub_new,\t/**< New upper bounds. */\r\n\t\t\t\t\t\t\t\t\t\t\t\treal_t* const delta_g,\t \t/**< Output: Step direction of gradient vector. */\r\n\t\t\t\t\t\t\t\t\t\t\t\treal_t* const delta_lbA,\t/**< Output: Step direction of lower constraints' bounds. */\r\n\t\t\t\t\t\t\t\t\t\t\t\treal_t* const delta_ubA,\t/**< Output: Step direction of upper constraints' bounds. */\r\n\t\t\t\t\t\t\t\t\t\t\t\treal_t* const delta_lb,\t \t/**< Output: Step direction of lower bounds. */\r\n\t\t\t\t\t\t\t\t\t\t\t\treal_t* const delta_ub,\t \t/**< Output: Step direction of upper bounds. */\r\n\t\t\t\t\t\t\t\t\t\t\t\tBooleanType& Delta_bC_isZero,/**< Output: Indicates if active constraints' bounds are to be shifted. */\r\n\t\t\t\t\t\t\t\t\t\t\t\tBooleanType& Delta_bB_isZero/**< Output: Indicates if active bounds are to be shifted. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Determines step direction of the homotopy path.\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t \t\t\tRET_STEPDIRECTION_FAILED_TQ \\n\r\n\t\t\t\t\tRET_STEPDIRECTION_FAILED_CHOLESKY */\r\n\t\treturnValue hotstart_determineStepDirection(const int* const FR_idx, \t\t/**< Index array of free variables. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst int* const FX_idx, \t\t/**< Index array of fixed variables. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst int* const AC_idx, \t\t/**< Index array of active constraints. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_g,\t/**< Step direction of gradient vector. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_lbA,\t/**< Step direction of lower constraints' bounds. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_ubA,\t/**< Step direction of upper constraints' bounds. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_lb,\t/**< Step direction of lower bounds. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_ub,\t/**< Step direction of upper bounds. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tBooleanType Delta_bC_isZero, \t/**< Indicates if active constraints' bounds are to be shifted. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tBooleanType Delta_bB_isZero,\t/**< Indicates if active bounds are to be shifted. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\treal_t* const delta_xFX, \t\t/**< Output: Primal homotopy step direction of fixed variables. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\treal_t* const delta_xFR,\t \t/**< Output: Primal homotopy step direction of free variables. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\treal_t* const delta_yAC, \t\t/**< Output: Dual homotopy step direction of active constraints' multiplier. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\treal_t* const delta_yFX \t\t/**< Output: Dual homotopy step direction of fixed variables' multiplier. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Determines the maximum possible step length along the homotopy path.\r\n\t\t *\t\\return SUCCESSFUL_RETURN */\r\n\t\treturnValue hotstart_determineStepLength(\tconst int* const FR_idx, \t\t\t/**< Index array of free variables. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst int* const FX_idx, \t\t\t/**< Index array of fixed variables. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst int* const AC_idx, \t\t\t/**< Index array of active constraints. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst int* const IAC_idx, \t\t\t/**< Index array of inactive constraints. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_lbA,\t\t/**< Step direction of lower constraints' bounds. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_ubA,\t\t/**< Step direction of upper constraints' bounds. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_lb,\t \t/**< Step direction of lower bounds. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_ub,\t \t/**< Step direction of upper bounds. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_xFX, \t\t/**< Primal homotopy step direction of fixed variables. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_xFR,\t\t/**< Primal homotopy step direction of free variables. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_yAC,\t\t/**< Dual homotopy step direction of active constraints' multiplier. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_yFX,\t\t/**< Dual homotopy step direction of fixed variables' multiplier. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\treal_t* const delta_Ax,\t\t\t\t/**< Output: Step in vector Ax. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tint& BC_idx, \t\t\t\t\t\t/**< Output: Index of blocking constraint. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tSubjectToStatus& BC_status,\t\t\t/**< Output: Status of blocking constraint. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tBooleanType& BC_isBound \t\t\t/**< Output: Indicates if blocking constraint is a bound. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Performs a step along the homotopy path (and updates active set).\r\n\t\t *\t\\return  SUCCESSFUL_RETURN \\n\r\n\t\t \t\t\t RET_OPTIMAL_SOLUTION_FOUND \\n\r\n\t\t \t\t\t RET_REMOVE_FROM_ACTIVESET_FAILED \\n\r\n\t\t\t\t\t RET_ADD_TO_ACTIVESET_FAILED \\n\r\n\t\t\t\t\t RET_QP_INFEASIBLE */\r\n\t\treturnValue hotstart_performStep(\tconst int* const FR_idx, \t\t\t/**< Index array of free variables. */\r\n\t\t\t\t\t\t\t\t\t\t\tconst int* const FX_idx, \t\t\t/**< Index array of fixed variables. */\r\n\t\t\t\t\t\t\t\t\t\t\tconst int* const AC_idx, \t\t\t/**< Index array of active constraints. */\r\n\t\t\t\t\t\t\t\t\t\t\tconst int* const IAC_idx, \t\t\t/**< Index array of inactive constraints. */\r\n\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_g,\t \t/**< Step direction of gradient vector. */\r\n\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_lbA,\t \t/**< Step direction of lower constraints' bounds. */\r\n\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_ubA,\t \t/**< Step direction of upper constraints' bounds. */\r\n\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_lb,\t \t/**< Step direction of lower bounds. */\r\n\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_ub,\t \t/**< Step direction of upper bounds. */\r\n\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_xFX, \t\t/**< Primal homotopy step direction of fixed variables. */\r\n\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_xFR,\t \t/**< Primal homotopy step direction of free variables. */\r\n\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_yAC,\t \t/**< Dual homotopy step direction of active constraints' multiplier. */\r\n\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_yFX, \t\t/**< Dual homotopy step direction of fixed variables' multiplier. */\r\n\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_Ax, \t\t/**< Step in vector Ax. */\r\n\t\t\t\t\t\t\t\t\t\t\tint BC_idx, \t\t\t\t\t\t/**< Index of blocking constraint. */\r\n\t\t\t\t\t\t\t\t\t\t\tSubjectToStatus BC_status,\t\t\t/**< Status of blocking constraint. */\r\n\t\t\t\t\t\t\t\t\t\t\tBooleanType BC_isBound \t\t\t\t/**< Indicates if blocking constraint is a bound. */\r\n\t\t\t\t\t\t\t\t\t\t\t);\r\n\r\n\r\n\t\t/** Checks if lower/upper (constraints') bounds remain consistent\r\n\t\t *  (i.e. if lb <= ub and lbA <= ubA ) during the current step.\r\n\t\t *\t\\return BT_TRUE iff (constraints\") bounds remain consistent\r\n\t\t */\r\n\t\tBooleanType areBoundsConsistent(\tconst real_t* const delta_lb,\t/**< Step direction of lower bounds. */\r\n\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_ub,\t/**< Step direction of upper bounds. */\r\n\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_lbA,\t/**< Step direction of lower constraints' bounds. */\r\n\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_ubA\t/**< Step direction of upper constraints' bounds. */\r\n\t\t\t\t\t\t\t\t\t\t\t) const;\r\n\r\n\r\n\t\t/** Setups internal QP data.\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t\t\t\tRET_INVALID_ARGUMENTS */\r\n\t\treturnValue setupQPdata(\tconst real_t* const _H, \t/**< Hessian matrix. */\r\n\t\t\t\t\t\t\t\t\tconst real_t* const _R, \t/**< Cholesky factorization of the Hessian matrix. */\r\n\t\t\t\t\t\t\t\t\tconst real_t* const _g, \t/**< Gradient vector. */\r\n\t\t\t\t\t\t\t\t\tconst real_t* const _A,  \t/**< Constraint matrix. */\r\n\t\t\t\t\t\t\t\t\tconst real_t* const _lb,\t/**< Lower bound vector (on variables). \\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t If no lower bounds exist, a NULL pointer can be passed. */\r\n\t\t\t\t\t\t\t\t\tconst real_t* const _ub,\t/**< Upper bound vector (on variables). \\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t If no upper bounds exist, a NULL pointer can be passed. */\r\n\t\t\t\t\t\t\t\t\tconst real_t* const _lbA,\t/**< Lower constraints' bound vector. \\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t If no lower constraints' bounds exist, a NULL pointer can be passed. */\r\n\t\t\t\t\t\t\t\t\tconst real_t* const _ubA\t/**< Upper constraints' bound vector. \\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t If no lower constraints' bounds exist, a NULL pointer can be passed. */\r\n\t\t\t\t\t\t\t\t\t);\r\n\r\n\r\n\t\t#ifdef PC_DEBUG  /* Define print functions only for debugging! */\r\n\r\n\t\t/** Prints concise information on the current iteration.\r\n\t\t *\t\\return  SUCCESSFUL_RETURN \\n */\r\n\t\treturnValue printIteration(\tint iteration,\t\t\t\t/**< Number of current iteration. */\r\n\t\t\t\t\t\t\t\t\tint BC_idx, \t\t\t\t/**< Index of blocking constraint. */\r\n\t\t\t\t\t\t\t\t\tSubjectToStatus BC_status,\t/**< Status of blocking constraint. */\r\n\t\t\t\t\t\t\t\t\tBooleanType BC_isBound \t\t/**< Indicates if blocking constraint is a bound. */\r\n\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Prints concise information on the current iteration.\r\n\t\t *  NOTE: ONLY DEFINED FOR SUPPRESSING A COMPILER WARNING!!\r\n\t\t *\t\\return  SUCCESSFUL_RETURN \\n */\r\n\t\treturnValue printIteration(\tint iteration,\t\t\t\t/**< Number of current iteration. */\r\n\t\t\t\t\t\t\t\t\tint BC_idx, \t\t\t\t/**< Index of blocking bound. */\r\n\t\t\t\t\t\t\t\t\tSubjectToStatus BC_status\t/**< Status of blocking bound. */\r\n\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t#endif  /* PC_DEBUG */\r\n\r\n\r\n\t\t/** Determines the maximum violation of the KKT optimality conditions\r\n\t\t *  of the current iterate within the QProblem object.\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t * \t\t\tRET_INACCURATE_SOLUTION \\n\r\n\t\t * \t\t\tRET_NO_SOLUTION */\r\n\t\treturnValue checkKKTconditions( );\r\n\r\n\r\n\t\t/** Sets constraint matrix of the QP. \\n\r\n\t\t\t(Remark: Also internal vector Ax is recomputed!)\r\n\t\t *\t\\return SUCCESSFUL_RETURN */\r\n\t\tinline returnValue setA(\tconst real_t* const A_new\t/**< New constraint matrix (with correct dimension!). */\r\n\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Changes single row of constraint matrix of the QP. \\n\r\n\t\t\t(Remark: Also correponding component of internal vector Ax is recomputed!)\r\n\t\t *\t\\return SUCCESSFUL_RETURN  \\n\r\n\t\t\t\t\tRET_INDEX_OUT_OF_BOUNDS */\r\n\t\tinline returnValue setA(\tint number,\t\t\t\t\t/**< Number of row to be changed. */\r\n\t\t\t\t\t\t\t\t\tconst real_t* const value\t/**< New (number)th constraint (with correct dimension!). */\r\n\t\t\t\t\t\t\t\t\t);\r\n\r\n\r\n\t\t/** Sets constraints' lower bound vector of the QP.\r\n\t\t *\t\\return SUCCESSFUL_RETURN */\r\n\t\tinline returnValue setLBA(\tconst real_t* const lbA_new\t/**< New constraints' lower bound vector (with correct dimension!). */\r\n\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Changes single entry of lower constraints' bound vector of the QP.\r\n\t\t *\t\\return SUCCESSFUL_RETURN  \\n\r\n\t\t\t\t\tRET_INDEX_OUT_OF_BOUNDS */\r\n\t\tinline returnValue setLBA(\tint number,\t\t/**< Number of entry to be changed. */\r\n\t\t\t\t\t\t\t\t\treal_t value\t/**< New value for entry of lower constraints' bound vector (with correct dimension!). */\r\n\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Sets constraints' upper bound vector of the QP.\r\n\t\t *\t\\return SUCCESSFUL_RETURN */\r\n\t\tinline returnValue setUBA(\tconst real_t* const ubA_new\t/**< New constraints' upper bound vector (with correct dimension!). */\r\n\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Changes single entry of upper constraints' bound vector of the QP.\r\n\t\t *\t\\return SUCCESSFUL_RETURN  \\n\r\n\t\t\t\t\tRET_INDEX_OUT_OF_BOUNDS */\r\n\t\tinline returnValue setUBA(\tint number,\t\t/**< Number of entry to be changed. */\r\n\t\t\t\t\t\t\t\t\treal_t value\t/**< New value for entry of upper constraints' bound vector (with correct dimension!). */\r\n\t\t\t\t\t\t\t\t\t);\r\n\r\n\r\n\t/*\r\n\t *\tPROTECTED MEMBER VARIABLES\r\n\t */\r\n\tprotected:\r\n\t\treal_t A[NCMAX_ALLOC*NVMAX];\t\t/**< Constraint matrix. */\r\n\t\treal_t lbA[NCMAX_ALLOC];\t\t\t/**< Lower constraints' bound vector. */\r\n\t\treal_t ubA[NCMAX_ALLOC];\t\t\t/**< Upper constraints' bound vector. */\r\n\r\n\t\tConstraints constraints;\t\t\t/**< Data structure for problem's constraints. */\r\n\r\n\t\treal_t T[NVMAX*NVMAX];\t\t\t\t/**< Reverse triangular matrix, A = [0 T]*Q'. */\r\n\t\treal_t Q[NVMAX*NVMAX];\t\t\t\t/**< Orthonormal quadratic matrix, A = [0 T]*Q'. */\r\n\t\tint sizeT;\t\t\t\t\t\t\t/**< Matrix T is stored in a (sizeT x sizeT) array. */\r\n\r\n\t\treal_t Ax[NCMAX_ALLOC];\t\t\t\t/**< Stores the current product A*x (for increased efficiency only). */\r\n\r\n\t\tCyclingManager cyclingManager;\t\t/**< Data structure for storing (possible) cycling information (NOT YET IMPLEMENTED!). */\r\n};\r\n\r\n\r\n#include <QProblem.ipp>\r\n\r\n#endif\t/* QPOASES_QPROBLEM_HPP */\r\n\r\n\r\n/*\r\n *\tend of file\r\n */\r\n"
  },
  {
    "path": "externals/qpoases/INCLUDE/QProblemB.hpp",
    "content": "/*\r\n *\tThis file is part of qpOASES.\r\n *\r\n *\tqpOASES -- An Implementation of the Online Active Set Strategy.\r\n *\tCopyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.\r\n *\r\n *\tqpOASES is free software; you can redistribute it and/or\r\n *\tmodify it under the terms of the GNU Lesser General Public\r\n *\tLicense as published by the Free Software Foundation; either\r\n *\tversion 2.1 of the License, or (at your option) any later version.\r\n *\r\n *\tqpOASES is distributed in the hope that it will be useful,\r\n *\tbut WITHOUT ANY WARRANTY; without even the implied warranty of\r\n *\tMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n *\tLesser General Public License for more details.\r\n *\r\n *\tYou should have received a copy of the GNU Lesser General Public\r\n *\tLicense along with qpOASES; if not, write to the Free Software\r\n *\tFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r\n *\r\n */\r\n\r\n\r\n/**\r\n *\t\\file INCLUDE/QProblemB.hpp\r\n *\t\\author Hans Joachim Ferreau\r\n *\t\\version 1.3embedded\r\n *\t\\date 2007-2008\r\n *\r\n *\tDeclaration of the QProblemB class which is able to use the newly\r\n *\tdeveloped online active set strategy for parametric quadratic programming\r\n *\tfor problems with (simple) bounds only.\r\n */\r\n\r\n\r\n\r\n#ifndef QPOASES_QPROBLEMB_HPP\r\n#define QPOASES_QPROBLEMB_HPP\r\n\r\n\r\n#include <Bounds.hpp>\r\n\r\n\r\n\r\nclass SolutionAnalysis;\r\n\r\n/** Class for setting up and solving quadratic programs with (simple) bounds only.\r\n *\tThe main feature is the possibily to use the newly developed online active set strategy\r\n *\tfor parametric quadratic programming.\r\n *\r\n *\t\\author Hans Joachim Ferreau\r\n *\t\\version 1.3embedded\r\n *\t\\date 2007-2008\r\n */\r\nclass QProblemB\r\n{\r\n\t/* allow SolutionAnalysis class to access private members */\r\n\tfriend class SolutionAnalysis;\r\n\t\r\n\t/*\r\n\t *\tPUBLIC MEMBER FUNCTIONS\r\n\t */\r\n\tpublic:\r\n\t\t/** Default constructor. */\r\n\t\tQProblemB( );\r\n\r\n\t\t/** Constructor which takes the QP dimension only. */\r\n\t\tQProblemB(\tint _nV\t\t\t\t\t\t/**< Number of variables. */\r\n\t\t\t\t\t);\r\n\r\n\t\t/** Copy constructor (deep copy). */\r\n\t\tQProblemB(\tconst QProblemB& rhs\t/**< Rhs object. */\r\n\t\t\t\t\t);\r\n\r\n\t\t/** Destructor. */\r\n\t\t~QProblemB( );\r\n\r\n\t\t/** Assignment operator (deep copy). */\r\n\t\tQProblemB& operator=(\tconst QProblemB& rhs\t/**< Rhs object. */\r\n\t\t\t\t\t\t\t\t);\r\n\r\n\r\n\t\t/** Clears all data structures of QProblemB except for QP data.\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t\t\t\tRET_RESET_FAILED */\r\n\t\treturnValue reset( );\r\n\r\n\r\n\t\t/** Initialises a QProblemB with given QP data and solves it\r\n\t\t *\tusing an initial homotopy with empty working set (at most nWSR iterations).\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t\t\t\tRET_INIT_FAILED \\n\r\n\t\t\t\t\tRET_INIT_FAILED_CHOLESKY \\n\r\n\t\t\t\t\tRET_INIT_FAILED_HOTSTART \\n\r\n\t\t\t\t\tRET_INIT_FAILED_INFEASIBILITY \\n\r\n\t\t\t\t\tRET_INIT_FAILED_UNBOUNDEDNESS \\n\r\n\t\t\t\t\tRET_MAX_NWSR_REACHED \\n\r\n\t\t\t\t\tRET_INVALID_ARGUMENTS \\n\r\n\t\t\t\t\tRET_INACCURATE_SOLUTION \\n\r\n\t\t \t\t\tRET_NO_SOLUTION */\r\n\t\treturnValue init(\tconst real_t* const _H, \t\t/**< Hessian matrix. */\r\n\t\t\t\t\t\t\tconst real_t* const _g,\t\t\t/**< Gradient vector. */\r\n\t\t\t\t\t\t\tconst real_t* const _lb,\t\t/**< Lower bounds (on variables). \\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tIf no lower bounds exist, a NULL pointer can be passed. */\r\n\t\t\t\t\t\t\tconst real_t* const _ub,\t\t/**< Upper bounds (on variables). \\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tIf no upper bounds exist, a NULL pointer can be passed. */\r\n\t\t\t\t\t\t\tint& nWSR, \t\t\t\t\t\t/**< Input: Maximum number of working set recalculations when using initial homotopy. \\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tOutput: Number of performed working set recalculations. */\r\n\t\t\t\t\t\t\tconst real_t* const yOpt = 0,\t/**< Initial guess for dual solution vector. */\r\n\t\t\t\t \t\t\treal_t* const cputime = 0\t\t/**< Output: CPU time required to initialise QP. */\r\n\t\t\t\t\t\t\t);\r\n\r\n\r\n\t\t/** Initialises a QProblemB with given QP data and solves it\r\n\t\t *\tusing an initial homotopy with empty working set (at most nWSR iterations).\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t\t\t\tRET_INIT_FAILED \\n\r\n\t\t\t\t\tRET_INIT_FAILED_CHOLESKY \\n\r\n\t\t\t\t\tRET_INIT_FAILED_HOTSTART \\n\r\n\t\t\t\t\tRET_INIT_FAILED_INFEASIBILITY \\n\r\n\t\t\t\t\tRET_INIT_FAILED_UNBOUNDEDNESS \\n\r\n\t\t\t\t\tRET_MAX_NWSR_REACHED \\n\r\n\t\t\t\t\tRET_INVALID_ARGUMENTS \\n\r\n\t\t\t\t\tRET_INACCURATE_SOLUTION \\n\r\n\t\t \t\t\tRET_NO_SOLUTION */\r\n\t\treturnValue init(\tconst real_t* const _H, \t\t/**< Hessian matrix. */\r\n\t\t\t\t\t\t\tconst real_t* const _R, \t\t/**< Cholesky factorization of the Hessian matrix. */\r\n\t\t\t\t\t\t\tconst real_t* const _g,\t\t\t/**< Gradient vector. */\r\n\t\t\t\t\t\t\tconst real_t* const _lb,\t\t/**< Lower bounds (on variables). \\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tIf no lower bounds exist, a NULL pointer can be passed. */\r\n\t\t\t\t\t\t\tconst real_t* const _ub,\t\t/**< Upper bounds (on variables). \\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tIf no upper bounds exist, a NULL pointer can be passed. */\r\n\t\t\t\t\t\t\tint& nWSR, \t\t\t\t\t\t/**< Input: Maximum number of working set recalculations when using initial homotopy. \\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tOutput: Number of performed working set recalculations. */\r\n\t\t\t\t\t\t\tconst real_t* const yOpt = 0,\t/**< Initial guess for dual solution vector. */\r\n\t\t\t\t \t\t\treal_t* const cputime = 0\t\t/**< Output: CPU time required to initialise QP. */\r\n\t\t\t\t\t\t\t);\r\n\r\n\r\n\t\t/** Solves an initialised QProblemB using online active set strategy.\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t\t\t\tRET_MAX_NWSR_REACHED \\n\r\n\t\t\t\t\tRET_HOTSTART_FAILED_AS_QP_NOT_INITIALISED \\n\r\n\t\t\t\t\tRET_HOTSTART_FAILED \\n\r\n\t\t\t\t\tRET_SHIFT_DETERMINATION_FAILED \\n\r\n\t\t\t\t\tRET_STEPDIRECTION_DETERMINATION_FAILED \\n\r\n\t\t\t\t\tRET_STEPLENGTH_DETERMINATION_FAILED \\n\r\n\t\t\t\t\tRET_HOMOTOPY_STEP_FAILED \\n\r\n\t\t\t\t\tRET_HOTSTART_STOPPED_INFEASIBILITY \\n\r\n\t\t\t\t\tRET_HOTSTART_STOPPED_UNBOUNDEDNESS \\n\r\n\t\t\t\t\tRET_INACCURATE_SOLUTION \\n\r\n\t\t \t\t\tRET_NO_SOLUTION */\r\n\t\treturnValue hotstart(\tconst real_t* const g_new,\t/**< Gradient of neighbouring QP to be solved. */\r\n\t\t\t\t\t\t\t\tconst real_t* const lb_new,\t/**< Lower bounds of neighbouring QP to be solved. \\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t If no lower bounds exist, a NULL pointer can be passed. */\r\n\t\t\t\t\t\t\t\tconst real_t* const ub_new,\t/**< Upper bounds of neighbouring QP to be solved. \\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t If no upper bounds exist, a NULL pointer can be passed. */\r\n\t\t\t\t\t\t\t\tint& nWSR,\t\t\t\t\t/**< Input: Maximum number of working set recalculations; \\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t Output: Number of performed working set recalculations. */\r\n\t\t\t\t\t\t\t\treal_t* const cputime\t\t/**< Output: CPU time required to solve QP (or to perform nWSR iterations). */\r\n\t\t\t\t\t\t\t\t);\r\n\r\n\r\n\t\t/** Returns Hessian matrix of the QP (deep copy).\r\n\t\t  *\t\\return SUCCESSFUL_RETURN */\r\n\t\tinline returnValue getH(\treal_t* const _H\t/**< Array of appropriate dimension for copying Hessian matrix.*/\r\n\t\t\t\t\t\t\t\t\t) const;\r\n\r\n\t\t/** Returns gradient vector of the QP (deep copy).\r\n\t\t  *\t\\return SUCCESSFUL_RETURN */\r\n\t\tinline returnValue getG(\treal_t* const _g\t/**< Array of appropriate dimension for copying gradient vector.*/\r\n\t\t\t\t\t\t\t\t\t) const;\r\n\r\n\t\t/** Returns lower bound vector of the QP (deep copy).\r\n\t\t  *\t\\return SUCCESSFUL_RETURN */\r\n\t\tinline returnValue getLB(\treal_t* const _lb\t/**< Array of appropriate dimension for copying lower bound vector.*/\r\n\t\t\t\t\t\t\t\t\t) const;\r\n\r\n\t\t/** Returns single entry of lower bound vector of the QP.\r\n\t\t  *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t\t\t\tRET_INDEX_OUT_OF_BOUNDS */\r\n\t\tinline returnValue getLB(\tint number,\t\t/**< Number of entry to be returned. */\r\n\t\t\t\t\t\t\t\t\treal_t& value\t/**< Output: lb[number].*/\r\n\t\t\t\t\t\t\t\t\t) const;\r\n\r\n\t\t/** Returns upper bound vector of the QP (deep copy).\r\n\t\t  *\t\\return SUCCESSFUL_RETURN */\r\n\t\tinline returnValue getUB(\treal_t* const _ub\t/**< Array of appropriate dimension for copying upper bound vector.*/\r\n\t\t\t\t\t\t\t\t\t) const;\r\n\r\n\t\t/** Returns single entry of upper bound vector of the QP.\r\n\t\t  *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t\t\t\tRET_INDEX_OUT_OF_BOUNDS */\r\n\t\tinline returnValue getUB(\tint number,\t\t/**< Number of entry to be returned. */\r\n\t\t\t\t\t\t\t\t\treal_t& value\t/**< Output: ub[number].*/\r\n\t\t\t\t\t\t\t\t\t) const;\r\n\r\n\r\n\t\t/** Returns current bounds object of the QP (deep copy).\r\n\t\t  *\t\\return SUCCESSFUL_RETURN */\r\n\t\tinline returnValue getBounds(\tBounds* const _bounds\t/** Output: Bounds object. */\r\n\t\t\t\t\t\t\t\t\t\t) const;\r\n\r\n\r\n\t\t/** Returns the number of variables.\r\n\t\t *\t\\return Number of variables. */\r\n\t\tinline int getNV( ) const;\r\n\r\n\t\t/** Returns the number of free variables.\r\n\t\t *\t\\return Number of free variables. */\r\n\t\tinline int getNFR( );\r\n\r\n\t\t/** Returns the number of fixed variables.\r\n\t\t *\t\\return Number of fixed variables. */\r\n\t\tinline int getNFX( );\r\n\r\n\t\t/** Returns the number of implicitly fixed variables.\r\n\t\t *\t\\return Number of implicitly fixed variables. */\r\n\t\tinline int getNFV( ) const;\r\n\r\n\t\t/** Returns the dimension of null space.\r\n\t\t *\t\\return Dimension of null space. */\r\n\t\tint getNZ( );\r\n\r\n\r\n\t\t/** Returns the optimal objective function value.\r\n\t\t *\t\\return finite value: Optimal objective function value (QP was solved) \\n\r\n\t\t \t\t\t+infinity:\t  QP was not yet solved */\r\n\t\treal_t getObjVal( ) const;\r\n\r\n\t\t/** Returns the objective function value at an arbitrary point x.\r\n\t\t *\t\\return Objective function value at point x */\r\n\t\treal_t getObjVal(\tconst real_t* const _x\t/**< Point at which the objective function shall be evaluated. */\r\n\t\t\t\t\t\t\t) const;\r\n\r\n\t\t/** Returns the primal solution vector.\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t\t\t\tRET_QP_NOT_SOLVED */\r\n\t\treturnValue getPrimalSolution(\treal_t* const xOpt\t\t\t/**< Output: Primal solution vector (if QP has been solved). */\r\n\t\t\t\t\t\t\t\t\t\t) const;\r\n\r\n\t\t/** Returns the dual solution vector.\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t\t\t\tRET_QP_NOT_SOLVED */\r\n\t\treturnValue getDualSolution(\treal_t* const yOpt\t/**< Output: Dual solution vector (if QP has been solved). */\r\n\t\t\t\t\t\t\t\t\t\t) const;\r\n\r\n\r\n\t\t/** Returns status of the solution process.\r\n\t\t *\t\\return Status of solution process. */\r\n\t\tinline QProblemStatus getStatus( ) const;\r\n\r\n\r\n\t\t/** Returns if the QProblem object is initialised.\r\n\t\t *\t\\return BT_TRUE:  QProblemB initialised \\n\r\n\t\t \t\t\tBT_FALSE: QProblemB not initialised */\r\n\t\tinline BooleanType isInitialised( ) const;\r\n\r\n\t\t/** Returns if the QP has been solved.\r\n\t\t *\t\\return BT_TRUE:  QProblemB solved \\n\r\n\t\t \t\t\tBT_FALSE: QProblemB not solved */\r\n\t\tinline BooleanType isSolved( ) const;\r\n\r\n\t\t/** Returns if the QP is infeasible.\r\n\t\t *\t\\return BT_TRUE:  QP infeasible \\n\r\n\t\t \t\t\tBT_FALSE: QP feasible (or not known to be infeasible!) */\r\n\t\tinline BooleanType isInfeasible( ) const;\r\n\r\n\t\t/** Returns if the QP is unbounded.\r\n\t\t *\t\\return BT_TRUE:  QP unbounded \\n\r\n\t\t \t\t\tBT_FALSE: QP unbounded (or not known to be unbounded!) */\r\n\t\tinline BooleanType isUnbounded( ) const;\r\n\r\n\r\n\t\t/** Returns the print level.\r\n\t\t *\t\\return Print level. */\r\n\t\tinline PrintLevel getPrintLevel( ) const;\r\n\r\n\t\t/** Changes the print level.\r\n \t\t *\t\\return SUCCESSFUL_RETURN */\r\n\t\treturnValue setPrintLevel(\tPrintLevel _printlevel\t/**< New print level. */\r\n\t\t\t\t\t\t\t\t\t);\r\n\r\n\r\n\t\t/** Returns Hessian type flag (type is not determined due to this call!).\r\n\t\t *\t\\return Hessian type. */\r\n\t\tinline HessianType getHessianType( ) const;\r\n\r\n\t\t/** Changes the print level.\r\n \t\t *\t\\return SUCCESSFUL_RETURN */\r\n\t\tinline returnValue setHessianType(\tHessianType _hessianType /**< New Hessian type. */\r\n\t\t\t\t\t\t\t\t\t\t\t);\r\n\r\n\r\n\t/*\r\n\t *\tPROTECTED MEMBER FUNCTIONS\r\n\t */\r\n\tprotected:\r\n\t\t/** Checks if Hessian happens to be the identity matrix,\r\n\t\t *  and sets corresponding status flag (otherwise the flag remains unaltered!).\r\n\t\t *\t\\return SUCCESSFUL_RETURN */\r\n\t\treturnValue checkForIdentityHessian( );\r\n\r\n\t\t/** Determines type of constraints and bounds (i.e. implicitly fixed, unbounded etc.).\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t\t\t\tRET_SETUPSUBJECTTOTYPE_FAILED */\r\n\t\treturnValue setupSubjectToType( );\r\n\r\n\t\t/** Computes the Cholesky decomposition R of the (simply projected) Hessian (i.e. R^T*R = Z^T*H*Z).\r\n\t\t *  It only works in the case where Z is a simple projection matrix!\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t *\t\t\tRET_INDEXLIST_CORRUPTED */\r\n\t\treturnValue setupCholeskyDecomposition( );\r\n\r\n\r\n\t\t/** Solves a QProblemB whose QP data is assumed to be stored in the member variables.\r\n\t\t *  A guess for its primal/dual optimal solution vectors and the corresponding\r\n\t\t *  optimal working set can be provided.\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t\t\t\tRET_INIT_FAILED \\n\r\n\t\t\t\t\tRET_INIT_FAILED_CHOLESKY \\n\r\n\t\t\t\t\tRET_INIT_FAILED_HOTSTART \\n\r\n\t\t\t\t\tRET_INIT_FAILED_INFEASIBILITY \\n\r\n\t\t\t\t\tRET_INIT_FAILED_UNBOUNDEDNESS \\n\r\n\t\t\t\t\tRET_MAX_NWSR_REACHED */\r\n\t\treturnValue solveInitialQP(\tconst real_t* const xOpt,\t\t\t/**< Optimal primal solution vector.\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t *\t A NULL pointer can be passed. */\r\n\t\t\t\t\t\t\t\t\tconst real_t* const yOpt,\t\t\t/**< Optimal dual solution vector.\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t *\t A NULL pointer can be passed. */\r\n\t\t\t\t\t\t\t\t\tconst Bounds* const guessedBounds,\t/**< Guessed working set for solution (xOpt,yOpt).\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t *\t A NULL pointer can be passed. */\r\n\t\t\t\t\t\t\t\t\tint& nWSR, \t\t\t\t\t\t\t/**< Input: Maximum number of working set recalculations; \\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t *\t Output: Number of performed working set recalculations. */\r\n\t\t\t\t\t\t\t\t\treal_t* const cputime\t\t\t\t/**< Output: CPU time required to solve QP (or to perform nWSR iterations). */\r\n\t\t\t\t\t\t\t\t\t);\r\n\r\n\r\n\t\t/** Obtains the desired working set for the auxiliary initial QP in\r\n\t\t *  accordance with the user specifications\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t\t\t\tRET_OBTAINING_WORKINGSET_FAILED \\n\r\n\t\t\t\t\tRET_INVALID_ARGUMENTS */\r\n\t\treturnValue obtainAuxiliaryWorkingSet(\tconst real_t* const xOpt,\t\t\t/**< Optimal primal solution vector.\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t *\t If a NULL pointer is passed, all entries are assumed to be zero. */\r\n\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const yOpt,\t\t\t/**< Optimal dual solution vector.\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t *\t If a NULL pointer is passed, all entries are assumed to be zero. */\r\n\t\t\t\t\t\t\t\t\t\t\t\tconst Bounds* const guessedBounds,\t/**< Guessed working set for solution (xOpt,yOpt). */\r\n\t\t\t\t\t\t\t\t\t\t\t\tBounds* auxiliaryBounds\t\t\t\t/**< Input: Allocated bound object. \\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t *\t Ouput: Working set for auxiliary QP. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t) const;\r\n\r\n\t\t/** Setups bound data structure according to auxiliaryBounds.\r\n\t\t *  (If the working set shall be setup afresh, make sure that\r\n\t\t *  bounds data structure has been resetted!)\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t\t\t\tRET_SETUP_WORKINGSET_FAILED \\n\r\n\t\t\t\t\tRET_INVALID_ARGUMENTS \\n\r\n\t\t\t\t\tRET_UNKNOWN BUG */\r\n\t\treturnValue setupAuxiliaryWorkingSet(\tconst Bounds* const auxiliaryBounds,\t/**< Working set for auxiliary QP. */\r\n\t\t\t\t\t\t\t\t\t\t\t\tBooleanType setupAfresh\t\t\t\t\t/**< Flag indicating if given working set shall be\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t *    setup afresh or by updating the current one. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Setups the optimal primal/dual solution of the auxiliary initial QP.\r\n\t\t *\t\\return SUCCESSFUL_RETURN */\r\n\t\treturnValue setupAuxiliaryQPsolution(\tconst real_t* const xOpt,\t\t\t/**< Optimal primal solution vector.\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t*\t If a NULL pointer is passed, all entries are set to zero. */\r\n\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const yOpt\t\t\t/**< Optimal dual solution vector.\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t *\t If a NULL pointer is passed, all entries are set to zero. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Setups gradient of the auxiliary initial QP for given\r\n\t\t *  optimal primal/dual solution and given initial working set\r\n\t\t *  (assumes that members X, Y and BOUNDS have already been initialised!).\r\n\t\t *\t\\return SUCCESSFUL_RETURN */\r\n\t\treturnValue setupAuxiliaryQPgradient( );\r\n\r\n\t\t/** Setups bounds of the auxiliary initial QP for given\r\n\t\t *  optimal primal/dual solution and given initial working set\r\n\t\t *  (assumes that members X, Y and BOUNDS have already been initialised!).\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t\t\t\tRET_UNKNOWN BUG */\r\n\t\treturnValue setupAuxiliaryQPbounds( BooleanType useRelaxation\t/**< Flag indicating if inactive bounds shall be relaxed. */\r\n\t\t\t\t\t\t\t\t\t\t\t);\r\n\r\n\r\n\t\t/** Adds a bound to active set (specialised version for the case where no constraints exist).\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t \t\t\tRET_ADDBOUND_FAILED */\r\n\t\treturnValue addBound(\tint number,\t\t\t\t\t/**< Number of bound to be added to active set. */\r\n\t\t\t\t\t\t\t\tSubjectToStatus B_status,\t/**< Status of new active bound. */\r\n\t\t\t\t\t\t\t\tBooleanType updateCholesky\t/**< Flag indicating if Cholesky decomposition shall be updated. */\r\n\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Removes a bounds from active set (specialised version for the case where no constraints exist).\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t\t\t\tRET_HESSIAN_NOT_SPD \\n\r\n\t\t\t\t\tRET_REMOVEBOUND_FAILED */\r\n\t\treturnValue removeBound(\tint number,\t\t\t\t\t/**< Number of bound to be removed from active set. */\r\n\t\t\t\t\t\t\t\t\tBooleanType updateCholesky\t/**< Flag indicating if Cholesky decomposition shall be updated. */\r\n\t\t\t\t\t\t\t\t\t);\r\n\r\n\r\n\t\t/** Solves the system Ra = b or R^Ta = b where R is an upper triangular matrix.\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t\t\t\tRET_DIV_BY_ZERO */\r\n\t\treturnValue backsolveR(\tconst real_t* const b,\t/**< Right hand side vector. */\r\n\t\t\t\t\t\t\t\tBooleanType transposed,\t/**< Indicates if the transposed system shall be solved. */\r\n\t\t\t\t\t\t\t\treal_t* const a \t\t/**< Output: Solution vector */\r\n\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Solves the system Ra = b or R^Ta = b where R is an upper triangular matrix. \\n\r\n\t\t *  Special variant for the case that this function is called from within \"removeBound()\".\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t\t\t\tRET_DIV_BY_ZERO */\r\n\t\treturnValue backsolveR(\tconst real_t* const b,\t\t/**< Right hand side vector. */\r\n\t\t\t\t\t\t\t\tBooleanType transposed,\t\t/**< Indicates if the transposed system shall be solved. */\r\n\t\t\t\t\t\t\t\tBooleanType removingBound,\t/**< Indicates if function is called from \"removeBound()\". */\r\n\t\t\t\t\t\t\t\treal_t* const a \t\t\t/**< Output: Solution vector */\r\n\t\t\t\t\t\t\t\t);\r\n\r\n\r\n\t\t/** Determines step direction of the shift of the QP data.\r\n\t\t *\t\\return SUCCESSFUL_RETURN */\r\n\t\treturnValue hotstart_determineDataShift(const int* const FX_idx, \t/**< Index array of fixed variables. */\r\n\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const g_new,\t/**< New gradient vector. */\r\n\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const lb_new,\t/**< New lower bounds. */\r\n\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const ub_new,\t/**< New upper bounds. */\r\n\t\t\t\t\t\t\t\t\t\t\t\treal_t* const delta_g,\t \t/**< Output: Step direction of gradient vector. */\r\n\t\t\t\t\t\t\t\t\t\t\t\treal_t* const delta_lb,\t \t/**< Output: Step direction of lower bounds. */\r\n\t\t\t\t\t\t\t\t\t\t\t\treal_t* const delta_ub,\t \t/**< Output: Step direction of upper bounds. */\r\n\t\t\t\t\t\t\t\t\t\t\t\tBooleanType& Delta_bB_isZero/**< Output: Indicates if active bounds are to be shifted. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t);\r\n\r\n\r\n\t\t/** Checks if lower/upper bounds remain consistent\r\n\t\t *  (i.e. if lb <= ub) during the current step.\r\n\t\t *\t\\return BT_TRUE iff bounds remain consistent\r\n\t\t */\r\n\t\tBooleanType areBoundsConsistent(\tconst real_t* const delta_lb,\t\t/**< Step direction of lower bounds. */\r\n\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_ub\t\t/**< Step direction of upper bounds. */\r\n\t\t\t\t\t\t\t\t\t\t\t) const;\r\n\r\n\r\n\t\t/** Setups internal QP data.\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t\t\t\tRET_INVALID_ARGUMENTS */\r\n\t\treturnValue setupQPdata(\tconst real_t* const _H, \t/**< Hessian matrix. */\r\n\t\t\t\t\t\t\t\t\tconst real_t* const _R, \t/**< Cholesky factorization of the Hessian matrix. */\r\n\t\t\t\t\t\t\t\t\tconst real_t* const _g,\t\t/**< Gradient vector. */\r\n\t\t\t\t\t\t\t\t\tconst real_t* const _lb,\t/**< Lower bounds (on variables). \\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t If no lower bounds exist, a NULL pointer can be passed. */\r\n\t\t\t\t\t\t\t\t\tconst real_t* const _ub\t\t/**< Upper bounds (on variables). \\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t If no upper bounds exist, a NULL pointer can be passed. */\r\n\t\t\t\t\t\t\t\t\t);\r\n\r\n\r\n\t\t/** Sets Hessian matrix of the QP.\r\n\t\t *\t\\return SUCCESSFUL_RETURN */\r\n\t\tinline returnValue setH(\tconst real_t* const H_new\t/**< New Hessian matrix (with correct dimension!). */\r\n\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Changes gradient vector of the QP.\r\n\t\t *\t\\return SUCCESSFUL_RETURN */\r\n\t\tinline returnValue setG(\tconst real_t* const g_new\t/**< New gradient vector (with correct dimension!). */\r\n\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Changes lower bound vector of the QP.\r\n\t\t *\t\\return SUCCESSFUL_RETURN */\r\n\t\tinline returnValue setLB(\tconst real_t* const lb_new\t/**< New lower bound vector (with correct dimension!). */\r\n\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Changes single entry of lower bound vector of the QP.\r\n\t\t *\t\\return SUCCESSFUL_RETURN  \\n\r\n\t\t\t\t\tRET_INDEX_OUT_OF_BOUNDS */\r\n\t\tinline returnValue setLB(\tint number,\t\t/**< Number of entry to be changed. */\r\n\t\t\t\t\t\t\t\t\treal_t value\t/**< New value for entry of lower bound vector. */\r\n\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Changes upper bound vector of the QP.\r\n\t\t *\t\\return SUCCESSFUL_RETURN */\r\n\t\tinline returnValue setUB(\tconst real_t* const ub_new\t/**< New upper bound vector (with correct dimension!). */\r\n\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Changes single entry of upper bound vector of the QP.\r\n\t\t *\t\\return SUCCESSFUL_RETURN  \\n\r\n\t\t\t\t\tRET_INDEX_OUT_OF_BOUNDS */\r\n\t\tinline returnValue setUB(\tint number,\t\t/**< Number of entry to be changed. */\r\n\t\t\t\t\t\t\t\t\treal_t value\t/**< New value for entry of upper bound vector. */\r\n\t\t\t\t\t\t\t\t\t);\r\n\r\n\r\n\t\t/** Computes parameters for the Givens matrix G for which [x,y]*G = [z,0]\r\n\t\t *\t\\return SUCCESSFUL_RETURN */\r\n\t\tinline void computeGivens(\treal_t xold,\t/**< Matrix entry to be normalised. */\r\n\t\t\t\t\t\t\t\t\treal_t yold,\t/**< Matrix entry to be annihilated. */\r\n\t\t\t\t\t\t\t\t\treal_t& xnew,\t/**< Output: Normalised matrix entry. */\r\n\t\t\t\t\t\t\t\t\treal_t& ynew,\t/**< Output: Annihilated matrix entry. */\r\n\t\t\t\t\t\t\t\t\treal_t& c,\t\t/**< Output: Cosine entry of Givens matrix. */\r\n\t\t\t\t\t\t\t\t\treal_t& s \t\t/**< Output: Sine entry of Givens matrix. */\r\n\t\t\t\t\t\t\t\t\t) const;\r\n\r\n\t\t/** Applies Givens matrix determined by c and s (cf. computeGivens).\r\n\t\t *\t\\return SUCCESSFUL_RETURN */\r\n\t\tinline void applyGivens(\treal_t c,\t\t/**< Cosine entry of Givens matrix. */\r\n\t\t\t\t\t\t\t\t\treal_t s,\t\t/**< Sine entry of Givens matrix. */\r\n\t\t\t\t\t\t\t\t\treal_t xold,\t/**< Matrix entry to be transformed corresponding to\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t *\t the normalised entry of the original matrix. */\r\n\t\t\t\t\t\t\t\t\treal_t yold, \t/**< Matrix entry to be transformed corresponding to\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t *\t the annihilated entry of the original matrix. */\r\n\t\t\t\t\t\t\t\t\treal_t& xnew,\t/**< Output: Transformed matrix entry corresponding to\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t *\t the normalised entry of the original matrix. */\r\n\t\t\t\t\t\t\t\t\treal_t& ynew\t/**< Output: Transformed matrix entry corresponding to\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t *\t the annihilated entry of the original matrix. */\r\n\t\t\t\t\t\t\t\t\t) const;\r\n\r\n\r\n\t/*\r\n\t *\tPRIVATE MEMBER FUNCTIONS\r\n\t */\r\n\tprivate:\r\n\t\t/** Determines step direction of the homotopy path.\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t \t\t\tRET_STEPDIRECTION_FAILED_CHOLESKY */\r\n\t\treturnValue hotstart_determineStepDirection(const int* const FR_idx, \t\t/**< Index array of free variables. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst int* const FX_idx, \t\t/**< Index array of fixed variables. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_g,\t/**< Step direction of gradient vector. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_lb,\t/**< Step direction of lower bounds. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_ub,\t/**< Step direction of upper bounds. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tBooleanType Delta_bB_isZero,\t/**< Indicates if active bounds are to be shifted. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\treal_t* const delta_xFX, \t\t/**< Output: Primal homotopy step direction of fixed variables. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\treal_t* const delta_xFR,\t \t/**< Output: Primal homotopy step direction of free variables. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\treal_t* const delta_yFX \t\t/**< Output: Dual homotopy step direction of fixed variables' multiplier. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Determines the maximum possible step length along the homotopy path.\r\n\t\t *\t\\return SUCCESSFUL_RETURN */\r\n\t\treturnValue hotstart_determineStepLength(\tconst int* const FR_idx, \t\t/**< Index array of free variables. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst int* const FX_idx, \t\t/**< Index array of fixed variables. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_lb,\t/**< Step direction of lower bounds. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_ub,\t/**< Step direction of upper bounds. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_xFR,\t/**< Primal homotopy step direction of free variables. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_yFX,\t/**< Dual homotopy step direction of fixed variables' multiplier. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tint& BC_idx, \t\t\t\t\t/**< Output: Index of blocking constraint. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tSubjectToStatus& BC_status\t\t/**< Output: Status of blocking constraint. */\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Performs a step along the homotopy path (and updates active set).\r\n\t\t *\t\\return  SUCCESSFUL_RETURN \\n\r\n\t\t \t\t\t RET_OPTIMAL_SOLUTION_FOUND \\n\r\n\t\t \t\t\t RET_REMOVE_FROM_ACTIVESET_FAILED \\n\r\n\t\t\t\t\t RET_ADD_TO_ACTIVESET_FAILED \\n\r\n\t\t\t\t\t RET_QP_INFEASIBLE */\r\n\t\treturnValue hotstart_performStep(\tconst int* const FR_idx, \t\t\t/**< Index array of free variables. */\r\n\t\t\t\t\t\t\t\t\t\t\tconst int* const FX_idx, \t\t\t/**< Index array of fixed variables. */\r\n\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_g,\t \t/**< Step direction of gradient vector. */\r\n\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_lb,\t \t/**< Step direction of lower bounds. */\r\n\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_ub,\t \t/**< Step direction of upper bounds. */\r\n\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_xFX, \t\t/**< Primal homotopy step direction of fixed variables. */\r\n\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_xFR,\t \t/**< Primal homotopy step direction of free variables. */\r\n\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_yFX, \t\t/**< Dual homotopy step direction of fixed variables' multiplier. */\r\n\t\t\t\t\t\t\t\t\t\t\tint BC_idx, \t\t\t\t\t\t/**< Index of blocking constraint. */\r\n\t\t\t\t\t\t\t\t\t\t\tSubjectToStatus BC_status \t\t\t/**< Status of blocking constraint. */\r\n\t\t\t\t\t\t\t\t\t\t\t);\r\n\r\n\r\n\t\t#ifdef PC_DEBUG  /* Define print functions only for debugging! */\r\n\r\n\t\t/** Prints concise information on the current iteration.\r\n\t\t *\t\\return  SUCCESSFUL_RETURN \\n */\r\n\t\treturnValue printIteration(\tint iteration,\t\t\t\t/**< Number of current iteration. */\r\n\t\t\t\t\t\t\t\t\tint BC_idx, \t\t\t\t/**< Index of blocking bound. */\r\n\t\t\t\t\t\t\t\t\tSubjectToStatus BC_status\t/**< Status of blocking bound. */\r\n\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t#endif  /* PC_DEBUG */\r\n\r\n\r\n\t\t/** Determines the maximum violation of the KKT optimality conditions\r\n\t\t *  of the current iterate within the QProblemB object.\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t * \t\t\tRET_INACCURATE_SOLUTION \\n\r\n\t\t * \t\t\tRET_NO_SOLUTION */\r\n\t\treturnValue checkKKTconditions( );\r\n\r\n\r\n\t/*\r\n\t *\tPROTECTED MEMBER VARIABLES\r\n\t */\r\n\tprotected:\r\n\t\treal_t H[NVMAX*NVMAX];\t\t/**< Hessian matrix. */\r\n\t\tBooleanType hasHessian;\t\t/**< Flag indicating whether H contains Hessian or corresponding Cholesky factor R; \\sa init. */\r\n\r\n\t\treal_t g[NVMAX];\t\t\t/**< Gradient. */\r\n\t\treal_t lb[NVMAX];\t\t\t/**< Lower bound vector (on variables). */\r\n\t\treal_t ub[NVMAX];\t\t\t/**< Upper bound vector (on variables). */\r\n\r\n\t\tBounds bounds;\t\t\t\t/**< Data structure for problem's bounds. */\r\n\r\n\t\treal_t R[NVMAX*NVMAX];\t\t/**< Cholesky decomposition of H (i.e. H = R^T*R). */\r\n\t\tBooleanType hasCholesky;\t/**< Flag indicating whether Cholesky decomposition has already been setup. */\r\n\r\n\t\treal_t x[NVMAX];\t\t\t/**< Primal solution vector. */\r\n\t\treal_t y[NVMAX+NCMAX];\t\t/**< Dual solution vector. */\r\n\r\n\t\treal_t tau;\t\t\t\t\t/**< Last homotopy step length. */\r\n\r\n\t\tQProblemStatus status;\t\t/**< Current status of the solution process. */\r\n\r\n\t\tBooleanType infeasible;\t\t/**< QP infeasible? */\r\n\t\tBooleanType unbounded;\t\t/**< QP unbounded? */\r\n\r\n\t\tHessianType hessianType;\t/**< Type of Hessian matrix. */\r\n\r\n\t\tPrintLevel printlevel;\t\t/**< Print level. */\r\n\r\n\t\tint count;\t\t\t\t\t/**< Counts the number of hotstart function calls (internal usage only!). */\r\n};\r\n\r\n\r\n#include <QProblemB.ipp>\r\n\r\n#endif\t/* QPOASES_QPROBLEMB_HPP */\r\n\r\n\r\n/*\r\n *\tend of file\r\n */\r\n"
  },
  {
    "path": "externals/qpoases/INCLUDE/SubjectTo.hpp",
    "content": "/*\r\n *\tThis file is part of qpOASES.\r\n *\r\n *\tqpOASES -- An Implementation of the Online Active Set Strategy.\r\n *\tCopyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.\r\n *\r\n *\tqpOASES is free software; you can redistribute it and/or\r\n *\tmodify it under the terms of the GNU Lesser General Public\r\n *\tLicense as published by the Free Software Foundation; either\r\n *\tversion 2.1 of the License, or (at your option) any later version.\r\n *\r\n *\tqpOASES is distributed in the hope that it will be useful,\r\n *\tbut WITHOUT ANY WARRANTY; without even the implied warranty of\r\n *\tMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n *\tLesser General Public License for more details.\r\n *\r\n *\tYou should have received a copy of the GNU Lesser General Public\r\n *\tLicense along with qpOASES; if not, write to the Free Software\r\n *\tFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r\n *\r\n */\r\n\r\n\r\n/**\r\n *\t\\file INCLUDE/SubjectTo.hpp\r\n *\t\\author Hans Joachim Ferreau\r\n *\t\\version 1.3embedded\r\n *\t\\date 2007-2008\r\n *\r\n *\tDeclaration of the SubjectTo class designed to manage working sets of\r\n *\tconstraints and bounds within a QProblem.\r\n */\r\n\r\n\r\n#ifndef QPOASES_SUBJECTTO_HPP\r\n#define QPOASES_SUBJECTTO_HPP\r\n\r\n\r\n#include <Indexlist.hpp>\r\n\r\n\r\n\r\n/** This class manages working sets of constraints and bounds by storing\r\n *\tindex sets and other status information.\r\n *\r\n *\t\\author Hans Joachim Ferreau\r\n *\t\\version 1.3embedded\r\n *\t\\date 2007-2008\r\n */\r\nclass SubjectTo\r\n{\r\n\t/*\r\n\t *\tPUBLIC MEMBER FUNCTIONS\r\n\t */\r\n\tpublic:\r\n\t\t/** Default constructor. */\r\n\t\tSubjectTo( );\r\n\r\n\t\t/** Copy constructor (deep copy). */\r\n\t\tSubjectTo(\tconst SubjectTo& rhs\t/**< Rhs object. */\r\n\t\t\t\t\t);\r\n\r\n\t\t/** Destructor. */\r\n\t\t~SubjectTo( );\r\n\r\n\t\t/** Assignment operator (deep copy). */\r\n\t\tSubjectTo& operator=(\tconst SubjectTo& rhs\t/**< Rhs object. */\r\n\t\t\t\t\t\t\t\t);\r\n\r\n\r\n\t\t/** Pseudo-constructor takes the number of constraints or bounds.\r\n\t\t *\t\\return SUCCESSFUL_RETURN */\r\n\t\treturnValue init(\tint n \t/**< Number of constraints or bounds. */\r\n\t\t\t\t\t\t\t);\r\n\r\n\r\n\t\t/** Returns type of (constraints') bound.\r\n\t\t *\t\\return Type of (constraints') bound \\n\r\n\t\t \t\t\tRET_INDEX_OUT_OF_BOUNDS */\r\n\t\tinline SubjectToType getType(\tint i\t\t/**< Number of (constraints') bound. */\r\n\t\t\t\t\t\t\t\t\t\t) const ;\r\n\r\n\t\t/** Returns status of (constraints') bound.\r\n\t\t *\t\\return Status of (constraints') bound \\n\r\n\t\t \t\t\tST_UNDEFINED */\r\n\t\tinline SubjectToStatus getStatus(\tint i\t\t/**< Number of (constraints') bound. */\r\n\t\t\t\t\t\t\t\t\t\t\t) const;\r\n\r\n\r\n\t\t/** Sets type of (constraints') bound.\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t \t\t\tRET_INDEX_OUT_OF_BOUNDS */\r\n\t\tinline returnValue setType(\tint i,\t\t\t\t/**< Number of (constraints') bound. */\r\n\t\t\t\t\t\t\t\t\tSubjectToType value\t/**< Type of (constraints') bound. */\r\n\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Sets status of (constraints') bound.\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t \t\t\tRET_INDEX_OUT_OF_BOUNDS */\r\n\t\tinline returnValue setStatus(\tint i,\t\t\t\t\t/**< Number of (constraints') bound. */\r\n\t\t\t\t\t\t\t\t\t\tSubjectToStatus value\t/**< Status of (constraints') bound. */\r\n\t\t\t\t\t\t\t\t\t\t);\r\n\r\n\r\n\t\t/** Sets status of lower (constraints') bounds. */\r\n\t\tinline void setNoLower(\tBooleanType _status\t\t/**< Status of lower (constraints') bounds. */\r\n\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Sets status of upper (constraints') bounds. */\r\n\t\tinline void setNoUpper(\tBooleanType _status\t\t/**< Status of upper (constraints') bounds. */\r\n\t\t\t\t\t\t\t\t);\r\n\r\n\r\n\t\t/** Returns status of lower (constraints') bounds.\r\n\t\t *\t\\return BT_TRUE if there is no lower (constraints') bound on any variable. */\r\n\t\tinline BooleanType isNoLower( ) const;\r\n\r\n\t\t/** Returns status of upper bounds.\r\n\t\t *\t\\return BT_TRUE if there is no upper (constraints') bound on any variable. */\r\n\t\tinline BooleanType isNoUpper( ) const;\r\n\r\n\r\n\t/*\r\n\t *\tPROTECTED MEMBER FUNCTIONS\r\n\t */\r\n\tprotected:\r\n\t\t/** Adds the index of a new constraint or bound to index set.\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t \t\t\tRET_ADDINDEX_FAILED */\r\n\t\treturnValue addIndex(\tIndexlist* const indexlist,\t/**< Index list to which the new index shall be added. */\r\n\t\t\t\t\t\t\t\tint newnumber,\t\t\t\t/**< Number of new constraint or bound. */\r\n\t\t\t\t\t\t\t\tSubjectToStatus newstatus\t/**< Status of new constraint or bound. */\r\n\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Removes the index of a constraint or bound from index set.\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t \t\t\tRET_UNKNOWN_BUG */\r\n\t\treturnValue removeIndex(\tIndexlist* const indexlist,\t/**< Index list from which the new index shall be removed. */\r\n\t\t\t\t\t\t\t\t\tint removenumber\t\t\t/**< Number of constraint or bound to be removed. */\r\n\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t/** Swaps the indices of two constraints or bounds within the index set.\r\n\t\t *\t\\return SUCCESSFUL_RETURN \\n\r\n\t\t \t\t\tRET_SWAPINDEX_FAILED */\r\n\t\treturnValue swapIndex(\tIndexlist* const indexlist,\t/**< Index list in which the indices shold be swapped. */\r\n\t\t\t\t\t\t\t\tint number1,\t\t\t\t/**< Number of first constraint or bound. */\r\n\t\t\t\t\t\t\t\tint number2\t\t\t\t\t/**< Number of second constraint or bound. */\r\n\t\t\t\t\t\t\t\t);\r\n\r\n\r\n\t/*\r\n\t *\tPROTECTED MEMBER VARIABLES\r\n\t */\r\n\tprotected:\r\n\t\tSubjectToType type[NVMAX+NCMAX]; \t\t/**< Type of constraints/bounds. */\r\n\t\tSubjectToStatus status[NVMAX+NCMAX];\t/**< Status of constraints/bounds. */\r\n\r\n\t\tBooleanType noLower;\t\t\t\t \t/**< This flag indicates if there is no lower bound on any variable. */\r\n\t\tBooleanType noUpper;\t \t\t\t\t/**< This flag indicates if there is no upper bound on any variable. */\r\n\r\n\r\n\t/*\r\n\t *\tPRIVATE MEMBER VARIABLES\r\n\t */\r\n\tprivate:\r\n\t\tint size;\r\n};\r\n\r\n\r\n\r\n#include <SubjectTo.ipp>\r\n\r\n#endif\t/* QPOASES_SUBJECTTO_HPP */\r\n\r\n\r\n/*\r\n *\tend of file\r\n */\r\n"
  },
  {
    "path": "externals/qpoases/INCLUDE/Types.hpp",
    "content": "/*\r\n *\tThis file is part of qpOASES.\r\n *\r\n *\tqpOASES -- An Implementation of the Online Active Set Strategy.\r\n *\tCopyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.\r\n *\r\n *\tqpOASES is free software; you can redistribute it and/or\r\n *\tmodify it under the terms of the GNU Lesser General Public\r\n *\tLicense as published by the Free Software Foundation; either\r\n *\tversion 2.1 of the License, or (at your option) any later version.\r\n *\r\n *\tqpOASES is distributed in the hope that it will be useful,\r\n *\tbut WITHOUT ANY WARRANTY; without even the implied warranty of\r\n *\tMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n *\tLesser General Public License for more details.\r\n *\r\n *\tYou should have received a copy of the GNU Lesser General Public\r\n *\tLicense along with qpOASES; if not, write to the Free Software\r\n *\tFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r\n *\r\n */\r\n\r\n\r\n/**\r\n *\t\\file INCLUDE/Types.hpp\r\n *\t\\author Hans Joachim Ferreau\r\n *\t\\version 1.3embedded\r\n *\t\\date 2008\r\n *\r\n *\tDeclaration of all non-built-in types (except for classes).\r\n */\r\n\r\n\r\n#ifndef QPOASES_TYPES_HPP\r\n#define QPOASES_TYPES_HPP\r\n\r\n\r\n\r\n/** Define real_t for facilitating switching between double and float. */\r\n// typedef double real_t;\r\n\r\n\r\n/** Summarises all possible logical values. */\r\nenum BooleanType\r\n{\r\n\tBT_FALSE,\t\t\t\t\t/**< Logical value for \"false\". */\r\n\tBT_TRUE\t\t\t\t\t\t/**< Logical value for \"true\". */\r\n};\r\n\r\n\r\n/** Summarises all possible print levels. Print levels are used to describe\r\n *\tthe desired amount of output during runtime of qpOASES. */\r\nenum PrintLevel\r\n{\r\n\tPL_NONE,\t\t\t\t\t/**< No output. */\r\n\tPL_LOW,\t\t\t\t\t\t/**< Print error messages only. */\r\n\tPL_MEDIUM,\t\t\t\t\t/**< Print error and warning messages as well as concise info messages. */\r\n\tPL_HIGH\t\t\t\t\t\t/**< Print all messages with full details. */\r\n};\r\n\r\n\r\n/** Defines visibility status of a message. */\r\nenum VisibilityStatus\r\n{\r\n\tVS_VISIBLE,\t\t\t\t\t/**< Message visible. */\r\n\tVS_HIDDEN\t\t\t\t\t/**< Message not visible. */\r\n};\r\n\r\n\r\n/** Summarises all possible states of the (S)QProblem(B) object during the\r\nsolution process of a QP sequence. */\r\nenum QProblemStatus\r\n{\r\n\tQPS_NOTINITIALISED,\t\t\t/**< QProblem object is freshly instantiated or reset. */\r\n\tQPS_PREPARINGAUXILIARYQP,\t/**< An auxiliary problem is currently setup, either at the very beginning\r\n\t\t\t\t\t\t\t\t *   via an initial homotopy or after changing the QP matrices. */\r\n\tQPS_AUXILIARYQPSOLVED,\t\t/**< An auxilary problem was solved, either at the very beginning\r\n\t\t\t\t\t\t\t\t *   via an initial homotopy or after changing the QP matrices. */\r\n\tQPS_PERFORMINGHOMOTOPY,\t\t/**< A homotopy according to the main idea of the online active\r\n\t\t\t\t\t\t\t\t *   set strategy is performed. */\r\n\tQPS_HOMOTOPYQPSOLVED,\t\t/**< An intermediate QP along the homotopy path was solved. */\r\n\tQPS_SOLVED\t\t\t\t\t/**< The solution of the actual QP was found. */\r\n};\r\n\r\n\r\n/** Summarises all possible types of bounds and constraints. */\r\nenum SubjectToType\r\n{\r\n\tST_UNBOUNDED,\t\t\t\t/**< Bound/constraint is unbounded. */\r\n\tST_BOUNDED,\t\t\t\t\t/**< Bound/constraint is bounded but not fixed. */\r\n\tST_EQUALITY,\t\t\t\t/**< Bound/constraint is fixed (implicit equality bound/constraint). */\r\n\tST_UNKNOWN\t\t\t\t\t/**< Type of bound/constraint unknown. */\r\n};\r\n\r\n\r\n/** Summarises all possible states of bounds and constraints. */\r\nenum SubjectToStatus\r\n{\r\n\tST_INACTIVE,\t\t\t\t/**< Bound/constraint is inactive. */\r\n\tST_LOWER,\t\t\t\t\t/**< Bound/constraint is at its lower bound. */\r\n\tST_UPPER,\t\t\t\t\t/**< Bound/constraint is at its upper bound. */\r\n\tST_UNDEFINED\t\t\t\t/**< Status of bound/constraint undefined. */\r\n};\r\n\r\n\r\n/** Summarises all possible cycling states of bounds and constraints. */\r\nenum CyclingStatus\r\n{\r\n\tCYC_NOT_INVOLVED,\t\t\t/**< Bound/constraint is not involved in current cycling. */\r\n\tCYC_PREV_ADDED,\t\t\t\t/**< Bound/constraint has previously been added during the current cycling. */\r\n\tCYC_PREV_REMOVED\t\t\t/**< Bound/constraint has previously been removed during the current cycling. */\r\n};\r\n\r\n\r\n/** Summarises all possible types of the QP's Hessian matrix. */\r\nenum HessianType\r\n{\r\n\tHST_SEMIDEF,\t\t\t\t/**< Hessian is positive semi-definite. */\r\n\tHST_POSDEF_NULLSPACE,\t\t/**< Hessian is positive definite on null space of active bounds/constraints. */\r\n\tHST_POSDEF,\t\t\t\t\t/**< Hessian is (strictly) positive definite. */\r\n\tHST_IDENTITY\t\t\t\t/**< Hessian is identity matrix. */\r\n};\r\n\r\n\r\n\r\n#endif\t/* QPOASES_TYPES_HPP */\r\n\r\n\r\n/*\r\n *\tend of file\r\n */\r\n"
  },
  {
    "path": "externals/qpoases/INCLUDE/Utils.hpp",
    "content": "/*\r\n *\tThis file is part of qpOASES.\r\n *\r\n *\tqpOASES -- An Implementation of the Online Active Set Strategy.\r\n *\tCopyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.\r\n *\r\n *\tqpOASES is free software; you can redistribute it and/or\r\n *\tmodify it under the terms of the GNU Lesser General Public\r\n *\tLicense as published by the Free Software Foundation; either\r\n *\tversion 2.1 of the License, or (at your option) any later version.\r\n *\r\n *\tqpOASES is distributed in the hope that it will be useful,\r\n *\tbut WITHOUT ANY WARRANTY; without even the implied warranty of\r\n *\tMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n *\tLesser General Public License for more details.\r\n *\r\n *\tYou should have received a copy of the GNU Lesser General Public\r\n *\tLicense along with qpOASES; if not, write to the Free Software\r\n *\tFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r\n *\r\n */\r\n\r\n\r\n/**\r\n *\t\\file INCLUDE/Utils.hpp\r\n *\t\\author Hans Joachim Ferreau\r\n *\t\\version 1.3embedded\r\n *\t\\date 2007-2008\r\n *\r\n *\tDeclaration of global utility functions for working with qpOASES.\r\n */\r\n\r\n\r\n#ifndef QPOASES_UTILS_HPP\r\n#define QPOASES_UTILS_HPP\r\n\r\n\r\n#include <MessageHandling.hpp>\r\n\r\n\r\n#ifdef PC_DEBUG  /* Define print functions only for debugging! */\r\n\r\n/** Prints a vector.\r\n * \\return SUCCESSFUL_RETURN */\r\nreturnValue print(\tconst real_t* const v,\t/**< Vector to be printed. */\r\n\t\t\t\t\tint n\t\t\t\t\t/**< Length of vector. */\r\n\t\t\t\t\t);\r\n\r\n/** Prints a permuted vector.\r\n * \\return SUCCESSFUL_RETURN */\r\nreturnValue print(\tconst real_t* const v,\t\t/**< Vector to be printed. */\r\n\t\t\t\t\tint n,\t\t\t\t\t\t/**< Length of vector. */\r\n\t\t\t\t\tconst int* const V_idx\t\t/**< Pemutation vector. */\r\n\t\t\t\t\t);\r\n\r\n/** Prints a named vector.\r\n * \\return SUCCESSFUL_RETURN */\r\nreturnValue print(\tconst real_t* const v,\t/**< Vector to be printed. */\r\n\t\t\t\t\tint n,\t\t\t\t\t/**< Length of vector. */\r\n\t\t\t\t\tconst char* name\t\t/** Name of vector. */\r\n\t\t\t\t\t);\r\n\r\n/** Prints a matrix.\r\n * \\return SUCCESSFUL_RETURN */\r\nreturnValue print(\tconst real_t* const M,\t/**< Matrix to be printed. */\r\n\t\t\t\t\tint nrow,\t\t\t\t/**< Row number of matrix. */\r\n\t\t\t\t\tint ncol\t\t\t\t/**< Column number of matrix. */\r\n\t\t\t\t\t);\r\n\r\n/** Prints a permuted matrix.\r\n * \\return SUCCESSFUL_RETURN */\r\nreturnValue print(\tconst real_t* const M,\t\t/**< Matrix to be printed. */\r\n\t\t\t\t\tint nrow,\t\t\t\t\t/**< Row number of matrix. */\r\n\t\t\t\t\tint ncol\t,\t\t\t\t/**< Column number of matrix. */\r\n\t\t\t\t\tconst int* const ROW_idx,\t/**< Row pemutation vector. */\r\n\t\t\t\t\tconst int* const COL_idx\t/**< Column pemutation vector. */\r\n\t\t\t\t\t);\r\n\r\n/** Prints a named matrix.\r\n * \\return SUCCESSFUL_RETURN */\r\nreturnValue print(\tconst real_t* const M,\t/**< Matrix to be printed. */\r\n\t\t\t\t\tint nrow,\t\t\t\t/**< Row number of matrix. */\r\n\t\t\t\t\tint ncol,\t\t\t\t/**< Column number of matrix. */\r\n\t\t\t\t\tconst char* name\t\t/** Name of matrix. */\r\n\t\t\t\t\t);\r\n\r\n/** Prints an index array.\r\n * \\return SUCCESSFUL_RETURN */\r\nreturnValue print(\tconst int* const index,\t/**< Index array to be printed. */\r\n\t\t\t\t\tint n\t\t\t\t\t/**< Length of index array. */\r\n\t\t\t\t\t);\r\n\r\n/** Prints a named index array.\r\n * \\return SUCCESSFUL_RETURN */\r\nreturnValue print(\tconst int* const index,\t/**< Index array to be printed. */\r\n\t\t\t\t\tint n,\t\t\t\t\t/**< Length of index array. */\r\n\t\t\t\t\tconst char* name\t\t/**< Name of index array. */\r\n\t\t\t\t\t);\r\n\r\n\r\n/** Prints a string to desired output target (useful also for MATLAB output!).\r\n * \\return SUCCESSFUL_RETURN */\r\nreturnValue myPrintf(\tconst char* s\t/**< String to be written. */\r\n\t\t\t\t\t\t);\r\n\r\n\r\n/** Prints qpOASES copyright notice.\r\n * \\return SUCCESSFUL_RETURN */\r\nreturnValue printCopyrightNotice( );\r\n\r\n\r\n/** Reads a real_t matrix from file.\r\n * \\return SUCCESSFUL_RETURN \\n\r\n \t\t   RET_UNABLE_TO_OPEN_FILE \\n\r\n\t\t   RET_UNABLE_TO_READ_FILE */\r\nreturnValue readFromFile(\treal_t* data,\t\t\t\t/**< Matrix to be read from file. */\r\n\t\t\t\t\t\t\tint nrow,\t\t\t\t\t/**< Row number of matrix. */\r\n\t\t\t\t\t\t\tint ncol,\t\t\t\t\t/**< Column number of matrix. */\r\n\t\t\t\t\t\t\tconst char* datafilename\t/**< Data file name. */\r\n\t\t\t\t\t\t\t);\r\n\r\n/** Reads a real_t vector from file.\r\n * \\return SUCCESSFUL_RETURN \\n\r\n \t\t   RET_UNABLE_TO_OPEN_FILE \\n\r\n\t\t   RET_UNABLE_TO_READ_FILE */\r\nreturnValue readFromFile(\treal_t* data,\t\t\t\t/**< Vector to be read from file. */\r\n\t\t\t\t\t\t\tint n,\t\t\t\t\t\t/**< Length of vector. */\r\n\t\t\t\t\t\t\tconst char* datafilename\t/**< Data file name. */\r\n\t\t\t\t\t\t\t);\r\n\r\n/** Reads an integer (column) vector from file.\r\n * \\return SUCCESSFUL_RETURN \\n\r\n \t\t   RET_UNABLE_TO_OPEN_FILE \\n\r\n\t\t   RET_UNABLE_TO_READ_FILE */\r\nreturnValue readFromFile(\tint* data,\t\t\t\t\t/**< Vector to be read from file. */\r\n\t\t\t\t\t\t\tint n,\t\t\t\t\t\t/**< Length of vector. */\r\n\t\t\t\t\t\t\tconst char* datafilename\t/**< Data file name. */\r\n\t\t\t\t\t\t\t);\r\n\r\n\r\n/** Writes a real_t matrix into a file.\r\n * \\return SUCCESSFUL_RETURN \\n\r\n \t\t   RET_UNABLE_TO_OPEN_FILE  */\r\nreturnValue writeIntoFile(\tconst real_t* const data,\t/**< Matrix to be written into file. */\r\n\t\t\t\t\t\t\tint nrow,\t\t\t\t\t/**< Row number of matrix. */\r\n\t\t\t\t\t\t\tint ncol,\t\t\t\t\t/**< Column number of matrix. */\r\n\t\t\t\t\t\t\tconst char* datafilename,\t/**< Data file name. */\r\n\t\t\t\t\t\t\tBooleanType append\t\t\t/**< Indicates if data shall be appended if the file already exists (otherwise it is overwritten). */\r\n\t\t\t\t\t\t\t);\r\n\r\n/** Writes a real_t vector into a file.\r\n * \\return SUCCESSFUL_RETURN \\n\r\n \t\t   RET_UNABLE_TO_OPEN_FILE  */\r\nreturnValue writeIntoFile(\tconst real_t* const data,\t/**< Vector to be written into file. */\r\n\t\t\t\t\t\t\tint n,\t\t\t\t\t\t/**< Length of vector. */\r\n\t\t\t\t\t\t\tconst char* datafilename,\t/**< Data file name. */\r\n\t\t\t\t\t\t\tBooleanType append\t\t\t/**< Indicates if data shall be appended if the file already exists (otherwise it is overwritten). */\r\n\t\t\t\t\t\t\t);\r\n\r\n/** Writes an integer (column) vector into a file.\r\n * \\return SUCCESSFUL_RETURN \\n\r\n \t\t   RET_UNABLE_TO_OPEN_FILE */\r\nreturnValue writeIntoFile(\tconst int* const integer,\t/**< Integer vector to be written into file. */\r\n\t\t\t\t\t\t\tint n,\t\t\t\t\t\t/**< Length of vector. */\r\n\t\t\t\t\t\t\tconst char* datafilename,\t/**< Data file name. */\r\n\t\t\t\t\t\t\tBooleanType append\t\t\t/**< Indicates if integer shall be appended if the file already exists (otherwise it is overwritten). */\r\n\t\t\t\t\t\t\t);\r\n\r\n#endif  /* PC_DEBUG */\r\n\r\n\r\n/** Returns the current system time.\r\n * \\return current system time */\r\nreal_t getCPUtime( );\r\n\r\n\r\n/** Returns the Euclidean norm of a vector.\r\n * \\return 0: successful */\r\nreal_t getNorm(\tconst real_t* const v,\t/**< Vector. */\r\n\t\t\t\tint n\t\t\t\t\t/**< Vector's dimension. */\r\n\t\t\t\t);\r\n\r\n/** Returns the absolute value of a real_t.\r\n * \\return Absolute value of a real_t */\r\ninline real_t getAbs(\treal_t x\t\t/**< Input argument. */\r\n\t\t\t\t\t\t);\r\n\r\n\r\n\r\n#include <Utils.ipp>\r\n\r\n#endif\t/* QPOASES_UTILS_HPP */\r\n\r\n\r\n/*\r\n *\tend of file\r\n */\r\n"
  },
  {
    "path": "externals/qpoases/LICENSE.txt",
    "content": "\t\t  GNU LESSER GENERAL PUBLIC LICENSE\r\n\t\t       Version 2.1, February 1999\r\n\r\n Copyright (C) 1991, 1999 Free Software Foundation, Inc.\r\n 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r\n Everyone is permitted to copy and distribute verbatim copies\r\n of this license document, but changing it is not allowed.\r\n\r\n[This is the first released version of the Lesser GPL.  It also counts\r\n as the successor of the GNU Library Public License, version 2, hence\r\n the version number 2.1.]\r\n\r\n\t\t\t    Preamble\r\n\r\n  The licenses for most software are designed to take away your\r\nfreedom to share and change it.  By contrast, the GNU General Public\r\nLicenses are intended to guarantee your freedom to share and change\r\nfree software--to make sure the software is free for all its users.\r\n\r\n  This license, the Lesser General Public License, applies to some\r\nspecially designated software packages--typically libraries--of the\r\nFree Software Foundation and other authors who decide to use it.  You\r\ncan use it too, but we suggest you first think carefully about whether\r\nthis license or the ordinary General Public License is the better\r\nstrategy to use in any particular case, based on the explanations below.\r\n\r\n  When we speak of free software, we are referring to freedom of use,\r\nnot price.  Our General Public Licenses are designed to make sure that\r\nyou have the freedom to distribute copies of free software (and charge\r\nfor this service if you wish); that you receive source code or can get\r\nit if you want it; that you can change the software and use pieces of\r\nit in new free programs; and that you are informed that you can do\r\nthese things.\r\n\r\n  To protect your rights, we need to make restrictions that forbid\r\ndistributors to deny you these rights or to ask you to surrender these\r\nrights.  These restrictions translate to certain responsibilities for\r\nyou if you distribute copies of the library or if you modify it.\r\n\r\n  For example, if you distribute copies of the library, whether gratis\r\nor for a fee, you must give the recipients all the rights that we gave\r\nyou.  You must make sure that they, too, receive or can get the source\r\ncode.  If you link other code with the library, you must provide\r\ncomplete object files to the recipients, so that they can relink them\r\nwith the library after making changes to the library and recompiling\r\nit.  And you must show them these terms so they know their rights.\r\n\r\n  We protect your rights with a two-step method: (1) we copyright the\r\nlibrary, and (2) we offer you this license, which gives you legal\r\npermission to copy, distribute and/or modify the library.\r\n\r\n  To protect each distributor, we want to make it very clear that\r\nthere is no warranty for the free library.  Also, if the library is\r\nmodified by someone else and passed on, the recipients should know\r\nthat what they have is not the original version, so that the original\r\nauthor's reputation will not be affected by problems that might be\r\nintroduced by others.\r\n\f\r\n  Finally, software patents pose a constant threat to the existence of\r\nany free program.  We wish to make sure that a company cannot\r\neffectively restrict the users of a free program by obtaining a\r\nrestrictive license from a patent holder.  Therefore, we insist that\r\nany patent license obtained for a version of the library must be\r\nconsistent with the full freedom of use specified in this license.\r\n\r\n  Most GNU software, including some libraries, is covered by the\r\nordinary GNU General Public License.  This license, the GNU Lesser\r\nGeneral Public License, applies to certain designated libraries, and\r\nis quite different from the ordinary General Public License.  We use\r\nthis license for certain libraries in order to permit linking those\r\nlibraries into non-free programs.\r\n\r\n  When a program is linked with a library, whether statically or using\r\na shared library, the combination of the two is legally speaking a\r\ncombined work, a derivative of the original library.  The ordinary\r\nGeneral Public License therefore permits such linking only if the\r\nentire combination fits its criteria of freedom.  The Lesser General\r\nPublic License permits more lax criteria for linking other code with\r\nthe library.\r\n\r\n  We call this license the \"Lesser\" General Public License because it\r\ndoes Less to protect the user's freedom than the ordinary General\r\nPublic License.  It also provides other free software developers Less\r\nof an advantage over competing non-free programs.  These disadvantages\r\nare the reason we use the ordinary General Public License for many\r\nlibraries.  However, the Lesser license provides advantages in certain\r\nspecial circumstances.\r\n\r\n  For example, on rare occasions, there may be a special need to\r\nencourage the widest possible use of a certain library, so that it becomes\r\na de-facto standard.  To achieve this, non-free programs must be\r\nallowed to use the library.  A more frequent case is that a free\r\nlibrary does the same job as widely used non-free libraries.  In this\r\ncase, there is little to gain by limiting the free library to free\r\nsoftware only, so we use the Lesser General Public License.\r\n\r\n  In other cases, permission to use a particular library in non-free\r\nprograms enables a greater number of people to use a large body of\r\nfree software.  For example, permission to use the GNU C Library in\r\nnon-free programs enables many more people to use the whole GNU\r\noperating system, as well as its variant, the GNU/Linux operating\r\nsystem.\r\n\r\n  Although the Lesser General Public License is Less protective of the\r\nusers' freedom, it does ensure that the user of a program that is\r\nlinked with the Library has the freedom and the wherewithal to run\r\nthat program using a modified version of the Library.\r\n\r\n  The precise terms and conditions for copying, distribution and\r\nmodification follow.  Pay close attention to the difference between a\r\n\"work based on the library\" and a \"work that uses the library\".  The\r\nformer contains code derived from the library, whereas the latter must\r\nbe combined with the library in order to run.\r\n\f\r\n\t\t  GNU LESSER GENERAL PUBLIC LICENSE\r\n   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\r\n\r\n  0. This License Agreement applies to any software library or other\r\nprogram which contains a notice placed by the copyright holder or\r\nother authorized party saying it may be distributed under the terms of\r\nthis Lesser General Public License (also called \"this License\").\r\nEach licensee is addressed as \"you\".\r\n\r\n  A \"library\" means a collection of software functions and/or data\r\nprepared so as to be conveniently linked with application programs\r\n(which use some of those functions and data) to form executables.\r\n\r\n  The \"Library\", below, refers to any such software library or work\r\nwhich has been distributed under these terms.  A \"work based on the\r\nLibrary\" means either the Library or any derivative work under\r\ncopyright law: that is to say, a work containing the Library or a\r\nportion of it, either verbatim or with modifications and/or translated\r\nstraightforwardly into another language.  (Hereinafter, translation is\r\nincluded without limitation in the term \"modification\".)\r\n\r\n  \"Source code\" for a work means the preferred form of the work for\r\nmaking modifications to it.  For a library, complete source code means\r\nall the source code for all modules it contains, plus any associated\r\ninterface definition files, plus the scripts used to control compilation\r\nand installation of the library.\r\n\r\n  Activities other than copying, distribution and modification are not\r\ncovered by this License; they are outside its scope.  The act of\r\nrunning a program using the Library is not restricted, and output from\r\nsuch a program is covered only if its contents constitute a work based\r\non the Library (independent of the use of the Library in a tool for\r\nwriting it).  Whether that is true depends on what the Library does\r\nand what the program that uses the Library does.\r\n  \r\n  1. You may copy and distribute verbatim copies of the Library's\r\ncomplete source code as you receive it, in any medium, provided that\r\nyou conspicuously and appropriately publish on each copy an\r\nappropriate copyright notice and disclaimer of warranty; keep intact\r\nall the notices that refer to this License and to the absence of any\r\nwarranty; and distribute a copy of this License along with the\r\nLibrary.\r\n\r\n  You may charge a fee for the physical act of transferring a copy,\r\nand you may at your option offer warranty protection in exchange for a\r\nfee.\r\n\f\r\n  2. You may modify your copy or copies of the Library or any portion\r\nof it, thus forming a work based on the Library, and copy and\r\ndistribute such modifications or work under the terms of Section 1\r\nabove, provided that you also meet all of these conditions:\r\n\r\n    a) The modified work must itself be a software library.\r\n\r\n    b) You must cause the files modified to carry prominent notices\r\n    stating that you changed the files and the date of any change.\r\n\r\n    c) You must cause the whole of the work to be licensed at no\r\n    charge to all third parties under the terms of this License.\r\n\r\n    d) If a facility in the modified Library refers to a function or a\r\n    table of data to be supplied by an application program that uses\r\n    the facility, other than as an argument passed when the facility\r\n    is invoked, then you must make a good faith effort to ensure that,\r\n    in the event an application does not supply such function or\r\n    table, the facility still operates, and performs whatever part of\r\n    its purpose remains meaningful.\r\n\r\n    (For example, a function in a library to compute square roots has\r\n    a purpose that is entirely well-defined independent of the\r\n    application.  Therefore, Subsection 2d requires that any\r\n    application-supplied function or table used by this function must\r\n    be optional: if the application does not supply it, the square\r\n    root function must still compute square roots.)\r\n\r\nThese requirements apply to the modified work as a whole.  If\r\nidentifiable sections of that work are not derived from the Library,\r\nand can be reasonably considered independent and separate works in\r\nthemselves, then this License, and its terms, do not apply to those\r\nsections when you distribute them as separate works.  But when you\r\ndistribute the same sections as part of a whole which is a work based\r\non the Library, the distribution of the whole must be on the terms of\r\nthis License, whose permissions for other licensees extend to the\r\nentire whole, and thus to each and every part regardless of who wrote\r\nit.\r\n\r\nThus, it is not the intent of this section to claim rights or contest\r\nyour rights to work written entirely by you; rather, the intent is to\r\nexercise the right to control the distribution of derivative or\r\ncollective works based on the Library.\r\n\r\nIn addition, mere aggregation of another work not based on the Library\r\nwith the Library (or with a work based on the Library) on a volume of\r\na storage or distribution medium does not bring the other work under\r\nthe scope of this License.\r\n\r\n  3. You may opt to apply the terms of the ordinary GNU General Public\r\nLicense instead of this License to a given copy of the Library.  To do\r\nthis, you must alter all the notices that refer to this License, so\r\nthat they refer to the ordinary GNU General Public License, version 2,\r\ninstead of to this License.  (If a newer version than version 2 of the\r\nordinary GNU General Public License has appeared, then you can specify\r\nthat version instead if you wish.)  Do not make any other change in\r\nthese notices.\r\n\f\r\n  Once this change is made in a given copy, it is irreversible for\r\nthat copy, so the ordinary GNU General Public License applies to all\r\nsubsequent copies and derivative works made from that copy.\r\n\r\n  This option is useful when you wish to copy part of the code of\r\nthe Library into a program that is not a library.\r\n\r\n  4. You may copy and distribute the Library (or a portion or\r\nderivative of it, under Section 2) in object code or executable form\r\nunder the terms of Sections 1 and 2 above provided that you accompany\r\nit with the complete corresponding machine-readable source code, which\r\nmust be distributed under the terms of Sections 1 and 2 above on a\r\nmedium customarily used for software interchange.\r\n\r\n  If distribution of object code is made by offering access to copy\r\nfrom a designated place, then offering equivalent access to copy the\r\nsource code from the same place satisfies the requirement to\r\ndistribute the source code, even though third parties are not\r\ncompelled to copy the source along with the object code.\r\n\r\n  5. A program that contains no derivative of any portion of the\r\nLibrary, but is designed to work with the Library by being compiled or\r\nlinked with it, is called a \"work that uses the Library\".  Such a\r\nwork, in isolation, is not a derivative work of the Library, and\r\ntherefore falls outside the scope of this License.\r\n\r\n  However, linking a \"work that uses the Library\" with the Library\r\ncreates an executable that is a derivative of the Library (because it\r\ncontains portions of the Library), rather than a \"work that uses the\r\nlibrary\".  The executable is therefore covered by this License.\r\nSection 6 states terms for distribution of such executables.\r\n\r\n  When a \"work that uses the Library\" uses material from a header file\r\nthat is part of the Library, the object code for the work may be a\r\nderivative work of the Library even though the source code is not.\r\nWhether this is true is especially significant if the work can be\r\nlinked without the Library, or if the work is itself a library.  The\r\nthreshold for this to be true is not precisely defined by law.\r\n\r\n  If such an object file uses only numerical parameters, data\r\nstructure layouts and accessors, and small macros and small inline\r\nfunctions (ten lines or less in length), then the use of the object\r\nfile is unrestricted, regardless of whether it is legally a derivative\r\nwork.  (Executables containing this object code plus portions of the\r\nLibrary will still fall under Section 6.)\r\n\r\n  Otherwise, if the work is a derivative of the Library, you may\r\ndistribute the object code for the work under the terms of Section 6.\r\nAny executables containing that work also fall under Section 6,\r\nwhether or not they are linked directly with the Library itself.\r\n\f\r\n  6. As an exception to the Sections above, you may also combine or\r\nlink a \"work that uses the Library\" with the Library to produce a\r\nwork containing portions of the Library, and distribute that work\r\nunder terms of your choice, provided that the terms permit\r\nmodification of the work for the customer's own use and reverse\r\nengineering for debugging such modifications.\r\n\r\n  You must give prominent notice with each copy of the work that the\r\nLibrary is used in it and that the Library and its use are covered by\r\nthis License.  You must supply a copy of this License.  If the work\r\nduring execution displays copyright notices, you must include the\r\ncopyright notice for the Library among them, as well as a reference\r\ndirecting the user to the copy of this License.  Also, you must do one\r\nof these things:\r\n\r\n    a) Accompany the work with the complete corresponding\r\n    machine-readable source code for the Library including whatever\r\n    changes were used in the work (which must be distributed under\r\n    Sections 1 and 2 above); and, if the work is an executable linked\r\n    with the Library, with the complete machine-readable \"work that\r\n    uses the Library\", as object code and/or source code, so that the\r\n    user can modify the Library and then relink to produce a modified\r\n    executable containing the modified Library.  (It is understood\r\n    that the user who changes the contents of definitions files in the\r\n    Library will not necessarily be able to recompile the application\r\n    to use the modified definitions.)\r\n\r\n    b) Use a suitable shared library mechanism for linking with the\r\n    Library.  A suitable mechanism is one that (1) uses at run time a\r\n    copy of the library already present on the user's computer system,\r\n    rather than copying library functions into the executable, and (2)\r\n    will operate properly with a modified version of the library, if\r\n    the user installs one, as long as the modified version is\r\n    interface-compatible with the version that the work was made with.\r\n\r\n    c) Accompany the work with a written offer, valid for at\r\n    least three years, to give the same user the materials\r\n    specified in Subsection 6a, above, for a charge no more\r\n    than the cost of performing this distribution.\r\n\r\n    d) If distribution of the work is made by offering access to copy\r\n    from a designated place, offer equivalent access to copy the above\r\n    specified materials from the same place.\r\n\r\n    e) Verify that the user has already received a copy of these\r\n    materials or that you have already sent this user a copy.\r\n\r\n  For an executable, the required form of the \"work that uses the\r\nLibrary\" must include any data and utility programs needed for\r\nreproducing the executable from it.  However, as a special exception,\r\nthe materials to be distributed need not include anything that is\r\nnormally distributed (in either source or binary form) with the major\r\ncomponents (compiler, kernel, and so on) of the operating system on\r\nwhich the executable runs, unless that component itself accompanies\r\nthe executable.\r\n\r\n  It may happen that this requirement contradicts the license\r\nrestrictions of other proprietary libraries that do not normally\r\naccompany the operating system.  Such a contradiction means you cannot\r\nuse both them and the Library together in an executable that you\r\ndistribute.\r\n\f\r\n  7. You may place library facilities that are a work based on the\r\nLibrary side-by-side in a single library together with other library\r\nfacilities not covered by this License, and distribute such a combined\r\nlibrary, provided that the separate distribution of the work based on\r\nthe Library and of the other library facilities is otherwise\r\npermitted, and provided that you do these two things:\r\n\r\n    a) Accompany the combined library with a copy of the same work\r\n    based on the Library, uncombined with any other library\r\n    facilities.  This must be distributed under the terms of the\r\n    Sections above.\r\n\r\n    b) Give prominent notice with the combined library of the fact\r\n    that part of it is a work based on the Library, and explaining\r\n    where to find the accompanying uncombined form of the same work.\r\n\r\n  8. You may not copy, modify, sublicense, link with, or distribute\r\nthe Library except as expressly provided under this License.  Any\r\nattempt otherwise to copy, modify, sublicense, link with, or\r\ndistribute the Library is void, and will automatically terminate your\r\nrights under this License.  However, parties who have received copies,\r\nor rights, from you under this License will not have their licenses\r\nterminated so long as such parties remain in full compliance.\r\n\r\n  9. You are not required to accept this License, since you have not\r\nsigned it.  However, nothing else grants you permission to modify or\r\ndistribute the Library or its derivative works.  These actions are\r\nprohibited by law if you do not accept this License.  Therefore, by\r\nmodifying or distributing the Library (or any work based on the\r\nLibrary), you indicate your acceptance of this License to do so, and\r\nall its terms and conditions for copying, distributing or modifying\r\nthe Library or works based on it.\r\n\r\n  10. Each time you redistribute the Library (or any work based on the\r\nLibrary), the recipient automatically receives a license from the\r\noriginal licensor to copy, distribute, link with or modify the Library\r\nsubject to these terms and conditions.  You may not impose any further\r\nrestrictions on the recipients' exercise of the rights granted herein.\r\nYou are not responsible for enforcing compliance by third parties with\r\nthis License.\r\n\f\r\n  11. If, as a consequence of a court judgment or allegation of patent\r\ninfringement or for any other reason (not limited to patent issues),\r\nconditions are imposed on you (whether by court order, agreement or\r\notherwise) that contradict the conditions of this License, they do not\r\nexcuse you from the conditions of this License.  If you cannot\r\ndistribute so as to satisfy simultaneously your obligations under this\r\nLicense and any other pertinent obligations, then as a consequence you\r\nmay not distribute the Library at all.  For example, if a patent\r\nlicense would not permit royalty-free redistribution of the Library by\r\nall those who receive copies directly or indirectly through you, then\r\nthe only way you could satisfy both it and this License would be to\r\nrefrain entirely from distribution of the Library.\r\n\r\nIf any portion of this section is held invalid or unenforceable under any\r\nparticular circumstance, the balance of the section is intended to apply,\r\nand the section as a whole is intended to apply in other circumstances.\r\n\r\nIt is not the purpose of this section to induce you to infringe any\r\npatents or other property right claims or to contest validity of any\r\nsuch claims; this section has the sole purpose of protecting the\r\nintegrity of the free software distribution system which is\r\nimplemented by public license practices.  Many people have made\r\ngenerous contributions to the wide range of software distributed\r\nthrough that system in reliance on consistent application of that\r\nsystem; it is up to the author/donor to decide if he or she is willing\r\nto distribute software through any other system and a licensee cannot\r\nimpose that choice.\r\n\r\nThis section is intended to make thoroughly clear what is believed to\r\nbe a consequence of the rest of this License.\r\n\r\n  12. If the distribution and/or use of the Library is restricted in\r\ncertain countries either by patents or by copyrighted interfaces, the\r\noriginal copyright holder who places the Library under this License may add\r\nan explicit geographical distribution limitation excluding those countries,\r\nso that distribution is permitted only in or among countries not thus\r\nexcluded.  In such case, this License incorporates the limitation as if\r\nwritten in the body of this License.\r\n\r\n  13. The Free Software Foundation may publish revised and/or new\r\nversions of the Lesser General Public License from time to time.\r\nSuch new versions will be similar in spirit to the present version,\r\nbut may differ in detail to address new problems or concerns.\r\n\r\nEach version is given a distinguishing version number.  If the Library\r\nspecifies a version number of this License which applies to it and\r\n\"any later version\", you have the option of following the terms and\r\nconditions either of that version or of any later version published by\r\nthe Free Software Foundation.  If the Library does not specify a\r\nlicense version number, you may choose any version ever published by\r\nthe Free Software Foundation.\r\n\f\r\n  14. If you wish to incorporate parts of the Library into other free\r\nprograms whose distribution conditions are incompatible with these,\r\nwrite to the author to ask for permission.  For software which is\r\ncopyrighted by the Free Software Foundation, write to the Free\r\nSoftware Foundation; we sometimes make exceptions for this.  Our\r\ndecision will be guided by the two goals of preserving the free status\r\nof all derivatives of our free software and of promoting the sharing\r\nand reuse of software generally.\r\n\r\n\t\t\t    NO WARRANTY\r\n\r\n  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO\r\nWARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.\r\nEXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR\r\nOTHER PARTIES PROVIDE THE LIBRARY \"AS IS\" WITHOUT WARRANTY OF ANY\r\nKIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE\r\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE\r\nLIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME\r\nTHE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\r\n\r\n  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN\r\nWRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY\r\nAND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU\r\nFOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR\r\nCONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE\r\nLIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING\r\nRENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A\r\nFAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF\r\nSUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH\r\nDAMAGES.\r\n\r\n\t\t     END OF TERMS AND CONDITIONS\r\n\f\r\n           How to Apply These Terms to Your New Libraries\r\n\r\n  If you develop a new library, and you want it to be of the greatest\r\npossible use to the public, we recommend making it free software that\r\neveryone can redistribute and change.  You can do so by permitting\r\nredistribution under these terms (or, alternatively, under the terms of the\r\nordinary General Public License).\r\n\r\n  To apply these terms, attach the following notices to the library.  It is\r\nsafest to attach them to the start of each source file to most effectively\r\nconvey the exclusion of warranty; and each file should have at least the\r\n\"copyright\" line and a pointer to where the full notice is found.\r\n\r\n    <one line to give the library's name and a brief idea of what it does.>\r\n    Copyright (C) <year>  <name of author>\r\n\r\n    This library is free software; you can redistribute it and/or\r\n    modify it under the terms of the GNU Lesser General Public\r\n    License as published by the Free Software Foundation; either\r\n    version 2.1 of the License, or (at your option) any later version.\r\n\r\n    This library is distributed in the hope that it will be useful,\r\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n    Lesser General Public License for more details.\r\n\r\n    You should have received a copy of the GNU Lesser General Public\r\n    License along with this library; if not, write to the Free Software\r\n    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r\n\r\nAlso add information on how to contact you by electronic and paper mail.\r\n\r\nYou should also get your employer (if you work as a programmer) or your\r\nschool, if any, to sign a \"copyright disclaimer\" for the library, if\r\nnecessary.  Here is a sample; alter the names:\r\n\r\n  Yoyodyne, Inc., hereby disclaims all copyright interest in the\r\n  library `Frob' (a library for tweaking knobs) written by James Random Hacker.\r\n\r\n  <signature of Ty Coon>, 1 April 1990\r\n  Ty Coon, President of Vice\r\n\r\nThat's all there is to it!\r\n\r\n\r\n"
  },
  {
    "path": "externals/qpoases/README.txt",
    "content": "##\r\n##\tqpOASES -- An Implementation of the Online Active Set Strategy.\r\n##\tCopyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.\r\n##\r\n##\tqpOASES is free software; you can redistribute it and/or\r\n##\tmodify it under the terms of the GNU Lesser General Public\r\n##\tLicense as published by the Free Software Foundation; either\r\n##\tversion 2.1 of the License, or (at your option) any later version.\r\n##\r\n##\tqpOASES is distributed in the hope that it will be useful,\r\n##\tbut WITHOUT ANY WARRANTY; without even the implied warranty of\r\n##\tMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n##\tLesser General Public License for more details.\r\n##\r\n##\tYou should have received a copy of the GNU Lesser General Public\r\n##\tLicense along with qpOASES; if not, write to the Free Software\r\n##\tFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r\n##\r\n\r\n\r\n\r\nINTRODUCTION\r\n=============\r\n\r\nqpOASES is an open-source C++ implementation of the recently proposed \r\nonline active set strategy (see [1], [2]), which was inspired by important \r\nobservations from the field of parametric quadratic programming. It has \r\nseveral theoretical features that make it particularly suited for model \r\npredictive control (MPC) applications.\r\n\r\nThe software package qpOASES implements these ideas and has already been \r\nsuccessfully used for closed-loop control of a real-world Diesel engine [3].\r\n\r\n\r\nReferences:\r\n\r\n[1] H.J. Ferreau. An Online Active Set Strategy for Fast Solution of \r\nParametric Quadratic Programs with Applications to Predictive Engine Control. \r\nDiplom thesis, University of Heidelberg, 2006.\r\n\r\n[2] H.J. Ferreau, H.G. Bock, M. Diehl. An online active set strategy to \r\novercome the limitations of explicit MPC. International Journal of Robust \r\nand Nonlinear Control, 18 (8), pp. 816-830, 2008.\r\n\r\n[3] H.J. Ferreau, P. Ortner, P. Langthaler, L. del Re, M. Diehl. Predictive \r\nControl of a Real-World Diesel Engine using an Extended Online Active Set \r\nStrategy. Annual Reviews in Control, 31 (2), pp. 293-301, 2007.\r\n\r\n\r\n\r\nGETTING STARTED\r\n================\r\n\r\n1. For installation, usage and additional information on this software package \r\n   see the qpOASES User's Manual located at ./DOC/manual.pdf!\r\n\r\n\r\n2. The file ./LICENSE.txt contains a copy of the GNU Lesser General Public \r\n   License. Please read it carefully before using qpOASES!\r\n\r\n\r\n3. The whole software package can be downloaded from \r\n\r\n        http://homes.esat.kuleuven.be/~optec/software/qpOASES/ \r\n\r\n   On this webpage you will also find a list of frequently asked questions.\r\n\r\n\r\n\r\nCONTACT THE AUTHORS\r\n====================\r\n\r\nIf you have got questions, remarks or comments on qpOASES \r\nplease contact the main author:\r\n\r\n        Hans Joachim Ferreau\r\n        Katholieke Universiteit Leuven\r\n        Department of Electrical Engineering (ESAT)\r\n        Kasteelpark Arenberg 10, bus 2446\r\n        B-3001 Leuven-Heverlee, Belgium\r\n\r\n        Phone: +32 16 32 03 63\r\n        E-mail: joachim.ferreau@esat.kuleuven.be\r\n                qpOASES@esat.kuleuven.be\r\n\r\nAlso bug reports and source code extensions are most welcome!\r\n\r\n\r\n\r\n##\r\n##\tend of file\r\n##\r\n"
  },
  {
    "path": "externals/qpoases/SRC/Bounds.cpp",
    "content": "/*\r\n *\tThis file is part of qpOASES.\r\n *\r\n *\tqpOASES -- An Implementation of the Online Active Set Strategy.\r\n *\tCopyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.\r\n *\r\n *\tqpOASES is free software; you can redistribute it and/or\r\n *\tmodify it under the terms of the GNU Lesser General Public\r\n *\tLicense as published by the Free Software Foundation; either\r\n *\tversion 2.1 of the License, or (at your option) any later version.\r\n *\r\n *\tqpOASES is distributed in the hope that it will be useful,\r\n *\tbut WITHOUT ANY WARRANTY; without even the implied warranty of\r\n *\tMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n *\tLesser General Public License for more details.\r\n *\r\n *\tYou should have received a copy of the GNU Lesser General Public\r\n *\tLicense along with qpOASES; if not, write to the Free Software\r\n *\tFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r\n *\r\n */\r\n\r\n\r\n/**\r\n *\t\\file SRC/Bounds.cpp\r\n *\t\\author Hans Joachim Ferreau\r\n *\t\\version 1.3embedded\r\n *\t\\date 2007-2008\r\n *\r\n *\tImplementation of the Bounds class designed to manage working sets of\r\n *\tbounds within a QProblem.\r\n */\r\n\r\n\r\n#include <Bounds.hpp>\r\n\r\n\r\n\r\n/*****************************************************************************\r\n *  P U B L I C                                                              *\r\n *****************************************************************************/\r\n\r\n\r\n/*\r\n *\tB o u n d s\r\n */\r\nBounds::Bounds( ) :\tSubjectTo( ),\r\n\t\t\t\t\tnV( 0 ),\r\n\t\t\t\t\tnFV( 0 ),\r\n\t\t\t\t\tnBV( 0 ),\r\n\t\t\t\t\tnUV( 0 )\r\n{\r\n}\r\n\r\n\r\n/*\r\n *\tB o u n d s\r\n */\r\nBounds::Bounds( const Bounds& rhs ) :\tSubjectTo( rhs ),\r\n\t\t\t\t\t\t\t\t\t\tnV( rhs.nV ),\r\n\t\t\t\t\t\t\t\t\t\tnFV( rhs.nFV ),\r\n\t\t\t\t\t\t\t\t\t\tnBV( rhs.nBV ),\r\n\t\t\t\t\t\t\t\t\t\tnUV( rhs.nUV )\r\n{\r\n\tfree  = rhs.free;\r\n\tfixed = rhs.fixed;\r\n}\r\n\r\n\r\n/*\r\n *\t~ B o u n d s\r\n */\r\nBounds::~Bounds( )\r\n{\r\n}\r\n\r\n\r\n/*\r\n *\to p e r a t o r =\r\n */\r\nBounds& Bounds::operator=( const Bounds& rhs )\r\n{\r\n\tif ( this != &rhs )\r\n\t{\r\n\t\tSubjectTo::operator=( rhs );\r\n\r\n\t\tnV  = rhs.nV;\r\n\t\tnFV = rhs.nFV;\r\n\t\tnBV = rhs.nBV;\r\n\t\tnUV = rhs.nUV;\r\n\r\n\t\tfree  = rhs.free;\r\n\t\tfixed = rhs.fixed;\r\n\t}\r\n\r\n\treturn *this;\r\n}\r\n\r\n\r\n/*\r\n *\ti n i t\r\n */\r\nreturnValue Bounds::init( int n )\r\n{\r\n\tnV = n;\r\n\tnFV = 0;\r\n\tnBV = 0;\r\n\tnUV = 0;\r\n\r\n\tfree.init( );\r\n\tfixed.init( );\r\n\r\n\treturn SubjectTo::init( n );\r\n}\r\n\r\n\r\n/*\r\n *\ts e t u p B o u n d\r\n */\r\nreturnValue Bounds::setupBound(\tint _number, SubjectToStatus _status\r\n\t\t\t\t\t\t\t\t)\r\n{\r\n\t/* consistency check */\r\n\tif ( ( _number < 0 ) || ( _number >= getNV( ) ) )\r\n\t\treturn THROWERROR( RET_INDEX_OUT_OF_BOUNDS );\r\n\t\r\n\t/* Add bound index to respective index list. */\r\n\tswitch ( _status )\r\n\t{\r\n\t\tcase ST_INACTIVE:\r\n\t\t\tif ( this->addIndex( this->getFree( ),_number,_status ) != SUCCESSFUL_RETURN )\r\n\t\t\t\treturn THROWERROR( RET_SETUP_BOUND_FAILED );\r\n\t\t\tbreak;\r\n\r\n\t\tcase ST_LOWER:\r\n\t\t\tif ( this->addIndex( this->getFixed( ),_number,_status ) != SUCCESSFUL_RETURN )\r\n\t\t\t\treturn THROWERROR( RET_SETUP_BOUND_FAILED );\r\n\t\t\tbreak;\r\n\r\n\t\tcase ST_UPPER:\r\n\t\t\tif ( this->addIndex( this->getFixed( ),_number,_status ) != SUCCESSFUL_RETURN )\r\n\t\t\t\treturn THROWERROR( RET_SETUP_BOUND_FAILED );\r\n\t\t\tbreak;\r\n\r\n\t\tdefault:\r\n\t\t\treturn THROWERROR( RET_INVALID_ARGUMENTS );\r\n\t}\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\ts e t u p A l l F r e e\r\n */\r\nreturnValue Bounds::setupAllFree( )\r\n{\r\n\tint i;\r\n\r\n\t/* 1) Place unbounded variables at the beginning of the index list of free variables. */\r\n\tfor( i=0; i<nV; ++i )\r\n\t{\r\n\t\tif ( getType( i ) == ST_UNBOUNDED )\r\n\t\t{\r\n\t\t\tif ( setupBound( i,ST_INACTIVE ) != SUCCESSFUL_RETURN )\r\n\t\t\t\t\treturn THROWERROR( RET_SETUP_BOUND_FAILED );\r\n\t\t}\r\n\t}\r\n\r\n\t/* 2) Add remaining (i.e. bounded but possibly free) variables to the index list of free variables. */\r\n\tfor( i=0; i<nV; ++i )\r\n\t{\r\n\t\tif ( getType( i ) == ST_BOUNDED )\r\n\t\t{\r\n\t\t\tif ( setupBound( i,ST_INACTIVE ) != SUCCESSFUL_RETURN )\r\n\t\t\t\treturn THROWERROR( RET_SETUP_BOUND_FAILED );\r\n\t\t}\r\n\t}\r\n\r\n\t/* 3) Place implicitly fixed variables at the end of the index list of free variables. */\r\n\tfor( i=0; i<nV; ++i )\r\n\t{\r\n\t\tif ( getType( i ) == ST_EQUALITY )\r\n\t\t{\r\n\t\t\tif ( setupBound( i,ST_INACTIVE ) != SUCCESSFUL_RETURN )\r\n\t\t\t\treturn THROWERROR( RET_SETUP_BOUND_FAILED );\r\n\t\t}\r\n\t}\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\tm o v e F i x e d T o F r e e\r\n */\r\nreturnValue Bounds::moveFixedToFree( int _number )\r\n{\r\n\t/* consistency check */\r\n\tif ( ( _number < 0 ) || ( _number >= getNV( ) ) )\r\n\t\treturn THROWERROR( RET_INDEX_OUT_OF_BOUNDS );\r\n\r\n\t/* Move index from indexlist of fixed variables to that of free ones. */\r\n\tif ( this->removeIndex( this->getFixed( ),_number ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_MOVING_BOUND_FAILED );\r\n\r\n\tif ( this->addIndex( this->getFree( ),_number,ST_INACTIVE ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_MOVING_BOUND_FAILED );\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\tm o v e F r e e T o F i x e d\r\n */\r\nreturnValue Bounds::moveFreeToFixed(\tint _number, SubjectToStatus _status\r\n\t\t\t\t\t\t\t\t\t\t)\r\n{\r\n\t/* consistency check */\r\n\tif ( ( _number < 0 ) || ( _number >= getNV( ) ) )\r\n\t\treturn THROWERROR( RET_INDEX_OUT_OF_BOUNDS );\r\n\r\n\t/* Move index from indexlist of free variables to that of fixed ones. */\r\n\tif ( this->removeIndex( this->getFree( ),_number ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_MOVING_BOUND_FAILED );\r\n\r\n\tif ( this->addIndex( this->getFixed( ),_number,_status ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_MOVING_BOUND_FAILED );\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\ts w a p F r e e\r\n */\r\nreturnValue Bounds::swapFree(\tint number1, int number2\r\n\t\t\t\t\t\t\t\t)\r\n{\r\n\t/* consistency check */\r\n\tif ( ( number1 < 0 ) || ( number1 >= getNV( ) ) || ( number2 < 0 ) || ( number2 >= getNV( ) ) )\r\n\t\treturn THROWERROR( RET_INDEX_OUT_OF_BOUNDS );\r\n\r\n\t/* Swap index within indexlist of free variables. */\r\n\treturn this->swapIndex( this->getFree( ),number1,number2 );\r\n}\r\n\r\n\r\n/*\r\n *\tend of file\r\n */\r\n"
  },
  {
    "path": "externals/qpoases/SRC/Bounds.ipp",
    "content": "/*\r\n *\tThis file is part of qpOASES.\r\n *\r\n *\tqpOASES -- An Implementation of the Online Active Set Strategy.\r\n *\tCopyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.\r\n *\r\n *\tqpOASES is free software; you can redistribute it and/or\r\n *\tmodify it under the terms of the GNU Lesser General Public\r\n *\tLicense as published by the Free Software Foundation; either\r\n *\tversion 2.1 of the License, or (at your option) any later version.\r\n *\r\n *\tqpOASES is distributed in the hope that it will be useful,\r\n *\tbut WITHOUT ANY WARRANTY; without even the implied warranty of\r\n *\tMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n *\tLesser General Public License for more details.\r\n *\r\n *\tYou should have received a copy of the GNU Lesser General Public\r\n *\tLicense along with qpOASES; if not, write to the Free Software\r\n *\tFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r\n *\r\n */\r\n\r\n\r\n/**\r\n *\t\\file SRC/Bounds.ipp\r\n *\t\\author Hans Joachim Ferreau\r\n *\t\\version 1.3embedded\r\n *\t\\date 2007-2008\r\n *\r\n *\tImplementation of inlined member functions of the Bounds class designed \r\n *\tto manage working sets of bounds within a QProblem.\r\n */\r\n\r\n\r\n/*****************************************************************************\r\n *  P U B L I C                                                              *\r\n *****************************************************************************/\r\n\r\n/*\r\n *\tg e t N V\r\n */\r\ninline int Bounds::getNV( ) const\r\n{\r\n \treturn nV;\r\n}\r\n\r\n\r\n/*\r\n *\tg e t N F X\r\n */\r\ninline int Bounds::getNFV( ) const\r\n{\r\n \treturn nFV;\r\n}\r\n\r\n\r\n/*\r\n *\tg e t N B V\r\n */\r\ninline int Bounds::getNBV( ) const\r\n{\r\n \treturn nBV;\r\n}\r\n \r\n\r\n/*\r\n *\tg e t N U V\r\n */\r\ninline int Bounds::getNUV( ) const\r\n{\r\n\treturn nUV;\r\n}\r\n\r\n\r\n\r\n/*\r\n *\ts e t N F X\r\n */\r\ninline returnValue Bounds::setNFV( int n )\r\n{\r\n \tnFV = n;\r\n\treturn SUCCESSFUL_RETURN;\t\r\n}\r\n \r\n \r\n/*\r\n *\ts e t N B V\r\n */\r\ninline returnValue Bounds::setNBV( int n )\r\n{\r\n \tnBV = n;\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n \r\n\r\n/*\r\n *\ts e t N U V\r\n */\r\ninline returnValue Bounds::setNUV( int n )\r\n{\r\n\tnUV = n;\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\tg e t N F R\r\n */\r\ninline int Bounds::getNFR( )\r\n{\r\n \treturn free.getLength( );\r\n}\r\n\r\n\r\n/*\r\n *\tg e t N F X\r\n */\r\ninline int Bounds::getNFX( )\r\n{\r\n \treturn fixed.getLength( );\r\n}\r\n\r\n\r\n/*\r\n *\tg e t F r e e\r\n */\r\ninline Indexlist* Bounds::getFree( )\r\n{\r\n\treturn &free;\r\n}\r\n\r\n\r\n/*\r\n *\tg e t F i x e d\r\n */\r\ninline Indexlist* Bounds::getFixed( )\r\n{\r\n\treturn &fixed;\r\n}\r\n\r\n\r\n/*\r\n *\tend of file\r\n */\r\n"
  },
  {
    "path": "externals/qpoases/SRC/Constraints.cpp",
    "content": "/*\r\n *\tThis file is part of qpOASES.\r\n *\r\n *\tqpOASES -- An Implementation of the Online Active Set Strategy.\r\n *\tCopyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.\r\n *\r\n *\tqpOASES is free software; you can redistribute it and/or\r\n *\tmodify it under the terms of the GNU Lesser General Public\r\n *\tLicense as published by the Free Software Foundation; either\r\n *\tversion 2.1 of the License, or (at your option) any later version.\r\n *\r\n *\tqpOASES is distributed in the hope that it will be useful,\r\n *\tbut WITHOUT ANY WARRANTY; without even the implied warranty of\r\n *\tMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n *\tLesser General Public License for more details.\r\n *\r\n *\tYou should have received a copy of the GNU Lesser General Public\r\n *\tLicense along with qpOASES; if not, write to the Free Software\r\n *\tFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r\n *\r\n */\r\n\r\n\r\n/**\r\n *\t\\file SRC/Constraints.cpp\r\n *\t\\author Hans Joachim Ferreau\r\n *\t\\version 1.3embedded\r\n *\t\\date 2007-2008\r\n *\r\n *\tImplementation of the Constraints class designed to manage working sets of\r\n *\tconstraints within a QProblem.\r\n */\r\n\r\n\r\n#include <Constraints.hpp>\r\n\r\n\r\n/*****************************************************************************\r\n *  P U B L I C                                                              *\r\n *****************************************************************************/\r\n\r\n\r\n/*\r\n *\tC o n s t r a i n t s\r\n */\r\nConstraints::Constraints( ) :\tSubjectTo( ),\r\n\t\t\t\t\t\t\t\tnC( 0 ),\r\n\t\t\t\t\t\t\t\tnEC( 0 ),\r\n\t\t\t\t\t\t\t\tnIC( 0 ),\r\n\t\t\t\t\t\t\t\tnUC( 0 )\r\n{\r\n}\r\n\r\n\r\n/*\r\n *\tC o n s t r a i n t s\r\n */\r\nConstraints::Constraints( const Constraints& rhs ) :\tSubjectTo( rhs ),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnC( rhs.nC ),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnEC( rhs.nEC ),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnIC( rhs.nIC ),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnUC( rhs.nUC )\r\n{\r\n\tactive =   rhs.active;\r\n\tinactive = rhs.inactive;\r\n}\r\n\r\n\r\n/*\r\n *\t~ C o n s t r a i n t s\r\n */\r\nConstraints::~Constraints( )\r\n{\r\n}\r\n\r\n\r\n/*\r\n *\to p e r a t o r =\r\n */\r\nConstraints& Constraints::operator=( const Constraints& rhs )\r\n{\r\n\tif ( this != &rhs )\r\n\t{\r\n\t\tSubjectTo::operator=( rhs );\r\n\r\n\t\tnC  = rhs.nC;\r\n\t\tnEC = rhs.nEC;\r\n\t\tnIC = rhs.nIC;\r\n\t\tnUC = rhs.nUC;\r\n\r\n\t\tactive =   rhs.active;\r\n\t\tinactive = rhs.inactive;\r\n\t}\r\n\r\n\treturn *this;\r\n}\r\n\r\n\r\n/*\r\n *\ti n i t\r\n */\r\nreturnValue Constraints::init( int n )\r\n{\r\n\tnC = n;\r\n\tnEC = 0;\r\n\tnIC = 0;\r\n\tnUC = 0;\r\n\r\n\tactive.init( );\r\n\tinactive.init( );\r\n\r\n\treturn SubjectTo::init( n );\r\n}\r\n\r\n\r\n/*\r\n *\ts e t u p C o n s t r a i n t\r\n */\r\nreturnValue Constraints::setupConstraint(\tint _number, SubjectToStatus _status\r\n\t\t\t\t\t\t\t\t\t\t\t)\r\n{\r\n\t/* consistency check */\r\n\tif ( ( _number < 0 ) || ( _number >= getNC( ) ) )\r\n\t\treturn THROWERROR( RET_INDEX_OUT_OF_BOUNDS );\r\n\t\r\n\t/* Add constraint index to respective index list. */\r\n\tswitch ( _status )\r\n\t{\r\n\t\tcase ST_INACTIVE:\r\n\t\t\tif ( this->addIndex( this->getInactive( ),_number,_status ) != SUCCESSFUL_RETURN )\r\n\t\t\t\treturn THROWERROR( RET_SETUP_CONSTRAINT_FAILED );\r\n\t\t\tbreak;\r\n\r\n\t\tcase ST_LOWER:\r\n\t\t\tif ( this->addIndex( this->getActive( ),_number,_status ) != SUCCESSFUL_RETURN )\r\n\t\t\t\treturn THROWERROR( RET_SETUP_CONSTRAINT_FAILED );\r\n\t\t\tbreak;\r\n\r\n\t\tcase ST_UPPER:\r\n\t\t\tif ( this->addIndex( this->getActive( ),_number,_status ) != SUCCESSFUL_RETURN )\r\n\t\t\t\treturn THROWERROR( RET_SETUP_CONSTRAINT_FAILED );\r\n\t\t\tbreak;\r\n\r\n\t\tdefault:\r\n\t\t\treturn THROWERROR( RET_INVALID_ARGUMENTS );\r\n\t}\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\ts e t u p A l l I n a c t i v e\r\n */\r\nreturnValue Constraints::setupAllInactive( )\r\n{\r\n\tint i;\r\n\r\n\r\n\t/* 1) Place unbounded constraints at the beginning of the index list of inactive constraints. */\r\n\tfor( i=0; i<nC; ++i )\r\n\t{\r\n\t\tif ( getType( i ) == ST_UNBOUNDED )\r\n\t\t{\r\n\t\t\tif ( setupConstraint( i,ST_INACTIVE ) != SUCCESSFUL_RETURN )\r\n\t\t\t\treturn THROWERROR( RET_SETUP_CONSTRAINT_FAILED );\r\n\t\t}\r\n\t}\r\n\r\n\t/* 2) Add remaining (i.e. \"real\" inequality) constraints to the index list of inactive constraints. */\r\n\tfor( i=0; i<nC; ++i )\r\n\t{\r\n\t\tif ( getType( i ) == ST_BOUNDED )\r\n\t\t{\r\n\t\t\tif ( setupConstraint( i,ST_INACTIVE ) != SUCCESSFUL_RETURN )\r\n\t\t\t\treturn THROWERROR( RET_SETUP_CONSTRAINT_FAILED );\r\n\t\t}\r\n\t}\r\n\r\n\t/* 3) Place implicit equality constraints at the end of the index list of inactive constraints. */\r\n\tfor( i=0; i<nC; ++i )\r\n\t{\r\n\t\tif ( getType( i ) == ST_EQUALITY )\r\n\t\t{\r\n\t\t\tif ( setupConstraint( i,ST_INACTIVE ) != SUCCESSFUL_RETURN )\r\n\t\t\t\treturn THROWERROR( RET_SETUP_CONSTRAINT_FAILED );\r\n\t\t}\r\n\t}\r\n\r\n\t/* 4) Moreover, add all constraints of unknown type. */\r\n\tfor( i=0; i<nC; ++i )\r\n\t{\r\n\t\tif ( getType( i ) == ST_UNKNOWN )\r\n\t\t{\r\n\t\t\tif ( setupConstraint( i,ST_INACTIVE ) != SUCCESSFUL_RETURN )\r\n\t\t\t\treturn THROWERROR( RET_SETUP_CONSTRAINT_FAILED );\r\n\t\t}\r\n\t}\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\tm o v e A c t i v e T o I n a c t i v e\r\n */\r\nreturnValue Constraints::moveActiveToInactive( int _number )\r\n{\r\n\t/* consistency check */\r\n\tif ( ( _number < 0 ) || ( _number >= getNC( ) ) )\r\n\t\treturn THROWERROR( RET_INDEX_OUT_OF_BOUNDS );\r\n\r\n\t/* Move index from indexlist of active constraints to that of inactive ones. */\r\n\tif ( this->removeIndex( this->getActive( ),_number ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_MOVING_BOUND_FAILED );\r\n\r\n\tif ( this->addIndex( this->getInactive( ),_number,ST_INACTIVE ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_MOVING_BOUND_FAILED );\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\tm o v e I n a c t i v e T o A c t i v e\r\n */\r\nreturnValue Constraints::moveInactiveToActive(\tint _number, SubjectToStatus _status\r\n\t\t\t\t\t\t\t\t\t\t\t\t)\r\n{\r\n\t/* consistency check */\r\n\tif ( ( _number < 0 ) || ( _number >= getNC( ) ) )\r\n\t\treturn THROWERROR( RET_INDEX_OUT_OF_BOUNDS );\r\n\r\n\t/* Move index from indexlist of inactive constraints to that of active ones. */\r\n\tif ( this->removeIndex( this->getInactive( ),_number ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_MOVING_BOUND_FAILED );\r\n\r\n\tif ( this->addIndex( this->getActive( ),_number,_status ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_MOVING_BOUND_FAILED );\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n\r\n/*\r\n *\tend of file\r\n */\r\n"
  },
  {
    "path": "externals/qpoases/SRC/Constraints.ipp",
    "content": "/*\r\n *\tThis file is part of qpOASES.\r\n *\r\n *\tqpOASES -- An Implementation of the Online Active Set Strategy.\r\n *\tCopyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.\r\n *\r\n *\tqpOASES is free software; you can redistribute it and/or\r\n *\tmodify it under the terms of the GNU Lesser General Public\r\n *\tLicense as published by the Free Software Foundation; either\r\n *\tversion 2.1 of the License, or (at your option) any later version.\r\n *\r\n *\tqpOASES is distributed in the hope that it will be useful,\r\n *\tbut WITHOUT ANY WARRANTY; without even the implied warranty of\r\n *\tMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n *\tLesser General Public License for more details.\r\n *\r\n *\tYou should have received a copy of the GNU Lesser General Public\r\n *\tLicense along with qpOASES; if not, write to the Free Software\r\n *\tFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r\n *\r\n */\r\n\r\n\r\n/**\r\n *\t\\file SRC/Constraints.ipp\r\n *\t\\author Hans Joachim Ferreau\r\n *\t\\version 1.3embedded\r\n *\t\\date 2007-2008\r\n *\r\n *\tDeclaration of inlined member functions of the Constraints class designed \r\n *\tto manage working sets of constraints within a QProblem.\r\n */\r\n\r\n\r\n\r\n/*****************************************************************************\r\n *  P U B L I C                                                              *\r\n *****************************************************************************/\r\n\r\n/*\r\n *\tg e t N C\r\n */\r\ninline int Constraints::getNC( ) const\r\n{\r\n \treturn nC;\r\n}\r\n \r\n\r\n/*\r\n *\tg e t N E C\r\n */\r\ninline int Constraints::getNEC( ) const\r\n{\r\n \treturn nEC;\r\n}\r\n \r\n\r\n/*\r\n *\tg e t N I C\r\n */\r\ninline int Constraints::getNIC( ) const\r\n{\r\n \treturn nIC;\r\n}\r\n \r\n\r\n/*\r\n *\tg e t N U C\r\n */\r\ninline int Constraints::getNUC( ) const\r\n{\r\n \treturn nUC;\r\n}\r\n\r\n\r\n/*\r\n *\ts e t N E C\r\n */\r\ninline returnValue Constraints::setNEC( int n )\r\n{\r\n \tnEC = n;\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n \r\n\r\n/*\r\n *\ts e t N I C\r\n */\r\ninline returnValue Constraints::setNIC( int n )\r\n{\r\n \tnIC = n;\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\ts e t N U C\r\n */\r\ninline returnValue Constraints::setNUC( int n )\r\n{\r\n \tnUC = n;\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\tg e t N A C\r\n */\r\ninline int Constraints::getNAC( )\r\n{\r\n \treturn active.getLength( );\r\n}\r\n\r\n\r\n/*\r\n *\tg e t N I A C\r\n */\r\ninline int Constraints::getNIAC( )\r\n{\r\n \treturn inactive.getLength( );\r\n}\r\n\r\n\r\n/*\r\n *\tg e t A c t i v e\r\n */\r\ninline Indexlist* Constraints::getActive( )\r\n{\r\n\treturn &active;\r\n}\r\n\r\n\r\n/*\r\n *\tg e t I n a c t i v e\r\n */\r\ninline Indexlist* Constraints::getInactive( )\r\n{\r\n\treturn &inactive;\r\n}\r\n\r\n\r\n/*\r\n *\tend of file\r\n */\r\n"
  },
  {
    "path": "externals/qpoases/SRC/CyclingManager.cpp",
    "content": "/*\r\n *\tThis file is part of qpOASES.\r\n *\r\n *\tqpOASES -- An Implementation of the Online Active Set Strategy.\r\n *\tCopyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.\r\n *\r\n *\tqpOASES is free software; you can redistribute it and/or\r\n *\tmodify it under the terms of the GNU Lesser General Public\r\n *\tLicense as published by the Free Software Foundation; either\r\n *\tversion 2.1 of the License, or (at your option) any later version.\r\n *\r\n *\tqpOASES is distributed in the hope that it will be useful,\r\n *\tbut WITHOUT ANY WARRANTY; without even the implied warranty of\r\n *\tMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n *\tLesser General Public License for more details.\r\n *\r\n *\tYou should have received a copy of the GNU Lesser General Public\r\n *\tLicense along with qpOASES; if not, write to the Free Software\r\n *\tFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r\n *\r\n */\r\n\r\n\r\n/**\r\n *\t\\file SRC/CyclingManager.cpp\r\n *\t\\author Hans Joachim Ferreau\r\n *\t\\version 1.3embedded\r\n *\t\\date 2007-2008\r\n *\r\n *\tImplementation of the CyclingManager class designed to detect\r\n *\tand handle possible cycling during QP iterations.\r\n *\r\n */\r\n\r\n\r\n#include <CyclingManager.hpp>\r\n\r\n\r\n/*****************************************************************************\r\n *  P U B L I C                                                              *\r\n *****************************************************************************/\r\n\r\n\r\n/*\r\n *\tC y c l i n g M a n a g e r\r\n */\r\nCyclingManager::CyclingManager( ) :\tnV( 0 ),\r\n\t\t\t\t\t\t\t\t\tnC( 0 )\r\n{\r\n\tcyclingDetected = BT_FALSE;\r\n}\r\n\r\n\r\n/*\r\n *\tC y c l i n g M a n a g e r\r\n */\r\nCyclingManager::CyclingManager( const CyclingManager& rhs ) :\tnV( rhs.nV ),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnC( rhs.nC ),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcyclingDetected( rhs.cyclingDetected )\r\n{\r\n\tint i;\r\n\r\n\tfor( i=0; i<nV+nC; ++i )\r\n\t\tstatus[i] = rhs.status[i];\r\n}\r\n\r\n\r\n/*\r\n *\t~ C y c l i n g M a n a g e r\r\n */\r\nCyclingManager::~CyclingManager( )\r\n{\r\n}\r\n\r\n\r\n/*\r\n *\to p e r a t o r =\r\n */\r\nCyclingManager& CyclingManager::operator=( const CyclingManager& rhs )\r\n{\r\n\tint i;\r\n\r\n\tif ( this != &rhs )\r\n\t{\r\n\t\tnV = rhs.nV;\r\n\t\tnC = rhs.nC;\r\n\r\n\t\tfor( i=0; i<nV+nC; ++i )\r\n\t\t\tstatus[i] = rhs.status[i];\r\n\r\n\t\tcyclingDetected = rhs.cyclingDetected;\r\n\t}\r\n\r\n\treturn *this;\r\n}\r\n\r\n\r\n\r\n/*\r\n *\ti n i t\r\n */\r\nreturnValue CyclingManager::init( int _nV, int _nC )\r\n{\r\n\tnV = _nV;\r\n\tnC = _nC;\r\n\r\n\tcyclingDetected = BT_FALSE;\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n\r\n/*\r\n *\ts e t C y c l i n g S t a t u s\r\n */\r\nreturnValue CyclingManager::setCyclingStatus(\tint number,\r\n\t\t\t\t\t\t\t\t\t\t\t\tBooleanType isBound, CyclingStatus _status\r\n\t\t\t\t\t\t\t\t\t\t\t\t)\r\n{\r\n\tif ( isBound == BT_TRUE )\r\n\t{\r\n\t\t/* Set cycling status of a bound. */\r\n\t\tif ( ( number >= 0 ) && ( number < nV ) )\r\n\t\t{\r\n\t\t\tstatus[number] = _status;\r\n\t\t\treturn SUCCESSFUL_RETURN;\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn THROWERROR( RET_INDEX_OUT_OF_BOUNDS );\r\n\t}\r\n\telse\r\n\t{\r\n\t\t/* Set cycling status of a constraint. */\r\n\t\tif ( ( number >= 0 ) && ( number < nC ) )\r\n\t\t{\r\n\t\t\tstatus[nV+number] = _status;\r\n\t\t\treturn SUCCESSFUL_RETURN;\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn THROWERROR( RET_INDEX_OUT_OF_BOUNDS );\r\n\t}\r\n}\r\n\r\n\r\n/*\r\n *\tg e t C y c l i n g S t a t u s\r\n */\r\nCyclingStatus CyclingManager::getCyclingStatus( int number, BooleanType isBound ) const\r\n{\r\n\tif ( isBound == BT_TRUE )\r\n\t{\r\n\t\t/* Return cycling status of a bound. */\r\n\t\tif ( ( number >= 0 ) && ( number < nV ) )\r\n\t\t\treturn status[number];\r\n\t}\r\n\telse\r\n\t{\r\n\t\t/* Return cycling status of a constraint. */\r\n\t\tif ( ( number >= 0 ) && ( number < nC ) )\r\n\t\t\treturn status[nV+number];\r\n\t}\r\n\r\n\treturn CYC_NOT_INVOLVED;\r\n}\r\n\r\n\r\n/*\r\n *\tc l e a r C y c l i n g D a t a\r\n */\r\nreturnValue CyclingManager::clearCyclingData( )\r\n{\r\n\tint i;\r\n\r\n\t/* Reset all status values ... */\r\n\tfor( i=0; i<nV+nC; ++i )\r\n\t\tstatus[i] = CYC_NOT_INVOLVED;\r\n\r\n\t/* ... and the main cycling flag. */\r\n\tcyclingDetected = BT_FALSE;\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\tend of file\r\n */\r\n"
  },
  {
    "path": "externals/qpoases/SRC/CyclingManager.ipp",
    "content": "/*\r\n *\tThis file is part of qpOASES.\r\n *\r\n *\tqpOASES -- An Implementation of the Online Active Set Strategy.\r\n *\tCopyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.\r\n *\r\n *\tqpOASES is free software; you can redistribute it and/or\r\n *\tmodify it under the terms of the GNU Lesser General Public\r\n *\tLicense as published by the Free Software Foundation; either\r\n *\tversion 2.1 of the License, or (at your option) any later version.\r\n *\r\n *\tqpOASES is distributed in the hope that it will be useful,\r\n *\tbut WITHOUT ANY WARRANTY; without even the implied warranty of\r\n *\tMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n *\tLesser General Public License for more details.\r\n *\r\n *\tYou should have received a copy of the GNU Lesser General Public\r\n *\tLicense along with qpOASES; if not, write to the Free Software\r\n *\tFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r\n *\r\n */\r\n\r\n\r\n/**\r\n *\t\\file SRC/CyclingManager.ipp\r\n *\t\\author Hans Joachim Ferreau\r\n *\t\\version 1.3embedded\r\n *\t\\date 2007-2008\r\n *\r\n *\tImplementation of inlined member functions of the CyclingManager class \r\n *\tdesigned to detect and handle possible cycling during QP iterations.\r\n *\t\r\n */\r\n\r\n\r\n/*****************************************************************************\r\n *  P U B L I C                                                              *\r\n *****************************************************************************/\r\n\r\n/*\r\n *\ti s C y c l i n g D e t e c t e d\r\n */\r\ninline BooleanType CyclingManager::isCyclingDetected( ) const\r\n{\r\n\treturn cyclingDetected;\r\n}\r\n\r\n\r\n/*\r\n *\tend of file\r\n */\r\n"
  },
  {
    "path": "externals/qpoases/SRC/EXTRAS/SolutionAnalysis.cpp",
    "content": "/*\n *\tThis file is part of qpOASES.\n *\n *\tqpOASES -- An Implementation of the Online Active Set Strategy.\n *\tCopyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.\n *\n *\tqpOASES is free software; you can redistribute it and/or\n *\tmodify it under the terms of the GNU Lesser General Public\n *\tLicense as published by the Free Software Foundation; either\n *\tversion 2.1 of the License, or (at your option) any later version.\n *\n *\tqpOASES is distributed in the hope that it will be useful,\n *\tbut WITHOUT ANY WARRANTY; without even the implied warranty of\n *\tMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n *\tLesser General Public License for more details.\n *\n *\tYou should have received a copy of the GNU Lesser General Public\n *\tLicense along with qpOASES; if not, write to the Free Software\n *\tFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\n *\n */\n\n\n/**\n *\t\\file SRC/EXTRAS/SolutionAnalysis.cpp\n *\t\\author Milan Vukov, Boris Houska, Hans Joachim Ferreau\n *\t\\version 1.3embedded\n *\t\\date 2012\n *\n *\tSolution analysis class, based on a class in the standard version of the qpOASES\n */\n\n#include <EXTRAS/SolutionAnalysis.hpp>\n\n/*\n *\tS o l u t i o n A n a l y s i s\n */\nSolutionAnalysis::SolutionAnalysis( )\n{\n\t\n}\n\n/*\n *\tS o l u t i o n A n a l y s i s\n */\nSolutionAnalysis::SolutionAnalysis( const SolutionAnalysis& rhs )\n{\n\t\n}\n\n/*\n *\t~ S o l u t i o n A n a l y s i s\n */\nSolutionAnalysis::~SolutionAnalysis( )\n{\n\t\n}\n\n/*\n *\to p e r a t o r =\n */\nSolutionAnalysis& SolutionAnalysis::operator=( const SolutionAnalysis& rhs )\n{\n\tif ( this != &rhs )\n\t{\n\t\t\n\t}\n\t\n\treturn *this;\n}\n\n/*\n * g e t H e s s i a n I n v e r s e\n */\nreturnValue SolutionAnalysis::getHessianInverse( QProblem* qp, real_t* hessianInverse )\n{\n\treturnValue returnvalue; /* the return value */\n\tBooleanType Delta_bC_isZero = BT_FALSE; /* (just use FALSE here) */\n\tBooleanType Delta_bB_isZero = BT_FALSE; /* (just use FALSE here) */\n\t\n\tregister int run1, run2, run3;\n\t\n\tregister int nFR, nFX;\n\t\n\t/* Ask for the number of free and fixed variables, assumes that active set\n\t * is constant for the covariance evaluation */\n\tnFR = qp->getNFR( );\n\tnFX = qp->getNFX( );\n\t\n\t/* Ask for the corresponding index arrays: */\n\tif ( qp->bounds.getFree( )->getNumberArray( FR_idx ) != SUCCESSFUL_RETURN )\n\t\treturn THROWERROR( RET_HOTSTART_FAILED );\n\t\n\tif ( qp->bounds.getFixed( )->getNumberArray( FX_idx ) != SUCCESSFUL_RETURN )\n\t\treturn THROWERROR( RET_HOTSTART_FAILED );\n\t\n\tif ( qp->constraints.getActive( )->getNumberArray( AC_idx ) != SUCCESSFUL_RETURN )\n\t\treturn THROWERROR( RET_HOTSTART_FAILED );\n\t\n\t/* Initialization: */\n\tfor( run1 = 0; run1 < NVMAX; run1++ )\n\t\tdelta_g_cov[ run1 ] = 0.0;\n\t\n\tfor( run1 = 0; run1 < NVMAX; run1++ )\n\t\tdelta_lb_cov[ run1 ] = 0.0;\n\t\n\tfor( run1 = 0; run1 < NVMAX; run1++ )\n\t\tdelta_ub_cov[ run1 ] = 0.0;\n\t\n\tfor( run1 = 0; run1 < NCMAX; run1++ )\n\t\tdelta_lbA_cov[ run1 ] = 0.0;\n\t\n\tfor( run1 = 0; run1 < NCMAX; run1++ )\n\t\tdelta_ubA_cov[ run1 ] = 0.0;\n\t\n\t/* The following loop solves the following:\n\t *\n\t * KKT * x =\n\t *   [delta_g_cov', delta_lbA_cov', delta_ubA_cov', delta_lb_cov', delta_ub_cov]'\n\t *\n\t * for the first NVMAX (negative) elementary vectors in order to get\n\t * transposed inverse of the Hessian. Assuming that the Hessian is\n\t * symmetric, the function will return transposed inverse, instead of the\n\t * true inverse.\n\t *\n\t * Note, that we use negative elementary vectors due because internal\n\t * implementation of the function hotstart_determineStepDirection requires\n\t * so.\n\t *\n\t * */\n\t\n\tfor( run3 = 0; run3 < NVMAX; run3++ )\n\t{\n\t\t/* Line wise loading of the corresponding (negative) elementary vector: */\n\t\tdelta_g_cov[ run3 ] = -1.0;\n\t\t\n\t\t/* Evaluation of the step: */\n\t\treturnvalue = qp->hotstart_determineStepDirection(\n\t\t\tFR_idx, FX_idx, AC_idx,\n\t\t\tdelta_g_cov, delta_lbA_cov, delta_ubA_cov, delta_lb_cov, delta_ub_cov,\n\t\t\tDelta_bC_isZero, Delta_bB_isZero,\n\t\t\tdelta_xFX, delta_xFR, delta_yAC, delta_yFX\n\t\t\t);\n\t\tif ( returnvalue != SUCCESSFUL_RETURN )\n\t\t{\n\t\t\treturn returnvalue;\n\t\t}\n\t\t\n\t\t/* Line wise storage of the QP reaction: */\n\t\tfor( run1 = 0; run1 < nFR; run1++ )\n\t\t{\n\t\t\trun2 = FR_idx[ run1 ];\n\t\t\t\n\t\t\thessianInverse[run3 * NVMAX + run2] = delta_xFR[ run1 ];\n\t\t} \n\t\t\n\t\tfor( run1 = 0; run1 < nFX; run1++ )\n\t\t{ \n\t\t\trun2 = FX_idx[ run1 ];\n\t\t\t\n\t\t\thessianInverse[run3 * NVMAX + run2] = delta_xFX[ run1 ];\n\t\t}\n\t\t\n\t\t/* Prepare for the next iteration */\n\t\tdelta_g_cov[ run3 ] = 0.0;\n\t}\n\t\n\t// TODO: Perform the transpose of the inverse of the Hessian matrix\n\t\n\treturn SUCCESSFUL_RETURN; \n}\n\n/*\n * g e t H e s s i a n I n v e r s e\n */\nreturnValue SolutionAnalysis::getHessianInverse( QProblemB* qp, real_t* hessianInverse )\n{\n\treturnValue returnvalue; /* the return value */\n\tBooleanType Delta_bB_isZero = BT_FALSE; /* (just use FALSE here) */\n\t\n\tregister int run1, run2, run3;\n\t\n\tregister int nFR, nFX;\n\t\n\t/* Ask for the number of free and fixed variables, assumes that active set\n\t * is constant for the covariance evaluation */\n\tnFR = qp->getNFR( );\n\tnFX = qp->getNFX( );\n\t\n\t/* Ask for the corresponding index arrays: */\n\tif ( qp->bounds.getFree( )->getNumberArray( FR_idx ) != SUCCESSFUL_RETURN )\n\t\treturn THROWERROR( RET_HOTSTART_FAILED );\n\t\n\tif ( qp->bounds.getFixed( )->getNumberArray( FX_idx ) != SUCCESSFUL_RETURN )\n\t\treturn THROWERROR( RET_HOTSTART_FAILED );\n\t\n\t/* Initialization: */\n\tfor( run1 = 0; run1 < NVMAX; run1++ )\n\t\tdelta_g_cov[ run1 ] = 0.0;\n\t\n\tfor( run1 = 0; run1 < NVMAX; run1++ )\n\t\tdelta_lb_cov[ run1 ] = 0.0;\n\t\n\tfor( run1 = 0; run1 < NVMAX; run1++ )\n\t\tdelta_ub_cov[ run1 ] = 0.0;\n\t\n\t/* The following loop solves the following:\n\t *\n\t * KKT * x =\n\t *   [delta_g_cov', delta_lb_cov', delta_ub_cov']'\n\t *\n\t * for the first NVMAX (negative) elementary vectors in order to get\n\t * transposed inverse of the Hessian. Assuming that the Hessian is\n\t * symmetric, the function will return transposed inverse, instead of the\n\t * true inverse.\n\t *\n\t * Note, that we use negative elementary vectors due because internal\n\t * implementation of the function hotstart_determineStepDirection requires\n\t * so.\n\t *\n\t * */\n\t\n\tfor( run3 = 0; run3 < NVMAX; run3++ )\n\t{\n\t\t/* Line wise loading of the corresponding (negative) elementary vector: */\n\t\tdelta_g_cov[ run3 ] = -1.0;\n\t\t\n\t\t/* Evaluation of the step: */\n\t\treturnvalue = qp->hotstart_determineStepDirection(\n\t\t\tFR_idx, FX_idx,\n\t\t\tdelta_g_cov, delta_lb_cov, delta_ub_cov,\n\t\t\tDelta_bB_isZero,\n\t\t\tdelta_xFX, delta_xFR, delta_yFX\n\t\t\t);\n\t\tif ( returnvalue != SUCCESSFUL_RETURN )\n\t\t{\n\t\t\treturn returnvalue;\n\t\t}\n\t\t\t\t\n\t\t/* Line wise storage of the QP reaction: */\n\t\tfor( run1 = 0; run1 < nFR; run1++ )\n\t\t{\n\t\t\trun2 = FR_idx[ run1 ];\n\t\t\t\n\t\t\thessianInverse[run3 * NVMAX + run2] = delta_xFR[ run1 ];\n\t\t} \n\t\t\n\t\tfor( run1 = 0; run1 < nFX; run1++ )\n\t\t{ \n\t\t\trun2 = FX_idx[ run1 ];\n\t\t\t\n\t\t\thessianInverse[run3 * NVMAX + run2] = delta_xFX[ run1 ];\n\t\t}\n\t\t\n\t\t/* Prepare for the next iteration */\n\t\tdelta_g_cov[ run3 ] = 0.0;\n\t}\n\t\n\t// TODO: Perform the transpose of the inverse of the Hessian matrix\n\t\n\treturn SUCCESSFUL_RETURN; \n}\n\n/*\n * g e t V a r i a n c e C o v a r i a n c e\n */\n\n#if QPOASES_USE_OLD_VERSION\n\nreturnValue SolutionAnalysis::getVarianceCovariance( QProblem* qp, real_t* g_b_bA_VAR, real_t* Primal_Dual_VAR )\n{\n\tint run1, run2, run3; /* simple run variables (for loops). */\n\t\n\treturnValue returnvalue; /* the return value */\n\tBooleanType Delta_bC_isZero = BT_FALSE; /* (just use FALSE here) */\n\tBooleanType Delta_bB_isZero = BT_FALSE; /* (just use FALSE here) */\n\t\n\t/* ASK FOR THE NUMBER OF FREE AND FIXED VARIABLES:\n\t * (ASSUMES THAT ACTIVE SET IS CONSTANT FOR THE\n\t *  VARIANCE-COVARIANCE EVALUATION)\n\t * ----------------------------------------------- */\n\tint nFR, nFX, nAC;\n\t\n\tnFR = qp->getNFR( );\n\tnFX = qp->getNFX( );\n\tnAC = qp->getNAC( );\n\t\n\tif ( qp->bounds.getFree( )->getNumberArray( FR_idx ) != SUCCESSFUL_RETURN )\n\t\treturn THROWERROR( RET_HOTSTART_FAILED );\n\t\n\tif ( qp->bounds.getFixed( )->getNumberArray( FX_idx ) != SUCCESSFUL_RETURN )\n\t\treturn THROWERROR( RET_HOTSTART_FAILED );\n\t\n\tif ( qp->constraints.getActive( )->getNumberArray( AC_idx ) != SUCCESSFUL_RETURN )\n\t\treturn THROWERROR( RET_HOTSTART_FAILED );\n\t\n\t/* SOME INITIALIZATIONS:\n\t * --------------------- */\n\tfor( run1 = 0; run1 < KKT_DIM * KKT_DIM; run1++ )\n\t{\n\t\tK [run1] = 0.0;\n\t\tPrimal_Dual_VAR[run1] = 0.0;\n\t}\n\t\n\t/* ================================================================= */\n\t\n\t/* FIRST MATRIX MULTIPLICATION (OBTAINS THE INTERMEDIATE RESULT\n\t *  K := [ (\"ACTIVE\" KKT-MATRIX OF THE QP)^(-1) * g_b_bA_VAR ]^T )\n\t * THE EVALUATION OF THE INVERSE OF THE KKT-MATRIX OF THE QP\n\t * WITH RESPECT TO THE CURRENT ACTIVE SET\n\t * USES THE EXISTING CHOLESKY AND TQ-DECOMPOSITIONS. FOR DETAILS\n\t * cf. THE (protected) FUNCTION determineStepDirection. */\n\t\n\tfor( run3 = 0; run3 < KKT_DIM; run3++ )\n\t{\n\t\t\n\t\tfor( run1 = 0; run1 < NVMAX; run1++ )\n\t\t{\n\t\t\tdelta_g_cov [run1] = g_b_bA_VAR[run3*KKT_DIM+run1];\n\t\t\tdelta_lb_cov [run1] = g_b_bA_VAR[run3*KKT_DIM+NVMAX+run1]; /*  LINE-WISE LOADING OF THE INPUT */\n\t\t\tdelta_ub_cov [run1] = g_b_bA_VAR[run3*KKT_DIM+NVMAX+run1]; /*  VARIANCE-COVARIANCE            */\n\t\t}\n\t\tfor( run1 = 0; run1 < NCMAX; run1++ )\n\t\t{\n\t\t\tdelta_lbA_cov [run1] = g_b_bA_VAR[run3*KKT_DIM+2*NVMAX+run1];\n\t\t\tdelta_ubA_cov [run1] = g_b_bA_VAR[run3*KKT_DIM+2*NVMAX+run1];\n\t\t}\n\t\t\n\t\t/* EVALUATION OF THE STEP:\n\t\t * ------------------------------------------------------------------------------ */\n\t\t\n\t\treturnvalue = qp->hotstart_determineStepDirection(\n\t\t\tFR_idx, FX_idx, AC_idx,\n\t\t\tdelta_g_cov, delta_lbA_cov, delta_ubA_cov, delta_lb_cov, delta_ub_cov,\n\t\t\tDelta_bC_isZero, Delta_bB_isZero, delta_xFX,delta_xFR,\n\t\t\tdelta_yAC,delta_yFX );\n\t\t\n\t\t/* ------------------------------------------------------------------------------ */\n\t\t\n\t\t/* STOP THE ALGORITHM IN THE CASE OF NO SUCCESFUL RETURN:\n\t\t * ------------------------------------------------------ */\n\t\tif ( returnvalue != SUCCESSFUL_RETURN )\n\t\t{\n\t\t\treturn returnvalue;\n\t\t}\n\t\t\n\t\t/*  LINE WISE                  */\n\t\t/*  STORAGE OF THE QP-REACTION */\n\t\t/*  (uses the index list)      */\n\t\t\n\t\tfor( run1=0; run1<nFR; run1++ )\n\t\t{\n\t\t\trun2 = FR_idx[run1];\n\t\t\tK[run3*KKT_DIM+run2] = delta_xFR[run1];\n\t\t} \n\t\tfor( run1=0; run1<nFX; run1++ )\n\t\t{ \n\t\t\trun2 = FX_idx[run1]; \n\t\t\tK[run3*KKT_DIM+run2] = delta_xFX[run1];\n\t\t\tK[run3*KKT_DIM+NVMAX+run2] = delta_yFX[run1];\n\t\t}\n\t\tfor( run1=0; run1<nAC; run1++ )\n\t\t{\n\t\t\trun2 = AC_idx[run1];\n\t\t\tK[run3*KKT_DIM+2*NVMAX+run2] = delta_yAC[run1];\n\t\t}\n\t}\n\t\n\t/* ================================================================= */\n\t\n\t/* SECOND MATRIX MULTIPLICATION (OBTAINS THE FINAL RESULT\n\t * Primal_Dual_VAR := (\"ACTIVE\" KKT-MATRIX OF THE QP)^(-1) * K )\n\t * THE APPLICATION OF THE KKT-INVERSE IS AGAIN REALIZED\n\t * BY USING THE PROTECTED FUNCTION\n\t * determineStepDirection */\n\t\n\tfor( run3 = 0; run3 < KKT_DIM; run3++ )\n\t{\n\t\t\n\t\tfor( run1 = 0; run1 < NVMAX; run1++ )\n\t\t{\n\t\t\tdelta_g_cov [run1] = K[run3+ run1*KKT_DIM];\n\t\t\tdelta_lb_cov [run1] = K[run3+(NVMAX+run1)*KKT_DIM]; /*  ROW WISE LOADING OF THE */\n\t\t\tdelta_ub_cov [run1] = K[run3+(NVMAX+run1)*KKT_DIM]; /*  INTERMEDIATE RESULT K   */\n\t\t}\n\t\tfor( run1 = 0; run1 < NCMAX; run1++ )\n\t\t{\n\t\t\tdelta_lbA_cov [run1] = K[run3+(2*NVMAX+run1)*KKT_DIM];\n\t\t\tdelta_ubA_cov [run1] = K[run3+(2*NVMAX+run1)*KKT_DIM];\n\t\t}\n\t\t\n\t\t/* EVALUATION OF THE STEP:\n\t\t * ------------------------------------------------------------------------------ */\n\t\t\n\t\treturnvalue = qp->hotstart_determineStepDirection(\n\t\t\tFR_idx, FX_idx, AC_idx,\n\t\t\tdelta_g_cov, delta_lbA_cov, delta_ubA_cov, delta_lb_cov, delta_ub_cov,\n\t\t\tDelta_bC_isZero, Delta_bB_isZero, delta_xFX,delta_xFR,\n\t\t\tdelta_yAC,delta_yFX );\n\t\t\n\t\t/* ------------------------------------------------------------------------------ */\n\t\t\n\t\t/* STOP THE ALGORITHM IN THE CASE OF NO SUCCESFUL RETURN:\n\t\t * ------------------------------------------------------ */\n\t\tif ( returnvalue != SUCCESSFUL_RETURN )\n\t\t{\n\t\t\treturn returnvalue;\n\t\t}\n\t\t\n\t\t/*  ROW-WISE STORAGE */\n\t\t/*  OF THE RESULT.   */\n\t\t\n\t\tfor( run1=0; run1<nFR; run1++ )\n\t\t{\n\t\t\trun2 = FR_idx[run1];\n\t\t\tPrimal_Dual_VAR[run3+run2*KKT_DIM] = delta_xFR[run1];\n\t\t}\n\t\tfor( run1=0; run1<nFX; run1++ )\n\t\t{ \n\t\t\trun2 = FX_idx[run1]; \n\t\t\tPrimal_Dual_VAR[run3+run2*KKT_DIM ] = delta_xFX[run1];\n\t\t\tPrimal_Dual_VAR[run3+(NVMAX+run2)*KKT_DIM] = delta_yFX[run1];\n\t\t}\n\t\tfor( run1=0; run1<nAC; run1++ )\n\t\t{\n\t\t\trun2 = AC_idx[run1];\n\t\t\tPrimal_Dual_VAR[run3+(2*NVMAX+run2)*KKT_DIM] = delta_yAC[run1];\n\t\t}\n\t}\n\t\n\treturn SUCCESSFUL_RETURN;\n}\n\n#endif\n"
  },
  {
    "path": "externals/qpoases/SRC/Indexlist.cpp",
    "content": "/*\r\n *\tThis file is part of qpOASES.\r\n *\r\n *\tqpOASES -- An Implementation of the Online Active Set Strategy.\r\n *\tCopyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.\r\n *\r\n *\tqpOASES is free software; you can redistribute it and/or\r\n *\tmodify it under the terms of the GNU Lesser General Public\r\n *\tLicense as published by the Free Software Foundation; either\r\n *\tversion 2.1 of the License, or (at your option) any later version.\r\n *\r\n *\tqpOASES is distributed in the hope that it will be useful,\r\n *\tbut WITHOUT ANY WARRANTY; without even the implied warranty of\r\n *\tMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n *\tLesser General Public License for more details.\r\n *\r\n *\tYou should have received a copy of the GNU Lesser General Public\r\n *\tLicense along with qpOASES; if not, write to the Free Software\r\n *\tFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r\n *\r\n */\r\n\r\n\r\n/**\r\n *\t\\file SRC/Indexlist.cpp\r\n *\t\\author Hans Joachim Ferreau\r\n *\t\\version 1.3embedded\r\n *\t\\date 2007-2008\r\n *\r\n *\tImplementation of the Indexlist class designed to manage index lists of\r\n *\tconstraints and bounds within a QProblem_SubjectTo.\r\n */\r\n\r\n\r\n#include <Indexlist.hpp>\r\n\r\n\r\n/*****************************************************************************\r\n *  P U B L I C                                                              *\r\n *****************************************************************************/\r\n\r\n\r\n/*\r\n *\tI n d e x l i s t\r\n */\r\nIndexlist::Indexlist( ) :\tlength( 0 ),\r\n\t\t\t\t\t\t\tfirst( -1 ),\r\n\t\t\t\t\t\t\tlast( -1 ),\r\n\t\t\t\t\t\t\tlastusedindex( -1 ),\r\n\t\t\t\t\t\t\tphysicallength( INDEXLISTFACTOR*(NVMAX+NCMAX) )\r\n{\r\n\tint i;\r\n\r\n\tfor( i=0; i<physicallength; ++i )\r\n\t{\r\n\t\tnumber[i] = -1;\r\n\t\tnext[i] = -1;\r\n\t\tprevious[i] = -1;\r\n\t}\r\n}\r\n\r\n\r\n/*\r\n *\tI n d e x l i s t\r\n */\r\nIndexlist::Indexlist( const Indexlist& rhs ) :\tlength( rhs.length ),\r\n\t\t\t\t\t\t\t\t\t\t\t\tfirst( rhs.first ),\r\n\t\t\t\t\t\t\t\t\t\t\t\tlast( rhs.last ),\r\n\t\t\t\t\t\t\t\t\t\t\t\tlastusedindex( rhs.lastusedindex ),\r\n\t\t\t\t\t\t\t\t\t\t\t\tphysicallength( rhs.physicallength )\r\n{\r\n\tint i;\r\n\r\n\tfor( i=0; i<physicallength; ++i )\r\n\t{\r\n\t\tnumber[i] = rhs.number[i];\r\n\t\tnext[i] = rhs.next[i];\r\n\t\tprevious[i] = rhs.previous[i];\r\n\t}\r\n}\r\n\r\n\r\n/*\r\n *\t~ I n d e x l i s t\r\n */\r\nIndexlist::~Indexlist( )\r\n{\r\n}\r\n\r\n\r\n/*\r\n *\to p e r a t o r =\r\n */\r\nIndexlist& Indexlist::operator=( const Indexlist& rhs )\r\n{\r\n\tint i;\r\n\r\n\tif ( this != &rhs )\r\n\t{\r\n\t\tlength = rhs.length;\r\n\t\tfirst = rhs.first;\r\n\t\tlast = rhs.last;\r\n\t\tlastusedindex = rhs.lastusedindex;\r\n\t\tphysicallength = rhs.physicallength;\r\n\r\n\t\tfor( i=0; i<physicallength; ++i )\r\n\t\t{\r\n\t\t\tnumber[i] = rhs.number[i];\r\n\t\t\tnext[i] = rhs.next[i];\r\n\t\t\tprevious[i] = rhs.previous[i];\r\n\t\t}\r\n\t}\r\n\r\n\treturn *this;\r\n}\r\n\r\n\r\n/*\r\n *\ti n i t\r\n */\r\nreturnValue Indexlist::init( )\r\n{\r\n\tint i;\r\n\r\n\tlength = 0;\r\n\tfirst = -1;\r\n\tlast = -1;\r\n\tlastusedindex = -1;\r\n\tphysicallength = INDEXLISTFACTOR*(NVMAX+NCMAX);\r\n\r\n\tfor( i=0; i<physicallength; ++i )\r\n\t{\r\n\t\tnumber[i] = -1;\r\n\t\tnext[i] = -1;\r\n\t\tprevious[i] = -1;\r\n\t}\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\tg e t N u m b e r A r r a y\r\n */\r\nreturnValue Indexlist::getNumberArray( int* const numberarray ) const\r\n{\r\n\tint i;\r\n\tint n = first;\r\n\r\n\t/* Run trough indexlist and store numbers in numberarray. */\r\n\tfor( i=0; i<length; ++i )\r\n\t{\r\n\t\tif ( ( n >= 0 ) && ( number[n] >= 0 ) )\r\n\t\t\tnumberarray[i] = number[n];\r\n\t\telse\r\n\t\t\treturn THROWERROR( RET_INDEXLIST_CORRUPTED );\r\n\r\n\t\tn = next[n];\r\n\t}\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\tg e t I n d e x\r\n */\r\nint Indexlist::getIndex( int givennumber ) const\r\n{\r\n\tint i;\r\n\tint n = first;\r\n\tint index = -1;\t/* return -1 by default */\r\n\r\n\t/* Run trough indexlist until number is found, if so return it index. */\r\n\tfor ( i=0; i<length; ++i )\r\n\t{\r\n\t\tif ( number[n] == givennumber )\r\n\t\t{\r\n\t\t\tindex = i;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tn = next[n];\r\n\t}\r\n\r\n\treturn index;\r\n}\r\n\r\n\r\n/*\r\n *\tg e t P h y s i c a l I n d e x\r\n */\r\nint Indexlist::getPhysicalIndex( int givennumber ) const\r\n{\r\n\tint i;\r\n\tint n = first;\r\n\tint index = -1;\t/* return -1 by default */\r\n\r\n\t/* Run trough indexlist until number is found, if so return it physicalindex. */\r\n\tfor ( i=0; i<length; ++i )\r\n\t{\r\n\t\tif ( number[n] == givennumber )\r\n\t\t{\r\n\t\t\tindex = n;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tn = next[n];\r\n\t}\r\n\r\n\treturn index;\r\n}\r\n\r\n\r\n/*\r\n *\ta d d N u m b e r\r\n */\r\nreturnValue Indexlist::addNumber( int addnumber )\r\n{\r\n\tint i;\r\n\r\n\tif ( lastusedindex+1 < physicallength )\r\n\t{\r\n\t\t/* If there is enough storage, add number to indexlist. */\r\n\t\t++lastusedindex;\r\n\t\tnumber[lastusedindex] = addnumber;\r\n\t\tnext[lastusedindex] = 0;\r\n\r\n\t\tif ( length == 0 )\r\n\t\t{\r\n\t\t\tfirst = lastusedindex;\r\n\t\t\tprevious[lastusedindex] = 0;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tnext[last] = lastusedindex;\r\n\t\t\tprevious[lastusedindex] = last;\r\n\t\t}\r\n\r\n\t\tlast = lastusedindex;\r\n\t\t++length;\r\n\r\n\t\treturn SUCCESSFUL_RETURN;\r\n\t}\r\n\telse\r\n\t{\r\n\t\t/* Rearrangement of index list necessary! */\r\n\t\tif ( length == physicallength )\r\n\t\t\treturn THROWERROR( RET_INDEXLIST_EXCEEDS_MAX_LENGTH );\r\n\t\telse\r\n\t\t{\r\n\t\t\tint numberArray[NVMAX+NCMAX];\r\n\t\t\tgetNumberArray( numberArray );\r\n\r\n\t\t\t/* copy existing elements */\r\n\t\t\tfor ( i=0; i<length; ++i )\r\n\t\t\t{\r\n\t\t\t\tnumber[i] = numberArray[i];\r\n\t\t\t\tnext[i] = i+1;\r\n\t\t\t\tprevious[i] = i-1;\r\n\t\t\t}\r\n\r\n\t\t\t/* add new number at end of list */\r\n\t\t\tnumber[length] = addnumber;\r\n\t\t\tnext[length] = -1;\r\n\t\t\tprevious[length] = length-1;\r\n\r\n\t\t\t/* and set remaining entries to empty */\r\n\t\t\tfor ( i=length+1; i<physicallength; ++i )\r\n\t\t\t{\r\n\t\t\t\tnumber[i] = -1;\r\n\t\t\t\tnext[i] = -1;\r\n\t\t\t\tprevious[i] = -1;\r\n\t\t\t}\r\n\r\n\t\t\tfirst = 0;\r\n\t\t\tlast = length;\r\n\t\t\tlastusedindex = length;\r\n\t\t\t++length;\r\n\r\n\t\t\treturn THROWWARNING( RET_INDEXLIST_MUST_BE_REORDERD );\r\n\t\t}\r\n\t}\r\n}\r\n\r\n\r\n/*\r\n *\tr e m o v e N u m b e r\r\n */\r\nreturnValue Indexlist::removeNumber( int removenumber )\r\n{\r\n\tint i = getPhysicalIndex( removenumber );\r\n\r\n\t/* nothing to be done if number is not contained in index set */\r\n\tif ( i < 0 )\r\n\t\treturn SUCCESSFUL_RETURN;\r\n\r\n\tint p = previous[i];\r\n\tint n = next[i];\r\n\r\n\tif ( i == last )\r\n\t\tlast = p;\r\n\telse\r\n\t\tprevious[n] = p;\r\n\r\n\tif ( i == first )\r\n\t\tfirst = n;\r\n\telse\r\n\t\tnext[p] = n;\r\n\r\n\tnumber[i] = -1;\r\n\tnext[i] = -1;\r\n\tprevious[i] = -1;\r\n\t--length;\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\ts w a p N u m b e r s\r\n */\r\nreturnValue Indexlist::swapNumbers( int number1, int number2 )\r\n{\r\n\tint index1 = getPhysicalIndex( number1 );\r\n\tint index2 = getPhysicalIndex( number2 );\r\n\r\n\t/* consistency check */\r\n\tif ( ( index1 < 0 ) || ( index2 < 0 ) )\r\n\t\treturn THROWERROR( RET_INDEXLIST_CORRUPTED );\r\n\r\n\tint tmp = number[index1];\r\n\tnumber[index1] = number[index2];\r\n\tnumber[index2] = tmp;\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\tend of file\r\n */\r\n"
  },
  {
    "path": "externals/qpoases/SRC/Indexlist.ipp",
    "content": "/*\r\n *\tThis file is part of qpOASES.\r\n *\r\n *\tqpOASES -- An Implementation of the Online Active Set Strategy.\r\n *\tCopyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.\r\n *\r\n *\tqpOASES is free software; you can redistribute it and/or\r\n *\tmodify it under the terms of the GNU Lesser General Public\r\n *\tLicense as published by the Free Software Foundation; either\r\n *\tversion 2.1 of the License, or (at your option) any later version.\r\n *\r\n *\tqpOASES is distributed in the hope that it will be useful,\r\n *\tbut WITHOUT ANY WARRANTY; without even the implied warranty of\r\n *\tMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n *\tLesser General Public License for more details.\r\n *\r\n *\tYou should have received a copy of the GNU Lesser General Public\r\n *\tLicense along with qpOASES; if not, write to the Free Software\r\n *\tFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r\n *\r\n */\r\n\r\n\r\n/**\r\n *\t\\file SRC/Indexlist.ipp\r\n *\t\\author Hans Joachim Ferreau\r\n *\t\\version 1.3embedded\r\n *\t\\date 2007-2008\r\n *\r\n *\tImplementation of inlined member functions of the Indexlist class designed \r\n *\tto manage index lists of constraints and bounds within a QProblem_SubjectTo.\r\n */\r\n\r\n\r\n\r\n/*****************************************************************************\r\n *  P U B L I C                                                              *\r\n *****************************************************************************/\r\n\r\n/*\r\n *\tg e t N u m b e r\r\n */\r\ninline int Indexlist::getNumber( int physicalindex ) const\r\n{\r\n\t/* consistency check */\r\n\tif ( ( physicalindex < 0 ) || ( physicalindex > length ) )\r\n\t\treturn -RET_INDEXLIST_OUTOFBOUNDS;\r\n\r\n\treturn number[physicalindex];\r\n}\r\n\r\n\r\n/*\r\n *\tg e t L e n g t h\r\n */\r\ninline int Indexlist::getLength( )\r\n{\r\n\treturn length;\r\n}\r\n\r\n\r\n/*\r\n *\tg e t L a s t N u m b e r\r\n */\r\ninline int Indexlist::getLastNumber( ) const\r\n{\r\n\treturn number[last];\r\n}\r\n\r\n\r\n/*\r\n *\tg e t L a s t N u m b e r\r\n */\r\ninline BooleanType Indexlist::isMember( int _number ) const\r\n{\r\n\tif ( getIndex( _number ) >= 0 )\r\n\t\treturn BT_TRUE;\r\n\telse\r\n\t\treturn BT_FALSE;\r\n}\r\n\r\n\r\n/*\r\n *\tend of file\r\n */\r\n"
  },
  {
    "path": "externals/qpoases/SRC/MessageHandling.cpp",
    "content": "/*\r\n *\tThis file is part of qpOASES.\r\n *\r\n *\tqpOASES -- An Implementation of the Online Active Set Strategy.\r\n *\tCopyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.\r\n *\r\n *\tqpOASES is free software; you can redistribute it and/or\r\n *\tmodify it under the terms of the GNU Lesser General Public\r\n *\tLicense as published by the Free Software Foundation; either\r\n *\tversion 2.1 of the License, or (at your option) any later version.\r\n *\r\n *\tqpOASES is distributed in the hope that it will be useful,\r\n *\tbut WITHOUT ANY WARRANTY; without even the implied warranty of\r\n *\tMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n *\tLesser General Public License for more details.\r\n *\r\n *\tYou should have received a copy of the GNU Lesser General Public\r\n *\tLicense along with qpOASES; if not, write to the Free Software\r\n *\tFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r\n *\r\n */\r\n\r\n\r\n/**\r\n *\t\\file SRC/MessageHandling.cpp\r\n *\t\\author Hans Joachim Ferreau\r\n *\t\\version 1.3embedded\r\n *\t\\date 2007-2008\r\n *\r\n *\tImplementation of the MessageHandling class including global return values.\r\n *\r\n */\r\n\r\n\r\n\r\n#include <MessageHandling.hpp>\r\n#include <Utils.hpp>\r\n\r\n\r\n\r\n\r\n/** Defines pairs of global return values and messages. */\r\nMessageHandling::ReturnValueList returnValueList[] =\r\n{\r\n/* miscellaneous */\r\n{ SUCCESSFUL_RETURN, \"Successful return\", VS_VISIBLE },\r\n{ RET_DIV_BY_ZERO, \"Division by zero\", VS_VISIBLE },\r\n{ RET_INDEX_OUT_OF_BOUNDS, \"Index out of bounds\", VS_VISIBLE },\r\n{ RET_INVALID_ARGUMENTS, \"At least one of the arguments is invalid\", VS_VISIBLE },\r\n{ RET_ERROR_UNDEFINED, \"Error number undefined\", VS_VISIBLE },\r\n{ RET_WARNING_UNDEFINED, \"Warning number undefined\", VS_VISIBLE },\r\n{ RET_INFO_UNDEFINED, \"Info number undefined\", VS_VISIBLE },\r\n{ RET_EWI_UNDEFINED, \"Error/warning/info number undefined\", VS_VISIBLE },\r\n{ RET_AVAILABLE_WITH_LINUX_ONLY, \"This function is available under Linux only\", VS_HIDDEN },\r\n{ RET_UNKNOWN_BUG, \"The error occured is not yet known\", VS_VISIBLE },\r\n{ RET_PRINTLEVEL_CHANGED, \"Print level changed\", VS_VISIBLE },\r\n{ RET_NOT_YET_IMPLEMENTED, \"Requested function is not yet implemented.\", VS_VISIBLE },\r\n/* Indexlist */\r\n{ RET_INDEXLIST_MUST_BE_REORDERD, \"Index list has to be reordered\", VS_VISIBLE },\r\n{ RET_INDEXLIST_EXCEEDS_MAX_LENGTH, \"Index list exceeds its maximal physical length\", VS_VISIBLE },\r\n{ RET_INDEXLIST_CORRUPTED, \"Index list corrupted\", VS_VISIBLE },\r\n{ RET_INDEXLIST_OUTOFBOUNDS, \"Physical index is out of bounds\", VS_VISIBLE },\r\n{ RET_INDEXLIST_ADD_FAILED, \"Adding indices from another index set failed\", VS_VISIBLE },\r\n{ RET_INDEXLIST_INTERSECT_FAILED, \"Intersection with another index set failed\", VS_VISIBLE },\r\n/* SubjectTo / Bounds / Constraints */\r\n{ RET_INDEX_ALREADY_OF_DESIRED_STATUS, \"Index is already of desired status\", VS_VISIBLE },\r\n{ RET_SWAPINDEX_FAILED, \"Cannot swap between different indexsets\", VS_VISIBLE },\r\n{ RET_ADDINDEX_FAILED, \"Adding index to index set failed\", VS_VISIBLE },\r\n{ RET_NOTHING_TO_DO, \"Nothing to do\", VS_VISIBLE },\r\n{ RET_SETUP_BOUND_FAILED, \"Setting up bound index failed\", VS_VISIBLE },\r\n{ RET_SETUP_CONSTRAINT_FAILED, \"Setting up constraint index failed\", VS_VISIBLE },\r\n{ RET_MOVING_BOUND_FAILED, \"Moving bound between index sets failed\", VS_VISIBLE },\r\n{ RET_MOVING_CONSTRAINT_FAILED, \"Moving constraint between index sets failed\", VS_VISIBLE },\r\n/* QProblem */\r\n{ RET_QP_ALREADY_INITIALISED, \"QProblem has already been initialised\", VS_VISIBLE },\r\n{ RET_NO_INIT_WITH_STANDARD_SOLVER, \"Initialisation via extern QP solver is not yet implemented\", VS_VISIBLE },\r\n{ RET_RESET_FAILED, \"Reset failed\", VS_VISIBLE },\r\n{ RET_INIT_FAILED, \"Initialisation failed\", VS_VISIBLE },\r\n{ RET_INIT_FAILED_TQ, \"Initialisation failed due to TQ factorisation\", VS_VISIBLE },\r\n{ RET_INIT_FAILED_CHOLESKY, \"Initialisation failed due to Cholesky decomposition\", VS_VISIBLE },\r\n{ RET_INIT_FAILED_HOTSTART, \"Initialisation failed! QP could not be solved!\", VS_VISIBLE },\r\n{ RET_INIT_FAILED_INFEASIBILITY, \"Initial QP could not be solved due to infeasibility!\", VS_VISIBLE },\r\n{ RET_INIT_FAILED_UNBOUNDEDNESS, \"Initial QP could not be solved due to unboundedness!\", VS_VISIBLE },\r\n{ RET_INIT_SUCCESSFUL, \"Initialisation done\", VS_VISIBLE },\r\n{ RET_OBTAINING_WORKINGSET_FAILED, \"Failed to obtain working set for auxiliary QP\", VS_VISIBLE },\r\n{ RET_SETUP_WORKINGSET_FAILED, \"Failed to setup working set for auxiliary QP\", VS_VISIBLE },\r\n{ RET_SETUP_AUXILIARYQP_FAILED, \"Failed to setup auxiliary QP for initialised homotopy\", VS_VISIBLE },\r\n{ RET_NO_EXTERN_SOLVER, \"No extern QP solver available\", VS_VISIBLE },\r\n{ RET_QP_UNBOUNDED, \"QP is unbounded\", VS_VISIBLE },\r\n{ RET_QP_INFEASIBLE, \"QP is infeasible\", VS_VISIBLE },\r\n{ RET_QP_NOT_SOLVED, \"Problems occured while solving QP with standard solver\", VS_VISIBLE },\r\n{ RET_QP_SOLVED, \"QP successfully solved\", VS_VISIBLE },\r\n{ RET_UNABLE_TO_SOLVE_QP, \"Problems occured while solving QP\", VS_VISIBLE },\r\n{ RET_INITIALISATION_STARTED, \"Starting problem initialisation...\", VS_VISIBLE },\r\n{ RET_HOTSTART_FAILED, \"Unable to perform homotopy due to internal error\", VS_VISIBLE },\r\n{ RET_HOTSTART_FAILED_TO_INIT, \"Unable to initialise problem\", VS_VISIBLE },\r\n{ RET_HOTSTART_FAILED_AS_QP_NOT_INITIALISED, \"Unable to perform homotopy as previous QP is not solved\", VS_VISIBLE },\r\n{ RET_ITERATION_STARTED, \"Iteration\", VS_VISIBLE },\r\n{ RET_SHIFT_DETERMINATION_FAILED, \"Determination of shift of the QP data failed\", VS_VISIBLE },\r\n{ RET_STEPDIRECTION_DETERMINATION_FAILED, \"Determination of step direction failed\", VS_VISIBLE },\r\n{ RET_STEPLENGTH_DETERMINATION_FAILED, \"Determination of step direction failed\", VS_VISIBLE },\r\n{ RET_OPTIMAL_SOLUTION_FOUND, \"Optimal solution of neighbouring QP found\", VS_VISIBLE },\r\n{ RET_HOMOTOPY_STEP_FAILED, \"Unable to perform homotopy step\", VS_VISIBLE },\r\n{ RET_HOTSTART_STOPPED_INFEASIBILITY, \"Premature homotopy termination because QP is infeasible\", VS_VISIBLE },\r\n{ RET_HOTSTART_STOPPED_UNBOUNDEDNESS, \"Premature homotopy termination because QP is unbounded\", VS_VISIBLE },\r\n{ RET_WORKINGSET_UPDATE_FAILED, \"Unable to update working sets according to initial guesses\", VS_VISIBLE },\r\n{ RET_MAX_NWSR_REACHED, \"Maximum number of working set recalculations performed\", VS_VISIBLE },\r\n{ RET_CONSTRAINTS_NOT_SPECIFIED, \"Problem does comprise constraints! You have to specify new constraints' bounds\", VS_VISIBLE },\r\n{ RET_INVALID_FACTORISATION_FLAG, \"Invalid factorisation flag\", VS_VISIBLE },\r\n{ RET_UNABLE_TO_SAVE_QPDATA, \"Unable to save QP data\", VS_VISIBLE },\r\n{ RET_STEPDIRECTION_FAILED_TQ, \"Abnormal termination due to TQ factorisation\", VS_VISIBLE },\r\n{ RET_STEPDIRECTION_FAILED_CHOLESKY, \"Abnormal termination due to Cholesky factorisation\", VS_VISIBLE },\r\n{ RET_CYCLING_DETECTED, \"Cycling detected\", VS_VISIBLE },\r\n{ RET_CYCLING_NOT_RESOLVED, \"Cycling cannot be resolved, QP is probably infeasible\", VS_VISIBLE },\r\n{ RET_CYCLING_RESOLVED, \"Cycling probably resolved\", VS_VISIBLE },\r\n{ RET_STEPSIZE, \"\", VS_VISIBLE },\r\n{ RET_STEPSIZE_NONPOSITIVE, \"\", VS_VISIBLE },\r\n{ RET_SETUPSUBJECTTOTYPE_FAILED, \"Setup of SubjectToTypes failed\", VS_VISIBLE },\r\n{ RET_ADDCONSTRAINT_FAILED, \"Addition of constraint to working set failed\", VS_VISIBLE },\r\n{ RET_ADDCONSTRAINT_FAILED_INFEASIBILITY, \"Addition of constraint to working set failed\", VS_VISIBLE },\r\n{ RET_ADDBOUND_FAILED, \"Addition of bound to working set failed\", VS_VISIBLE },\r\n{ RET_ADDBOUND_FAILED_INFEASIBILITY, \"Addition of bound to working set failed\", VS_VISIBLE },\r\n{ RET_REMOVECONSTRAINT_FAILED, \"Removal of constraint from working set failed\", VS_VISIBLE },\r\n{ RET_REMOVEBOUND_FAILED, \"Removal of bound from working set failed\", VS_VISIBLE },\r\n{ RET_REMOVE_FROM_ACTIVESET, \"Removing from active set:\", VS_VISIBLE },\r\n{ RET_ADD_TO_ACTIVESET, \"Adding to active set:\", VS_VISIBLE },\r\n{ RET_REMOVE_FROM_ACTIVESET_FAILED, \"Removing from active set failed\", VS_VISIBLE },\r\n{ RET_ADD_TO_ACTIVESET_FAILED, \"Adding to active set failed\", VS_VISIBLE },\r\n{ RET_CONSTRAINT_ALREADY_ACTIVE, \"Constraint is already active\", VS_VISIBLE },\r\n{ RET_ALL_CONSTRAINTS_ACTIVE, \"All constraints are active, no further constraint can be added\", VS_VISIBLE },\r\n{ RET_LINEARLY_DEPENDENT, \"New bound/constraint is linearly dependent\", VS_VISIBLE },\r\n{ RET_LINEARLY_INDEPENDENT, \"New bound/constraint is linearly independent\", VS_VISIBLE },\r\n{ RET_LI_RESOLVED, \"Linear independence of active contraint matrix successfully resolved\", VS_VISIBLE },\r\n{ RET_ENSURELI_FAILED, \"Failed to ensure linear indepence of active contraint matrix\", VS_VISIBLE },\r\n{ RET_ENSURELI_FAILED_TQ, \"Abnormal termination due to TQ factorisation\", VS_VISIBLE },\r\n{ RET_ENSURELI_FAILED_NOINDEX, \"No index found, QP is probably infeasible\", VS_VISIBLE },\r\n{ RET_ENSURELI_FAILED_CYCLING, \"Cycling detected, QP is probably infeasible\", VS_VISIBLE },\r\n{ RET_BOUND_ALREADY_ACTIVE, \"Bound is already active\", VS_VISIBLE },\r\n{ RET_ALL_BOUNDS_ACTIVE, \"All bounds are active, no further bound can be added\", VS_VISIBLE },\r\n{ RET_CONSTRAINT_NOT_ACTIVE, \"Constraint is not active\", VS_VISIBLE },\r\n{ RET_BOUND_NOT_ACTIVE, \"Bound is not active\", VS_VISIBLE },\r\n{ RET_HESSIAN_NOT_SPD, \"Projected Hessian matrix not positive definite\", VS_VISIBLE },\r\n{ RET_MATRIX_SHIFT_FAILED, \"Unable to update matrices or to transform vectors\", VS_VISIBLE },\r\n{ RET_MATRIX_FACTORISATION_FAILED, \"Unable to calculate new matrix factorisations\", VS_VISIBLE },\r\n{ RET_PRINT_ITERATION_FAILED, \"Unable to print information on current iteration\", VS_VISIBLE },\r\n{ RET_NO_GLOBAL_MESSAGE_OUTPUTFILE, \"No global message output file initialised\", VS_VISIBLE },\r\n/* Utils */\r\n{ RET_UNABLE_TO_OPEN_FILE, \"Unable to open file\", VS_VISIBLE },\r\n{ RET_UNABLE_TO_WRITE_FILE, \"Unable to write into file\", VS_VISIBLE },\r\n{ RET_UNABLE_TO_READ_FILE, \"Unable to read from file\", VS_VISIBLE },\r\n{ RET_FILEDATA_INCONSISTENT, \"File contains inconsistent data\", VS_VISIBLE },\r\n/* SolutionAnalysis */\r\n{ RET_NO_SOLUTION, \"QP solution does not satisfy KKT optimality conditions\", VS_VISIBLE },\r\n{ RET_INACCURATE_SOLUTION, \"KKT optimality conditions not satisfied to sufficient accuracy\", VS_VISIBLE },\r\n{ TERMINAL_LIST_ELEMENT, \"\", VS_HIDDEN } /* IMPORTANT: Terminal list element! */\r\n};\r\n\r\n\r\n\r\n/*****************************************************************************\r\n *  P U B L I C                                                              *\r\n *****************************************************************************/\r\n\r\n\r\n/*\r\n *\tM e s s a g e H a n d l i n g\r\n */\r\nMessageHandling::MessageHandling( ) :\terrorVisibility( VS_VISIBLE ),\r\n\t\t\t\t\t\t\t\t\t\twarningVisibility( VS_VISIBLE ),\r\n\t\t\t\t\t\t\t\t\t\tinfoVisibility( VS_VISIBLE ),\r\n\t\t\t\t\t\t\t\t\t\toutputFile( myStdout ),\r\n\t\t\t\t\t\t\t\t\t\terrorCount( 0 )\r\n{\r\n}\r\n\r\n/*\r\n *\tM e s s a g e H a n d l i n g\r\n */\r\nMessageHandling::MessageHandling( myFILE* _outputFile ) :\r\n\t\t\t\t\t\t\t\t\t\terrorVisibility( VS_VISIBLE ),\r\n\t\t\t\t\t\t\t\t\t\twarningVisibility( VS_VISIBLE ),\r\n\t\t\t\t\t\t\t\t\t\tinfoVisibility( VS_VISIBLE ),\r\n\t\t\t\t\t\t\t\t\t\toutputFile( _outputFile ),\r\n\t\t\t\t\t\t\t\t\t\terrorCount( 0 )\r\n{\r\n}\r\n\r\n/*\r\n *\tM e s s a g e H a n d l i n g\r\n */\r\nMessageHandling::MessageHandling(\tVisibilityStatus _errorVisibility,\r\n\t\t\t\t\t\t\t\t\tVisibilityStatus _warningVisibility,\r\n\t\t \t\t\t\t\t\t\tVisibilityStatus _infoVisibility\r\n\t\t\t\t\t\t\t\t\t) :\r\n\t\t\t\t\t\t\t\t\t\terrorVisibility( _errorVisibility ),\r\n\t\t\t\t\t\t\t\t\t\twarningVisibility( _warningVisibility ),\r\n\t\t\t\t\t\t\t\t\t\tinfoVisibility( _infoVisibility ),\r\n\t\t\t\t\t\t\t\t\t\toutputFile( myStderr ),\r\n\t\t\t\t\t\t\t\t\t\terrorCount( 0 )\r\n{\r\n}\r\n\r\n/*\r\n *\tM e s s a g e H a n d l i n g\r\n */\r\nMessageHandling::MessageHandling( \tmyFILE* _outputFile,\r\n\t\t\t\t\t\t\t\t\tVisibilityStatus _errorVisibility,\r\n\t\t\t\t\t\t\t\t\tVisibilityStatus _warningVisibility,\r\n\t\t \t\t\t\t\t\t\tVisibilityStatus _infoVisibility\r\n\t\t\t\t\t\t\t\t\t) :\r\n\t\t\t\t\t\t\t\t\t\terrorVisibility( _errorVisibility ),\r\n\t\t\t\t\t\t\t\t\t\twarningVisibility( _warningVisibility ),\r\n\t\t\t\t\t\t\t\t\t\tinfoVisibility( _infoVisibility ),\r\n\t\t\t\t\t\t\t\t\t\toutputFile( _outputFile ),\r\n\t\t\t\t\t\t\t\t\t\terrorCount( 0 )\r\n{\r\n}\r\n\r\n\r\n\r\n/*\r\n *\tM e s s a g e H a n d l i n g\r\n */\r\nMessageHandling::MessageHandling( const MessageHandling& rhs ) :\r\n\t\t\t\t\t\t\t\t\t\terrorVisibility( rhs.errorVisibility ),\r\n\t\t\t\t\t\t\t\t\t\twarningVisibility( rhs.warningVisibility ),\r\n\t\t\t\t\t\t\t\t\t\tinfoVisibility( rhs.infoVisibility ),\r\n\t\t\t\t\t\t\t\t\t\toutputFile( rhs.outputFile ),\r\n\t\t\t\t\t\t\t\t\t\terrorCount( rhs.errorCount )\r\n{\r\n}\r\n\r\n\r\n/*\r\n *\t~ M e s s a g e H a n d l i n g\r\n */\r\nMessageHandling::~MessageHandling( )\r\n{\r\n\t#ifdef PC_DEBUG\r\n\tif ( outputFile != 0 )\r\n\t\tfclose( outputFile );\r\n\t#endif\r\n}\r\n\r\n\r\n/*\r\n *\to p e r a t o r =\r\n */\r\nMessageHandling& MessageHandling::operator=( const MessageHandling& rhs )\r\n{\r\n\tif ( this != &rhs )\r\n\t{\r\n\t\terrorVisibility = rhs.errorVisibility;\r\n\t\twarningVisibility = rhs.warningVisibility;\r\n\t\tinfoVisibility = rhs.infoVisibility;\r\n\t\toutputFile = rhs.outputFile;\r\n\t\terrorCount = rhs.errorCount;\r\n\t}\r\n\r\n\treturn *this;\r\n}\r\n\r\n\r\n/*\r\n *\tt h r o w E r r o r\r\n */\r\nreturnValue MessageHandling::throwError(\r\n\treturnValue Enumber,\r\n\tconst char* additionaltext,\r\n\tconst char* functionname,\r\n\tconst char* filename,\r\n\tconst unsigned long linenumber,\r\n\tVisibilityStatus localVisibilityStatus\r\n\t)\r\n{\r\n\t/* consistency check */\r\n\tif ( Enumber <= SUCCESSFUL_RETURN )\r\n\t\treturn throwError( RET_ERROR_UNDEFINED,0,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );\r\n\r\n\t/* Call to common throwMessage function if error shall be displayed. */\r\n\tif ( errorVisibility == VS_VISIBLE )\r\n\t\treturn throwMessage( Enumber,additionaltext,functionname,filename,linenumber,localVisibilityStatus,\"ERROR\" );\r\n\telse\r\n\t\treturn Enumber;\r\n}\r\n\r\n\r\n/*\r\n *\tt h r o w W a r n i n g\r\n */\r\nreturnValue MessageHandling::throwWarning(\r\n\treturnValue Wnumber,\r\n\tconst char* additionaltext,\r\n\tconst char* functionname,\r\n\tconst char* filename,\r\n\tconst unsigned long linenumber,\r\n\tVisibilityStatus localVisibilityStatus\r\n  \t)\r\n{\r\n\t/* consistency check */\r\n  \tif ( Wnumber <= SUCCESSFUL_RETURN )\r\n\t\treturn throwError( RET_WARNING_UNDEFINED,0,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );\r\n\r\n\t/* Call to common throwMessage function if warning shall be displayed. */\r\n\tif ( warningVisibility == VS_VISIBLE )\r\n\t\treturn throwMessage( Wnumber,additionaltext,functionname,filename,linenumber,localVisibilityStatus,\"WARNING\" );\r\n  \telse\r\n  \t\treturn Wnumber;\r\n}\r\n\r\n\r\n/*\r\n *\tt h r o w I n f o\r\n */\r\nreturnValue MessageHandling::throwInfo(\r\n  \treturnValue Inumber,\r\n\tconst char* additionaltext,\r\n  \tconst char* functionname,\r\n\tconst char* filename,\r\n\tconst unsigned long linenumber,\r\n\tVisibilityStatus localVisibilityStatus\r\n \t)\r\n{\r\n\t/* consistency check */\r\n\tif ( Inumber < SUCCESSFUL_RETURN )\r\n\t\treturn throwError( RET_INFO_UNDEFINED,0,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );\r\n\r\n\t/* Call to common throwMessage function if info shall be displayed. */\r\n\tif ( infoVisibility == VS_VISIBLE )\r\n\t\treturn throwMessage( Inumber,additionaltext,functionname,filename,linenumber,localVisibilityStatus,\"INFO\" );\r\n\telse\r\n\t\treturn Inumber;\r\n}\r\n\r\n\r\n/*\r\n *\tr e s e t\r\n */\r\nreturnValue MessageHandling::reset( )\r\n{\r\n\tsetErrorVisibilityStatus(   VS_VISIBLE );\r\n\tsetWarningVisibilityStatus( VS_VISIBLE );\r\n\tsetInfoVisibilityStatus(    VS_VISIBLE );\r\n\r\n\tsetOutputFile( myStderr );\r\n\tsetErrorCount( 0 );\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\tl i s t A l l M e s s a g e s\r\n */\r\nreturnValue MessageHandling::listAllMessages( )\r\n{\r\n\t#ifdef PC_DEBUG\r\n\tint keypos = 0;\r\n\tchar myPrintfString[160];\r\n\r\n\t/* Run through whole returnValueList and print each item. */\r\n\twhile ( returnValueList[keypos].key != TERMINAL_LIST_ELEMENT )\r\n\t{\r\n\t\tsprintf( myPrintfString,\" %d - %s \\n\",keypos,returnValueList[keypos].data );\r\n\t\tmyPrintf( myPrintfString );\r\n\r\n\t\t++keypos;\r\n\t}\r\n\t#endif\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n\r\n/*****************************************************************************\r\n *  P R O T E C T E D                                                        *\r\n *****************************************************************************/\r\n\r\n\r\n#ifdef PC_DEBUG  /* Re-define throwMessage function for embedded code! */\r\n\r\n/*\r\n *\tt h r o w M e s s a g e\r\n */\r\nreturnValue MessageHandling::throwMessage(\r\n\treturnValue RETnumber,\r\n\tconst char* additionaltext,\r\n\tconst char* functionname,\r\n\tconst char* filename,\r\n\tconst unsigned long linenumber,\r\n\tVisibilityStatus localVisibilityStatus,\r\n\tconst char* RETstring\r\n \t)\r\n{\r\n\tint i;\r\n\r\n\tint keypos = 0;\r\n\tchar myPrintfString[160];\r\n\r\n\t/* 1) Determine number of whitespace for output. */\r\n\tchar whitespaces[41];\r\n\tint numberOfWhitespaces = (errorCount-1)*2;\r\n\r\n\tif ( numberOfWhitespaces < 0 )\r\n\t\tnumberOfWhitespaces = 0;\r\n\r\n\tif ( numberOfWhitespaces > 40 )\r\n\t\tnumberOfWhitespaces = 40;\r\n\r\n\tfor( i=0; i<numberOfWhitespaces; ++i )\r\n\t\twhitespaces[i] = ' ';\r\n\twhitespaces[numberOfWhitespaces] = '\\0';\r\n\r\n\t/* 2) Find error/warning/info in list. */\r\n\twhile ( returnValueList[keypos].key != TERMINAL_LIST_ELEMENT )\r\n\t{\r\n\t\tif ( returnValueList[keypos].key == RETnumber )\r\n\t\t\tbreak;\r\n\t\telse\r\n\t\t\t++keypos;\r\n\t}\r\n\r\n\tif ( returnValueList[keypos].key == TERMINAL_LIST_ELEMENT )\r\n\t{\r\n\t\tthrowError( RET_EWI_UNDEFINED,0,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );\r\n\t\treturn RETnumber;\r\n\t}\r\n\r\n\t/* 3) Print error/warning/info. */\r\n\tif ( ( returnValueList[keypos].globalVisibilityStatus == VS_VISIBLE ) && ( localVisibilityStatus == VS_VISIBLE ) )\r\n\t{\r\n\t\tif ( errorCount > 0 )\r\n\t\t{\r\n\t\t\tsprintf( myPrintfString,\"%s->\", whitespaces );\r\n\t\t\tmyPrintf( myPrintfString );\r\n\t\t}\r\n\r\n\t\tif ( additionaltext == 0 )\r\n\t\t{\r\n\t\t\tsprintf(\tmyPrintfString,\"%s (%s, %s:%d): \\t%s\\n\",\r\n\t\t\t\t\t\tRETstring,functionname,filename,(int)linenumber,returnValueList[keypos].data\r\n\t\t\t\t\t\t);\r\n\t\t\tmyPrintf( myPrintfString );\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tsprintf(\tmyPrintfString,\"%s (%s, %s:%d): \\t%s %s\\n\",\r\n\t\t\t\t\t\tRETstring,functionname,filename,(int)linenumber,returnValueList[keypos].data,additionaltext\r\n\t\t\t\t\t\t);\r\n\t\t\tmyPrintf( myPrintfString );\r\n\t\t}\r\n\r\n\t\t/* take care of proper indention for subsequent error messages */\r\n\t\tif ( RETstring[0] == 'E' )\r\n\t\t{\r\n\t\t\t++errorCount;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif ( errorCount > 0 )\r\n\t\t\t\tmyPrintf( \"\\n\" );\r\n\t\t\terrorCount = 0;\r\n\t\t}\r\n\t}\r\n\r\n\treturn RETnumber;\r\n}\r\n\r\n#else  /* = PC_DEBUG not defined */\r\n\r\n/*\r\n *\tt h r o w M e s s a g e\r\n */\r\nreturnValue MessageHandling::throwMessage(\r\n\treturnValue RETnumber,\r\n\tconst char* additionaltext,\r\n\tconst char* functionname,\r\n\tconst char* filename,\r\n\tconst unsigned long linenumber,\r\n\tVisibilityStatus localVisibilityStatus,\r\n\tconst char* RETstring\r\n \t)\r\n{\r\n\t/* DUMMY CODE FOR PRETENDING USE OF ARGUMENTS\r\n\t * FOR SUPPRESSING COMPILER WARNINGS! */\r\n\tint i = 0;\r\n\tif ( additionaltext == 0 ) i++;\r\n\tif ( functionname == 0 ) i++;\r\n\tif ( filename == 0 ) i++;\r\n\tif ( linenumber == 0 ) i++;\r\n\tif ( localVisibilityStatus == VS_VISIBLE ) i++;\r\n\tif ( RETstring == 0 ) i++;\r\n\t/* END OF DUMMY CODE */\r\n\r\n\treturn RETnumber;\r\n}\r\n\r\n#endif  /* PC_DEBUG */\r\n\r\n\r\n\r\n/*****************************************************************************\r\n *  G L O B A L  M E S S A G E  H A N D L E R                                *\r\n *****************************************************************************/\r\n\r\n\r\n/** Global message handler for all qpOASES modules.*/\r\nMessageHandling globalMessageHandler( myStderr,VS_VISIBLE,VS_VISIBLE,VS_VISIBLE );\r\n\r\n\r\n/*\r\n *\tg e t G l o b a l M e s s a g e H a n d l e r\r\n */\r\nMessageHandling* getGlobalMessageHandler( )\r\n{\r\n\treturn &globalMessageHandler;\r\n}\r\n\r\nconst char* MessageHandling::getErrorString(int error)\r\n{\r\n\treturn returnValueList[ error ].data;\r\n}\r\n\r\n\r\n\r\n/*\r\n *\tend of file\r\n */\r\n"
  },
  {
    "path": "externals/qpoases/SRC/MessageHandling.ipp",
    "content": "/*\r\n *\tThis file is part of qpOASES.\r\n *\r\n *\tqpOASES -- An Implementation of the Online Active Set Strategy.\r\n *\tCopyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.\r\n *\r\n *\tqpOASES is free software; you can redistribute it and/or\r\n *\tmodify it under the terms of the GNU Lesser General Public\r\n *\tLicense as published by the Free Software Foundation; either\r\n *\tversion 2.1 of the License, or (at your option) any later version.\r\n *\r\n *\tqpOASES is distributed in the hope that it will be useful,\r\n *\tbut WITHOUT ANY WARRANTY; without even the implied warranty of\r\n *\tMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n *\tLesser General Public License for more details.\r\n *\r\n *\tYou should have received a copy of the GNU Lesser General Public\r\n *\tLicense along with qpOASES; if not, write to the Free Software\r\n *\tFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r\n *\r\n */\r\n\r\n\r\n/**\r\n *\t\\file SRC/MessageHandling.ipp\r\n *\t\\author Hans Joachim Ferreau\r\n *\t\\version 1.3embedded\r\n *\t\\date 2007-2008\r\n *\r\n *\tImplementation of inlined member functions of the MessageHandling class. \r\n */\r\n\r\n\r\n\r\n/*****************************************************************************\r\n *  P U B L I C                                                              *\r\n *****************************************************************************/\r\n \r\n/*\r\n *\tg e t E r r o r V i s i b i l i t y S t a t u s\r\n */\r\ninline VisibilityStatus MessageHandling::getErrorVisibilityStatus( ) const\r\n{\r\n \treturn errorVisibility;\r\n}\r\n\r\n\r\n/*\r\n *\tg e t W a r n i n g V i s i b i l i t y S t a t u s\r\n */\r\ninline VisibilityStatus MessageHandling::getWarningVisibilityStatus( ) const\r\n{\r\n \treturn warningVisibility;\r\n}\r\n\r\n\r\n/*\r\n *\tg e t I n f o V i s i b i l i t y S t a t u s\r\n */\r\ninline VisibilityStatus MessageHandling::getInfoVisibilityStatus( ) const\r\n{\r\n \treturn infoVisibility;\r\n}\r\n\r\n\r\n/*\r\n *\tg e t O u t p u t F i l e\r\n */\r\ninline myFILE* MessageHandling::getOutputFile( ) const\r\n{\r\n \treturn outputFile;\r\n}\r\n\r\n\r\n/*\r\n *\tg e t E r r o r C o u n t\r\n */\r\ninline int MessageHandling::getErrorCount( ) const\r\n{\r\n \treturn errorCount;\r\n}\r\n\r\n\r\n/*\r\n *\ts e t E r r o r V i s i b i l i t y S t a t u s\r\n */\r\ninline void MessageHandling::setErrorVisibilityStatus( VisibilityStatus _errorVisibility ) \r\n{\r\n \terrorVisibility = _errorVisibility;\r\n}\r\n\r\n\r\n/*\r\n *\ts e t W a r n i n g V i s i b i l i t y S t a t u s\r\n */\r\ninline void MessageHandling::setWarningVisibilityStatus( VisibilityStatus _warningVisibility ) \r\n{\r\n \twarningVisibility = _warningVisibility;\r\n}\r\n\r\n\r\n/*\r\n *\ts e t I n f o V i s i b i l i t y S t a t u s\r\n */\r\ninline void MessageHandling::setInfoVisibilityStatus( VisibilityStatus _infoVisibility ) \r\n{\r\n \tinfoVisibility = _infoVisibility;\r\n}\r\n\r\n\r\n/*\r\n *\ts e t O u t p u t F i l e\r\n */\r\ninline void MessageHandling::setOutputFile( myFILE* _outputFile ) \r\n{\r\n \toutputFile = _outputFile;\r\n}\r\n\r\n\r\n/*\r\n *\ts e t E r r o r C o u n t\r\n */\r\ninline returnValue MessageHandling::setErrorCount( int _errorCount )\r\n{\r\n\tif ( _errorCount >= 0 ) \t\r\n\t{\r\n\t\terrorCount = _errorCount;\r\n\t\treturn SUCCESSFUL_RETURN;\r\n\t}\r\n\telse\r\n\t\treturn RET_INVALID_ARGUMENTS;\r\n}\r\n\r\n\r\n/*\r\n *\tend of file\r\n */\r\n"
  },
  {
    "path": "externals/qpoases/SRC/QProblem.cpp",
    "content": "/*\r\n *\tThis file is part of qpOASES.\r\n *\r\n *\tqpOASES -- An Implementation of the Online Active Set Strategy.\r\n *\tCopyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.\r\n *\r\n *\tqpOASES is free software; you can redistribute it and/or\r\n *\tmodify it under the terms of the GNU Lesser General Public\r\n *\tLicense as published by the Free Software Foundation; either\r\n *\tversion 2.1 of the License, or (at your option) any later version.\r\n *\r\n *\tqpOASES is distributed in the hope that it will be useful,\r\n *\tbut WITHOUT ANY WARRANTY; without even the implied warranty of\r\n *\tMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n *\tLesser General Public License for more details.\r\n *\r\n *\tYou should have received a copy of the GNU Lesser General Public\r\n *\tLicense along with qpOASES; if not, write to the Free Software\r\n *\tFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r\n *\r\n */\r\n\r\n\r\n/**\r\n *\t\\file SRC/QProblem.cpp\r\n *\t\\author Hans Joachim Ferreau\r\n *\t\\version 1.3embedded\r\n *\t\\date 2007-2008\r\n *\r\n *\tImplementation of the QProblem class which is able to use the newly\r\n *\tdeveloped online active set strategy for parametric quadratic programming.\r\n */\r\n\r\n\r\n#include <QProblem.hpp>\r\n\r\n#include <stdio.h>\r\n\r\nvoid printmatrix2(char *name, double *A, int m, int n) {\r\n  int i, j;\r\n\r\n  printf(\"%s = [...\\n\", name);\r\n  for (i = 0; i < m; i++) {\r\n    for (j = 0; j < n; j++)\r\n        printf(\"  % 9.4f\", A[i*n+j]);\r\n    printf(\",\\n\");\r\n  }\r\n  printf(\"];\\n\");\r\n}\r\n\r\n//#define __PERFORM_KKT_TEST__\r\n\r\n\r\n/*****************************************************************************\r\n *  P U B L I C                                                              *\r\n *****************************************************************************/\r\n\r\n\r\n/*\r\n *\tQ P r o b l e m\r\n */\r\nQProblem::QProblem( ) : QProblemB( )\r\n{\r\n\tconstraints.init( 0 );\r\n\r\n\tsizeT = 0;\r\n\r\n\tcyclingManager.init( 0,0 );\r\n}\r\n\r\n\r\n/*\r\n *\tQ P r o b l e m\r\n */\r\nQProblem::QProblem( int _nV, int _nC ) : QProblemB( _nV )\r\n{\r\n\t/* consistency checks */\r\n\tif ( _nV <= 0 )\r\n\t\t_nV = 1;\r\n\r\n\tif ( _nC < 0 )\r\n\t{\r\n\t\t_nC = 0;\r\n\t\tTHROWERROR( RET_INVALID_ARGUMENTS );\r\n\t}\r\n\r\n\tconstraints.init( _nC );\r\n\r\n\r\n\tsizeT = _nC;\r\n\tif ( _nC > _nV )\r\n\t\tsizeT = _nV;\r\n\r\n\tcyclingManager.init( _nV,_nC );\r\n}\r\n\r\n\r\n/*\r\n *\tQ P r o b l e m\r\n */\r\nQProblem::QProblem( const QProblem& rhs ) :\tQProblemB( rhs )\r\n{\r\n\tint i, j;\r\n\r\n\tint _nV = rhs.bounds.getNV( );\r\n\tint _nC = rhs.constraints.getNC( );\r\n\r\n\tfor( i=0; i<_nC; ++i )\r\n\t\tfor( j=0; j<_nV; ++j )\r\n\t\t\tA[i*NVMAX + j] = rhs.A[i*NVMAX + j];\r\n\r\n\tfor( i=0; i<_nC; ++i )\r\n\t\tlbA[i] = rhs.lbA[i];\r\n\r\n\tfor( i=0; i<_nC; ++i )\r\n\t\t\tubA[i] = rhs.ubA[i];\r\n\r\n\tconstraints = rhs.constraints;\r\n\r\n\tfor( i=0; i<(_nV+_nC); ++i )\r\n\t\ty[i] = rhs.y[i];\r\n\r\n\r\n\tsizeT = rhs.sizeT;\r\n\r\n\tfor( i=0; i<sizeT; ++i )\r\n\t\tfor( j=0; j<sizeT; ++j )\r\n\t\t\tT[i*NVMAX + j] = rhs.T[i*NVMAX + j];\r\n\r\n\tfor( i=0; i<_nV; ++i )\r\n\t\tfor( j=0; j<_nV; ++j )\r\n\t\t\tQ[i*NVMAX + j] = rhs.Q[i*NVMAX + j];\r\n\r\n\tfor( i=0; i<_nC; ++i )\r\n\t\tAx[i] = rhs.Ax[i];\r\n\r\n\tcyclingManager = rhs.cyclingManager;\r\n}\r\n\r\n\r\n/*\r\n *\t~ Q P r o b l e m\r\n */\r\nQProblem::~QProblem( )\r\n{\r\n}\r\n\r\n\r\n/*\r\n *\to p e r a t o r =\r\n */\r\nQProblem& QProblem::operator=( const QProblem& rhs )\r\n{\r\n\tint i, j;\r\n\r\n\tif ( this != &rhs )\r\n\t{\r\n\t\tQProblemB::operator=( rhs );\r\n\r\n\r\n\t\tint _nV = rhs.bounds.getNV( );\r\n\t\tint _nC = rhs.constraints.getNC( );\r\n\r\n\t\tfor( i=0; i<_nC; ++i )\r\n\t\t\tfor( j=0; j<_nV; ++j )\r\n\t\t\t\tA[i*NVMAX + j] = rhs.A[i*NVMAX + j];\r\n\r\n\t\tfor( i=0; i<_nC; ++i )\r\n\t\t\tlbA[i] = rhs.lbA[i];\r\n\r\n\t\tfor( i=0; i<_nC; ++i )\r\n\t\t\tubA[i] = rhs.ubA[i];\r\n\r\n\t\tconstraints = rhs.constraints;\r\n\r\n\t\tfor( i=0; i<(_nV+_nC); ++i )\r\n\t\t\ty[i] = rhs.y[i];\r\n\r\n\r\n\t\tsizeT = rhs.sizeT;\r\n\r\n\t\tfor( i=0; i<sizeT; ++i )\r\n\t\t\tfor( j=0; j<sizeT; ++j )\r\n\t\t\t\tT[i*NVMAX + j] = rhs.T[i*NVMAX + j];\r\n\r\n\t\tfor( i=0; i<_nV; ++i )\r\n\t\t\tfor( j=0; j<_nV; ++j )\r\n\t\t\t\tQ[i*NVMAX + j] = rhs.Q[i*NVMAX + j];\r\n\r\n\t\tfor( i=0; i<_nC; ++i )\r\n\t\t\tAx[i] = rhs.Ax[i];\r\n\r\n\t\tcyclingManager = rhs.cyclingManager;\r\n\t}\r\n\r\n\treturn *this;\r\n}\r\n\r\n\r\n/*\r\n *\tr e s e t\r\n */\r\nreturnValue QProblem::reset( )\r\n{\r\n\tint i, j;\r\n\tint nV = getNV( );\r\n\tint nC = getNC( );\r\n\r\n\r\n\t/* 1) Reset bounds, Cholesky decomposition and status flags. */\r\n\tif ( QProblemB::reset( ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_RESET_FAILED );\r\n\r\n\t/* 2) Reset constraints. */\r\n\tconstraints.init( nC );\r\n\r\n\t/* 3) Reset TQ factorisation. */\r\n\tfor( i=0; i<sizeT; ++i )\r\n\t\tfor( j=0; j<sizeT; ++j )\r\n\t\t\tT[i*NVMAX + j] = 0.0;\r\n\r\n\tfor( i=0; i<nV; ++i )\r\n\t\tfor( j=0; j<nV; ++j )\r\n\t\t\tQ[i*NVMAX + j] = 0.0;\r\n\r\n\t/* 4) Reset cycling manager. */\r\n\tif ( cyclingManager.clearCyclingData( ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_RESET_FAILED );\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\ti n i t\r\n */\r\nreturnValue QProblem::init(\tconst real_t* const _H, const real_t* const _g, const real_t* const _A,\r\n\t\t\t\t\t\t\tconst real_t* const _lb, const real_t* const _ub,\r\n\t\t\t\t\t\t\tconst real_t* const _lbA, const real_t* const _ubA,\r\n\t\t\t\t\t\t\tint& nWSR, const real_t* const yOpt, real_t* const cputime\r\n\t\t\t\t\t\t\t)\r\n{\r\n\t/* 1) Setup QP data. */\r\n\tif (setupQPdata(_H, 0, _g, _A, _lb, _ub, _lbA, _ubA) != SUCCESSFUL_RETURN)\r\n\t\treturn THROWERROR( RET_INVALID_ARGUMENTS );\r\n\r\n\t/* 2) Call to main initialisation routine (without any additional information). */\r\n\treturn solveInitialQP( 0,yOpt,0,0, nWSR,cputime );\r\n}\r\n\r\nreturnValue QProblem::init(\tconst real_t* const _H, const real_t* const _R, const real_t* const _g, const real_t* const _A,\r\n\t\t\t\t\t\t\tconst real_t* const _lb, const real_t* const _ub,\r\n\t\t\t\t\t\t\tconst real_t* const _lbA, const real_t* const _ubA,\r\n\t\t\t\t\t\t\tint& nWSR, const real_t* const yOpt, real_t* const cputime\r\n\t\t\t\t\t\t\t)\r\n{\r\n\t/* 1) Setup QP data. */\r\n\tif (setupQPdata(_H, _R, _g, _A, _lb, _ub, _lbA, _ubA) != SUCCESSFUL_RETURN)\r\n\t\treturn THROWERROR( RET_INVALID_ARGUMENTS );\r\n\r\n\t/* 2) Call to main initialisation routine (without any additional information). */\r\n\treturn solveInitialQP( 0,yOpt,0,0, nWSR,cputime );\r\n}\r\n\r\n\r\n/*\r\n *\th o t s t a r t\r\n */\r\nreturnValue QProblem::hotstart(\tconst real_t* const g_new, const real_t* const lb_new, const real_t* const ub_new,\r\n\t\t\t\t\t\t\t\tconst real_t* const lbA_new, const real_t* const ubA_new,\r\n\t\t\t\t\t\t\t\tint& nWSR, real_t* const cputime\r\n\t\t\t\t\t\t\t\t)\r\n{\r\n\tint l;\r\n\r\n\t/* consistency check */\r\n\tif ( ( getStatus( ) == QPS_NOTINITIALISED )       ||\r\n\t\t ( getStatus( ) == QPS_PREPARINGAUXILIARYQP ) ||\r\n\t\t ( getStatus( ) == QPS_PERFORMINGHOMOTOPY )   )\r\n\t{\r\n\t\treturn THROWERROR( RET_HOTSTART_FAILED_AS_QP_NOT_INITIALISED );\r\n\t}\r\n\r\n\t/* start runtime measurement */\r\n\treal_t starttime = 0.0;\r\n\tif ( cputime != 0 )\r\n\t\tstarttime = getCPUtime( );\r\n\r\n\r\n\t/* I) PREPARATIONS */\r\n\t/* 1) Reset cycling and status flags and increase QP counter. */\r\n\tcyclingManager.clearCyclingData( );\r\n\r\n\tinfeasible = BT_FALSE;\r\n\tunbounded = BT_FALSE;\r\n\r\n\t++count;\r\n\r\n\t/* 2) Allocate delta vectors of gradient and (constraints') bounds. */\r\n\treturnValue returnvalue;\r\n\tBooleanType Delta_bC_isZero, Delta_bB_isZero;\r\n\r\n\tint FR_idx[NVMAX];\r\n\tint FX_idx[NVMAX];\r\n\tint AC_idx[NCMAX_ALLOC];\r\n\tint IAC_idx[NCMAX_ALLOC];\r\n\r\n\treal_t delta_g[NVMAX];\r\n\treal_t delta_lb[NVMAX];\r\n\treal_t delta_ub[NVMAX];\r\n\treal_t delta_lbA[NCMAX_ALLOC];\r\n\treal_t delta_ubA[NCMAX_ALLOC];\r\n\r\n\treal_t delta_xFR[NVMAX];\r\n\treal_t delta_xFX[NVMAX];\r\n\treal_t delta_yAC[NCMAX_ALLOC];\r\n\treal_t delta_yFX[NVMAX];\r\n\treal_t delta_Ax[NCMAX_ALLOC];\r\n\r\n\tint BC_idx;\r\n\tSubjectToStatus BC_status;\r\n\tBooleanType BC_isBound;\r\n\r\n\t#ifdef PC_DEBUG\r\n\tchar messageString[80];\r\n\t#endif\r\n\r\n\r\n\t/* II) MAIN HOMOTOPY LOOP */\r\n\tfor( l=0; l<nWSR; ++l )\r\n\t{\r\n\t\tstatus = QPS_PERFORMINGHOMOTOPY;\r\n\r\n\t\tif ( printlevel == PL_HIGH )\r\n\t\t{\r\n\t\t\t#ifdef PC_DEBUG\r\n\t\t\tsprintf( messageString,\"%d ...\",l );\r\n\t\t  \tgetGlobalMessageHandler( )->throwInfo( RET_ITERATION_STARTED,messageString,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );\r\n\t\t\t#endif\r\n\t\t}\r\n\r\n\t\t/* 1) Setup index arrays. */\r\n\t\tif ( bounds.getFree( )->getNumberArray( FR_idx ) != SUCCESSFUL_RETURN )\r\n\t\t\treturn THROWERROR( RET_HOTSTART_FAILED );\r\n\r\n\t\tif ( bounds.getFixed( )->getNumberArray( FX_idx ) != SUCCESSFUL_RETURN )\r\n\t\t\treturn THROWERROR( RET_HOTSTART_FAILED );\r\n\r\n\t\tif ( constraints.getActive( )->getNumberArray( AC_idx ) != SUCCESSFUL_RETURN )\r\n\t\t\treturn THROWERROR( RET_HOTSTART_FAILED );\r\n\r\n\t\tif ( constraints.getInactive( )->getNumberArray( IAC_idx ) != SUCCESSFUL_RETURN )\r\n\t\t\treturn THROWERROR( RET_HOTSTART_FAILED );\r\n\r\n\t\t/* 2) Detemination of shift direction of the gradient and the (constraints') bounds. */\r\n\t\treturnvalue = hotstart_determineDataShift(  FX_idx, AC_idx,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tg_new,lbA_new,ubA_new,lb_new,ub_new,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tdelta_g,delta_lbA,delta_ubA,delta_lb,delta_ub,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tDelta_bC_isZero, Delta_bB_isZero );\r\n\t\tif ( returnvalue != SUCCESSFUL_RETURN )\r\n\t\t{\r\n\t\t\tnWSR = l;\r\n\t\t\tTHROWERROR( RET_SHIFT_DETERMINATION_FAILED );\r\n\t\t\treturn returnvalue;\r\n\t\t}\r\n\r\n\t\t/* 3) Determination of step direction of X and Y. */\r\n\t\treturnvalue = hotstart_determineStepDirection(\tFR_idx,FX_idx,AC_idx,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdelta_g,delta_lbA,delta_ubA,delta_lb,delta_ub,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDelta_bC_isZero, Delta_bB_isZero,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdelta_xFX,delta_xFR,delta_yAC,delta_yFX\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\r\n\t\tif ( returnvalue != SUCCESSFUL_RETURN )\r\n\t\t{\r\n\t\t\tnWSR = l;\r\n\t\t\tTHROWERROR( RET_STEPDIRECTION_DETERMINATION_FAILED );\r\n\t\t\treturn returnvalue;\r\n\t\t}\r\n\r\n\t\t/* 4) Determination of step length TAU. */\r\n\t\treturnvalue = hotstart_determineStepLength(\tFR_idx,FX_idx,AC_idx,IAC_idx,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tdelta_lbA,delta_ubA,delta_lb,delta_ub,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tdelta_xFX,delta_xFR,delta_yAC,delta_yFX,delta_Ax,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tBC_idx,BC_status,BC_isBound\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\r\n\t\tif ( returnvalue != SUCCESSFUL_RETURN )\r\n\t\t{\r\n\t\t\tnWSR = l;\r\n\t\t\tTHROWERROR( RET_STEPLENGTH_DETERMINATION_FAILED );\r\n\t\t\treturn returnvalue;\r\n\t\t}\r\n\r\n\t\t/* 5) Realisation of the homotopy step. */\r\n\t\treturnvalue = hotstart_performStep(\tFR_idx,FX_idx,AC_idx,IAC_idx,\r\n\t\t\t\t\t\t\t\t\t\t\tdelta_g,delta_lbA,delta_ubA,delta_lb,delta_ub,\r\n\t\t\t\t\t\t\t\t\t\t\tdelta_xFX,delta_xFR,delta_yAC,delta_yFX,delta_Ax,\r\n\t\t\t\t\t\t\t\t\t\t\tBC_idx,BC_status,BC_isBound\r\n\t\t\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\tif ( returnvalue != SUCCESSFUL_RETURN )\r\n\t\t{\r\n\t\t\tnWSR = l;\r\n\r\n\t\t\t/* stop runtime measurement */\r\n\t\t\tif ( cputime != 0 )\r\n\t\t\t\t\t*cputime = getCPUtime( ) - starttime;\r\n\r\n\t\t\t/* optimal solution found? */\r\n\t\t\tif ( returnvalue == RET_OPTIMAL_SOLUTION_FOUND )\r\n\t\t\t{\r\n\t\t\t\tstatus = QPS_SOLVED;\r\n\r\n\t\t\t\tif ( printlevel == PL_HIGH )\r\n\t\t\t\t\tTHROWINFO( RET_OPTIMAL_SOLUTION_FOUND );\r\n\r\n\t\t\t\t#ifdef PC_DEBUG\r\n\t \t\t\tif ( printIteration( l,BC_idx,BC_status,BC_isBound ) != SUCCESSFUL_RETURN )\r\n\t\t\t\t\tTHROWERROR( RET_PRINT_ITERATION_FAILED ); /* do not pass this as return value! */\r\n\t\t\t\t#endif\r\n\r\n\t\t\t\t/* check KKT optimality conditions */\r\n\t\t\t\treturn checkKKTconditions( );\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t/* checks for infeasibility... */\r\n\t\t\t\tif ( isInfeasible( ) == BT_TRUE )\r\n\t\t\t\t{\r\n\t\t\t\t\tstatus = QPS_HOMOTOPYQPSOLVED;\r\n\t\t\t\t\treturn THROWERROR( RET_HOTSTART_STOPPED_INFEASIBILITY );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* ...unboundedness... */\r\n\t\t\t\tif ( unbounded == BT_TRUE ) /* not necessary since objective function convex! */\r\n\t\t\t\t\treturn THROWERROR( RET_HOTSTART_STOPPED_UNBOUNDEDNESS );\r\n\r\n\t\t\t\t/* ... and throw unspecific error otherwise */\r\n\t\t\t\tTHROWERROR( RET_HOMOTOPY_STEP_FAILED );\r\n\t\t\t\treturn returnvalue;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/* 6) Output information of successful QP iteration. */\r\n\t\tstatus = QPS_HOMOTOPYQPSOLVED;\r\n\r\n\t\t#ifdef PC_DEBUG\r\n\t\tif ( printIteration( l,BC_idx,BC_status,BC_isBound ) != SUCCESSFUL_RETURN )\r\n\t\t\tTHROWERROR( RET_PRINT_ITERATION_FAILED ); /* do not pass this as return value! */\r\n\t\t#endif\r\n\t}\r\n\r\n\r\n\t/* stop runtime measurement */\r\n\tif ( cputime != 0 )\r\n\t\t*cputime = getCPUtime( ) - starttime;\r\n\r\n\r\n\t/* if programm gets to here, output information that QP could not be solved\r\n\t * within the given maximum numbers of working set changes */\r\n\tif ( printlevel == PL_HIGH )\r\n\t{\r\n\t\t#ifdef PC_DEBUG\r\n\t\tsprintf( messageString,\"(nWSR = %d)\",nWSR );\r\n\t\treturn getGlobalMessageHandler( )->throwWarning( RET_MAX_NWSR_REACHED,messageString,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );\r\n\t\t#endif\r\n\t}\r\n\r\n\t/* Finally check KKT optimality conditions. */\r\n\treturnValue returnvalueKKTcheck = checkKKTconditions( );\r\n\r\n\tif ( returnvalueKKTcheck != SUCCESSFUL_RETURN )\r\n\t\treturn returnvalueKKTcheck;\r\n\telse\r\n\t\treturn RET_MAX_NWSR_REACHED;\r\n}\r\n\r\n\r\n/*\r\n *\tg e t N Z\r\n */\r\nint QProblem::getNZ( )\r\n{\r\n\t/* nZ = nFR - nAC */\r\n\treturn bounds.getFree( )->getLength( ) - constraints.getActive( )->getLength( );\r\n}\r\n\r\n\r\n/*\r\n *\tg e t D u a l S o l u t i o n\r\n */\r\nreturnValue QProblem::getDualSolution( real_t* const yOpt ) const\r\n{\r\n\tint i;\r\n\r\n\t/* return optimal dual solution vector\r\n\t * only if current QP has been solved */\r\n\tif ( ( getStatus( ) == QPS_AUXILIARYQPSOLVED ) ||\r\n\t\t ( getStatus( ) == QPS_HOMOTOPYQPSOLVED )  ||\r\n\t\t ( getStatus( ) == QPS_SOLVED ) )\r\n\t{\r\n\t\tfor( i=0; i<getNV( )+getNC( ); ++i )\r\n\t\t\tyOpt[i] = y[i];\r\n\r\n\t\treturn SUCCESSFUL_RETURN;\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn RET_QP_NOT_SOLVED;\r\n\t}\r\n}\r\n\r\n\r\n\r\n/*****************************************************************************\r\n *  P R O T E C T E D                                                        *\r\n *****************************************************************************/\r\n\r\n/*\r\n *\ts e t u p S u b j e c t T o T y p e\r\n */\r\nreturnValue QProblem::setupSubjectToType( )\r\n{\r\n\tint i;\r\n\tint nC = getNC( );\r\n\r\n\r\n\t/* I) SETUP SUBJECTTOTYPE FOR BOUNDS */\r\n\tif ( QProblemB::setupSubjectToType( ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_SETUPSUBJECTTOTYPE_FAILED );\r\n\r\n\r\n\t/* II) SETUP SUBJECTTOTYPE FOR CONSTRAINTS */\r\n\t/* 1) Check if lower constraints' bounds are present. */\r\n\tconstraints.setNoLower( BT_TRUE );\r\n\tfor( i=0; i<nC; ++i )\r\n\t{\r\n\t\tif ( lbA[i] > -INFTY )\r\n\t\t{\r\n\t\t\tconstraints.setNoLower( BT_FALSE );\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\t/* 2) Check if upper constraints' bounds are present. */\r\n\tconstraints.setNoUpper( BT_TRUE );\r\n\tfor( i=0; i<nC; ++i )\r\n\t{\r\n\t\tif ( ubA[i] < INFTY )\r\n\t\t{\r\n\t\t\tconstraints.setNoUpper( BT_FALSE );\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\t/* 3) Determine implicit equality constraints and unbounded constraints. */\r\n\tint nEC = 0;\r\n\tint nUC = 0;\r\n\r\n\tfor( i=0; i<nC; ++i )\r\n\t{\r\n\t\tif ( ( lbA[i] < -INFTY + BOUNDTOL ) && ( ubA[i] > INFTY - BOUNDTOL ) )\r\n\t\t{\r\n\t\t\tconstraints.setType( i,ST_UNBOUNDED );\r\n\t\t\t++nUC;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif ( lbA[i] > ubA[i] - BOUNDTOL )\r\n\t\t\t{\r\n\t\t\t\tconstraints.setType( i,ST_EQUALITY );\r\n\t\t\t\t++nEC;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tconstraints.setType( i,ST_BOUNDED );\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/* 4) Set dimensions of constraints structure. */\r\n\tconstraints.setNEC( nEC );\r\n\tconstraints.setNUC( nUC );\r\n\tconstraints.setNIC( nC - nEC - nUC );\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\tc h o l e s k y D e c o m p o s i t i o n P r o j e c t e d\r\n */\r\nreturnValue QProblem::setupCholeskyDecompositionProjected( )\r\n{\r\n\tint i, j, k, ii, kk;\r\n\tint nV  = getNV( );\r\n\tint nFR = getNFR( );\r\n\tint nZ  = getNZ( );\r\n\r\n\t/* 1) Initialises R with all zeros. */\r\n\tfor( i=0; i<nV; ++i )\r\n\t\tfor( j=0; j<nV; ++j )\r\n\t\t\tR[i*NVMAX + j] = 0.0;\r\n\r\n\t/* 2) Calculate Cholesky decomposition of projected Hessian Z'*H*Z. */\r\n\tif ( hessianType == HST_IDENTITY )\r\n\t{\r\n\t\t/* if Hessian is identity, so is its Cholesky factor. */\r\n\t\tfor( i=0; i<nV; ++i )\r\n\t\t\tR[i*NVMAX + i] = 1.0;\r\n\t}\r\n\telse\r\n\t{\r\n\t\tif ( nZ > 0 )\r\n\t\t{\r\n\t\t\tint FR_idx[NVMAX];\r\n\t\t\tif ( bounds.getFree( )->getNumberArray( FR_idx ) != SUCCESSFUL_RETURN )\r\n\t\t\t\treturn THROWERROR( RET_INDEXLIST_CORRUPTED );\r\n\r\n#if 0\r\n\t\t\treal_t HZ[NVMAX*NVMAX];\r\n\t\t\treal_t ZHZ[NVMAX*NVMAX];\r\n\r\n\t\t\t/* calculate H*Z */\r\n\t\t\tfor ( i=0; i<nFR; ++i )\r\n\t\t\t{\r\n\t\t\t\tii = FR_idx[i];\r\n\r\n\t\t\t\tfor ( j=0; j<nZ; ++j )\r\n\t\t\t\t{\r\n\t\t\t\t\treal_t sum = 0.0;\r\n\t\t\t\t\tfor ( k=0; k<nFR; ++k )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tkk = FR_idx[k];\r\n\t\t\t\t\t\tsum += H[ii*NVMAX + kk] * Q[kk*NVMAX + j];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tHZ[i * NVMAX + j] = sum;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t/* calculate Z'*H*Z */\r\n\t\t\tfor ( i=0; i<nZ; ++i )\r\n\t\t\t\tfor ( j=0; j<nZ; ++j )\r\n\t\t\t\t{\r\n\t\t\t\t\treal_t sum = 0.0;\r\n\t\t\t\t\tfor ( k=0; k<nFR; ++k )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tkk = FR_idx[k];\r\n\t\t\t\t\t\tsum += Q[kk*NVMAX + i] * HZ[k*NVMAX + j];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tZHZ[i * NVMAX + j] = sum;\r\n\t\t\t\t}\r\n\r\n\t\t\t/* R'*R = Z'*H*Z */\r\n\t\t\treal_t sum, inv;\r\n\r\n\t\t\tfor( i=0; i<nZ; ++i )\r\n\t\t\t{\r\n\t\t\t\t/* j == i */\r\n\t\t\t\tsum = ZHZ[i*NVMAX + i];\r\n\r\n\t\t\t\tfor( k=(i-1); k>=0; --k )\r\n\t\t\t\t\tsum -= R[k*NVMAX + i] * R[k*NVMAX + i];\r\n\r\n\t\t\t\tif ( sum > 0.0 )\r\n\t\t\t\t{\r\n\t\t\t\t\tR[i*NVMAX + i] = sqrt( sum );\r\n\t\t\t\t\tinv = 1.0 / R[i * NVMAX + i];\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\thessianType = HST_SEMIDEF;\r\n\t\t\t\t\treturn THROWERROR( RET_HESSIAN_NOT_SPD );\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor( j=(i+1); j<nZ; ++j )\r\n\t\t\t\t{\r\n\t\t\t\t\tsum = ZHZ[j*NVMAX + i];\r\n\r\n\t\t\t\t\tfor( k=(i-1); k>=0; --k )\r\n\t\t\t\t\t\tsum -= R[k*NVMAX + i] * R[k*NVMAX + j];\r\n\r\n\t\t\t\t\tR[i*NVMAX + j] = sum * inv;\r\n\t\t\t\t}\r\n\t\t\t}\r\n#else\r\n\t\t\treal_t HZ[NVMAX];\r\n\t\t\treal_t ZHZ[NVMAX];\r\n\r\n\t\t\treal_t sum, inv;\r\n\t\t\tfor (j = 0; j < nZ; ++j)\r\n\t\t\t{\r\n\t\t\t\t/* Cache one column of Z. */\r\n\t\t\t\tfor (i = 0; i < NVMAX; ++i)\r\n\t\t\t\t\tZHZ[i] = Q[i * NVMAX + j];\r\n\r\n\t\t\t\t/* Create one column of the product H * Z. */\r\n\t\t\t\tfor (i = 0; i < nFR; ++i)\r\n\t\t\t\t{\r\n\t\t\t\t\tii = FR_idx[i];\r\n\r\n\t\t\t\t\tsum = 0.0;\r\n\t\t\t\t\tfor (k = 0; k < nFR; ++k)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tkk = FR_idx[k];\r\n\t\t\t\t\t\tsum += H[ii * NVMAX + kk] * ZHZ[kk];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tHZ[ii] = sum;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Create one column of the product Z^T * H * Z. */\r\n\t\t\t\tfor (i = j; i < nZ; ++i)\r\n\t\t\t\t\tZHZ[ i ] = 0.0;\r\n\r\n\t\t\t\tfor (k = 0; k < nFR; ++k)\r\n\t\t\t\t{\r\n\t\t\t\t\tkk = FR_idx[k];\r\n\t\t\t\t\treal_t q = HZ[kk];\r\n\t\t\t\t\tfor (i = j; i < nZ; ++i)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tZHZ[i] += Q[kk * NVMAX + i] * q;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Use the computed column to update the factorization. */\r\n\t\t\t\t/* j == i */\r\n\t\t\t\tsum = ZHZ[j];\r\n\r\n\t\t\t\tfor (k = (j - 1); k >= 0; --k)\r\n\t\t\t\t\tsum -= R[k * NVMAX + j] * R[k * NVMAX + j];\r\n\r\n\t\t\t\tif (sum > 0.0)\r\n\t\t\t\t{\r\n\t\t\t\t\tR[j * NVMAX + j] = sqrt(sum);\r\n\t\t\t\t\tinv = 1.0 / R[j * NVMAX + j];\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\thessianType = HST_SEMIDEF;\r\n\t\t\t\t\treturn THROWERROR( RET_HESSIAN_NOT_SPD );\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor (i = (j + 1); i < nZ; ++i)\r\n\t\t\t\t{\r\n\t\t\t\t\tsum = ZHZ[i];\r\n\r\n\t\t\t\t\tfor (k = (j - 1); k >= 0; --k)\r\n\t\t\t\t\t\tsum -= R[k * NVMAX + j] * R[k * NVMAX + i];\r\n\r\n\t\t\t\t\tR[j * NVMAX + i] = sum * inv;\r\n\t\t\t\t}\r\n\t\t\t}\r\n#endif\r\n\t\t}\r\n\t}\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\ts e t u p T Q f a c t o r i s a t i o n\r\n */\r\nreturnValue QProblem::setupTQfactorisation( )\r\n{\r\n\tint i, j, ii;\r\n\tint nV  = getNV( );\r\n\tint nFR = getNFR( );\r\n\r\n\tint FR_idx[NVMAX];\r\n\tif ( bounds.getFree( )->getNumberArray( FR_idx ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_INDEXLIST_CORRUPTED );\r\n\r\n\t/* 1) Set Q to unity matrix. */\r\n\tfor( i=0; i<nV; ++i )\r\n\t\tfor( j=0; j<nV; ++j )\r\n\t\t\tQ[i*NVMAX + j] = 0.0;\r\n\r\n\tfor( i=0; i<nFR; ++i )\r\n\t{\r\n\t\tii = FR_idx[i];\r\n\t\tQ[ii*NVMAX + i] = 1.0;\r\n\t}\r\n\r\n \t/* 2) Set T to zero matrix. */\r\n\tfor( i=0; i<sizeT; ++i )\r\n\t\tfor( j=0; j<sizeT; ++j )\r\n\t\t\tT[i*NVMAX + j] = 0.0;\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\ts o l v e I n i t i a l Q P\r\n */\r\nreturnValue QProblem::solveInitialQP(\tconst real_t* const xOpt, const real_t* const yOpt,\r\n\t\t\t\t\t\t\t\t\t\tconst Bounds* const guessedBounds, const Constraints* const guessedConstraints,\r\n\t\t\t\t\t\t\t\t\t\tint& nWSR, real_t* const cputime\r\n\t\t\t\t\t\t\t\t\t\t)\r\n{\r\n\tint i;\r\n\r\n\t/* some definitions */\r\n\tint nV = getNV( );\r\n\tint nC = getNC( );\r\n\r\n\r\n\t/* start runtime measurement */\r\n\treal_t starttime = 0.0;\r\n\tif ( cputime != 0 )\r\n\t\tstarttime = getCPUtime( );\r\n\r\n\r\n\tstatus = QPS_NOTINITIALISED;\r\n\r\n\t/* I) ANALYSE QP DATA: */\r\n\t/* 1) Check if Hessian happens to be the identity matrix. */\r\n\tif ( checkForIdentityHessian( ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_INIT_FAILED );\r\n\r\n\t/* 2) Setup type of bounds and constraints (i.e. unbounded, implicitly fixed etc.). */\r\n\tif ( setupSubjectToType( ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_INIT_FAILED );\r\n\r\n\t/* 3) Initialise cycling manager. */\r\n\tcyclingManager.clearCyclingData( );\r\n\r\n\tstatus = QPS_PREPARINGAUXILIARYQP;\r\n\r\n\r\n\t/* II) SETUP AUXILIARY QP WITH GIVEN OPTIMAL SOLUTION: */\r\n\t/* 1) Setup bounds and constraints data structure. */\r\n\tif ( bounds.setupAllFree( ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_INIT_FAILED );\r\n\r\n\tif ( constraints.setupAllInactive( ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_INIT_FAILED );\r\n\r\n\t/* 2) Setup optimal primal/dual solution for auxiliary QP. */\r\n\tif ( setupAuxiliaryQPsolution( xOpt,yOpt ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_INIT_FAILED );\r\n\r\n\t/* 3) Obtain linear independent working set for auxiliary QP. */\r\n\r\n\tstatic Bounds auxiliaryBounds;\r\n\r\n\tauxiliaryBounds.init( nV );\r\n\r\n\tstatic Constraints auxiliaryConstraints;\r\n\r\n\tauxiliaryConstraints.init( nC );\r\n\r\n\tif ( obtainAuxiliaryWorkingSet(\txOpt,yOpt,guessedBounds,guessedConstraints,\r\n\t\t\t\t\t\t\t\t\t&auxiliaryBounds,&auxiliaryConstraints ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_INIT_FAILED );\r\n\r\n\t/* 4) Setup working set of auxiliary QP and setup matrix factorisations. */\r\n\tif ( setupTQfactorisation( ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_INIT_FAILED_TQ );\r\n\r\n\tif ( setupAuxiliaryWorkingSet( &auxiliaryBounds,&auxiliaryConstraints,BT_TRUE ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_INIT_FAILED );\r\n\r\n\tif ( ( getNAC( ) + getNFX( ) ) == 0 )\r\n\t{\r\n\t\t/* Factorise full Hessian if no bounds/constraints are active. */\r\n\t\tif (hasCholesky == BT_FALSE)\r\n\t\t\tif ( setupCholeskyDecomposition( ) != SUCCESSFUL_RETURN )\r\n\t\t\t\treturn THROWERROR( RET_INIT_FAILED_CHOLESKY );\r\n\t\t/* ... else we use user provided Cholesky factorization. At the moment\r\n\t\t * we can do that only for cold-started solver. */\r\n\t}\r\n\telse\r\n\t{\r\n\t\t/* Factorise projected Hessian if there active bounds/constraints. */\r\n\t\tif ( setupCholeskyDecompositionProjected( ) != SUCCESSFUL_RETURN )\r\n\t\t\treturn THROWERROR( RET_INIT_FAILED_CHOLESKY );\r\n\t\t/* TODO: use user-supplied Hessian decomposition. R_Z = R * Z. */\r\n\t}\r\n\r\n\t/* 5) Store original QP formulation... */\r\n\treal_t g_original[NVMAX];\r\n\treal_t lb_original[NVMAX];\r\n\treal_t ub_original[NVMAX];\r\n\treal_t lbA_original[NCMAX_ALLOC];\r\n\treal_t ubA_original[NCMAX_ALLOC];\r\n\r\n\tfor( i=0; i<nV; ++i )\r\n\t{\r\n\t\tg_original[i] = g[i];\r\n\t\tlb_original[i] = lb[i];\r\n\t\tub_original[i] = ub[i];\r\n\t}\r\n\r\n\tfor( i=0; i<nC; ++i )\r\n\t{\r\n\t\tlbA_original[i] = lbA[i];\r\n\t\tubA_original[i] = ubA[i];\r\n\t}\r\n\r\n\t/* ... and setup QP data of an auxiliary QP having an optimal solution\r\n\t * as specified by the user (or xOpt = yOpt = 0, by default). */\r\n\tif ( setupAuxiliaryQPgradient( ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_INIT_FAILED );\r\n\r\n\tif ( setupAuxiliaryQPbounds( &auxiliaryBounds,&auxiliaryConstraints,BT_TRUE ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_INIT_FAILED );\r\n\r\n\tstatus = QPS_AUXILIARYQPSOLVED;\r\n\r\n\r\n\t/* III) SOLVE ACTUAL INITIAL QP: */\r\n\t/* Use hotstart method to find the solution of the original initial QP,... */\r\n\treturnValue returnvalue = hotstart( g_original,lb_original,ub_original,lbA_original,ubA_original, nWSR,0 );\r\n\r\n\r\n\t/* ... check for infeasibility and unboundedness... */\r\n\tif ( isInfeasible( ) == BT_TRUE )\r\n\t\treturn THROWERROR( RET_INIT_FAILED_INFEASIBILITY );\r\n\r\n\tif ( isUnbounded( ) == BT_TRUE )\r\n\t\treturn THROWERROR( RET_INIT_FAILED_UNBOUNDEDNESS );\r\n\r\n\t/* ... and internal errors. */\r\n\tif ( ( returnvalue != SUCCESSFUL_RETURN ) && ( returnvalue != RET_MAX_NWSR_REACHED )  &&\r\n\t     ( returnvalue != RET_INACCURATE_SOLUTION ) && ( returnvalue != RET_NO_SOLUTION ) )\r\n\t\treturn THROWERROR( RET_INIT_FAILED_HOTSTART );\r\n\r\n\r\n\t/* stop runtime measurement */\r\n\tif ( cputime != 0 )\r\n\t\t*cputime = getCPUtime( ) - starttime;\r\n\r\n\tif ( printlevel == PL_HIGH )\r\n\t\tTHROWINFO( RET_INIT_SUCCESSFUL );\r\n\r\n\treturn returnvalue;\r\n}\r\n\r\n\r\n/*\r\n *\to b t a i n A u x i l i a r y W o r k i n g S e t\r\n */\r\nreturnValue QProblem::obtainAuxiliaryWorkingSet(\tconst real_t* const xOpt, const real_t* const yOpt,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst Bounds* const guessedBounds, const Constraints* const guessedConstraints,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tBounds* auxiliaryBounds, Constraints* auxiliaryConstraints\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t) const\r\n{\r\n\tint i = 0;\r\n\tint nV = getNV( );\r\n\tint nC = getNC( );\r\n\r\n\r\n\t/* 1) Ensure that desiredBounds is allocated (and different from guessedBounds). */\r\n\tif ( ( auxiliaryBounds == 0 ) || ( auxiliaryBounds == guessedBounds ) )\r\n\t\treturn THROWERROR( RET_INVALID_ARGUMENTS );\r\n\r\n\tif ( ( auxiliaryConstraints == 0 ) || ( auxiliaryConstraints == guessedConstraints ) )\r\n\t\treturn THROWERROR( RET_INVALID_ARGUMENTS );\r\n\r\n\r\n\tSubjectToStatus guessedStatus;\r\n\r\n\t/* 2) Setup working set of bounds for auxiliary initial QP. */\r\n\tif ( QProblemB::obtainAuxiliaryWorkingSet( xOpt,yOpt,guessedBounds, auxiliaryBounds ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );\r\n\r\n\t/* 3) Setup working set of constraints for auxiliary initial QP. */\r\n\tif ( guessedConstraints != 0 )\r\n\t{\r\n\t\t/* If an initial working set is specific, use it!\r\n\t\t * Moreover, add all equality constraints if specified. */\r\n\t\tfor( i=0; i<nC; ++i )\r\n\t\t{\r\n\t\t\tguessedStatus = guessedConstraints->getStatus( i );\r\n\r\n\t\t\tif ( constraints.getType( i ) == ST_EQUALITY )\r\n\t\t\t{\r\n\t\t\t\tif ( auxiliaryConstraints->setupConstraint( i,ST_LOWER ) != SUCCESSFUL_RETURN )\r\n\t\t\t\t\treturn THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif ( auxiliaryConstraints->setupConstraint( i,guessedStatus ) != SUCCESSFUL_RETURN )\r\n\t\t\t\t\treturn THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\telse\t/* No initial working set specified. */\r\n\t{\r\n\t\t/* Obtain initial working set by \"clipping\". */\r\n\t\tif ( ( xOpt != 0 ) && ( yOpt == 0 ) )\r\n\t\t{\r\n\t\t\tfor( i=0; i<nC; ++i )\r\n\t\t\t{\r\n\t\t\t\tif ( Ax[i] <= lbA[i] + BOUNDTOL )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( auxiliaryConstraints->setupConstraint( i,ST_LOWER ) != SUCCESSFUL_RETURN )\r\n\t\t\t\t\t\treturn THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( Ax[i] >= ubA[i] - BOUNDTOL )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( auxiliaryConstraints->setupConstraint( i,ST_UPPER ) != SUCCESSFUL_RETURN )\r\n\t\t\t\t\t\t\treturn THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Moreover, add all equality constraints if specified. */\r\n\t\t\t\tif ( constraints.getType( i ) == ST_EQUALITY )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( auxiliaryConstraints->setupConstraint( i,ST_LOWER ) != SUCCESSFUL_RETURN )\r\n\t\t\t\t\t\treturn THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( auxiliaryConstraints->setupConstraint( i,ST_INACTIVE ) != SUCCESSFUL_RETURN )\r\n\t\t\t\t\t\treturn THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/* Obtain initial working set in accordance to sign of dual solution vector. */\r\n\t\tif ( ( xOpt == 0 ) && ( yOpt != 0 ) )\r\n\t\t{\r\n\t\t\tfor( i=0; i<nC; ++i )\r\n\t\t\t{\r\n\t\t\t\tif ( yOpt[nV+i] > ZERO )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( auxiliaryConstraints->setupConstraint( i,ST_LOWER ) != SUCCESSFUL_RETURN )\r\n\t\t\t\t\t\treturn THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( yOpt[nV+i] < -ZERO )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( auxiliaryConstraints->setupConstraint( i,ST_UPPER ) != SUCCESSFUL_RETURN )\r\n\t\t\t\t\t\treturn THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Moreover, add all equality constraints if specified. */\r\n\t\t\t\tif ( constraints.getType( i ) == ST_EQUALITY )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( auxiliaryConstraints->setupConstraint( i,ST_LOWER ) != SUCCESSFUL_RETURN )\r\n\t\t\t\t\t\treturn THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( auxiliaryConstraints->setupConstraint( i,ST_INACTIVE ) != SUCCESSFUL_RETURN )\r\n\t\t\t\t\t\treturn THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/* If xOpt and yOpt are null pointer and no initial working is specified,\r\n\t\t * start with empty working set (or implicitly fixed bounds and equality constraints only)\r\n\t\t * for auxiliary QP. */\r\n\t\tif ( ( xOpt == 0 ) && ( yOpt == 0 ) )\r\n\t\t{\r\n\t\t\tfor( i=0; i<nC; ++i )\r\n\t\t\t{\r\n\t\t\t\t/* Only add all equality constraints if specified. */\r\n\t\t\t\tif ( constraints.getType( i ) == ST_EQUALITY )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( auxiliaryConstraints->setupConstraint( i,ST_LOWER ) != SUCCESSFUL_RETURN )\r\n\t\t\t\t\t\treturn THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( auxiliaryConstraints->setupConstraint( i,ST_INACTIVE ) != SUCCESSFUL_RETURN )\r\n\t\t\t\t\t\treturn THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n\r\n/*\r\n *\ts e t u p A u x i l i a r y W o r k i n g S e t\r\n */\r\nreturnValue QProblem::setupAuxiliaryWorkingSet(\tconst Bounds* const auxiliaryBounds,\r\n\t\t\t\t\t\t\t\t\t\t\t\tconst Constraints* const auxiliaryConstraints,\r\n\t\t\t\t\t\t\t\t\t\t\t\tBooleanType setupAfresh\r\n\t\t\t\t\t\t\t\t\t\t\t\t)\r\n{\r\n\tint i;\r\n\tint nV = getNV( );\r\n\tint nC = getNC( );\r\n\r\n\t/* consistency checks */\r\n\tif ( auxiliaryBounds != 0 )\r\n\t{\r\n\t\tfor( i=0; i<nV; ++i )\r\n\t\t\tif ( ( bounds.getStatus( i ) == ST_UNDEFINED ) || ( auxiliaryBounds->getStatus( i ) == ST_UNDEFINED ) )\r\n\t\t\t\treturn THROWERROR( RET_UNKNOWN_BUG );\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn THROWERROR( RET_INVALID_ARGUMENTS );\r\n\t}\r\n\r\n\tif ( auxiliaryConstraints != 0 )\r\n\t{\r\n\t\tfor( i=0; i<nC; ++i )\r\n\t\t\tif ( ( constraints.getStatus( i ) == ST_UNDEFINED ) || ( auxiliaryConstraints->getStatus( i ) == ST_UNDEFINED ) )\r\n\t\t\t\treturn THROWERROR( RET_UNKNOWN_BUG );\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn THROWERROR( RET_INVALID_ARGUMENTS );\r\n\t}\r\n\r\n\r\n\t/* I) SETUP CHOLESKY FLAG:\r\n\t *    Cholesky decomposition shall only be updated if working set\r\n\t *    shall be updated (i.e. NOT setup afresh!) */\r\n\tBooleanType updateCholesky;\r\n\tif ( setupAfresh == BT_TRUE )\r\n\t\tupdateCholesky = BT_FALSE;\r\n\telse\r\n\t\tupdateCholesky = BT_TRUE;\r\n\r\n\r\n\t/* II) REMOVE FORMERLY ACTIVE (CONSTRAINTS') BOUNDS (IF NECESSARY): */\r\n\tif ( setupAfresh == BT_FALSE )\r\n\t{\r\n\t\t/* 1) Remove all active constraints that shall be inactive AND\r\n\t\t*    all active constraints that are active at the wrong bound. */\r\n\t\tfor( i=0; i<nC; ++i )\r\n\t\t{\r\n\t\t\tif ( ( constraints.getStatus( i ) == ST_LOWER ) && ( auxiliaryConstraints->getStatus( i ) != ST_LOWER ) )\r\n\t\t\t\tif ( removeConstraint( i,updateCholesky ) != SUCCESSFUL_RETURN )\r\n\t\t\t\t\treturn THROWERROR( RET_SETUP_WORKINGSET_FAILED );\r\n\r\n\t\t\tif ( ( constraints.getStatus( i ) == ST_UPPER ) && ( auxiliaryConstraints->getStatus( i ) != ST_UPPER ) )\r\n\t\t\t\tif ( removeConstraint( i,updateCholesky ) != SUCCESSFUL_RETURN )\r\n\t\t\t\t\treturn THROWERROR( RET_SETUP_WORKINGSET_FAILED );\r\n\t\t}\r\n\r\n\t\t/* 2) Remove all active bounds that shall be inactive AND\r\n\t\t*    all active bounds that are active at the wrong bound. */\r\n\t\tfor( i=0; i<nV; ++i )\r\n\t\t{\r\n\t\t\tif ( ( bounds.getStatus( i ) == ST_LOWER ) && ( auxiliaryBounds->getStatus( i ) != ST_LOWER ) )\r\n\t\t\t\tif ( removeBound( i,updateCholesky ) != SUCCESSFUL_RETURN )\r\n\t\t\t\t\treturn THROWERROR( RET_SETUP_WORKINGSET_FAILED );\r\n\r\n\t\t\tif ( ( bounds.getStatus( i ) == ST_UPPER ) && ( auxiliaryBounds->getStatus( i ) != ST_UPPER ) )\r\n\t\t\t\tif ( removeBound( i,updateCholesky ) != SUCCESSFUL_RETURN )\r\n\t\t\t\t\treturn THROWERROR( RET_SETUP_WORKINGSET_FAILED );\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t/* III) ADD NEWLY ACTIVE (CONSTRAINTS') BOUNDS: */\r\n\t/* 1) Add all inactive bounds that shall be active AND\r\n\t *    all formerly active bounds that have been active at the wrong bound. */\r\n\tfor( i=0; i<nV; ++i )\r\n\t{\r\n\t\tif ( ( bounds.getStatus( i ) == ST_INACTIVE ) && ( auxiliaryBounds->getStatus( i ) != ST_INACTIVE ) )\r\n\t\t{\r\n\t\t\t/* Add bound only if it is linearly independent from the current working set. */\r\n\t\t\tif ( addBound_checkLI( i ) == RET_LINEARLY_INDEPENDENT )\r\n\t\t\t{\r\n\t\t\t\tif ( addBound( i,auxiliaryBounds->getStatus( i ),updateCholesky ) != SUCCESSFUL_RETURN )\r\n\t\t\t\t\treturn THROWERROR( RET_SETUP_WORKINGSET_FAILED );\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/* 2) Add all inactive constraints that shall be active AND\r\n\t *    all formerly active constraints that have been active at the wrong bound. */\r\n\tfor( i=0; i<nC; ++i )\r\n\t{\r\n\t\tif ( ( auxiliaryConstraints->getStatus( i ) == ST_LOWER ) || ( auxiliaryConstraints->getStatus( i ) == ST_UPPER ) )\r\n\t\t{\r\n\t\t\t/* formerly inactive */\r\n\t\t\tif ( constraints.getStatus( i ) == ST_INACTIVE )\r\n\t\t\t{\r\n\t\t\t\t/* Add constraint only if it is linearly independent from the current working set. */\r\n\t\t\t\tif ( addConstraint_checkLI( i ) == RET_LINEARLY_INDEPENDENT )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( addConstraint( i,auxiliaryConstraints->getStatus( i ),updateCholesky ) != SUCCESSFUL_RETURN )\r\n\t\t\t\t\t\treturn THROWERROR( RET_SETUP_WORKINGSET_FAILED );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\ts e t u p A u x i l i a r y Q P s o l u t i o n\r\n */\r\nreturnValue QProblem::setupAuxiliaryQPsolution(\tconst real_t* const xOpt, const real_t* const yOpt\r\n\t\t\t\t\t\t\t\t\t\t\t\t)\r\n{\r\n\tint i, j;\r\n\tint nV = getNV( );\r\n\tint nC = getNC( );\r\n\r\n\r\n\t/* Setup primal/dual solution vector for auxiliary initial QP:\r\n\t * if a null pointer is passed, a zero vector is assigned;\r\n\t *  old solution vector is kept if pointer to internal solution vevtor is passed. */\r\n\tif ( xOpt != 0 )\r\n\t{\r\n\t\tif ( xOpt != x )\r\n\t\t\tfor( i=0; i<nV; ++i )\r\n\t\t\t\tx[i] = xOpt[i];\r\n\r\n\t\tfor ( j=0; j<nC; ++j )\r\n\t\t{\r\n\t\t\tAx[j] = 0.0;\r\n\r\n\t\t\tfor( i=0; i<nV; ++i )\r\n\t\t\t\tAx[j] += A[j*NVMAX + i] * x[i];\r\n\t\t}\r\n\t}\r\n\telse\r\n\t{\r\n\t\tfor( i=0; i<nV; ++i )\r\n\t\t\tx[i] = 0.0;\r\n\r\n\t\tfor ( j=0; j<nC; ++j )\r\n\t\t\tAx[j] = 0.0;\r\n\t}\r\n\r\n\tif ( yOpt != 0 )\r\n\t{\r\n\t\tif ( yOpt != y )\r\n\t\t\tfor( i=0; i<nV+nC; ++i )\r\n\t\t\t\ty[i] = yOpt[i];\r\n\t}\r\n\telse\r\n\t{\r\n\t\tfor( i=0; i<nV+nC; ++i )\r\n\t\t\ty[i] = 0.0;\r\n\t}\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\ts e t u p A u x i l i a r y Q P g r a d i e n t\r\n */\r\nreturnValue QProblem::setupAuxiliaryQPgradient( )\r\n{\r\n\tint i, j;\r\n\tint nV = getNV( );\r\n\tint nC = getNC( );\r\n\r\n\r\n\t/* Setup gradient vector: g = -H*x + [Id A]'*[yB yC]. */\r\n\tfor ( i=0; i<nV; ++i )\r\n\t{\r\n\t\t/* Id'*yB */\r\n\t\tg[i] = y[i];\r\n\r\n\t\t/* A'*yC */\r\n\t\tfor ( j=0; j<nC; ++j )\r\n\t\t\tg[i] += A[j*NVMAX + i] * y[nV+j];\r\n\r\n\t\t/* -H*x */\r\n\t\tfor ( j=0; j<nV; ++j )\r\n\t\t\tg[i] -= H[i*NVMAX + j] * x[j];\r\n\t}\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\ts e t u p A u x i l i a r y Q P b o u n d s\r\n */\r\nreturnValue QProblem::setupAuxiliaryQPbounds(\tconst Bounds* const auxiliaryBounds,\r\n\t\t\t\t\t\t\t\t\t\t\t\tconst Constraints* const auxiliaryConstraints,\r\n\t\t\t\t\t\t\t\t\t\t\t\tBooleanType useRelaxation\r\n\t\t\t\t\t\t\t\t\t\t\t\t)\r\n{\r\n\tint i;\r\n\tint nV = getNV( );\r\n\tint nC = getNC( );\r\n\r\n\r\n\t/* 1) Setup bound vectors. */\r\n\tfor ( i=0; i<nV; ++i )\r\n\t{\r\n\t\tswitch ( bounds.getStatus( i ) )\r\n\t\t{\r\n\t\t\tcase ST_INACTIVE:\r\n\t\t\t\tif ( useRelaxation == BT_TRUE )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( bounds.getType( i ) == ST_EQUALITY )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlb[i] = x[i];\r\n\t\t\t\t\t\tub[i] = x[i];\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t/* If a bound is inactive although it was supposed to be\r\n\t\t\t\t\t\t* active by the auxiliaryBounds, it could not be added\r\n\t\t\t\t\t\t* due to linear dependence. Thus set it \"strongly inactive\". */\r\n\t\t\t\t\t\tif ( auxiliaryBounds->getStatus( i ) == ST_LOWER )\r\n\t\t\t\t\t\t\tlb[i] = x[i];\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tlb[i] = x[i] - BOUNDRELAXATION;\r\n\r\n\t\t\t\t\t\tif ( auxiliaryBounds->getStatus( i ) == ST_UPPER )\r\n\t\t\t\t\t\t\tub[i] = x[i];\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tub[i] = x[i] + BOUNDRELAXATION;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase ST_LOWER:\r\n\t\t\t\tlb[i] = x[i];\r\n\t\t\t\tif ( bounds.getType( i ) == ST_EQUALITY )\r\n\t\t\t\t{\r\n\t\t\t\t\tub[i] = x[i];\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( useRelaxation == BT_TRUE )\r\n\t\t\t\t\t\tub[i] = x[i] + BOUNDRELAXATION;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase ST_UPPER:\r\n\t\t\t\tub[i] = x[i];\r\n\t\t\t\tif ( bounds.getType( i ) == ST_EQUALITY )\r\n\t\t\t\t{\r\n\t\t\t\t\tlb[i] = x[i];\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( useRelaxation == BT_TRUE )\r\n\t\t\t\t\t\tlb[i] = x[i] - BOUNDRELAXATION;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\t\treturn THROWERROR( RET_UNKNOWN_BUG );\r\n\t\t}\r\n\t}\r\n\r\n\t/* 2) Setup constraints vectors. */\r\n\tfor ( i=0; i<nC; ++i )\r\n\t{\r\n\t\tswitch ( constraints.getStatus( i ) )\r\n\t\t{\r\n\t\t\tcase ST_INACTIVE:\r\n\t\t\t\tif ( useRelaxation == BT_TRUE )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( constraints.getType( i ) == ST_EQUALITY )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlbA[i] = Ax[i];\r\n\t\t\t\t\t\tubA[i] = Ax[i];\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t/* If a constraint is inactive although it was supposed to be\r\n\t\t\t\t\t\t* active by the auxiliaryConstraints, it could not be added\r\n\t\t\t\t\t\t* due to linear dependence. Thus set it \"strongly inactive\". */\r\n\t\t\t\t\t\tif ( auxiliaryConstraints->getStatus( i ) == ST_LOWER )\r\n\t\t\t\t\t\t\tlbA[i] = Ax[i];\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tlbA[i] = Ax[i] - BOUNDRELAXATION;\r\n\r\n\t\t\t\t\t\tif ( auxiliaryConstraints->getStatus( i ) == ST_UPPER )\r\n\t\t\t\t\t\t\tubA[i] = Ax[i];\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tubA[i] = Ax[i] + BOUNDRELAXATION;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase ST_LOWER:\r\n\t\t\t\tlbA[i] = Ax[i];\r\n\t\t\t\tif ( constraints.getType( i ) == ST_EQUALITY )\r\n\t\t\t\t{\r\n\t\t\t\t\tubA[i] = Ax[i];\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( useRelaxation == BT_TRUE )\r\n\t\t\t\t\t\tubA[i] = Ax[i] + BOUNDRELAXATION;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase ST_UPPER:\r\n\t\t\t\tubA[i] = Ax[i];\r\n\t\t\t\tif ( constraints.getType( i ) == ST_EQUALITY )\r\n\t\t\t\t{\r\n\t\t\t\t\tlbA[i] = Ax[i];\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( useRelaxation == BT_TRUE )\r\n\t\t\t\t\t\tlbA[i] = Ax[i] - BOUNDRELAXATION;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\t\treturn THROWERROR( RET_UNKNOWN_BUG );\r\n\t\t}\r\n\t}\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\ta d d C o n s t r a i n t\r\n */\r\nreturnValue QProblem::addConstraint(\tint number, SubjectToStatus C_status,\r\n\t\t\t\t\t\t\t\t\t\tBooleanType updateCholesky\r\n\t\t\t\t\t\t\t\t\t\t)\r\n{\r\n\tint i, j, ii;\r\n\r\n\t/* consistency checks */\r\n\tif ( constraints.getStatus( number ) != ST_INACTIVE )\r\n\t\treturn THROWERROR( RET_CONSTRAINT_ALREADY_ACTIVE );\r\n\r\n\tif ( ( constraints.getNC( ) - getNAC( ) ) == constraints.getNUC( ) )\r\n\t\treturn THROWERROR( RET_ALL_CONSTRAINTS_ACTIVE );\r\n\r\n\tif ( ( getStatus( ) == QPS_NOTINITIALISED )    ||\r\n\t\t ( getStatus( ) == QPS_AUXILIARYQPSOLVED ) ||\r\n\t\t ( getStatus( ) == QPS_HOMOTOPYQPSOLVED )  ||\r\n\t\t ( getStatus( ) == QPS_SOLVED )            )\r\n\t{\r\n\t\treturn THROWERROR( RET_UNKNOWN_BUG );\r\n\t}\r\n\r\n\r\n\t/* I) ENSURE LINEAR INDEPENDENCE OF THE WORKING SET,\r\n\t *    i.e. remove a constraint or bound if linear dependence occurs. */\r\n\t/* check for LI only if Cholesky decomposition shall be updated! */\r\n\tif ( updateCholesky == BT_TRUE )\r\n\t{\r\n\t\treturnValue ensureLIreturnvalue = addConstraint_ensureLI( number,C_status );\r\n\r\n\t\tswitch ( ensureLIreturnvalue )\r\n\t\t{\r\n\t\t\tcase SUCCESSFUL_RETURN:\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase RET_LI_RESOLVED:\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase RET_ENSURELI_FAILED_NOINDEX:\r\n\t\t\t\treturn THROWERROR( RET_ADDCONSTRAINT_FAILED_INFEASIBILITY );\r\n\r\n\t\t\tcase RET_ENSURELI_FAILED_CYCLING:\r\n\t\t\t\treturn THROWERROR( RET_ADDCONSTRAINT_FAILED_INFEASIBILITY );\r\n\r\n\t\t\tdefault:\r\n\t\t\t\treturn THROWERROR( RET_ENSURELI_FAILED );\r\n\t\t}\r\n\t}\r\n\r\n\t/* some definitions */\r\n\tint nFR = getNFR( );\r\n\tint nAC = getNAC( );\r\n\tint nZ  = getNZ( );\r\n\r\n\tint tcol = sizeT - nAC;\r\n\r\n\r\n\tint FR_idx[NVMAX];\r\n\tif ( bounds.getFree( )->getNumberArray( FR_idx ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_ADDCONSTRAINT_FAILED );\r\n\r\n\treal_t aFR[NVMAX];\r\n\treal_t wZ[NVMAX];\r\n\tfor( i=0; i<nZ; ++i )\r\n\t\twZ[i] = 0.0;\r\n\r\n\r\n\t/* II) ADD NEW ACTIVE CONSTRAINT TO MATRIX T: */\r\n\t/* 1) Add row [wZ wY] = aFR'*[Z Y] to the end of T: assign aFR. */\r\n\tfor( i=0; i<nFR; ++i )\r\n\t{\r\n\t\tii = FR_idx[i];\r\n\t\taFR[i] = A[number*NVMAX + ii];\r\n\t}\r\n\r\n\t/* calculate wZ */\r\n\tfor( i=0; i<nFR; ++i )\r\n\t{\r\n\t\tii = FR_idx[i];\r\n\t\tfor( j=0; j<nZ; ++j )\r\n\t\t\twZ[j] += aFR[i] * Q[ii*NVMAX + j];\r\n\t}\r\n\r\n\t/* 2) Calculate wY and store it directly into T. */\r\n\tif ( nAC > 0 )\r\n\t{\r\n\t\tfor( j=0; j<nAC; ++j )\r\n\t\t\tT[nAC*NVMAX + tcol+j] = 0.0;\r\n\t\tfor( i=0; i<nFR; ++i )\r\n\t\t{\r\n\t\t\tii = FR_idx[i];\r\n\t\t\tfor( j=0; j<nAC; ++j )\r\n\t\t\t\tT[nAC*NVMAX + tcol+j] += aFR[i] * Q[ii*NVMAX + nZ+j];\r\n\t\t}\r\n\t}\r\n\r\n\r\n\treal_t c, s;\r\n\r\n\tif ( nZ > 0 )\r\n\t{\r\n\t\t/* II) RESTORE TRIANGULAR FORM OF T: */\r\n\t\t/*     Use column-wise Givens rotations to restore reverse triangular form\r\n\t\t*      of T, simultanenous change of Q (i.e. Z) and R. */\r\n\t\tfor( j=0; j<nZ-1; ++j )\r\n\t\t{\r\n\t\t\tcomputeGivens( wZ[j+1],wZ[j], wZ[j+1],wZ[j],c,s );\r\n\r\n\t\t\tfor( i=0; i<nFR; ++i )\r\n\t\t\t{\r\n\t\t\t\tii = FR_idx[i];\r\n\t\t\t\tapplyGivens( c,s,Q[ii*NVMAX + 1+j],Q[ii*NVMAX + j], Q[ii*NVMAX + 1+j],Q[ii*NVMAX + j] );\r\n\t\t\t}\r\n\r\n\t\t\tif ( ( updateCholesky == BT_TRUE ) && ( hessianType != HST_IDENTITY ) )\r\n\t\t\t{\r\n\t\t\t\tfor( i=0; i<=j+1; ++i )\r\n\t\t\t\t\tapplyGivens( c,s,R[i*NVMAX + 1+j],R[i*NVMAX + j], R[i*NVMAX + 1+j],R[i*NVMAX + j] );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tT[nAC*NVMAX + tcol-1] = wZ[nZ-1];\r\n\r\n\r\n\t\tif ( ( updateCholesky == BT_TRUE ) && ( hessianType != HST_IDENTITY ) )\r\n\t\t{\r\n\t\t\t/* III) RESTORE TRIANGULAR FORM OF R:\r\n\t\t\t *      Use row-wise Givens rotations to restore upper triangular form of R. */\r\n\t\t\tfor( i=0; i<nZ-1; ++i )\r\n\t\t\t{\r\n\t\t\t\tcomputeGivens( R[i*NVMAX + i],R[(1+i)*NVMAX + i], R[i*NVMAX + i],R[(1+i)*NVMAX + i],c,s );\r\n\r\n\t\t\t\tfor( j=(1+i); j<(nZ-1); ++j ) /* last column of R is thrown away */\r\n\t\t\t\t\tapplyGivens( c,s,R[i*NVMAX + j],R[(1+i)*NVMAX + j], R[i*NVMAX + j],R[(1+i)*NVMAX + j] );\r\n\t\t\t}\r\n\t\t\t/* last column of R is thrown away */\r\n\t\t\tfor( i=0; i<nZ; ++i )\r\n\t\t\t\tR[i*NVMAX + nZ-1] = 0.0;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t/* IV) UPDATE INDICES */\r\n\tif ( constraints.moveInactiveToActive( number,C_status ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_ADDCONSTRAINT_FAILED );\r\n\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n\r\n/*\r\n *\ta d d C o n s t r a i n t _ c h e c k L I\r\n */\r\nreturnValue QProblem::addConstraint_checkLI( int number )\r\n{\r\n\tint i, j, jj;\r\n\tint nFR = getNFR( );\r\n\tint nZ  = getNZ( );\r\n\r\n\tint FR_idx[NVMAX];\r\n\tif ( bounds.getFree( )->getNumberArray( FR_idx ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_INDEXLIST_CORRUPTED );\r\n\r\n\t/* Check if constraint <number> is linearly independent from the\r\n\t   the active ones (<=> is element of null space of Afr). */\r\n\treal_t sum;\r\n\r\n\tfor( i=0; i<nZ; ++i )\r\n\t{\r\n\t\tsum = 0.0;\r\n\t\tfor( j=0; j<nFR; ++j )\r\n\t\t{\r\n\t\t\tjj = FR_idx[j];\r\n\t\t\tsum += Q[jj*NVMAX + i] * A[number*NVMAX + jj];\r\n\t\t}\r\n\r\n\t\tif ( getAbs( sum ) > 10.0*EPS )\r\n\t\t\treturn RET_LINEARLY_INDEPENDENT;\r\n\t}\r\n\r\n\treturn RET_LINEARLY_DEPENDENT;\r\n}\r\n\r\n\r\n/*\r\n *\ta d d C o n s t r a i n t _ e n s u r e L I\r\n */\r\nreturnValue QProblem::addConstraint_ensureLI( int number, SubjectToStatus C_status )\r\n{\r\n\tint i, j, ii, jj;\r\n\tint nV  = getNV( );\r\n\tint nFR = getNFR( );\r\n\tint nFX = getNFX( );\r\n\tint nAC = getNAC( );\r\n\tint nZ  = getNZ( );\r\n\r\n\r\n\t/* I) Check if new constraint is linearly independent from the active ones. */\r\n\treturnValue returnvalueCheckLI = addConstraint_checkLI( number );\r\n\r\n\tif ( returnvalueCheckLI == RET_INDEXLIST_CORRUPTED )\r\n\t\treturn THROWERROR( RET_ENSURELI_FAILED );\r\n\r\n\tif ( returnvalueCheckLI == RET_LINEARLY_INDEPENDENT )\r\n\t\treturn SUCCESSFUL_RETURN;\r\n\r\n\r\n \t/* II) NEW CONSTRAINT IS LINEARLY DEPENDENT: */\r\n\t/* 1) Determine coefficients of linear combination,\r\n\t *    cf. M.J. Best. Applied Mathematics and Parallel Computing, chapter:\r\n\t *    An Algorithm for the Solution of the Parametric Quadratic Programming\r\n\t *    Problem, pages 57-76. Physica-Verlag, Heidelberg, 1996. */\r\n\tint FR_idx[NVMAX];\r\n\tif ( bounds.getFree( )->getNumberArray( FR_idx ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_ENSURELI_FAILED );\r\n\r\n\tint FX_idx[NVMAX];\r\n\tif ( bounds.getFixed( )->getNumberArray( FX_idx ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_ENSURELI_FAILED );\r\n\r\n\treal_t xiC[NCMAX_ALLOC];\r\n\treal_t xiC_TMP[NCMAX_ALLOC];\r\n\treal_t xiB[NVMAX];\r\n\r\n\t/* 2) Calculate xiC */\r\n\tif ( nAC > 0 )\r\n\t{\r\n\t\tif ( C_status == ST_LOWER )\r\n\t\t{\r\n\t\t\tfor( i=0; i<nAC; ++i )\r\n\t\t\t{\r\n\t\t\t\txiC_TMP[i] = 0.0;\r\n\t\t\t\tfor( j=0; j<nFR; ++j )\r\n\t\t\t\t{\r\n\t\t\t\t\tjj = FR_idx[j];\r\n\t\t\t\t\txiC_TMP[i] += Q[jj*NVMAX + nZ+i] * A[number*NVMAX + jj];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tfor( i=0; i<nAC; ++i )\r\n\t\t\t{\r\n\t\t\t\txiC_TMP[i] = 0.0;\r\n\t\t\t\tfor( j=0; j<nFR; ++j )\r\n\t\t\t\t{\r\n\t\t\t\t\tjj = FR_idx[j];\r\n\t\t\t\t\txiC_TMP[i] -= Q[jj*NVMAX + nZ+i] * A[number*NVMAX + jj];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ( backsolveT( xiC_TMP, BT_TRUE, xiC ) != SUCCESSFUL_RETURN )\r\n\t\t\treturn THROWERROR( RET_ENSURELI_FAILED_TQ );\r\n\t}\r\n\r\n\t/* 3) Calculate xiB. */\r\n\tint AC_idx[NCMAX_ALLOC];\r\n\tif ( constraints.getActive( )->getNumberArray( AC_idx ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_ENSURELI_FAILED );\r\n\r\n\tif ( C_status == ST_LOWER )\r\n\t{\r\n\t\tfor( i=0; i<nFX; ++i )\r\n\t\t{\r\n\t\t\tii = FX_idx[i];\r\n\t\t\txiB[i] = A[number*NVMAX + ii];\r\n\r\n\t\t\tfor( j=0; j<nAC; ++j )\r\n\t\t\t{\r\n\t\t\t\tjj = AC_idx[j];\r\n\t\t\t\txiB[i] -= A[jj*NVMAX + ii] * xiC[j];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\telse\r\n\t{\r\n\t\tfor( i=0; i<nFX; ++i )\r\n\t\t{\r\n\t\t\tii = FX_idx[i];\r\n\t\t\txiB[i] = -A[number*NVMAX + ii];\r\n\r\n\t\t\tfor( j=0; j<nAC; ++j )\r\n\t\t\t{\r\n\t\t\t\tjj = AC_idx[j];\r\n\t\t\t\txiB[i] -= A[jj*NVMAX + ii] * xiC[j];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t/* III) DETERMINE CONSTRAINT/BOUND TO BE REMOVED. */\r\n\treal_t y_min = INFTY * INFTY;\r\n\tint y_min_number = -1;\r\n\tBooleanType y_min_isBound = BT_FALSE;\r\n\r\n\t/* 1) Constraints. */\r\n\tfor( i=0; i<nAC; ++i )\r\n\t{\r\n\t\tii = AC_idx[i];\r\n\r\n\t\tif ( constraints.getStatus( ii ) == ST_LOWER )\r\n\t\t{\r\n\t\t\tif ( ( xiC[i] > ZERO ) && ( y[nV+ii] >= 0.0 ) )\r\n\t\t\t{\r\n\t\t\t\tif ( y[nV+ii]/xiC[i] < y_min )\r\n\t\t\t\t{\r\n\t\t\t\t\ty_min = y[nV+ii]/xiC[i];\r\n\t\t\t\t\ty_min_number = ii;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif ( ( xiC[i] < -ZERO ) && ( y[nV+ii] <= 0.0 ) )\r\n\t\t\t{\r\n\t\t\t\tif ( y[nV+ii]/xiC[i] < y_min )\r\n\t\t\t\t{\r\n\t\t\t\t\ty_min = y[nV+ii]/xiC[i];\r\n\t\t\t\t\ty_min_number = ii;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/* 2) Bounds. */\r\n\tfor( i=0; i<nFX; ++i )\r\n\t{\r\n\t\tii = FX_idx[i];\r\n\r\n\t\tif ( bounds.getStatus( ii ) == ST_LOWER )\r\n\t\t{\r\n\t\t\tif ( ( xiB[i] > ZERO ) && ( y[ii] >= 0.0 ) )\r\n\t\t\t{\r\n\t\t\t\tif ( y[ii]/xiB[i] < y_min )\r\n\t\t\t\t{\r\n\t\t\t\t\ty_min = y[ii]/xiB[i];\r\n\t\t\t\t\ty_min_number = ii;\r\n\t\t\t\t\ty_min_isBound = BT_TRUE;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif ( ( xiB[i] < -ZERO ) && ( y[ii] <= 0.0 ) )\r\n\t\t\t{\r\n\t\t\t\tif ( y[ii]/xiB[i] < y_min )\r\n\t\t\t\t{\r\n\t\t\t\t\ty_min = y[ii]/xiB[i];\r\n\t\t\t\t\ty_min_number = ii;\r\n\t\t\t\t\ty_min_isBound = BT_TRUE;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/* setup output preferences */\r\n\t#ifdef PC_DEBUG\r\n\tchar messageString[80];\r\n\tVisibilityStatus visibilityStatus;\r\n\r\n\tif ( printlevel == PL_HIGH )\r\n\t\tvisibilityStatus = VS_VISIBLE;\r\n\telse\r\n\t\tvisibilityStatus = VS_HIDDEN;\r\n\t#endif\r\n\r\n\r\n\t/* IV) REMOVE CONSTRAINT/BOUND FOR RESOLVING LINEAR DEPENDENCE: */\r\n\tif ( y_min_number >= 0 )\r\n\t{\r\n\t\t/* 1) Check for cycling due to infeasibility. */\r\n\t\tif ( ( cyclingManager.getCyclingStatus( number,BT_FALSE ) == CYC_PREV_REMOVED ) &&\r\n\t\t\t ( cyclingManager.getCyclingStatus( y_min_number,y_min_isBound ) == CYC_PREV_ADDED ) )\r\n\t\t{\r\n\t\t\tinfeasible = BT_TRUE;\r\n\r\n\t\t\treturn THROWERROR( RET_ENSURELI_FAILED_CYCLING );\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t/* set cycling data */\r\n\t\t\tcyclingManager.clearCyclingData( );\r\n\t\t\tcyclingManager.setCyclingStatus( number,BT_FALSE, CYC_PREV_ADDED );\r\n\t\t\tcyclingManager.setCyclingStatus( y_min_number,y_min_isBound, CYC_PREV_REMOVED );\r\n\t\t}\r\n\r\n\t\t/* 2) Update Lagrange multiplier... */\r\n\t\tfor( i=0; i<nAC; ++i )\r\n\t\t{\r\n\t\t\tii = AC_idx[i];\r\n\t\t\ty[nV+ii] -= y_min * xiC[i];\r\n\t\t}\r\n\t\tfor( i=0; i<nFX; ++i )\r\n\t\t{\r\n\t\t\tii = FX_idx[i];\r\n\t\t\ty[ii] -= y_min * xiB[i];\r\n\t\t}\r\n\r\n\t\t/* ... also for newly active constraint... */\r\n\t\tif ( C_status == ST_LOWER )\r\n\t\t\ty[nV+number] = y_min;\r\n\t\telse\r\n\t\t\ty[nV+number] = -y_min;\r\n\r\n\t\t/* ... and for constraint to be removed. */\r\n\t\tif ( y_min_isBound == BT_TRUE )\r\n\t\t{\r\n\t\t\t#ifdef PC_DEBUG\r\n\t\t\tsprintf( messageString,\"bound no. %d.\",y_min_number );\r\n\t\t\tgetGlobalMessageHandler( )->throwInfo( RET_REMOVE_FROM_ACTIVESET,messageString,__FUNCTION__,__FILE__,__LINE__,visibilityStatus );\r\n\t\t\t#endif\r\n\r\n\t\t\tif ( removeBound( y_min_number,BT_TRUE ) != SUCCESSFUL_RETURN )\r\n\t\t\t\treturn THROWERROR( RET_REMOVE_FROM_ACTIVESET_FAILED );\r\n\r\n\t\t\ty[y_min_number] = 0.0;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t#ifdef PC_DEBUG\r\n\t\t\tsprintf( messageString,\"constraint no. %d.\",y_min_number );\r\n\t\t\tgetGlobalMessageHandler( )->throwInfo( RET_REMOVE_FROM_ACTIVESET,messageString,__FUNCTION__,__FILE__,__LINE__,visibilityStatus );\r\n\t\t\t#endif\r\n\r\n\t\t\tif ( removeConstraint( y_min_number,BT_TRUE ) != SUCCESSFUL_RETURN )\r\n\t\t\t\treturn THROWERROR( RET_REMOVE_FROM_ACTIVESET_FAILED );\r\n\r\n\t\t\ty[nV+y_min_number] = 0.0;\r\n\t\t}\r\n\t}\r\n\telse\r\n\t{\r\n\t\t/* no constraint/bound can be removed => QP is infeasible! */\r\n\t\tinfeasible = BT_TRUE;\r\n\r\n\t\treturn THROWERROR( RET_ENSURELI_FAILED_NOINDEX );\r\n\t}\r\n\r\n\treturn getGlobalMessageHandler( )->throwInfo( RET_LI_RESOLVED,0,__FUNCTION__,__FILE__,__LINE__,VS_HIDDEN );\r\n}\r\n\r\n\r\n\r\n/*\r\n *\ta d d B o u n d\r\n */\r\nreturnValue QProblem::addBound(\tint number, SubjectToStatus B_status,\r\n\t\t\t\t\t\t\t\tBooleanType updateCholesky\r\n\t\t\t\t\t\t\t\t)\r\n{\r\n\tint i, j, ii;\r\n\r\n\t/* consistency checks */\r\n\tif ( bounds.getStatus( number ) != ST_INACTIVE )\r\n\t\treturn THROWERROR( RET_BOUND_ALREADY_ACTIVE );\r\n\r\n\tif ( getNFR( ) == bounds.getNUV( ) )\r\n\t\treturn THROWERROR( RET_ALL_BOUNDS_ACTIVE );\r\n\r\n\tif ( ( getStatus( ) == QPS_NOTINITIALISED )    ||\r\n\t\t ( getStatus( ) == QPS_AUXILIARYQPSOLVED ) ||\r\n\t\t ( getStatus( ) == QPS_HOMOTOPYQPSOLVED )  ||\r\n \t\t ( getStatus( ) == QPS_SOLVED )            )\r\n\t{\r\n\t\treturn THROWERROR( RET_UNKNOWN_BUG );\r\n\t}\r\n\r\n\r\n\t/* I) ENSURE LINEAR INDEPENDENCE OF THE WORKING SET,\r\n\t *    i.e. remove a constraint or bound if linear dependence occurs. */\r\n\t/* check for LI only if Cholesky decomposition shall be updated! */\r\n\tif ( updateCholesky == BT_TRUE )\r\n\t{\r\n\t\treturnValue ensureLIreturnvalue = addBound_ensureLI( number,B_status );\r\n\r\n\t\tswitch ( ensureLIreturnvalue )\r\n\t\t{\r\n\t\t\tcase SUCCESSFUL_RETURN:\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase RET_LI_RESOLVED:\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase RET_ENSURELI_FAILED_NOINDEX:\r\n\t\t\t\treturn THROWERROR( RET_ADDBOUND_FAILED_INFEASIBILITY );\r\n\r\n\t\t\tcase RET_ENSURELI_FAILED_CYCLING:\r\n\t\t\t\treturn THROWERROR( RET_ADDBOUND_FAILED_INFEASIBILITY );\r\n\r\n\t\t\tdefault:\r\n\t\t\t\treturn THROWERROR( RET_ENSURELI_FAILED );\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t/* some definitions */\r\n\tint nFR = getNFR( );\r\n\tint nAC = getNAC( );\r\n\tint nZ  = getNZ( );\r\n\r\n\tint tcol = sizeT - nAC;\r\n\r\n\r\n\t/* I) SWAP INDEXLIST OF FREE VARIABLES:\r\n\t *    move the variable to be fixed to the end of the list of free variables. */\r\n\tint lastfreenumber = bounds.getFree( )->getLastNumber( );\r\n\tif ( lastfreenumber != number )\r\n\t\tif ( bounds.swapFree( number,lastfreenumber ) != SUCCESSFUL_RETURN )\r\n\t\t\tTHROWERROR( RET_ADDBOUND_FAILED );\r\n\r\n\r\n\tint FR_idx[NVMAX];\r\n\tif ( bounds.getFree( )->getNumberArray( FR_idx ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_ADDBOUND_FAILED );\r\n\r\n\treal_t w[NVMAX];\r\n\r\n\r\n\t/* II) ADD NEW ACTIVE BOUND TO TOP OF MATRIX T: */\r\n\t/* 1) add row [wZ wY] = [Z Y](number) at the top of T: assign w */\r\n\tfor( i=0; i<nFR; ++i )\r\n\t\tw[i] = Q[FR_idx[nFR-1]*NVMAX + i];\r\n\r\n\r\n\t/* 2) Use column-wise Givens rotations to restore reverse triangular form\r\n\t *    of the first row of T, simultanenous change of Q (i.e. Z) and R. */\r\n\treal_t c, s;\r\n\r\n\tfor( j=0; j<nZ-1; ++j )\r\n\t{\r\n\t\tcomputeGivens( w[j+1],w[j], w[j+1],w[j],c,s );\r\n\r\n\t\tfor( i=0; i<nFR; ++i )\r\n\t\t{\r\n\t\t\tii = FR_idx[i];\r\n\t\t\tapplyGivens( c,s,Q[ii*NVMAX + 1+j],Q[ii*NVMAX + j], Q[ii*NVMAX + 1+j],Q[ii*NVMAX + j] );\r\n\t\t}\r\n\r\n\t\tif ( ( updateCholesky == BT_TRUE ) && ( hessianType != HST_IDENTITY ) )\r\n\t\t{\r\n\t\t\tfor( i=0; i<=j+1; ++i )\r\n\t\t\t\tapplyGivens( c,s,R[i*NVMAX + 1+j],R[i*NVMAX + j], R[i*NVMAX + 1+j],R[i*NVMAX + j] );\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tif ( nAC > 0 )\t  /* ( nAC == 0 ) <=> ( nZ == nFR ) <=> Y and T are empty => nothing to do */\r\n\t{\r\n\t\t/* store new column a in a temporary vector instead of shifting T one column to the left */\r\n\t\treal_t tmp[NCMAX_ALLOC];\r\n\t\tfor( i=0; i<nAC; ++i )\r\n\t\t\ttmp[i] = 0.0;\r\n\r\n\t\t{\r\n\t\t\tj = nZ-1;\r\n\r\n\t\t\tcomputeGivens( w[j+1],w[j], w[j+1],w[j],c,s );\r\n\r\n\t\t\tfor( i=0; i<nFR; ++i )\r\n\t\t\t{\r\n\t\t\t\tii = FR_idx[i];\r\n\t\t\t\tapplyGivens( c,s,Q[ii*NVMAX + 1+j],Q[ii*NVMAX + j], Q[ii*NVMAX + 1+j],Q[ii*NVMAX + j] );\r\n\t\t\t}\r\n\r\n\t\t\tapplyGivens( c,s,T[(nAC-1)*NVMAX + tcol],tmp[nAC-1], tmp[nAC-1],T[(nAC-1)*NVMAX + tcol] );\r\n\t\t}\r\n\r\n\t\tfor( j=nZ; j<nFR-1; ++j )\r\n\t\t{\r\n\t\t\tcomputeGivens( w[j+1],w[j], w[j+1],w[j],c,s );\r\n\r\n\t\t\tfor( i=0; i<nFR; ++i )\r\n\t\t\t{\r\n\t\t\t\tii = FR_idx[i];\r\n\t\t\t\tapplyGivens( c,s,Q[ii*NVMAX + 1+j],Q[ii*NVMAX + j], Q[ii*NVMAX + 1+j],Q[ii*NVMAX + j] );\r\n\t\t\t}\r\n\r\n\t\t\tfor( i=(nFR-2-j); i<nAC; ++i )\r\n\t\t\t\tapplyGivens( c,s,T[i*NVMAX + 1+tcol-nZ+j],tmp[i], tmp[i],T[i*NVMAX + 1+tcol-nZ+j] );\r\n\t\t}\r\n\r\n\t}\r\n\r\n\r\n\tif ( ( updateCholesky == BT_TRUE ) && ( hessianType != HST_IDENTITY ) )\r\n\t{\r\n\t\t/* III) RESTORE TRIANGULAR FORM OF R:\r\n\t\t *      use row-wise Givens rotations to restore upper triangular form of R */\r\n\t\tfor( i=0; i<nZ-1; ++i )\r\n\t\t{\r\n\t\t\tcomputeGivens( R[i*NVMAX + i],R[(1+i)*NVMAX + i], R[i*NVMAX + i],R[(1+i)*NVMAX + i],c,s );\r\n\r\n\t\t\tfor( j=(1+i); j<nZ-1; ++j ) /* last column of R is thrown away */\r\n\t\t\t\tapplyGivens( c,s,R[i*NVMAX + j],R[(1+i)*NVMAX + j], R[i*NVMAX + j],R[(1+i)*NVMAX + j] );\r\n\t\t}\r\n\t\t/* last column of R is thrown away */\r\n\t\tfor( i=0; i<nZ; ++i )\r\n\t\t\tR[i*NVMAX + nZ-1] = 0.0;\r\n\t}\r\n\r\n\r\n\t/* IV) UPDATE INDICES */\r\n\tif ( bounds.moveFreeToFixed( number,B_status ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_ADDBOUND_FAILED );\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\ta d d B o u n d _ c h e c k L I\r\n */\r\nreturnValue QProblem::addBound_checkLI( int number )\r\n{\r\n\tint i;\r\n\r\n\t/* some definitions */\r\n\tint nZ  = getNZ( );\r\n\r\n\t/* Check if constraint <number> is linearly independent from the\r\n\t   the active ones (<=> is element of null space of Afr). */\r\n\tfor( i=0; i<nZ; ++i )\r\n\t{\r\n\t\tif ( getAbs( Q[number*NVMAX + i] ) > EPS )\r\n\t\t\treturn RET_LINEARLY_INDEPENDENT;\r\n\t}\r\n\r\n\treturn RET_LINEARLY_DEPENDENT;\r\n}\r\n\r\n\r\n/*\r\n *\ta d d B o u n d _ e n s u r e L I\r\n */\r\nreturnValue QProblem::addBound_ensureLI( int number, SubjectToStatus B_status )\r\n{\r\n\tint i, j, ii, jj;\r\n\tint nV  = getNV( );\r\n\tint nFX = getNFX( );\r\n\tint nAC = getNAC( );\r\n\tint nZ  = getNZ( );\r\n\r\n\r\n\t/* I) Check if new constraint is linearly independent from the active ones. */\r\n\treturnValue returnvalueCheckLI = addBound_checkLI( number );\r\n\r\n\tif ( returnvalueCheckLI == RET_LINEARLY_INDEPENDENT )\r\n\t\treturn SUCCESSFUL_RETURN;\r\n\r\n\r\n \t/* II) NEW BOUND IS LINEARLY DEPENDENT: */\r\n\t/* 1) Determine coefficients of linear combination,\r\n\t *    cf. M.J. Best. Applied Mathematics and Parallel Computing, chapter:\r\n\t *    An Algorithm for the Solution of the Parametric Quadratic Programming\r\n\t *    Problem, pages 57-76. Physica-Verlag, Heidelberg, 1996. */\r\n\tint FR_idx[NVMAX];\r\n\tif ( bounds.getFree( )->getNumberArray( FR_idx ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_ENSURELI_FAILED );\r\n\r\n\tint FX_idx[NVMAX];\r\n\tif ( bounds.getFixed( )->getNumberArray( FX_idx ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_ENSURELI_FAILED );\r\n\r\n\tint AC_idx[NCMAX_ALLOC];\r\n\tif ( constraints.getActive( )->getNumberArray( AC_idx ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_ENSURELI_FAILED );\r\n\r\n\treal_t xiC[NCMAX_ALLOC];\r\n\treal_t xiC_TMP[NCMAX_ALLOC];\r\n\treal_t xiB[NVMAX];\r\n\r\n\t/* 2) Calculate xiC. */\r\n\tif ( nAC > 0 )\r\n\t{\r\n\t\tif ( B_status == ST_LOWER )\r\n\t\t{\r\n\t\t\tfor( i=0; i<nAC; ++i )\r\n\t\t\t\txiC_TMP[i] = Q[number*NVMAX + nZ+i];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tfor( i=0; i<nAC; ++i )\r\n\t\t\t\txiC_TMP[i] = -Q[number*NVMAX + nZ+i];\r\n\t\t}\r\n\r\n\t\tif ( backsolveT( xiC_TMP, BT_TRUE, xiC ) != SUCCESSFUL_RETURN )\r\n\t\t\treturn THROWERROR( RET_ENSURELI_FAILED_TQ );\r\n\t}\r\n\r\n\t/* 3) Calculate xiB. */\r\n\tfor( i=0; i<nFX; ++i )\r\n\t{\r\n\t\tii = FX_idx[i];\r\n\r\n\t\txiB[i] = 0.0;\r\n\t\tfor( j=0; j<nAC; ++j )\r\n\t\t{\r\n\t\t\tjj = AC_idx[j];\r\n\t\t\txiB[i] -= A[jj*NVMAX + ii] * xiC[j];\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t/* III) DETERMINE CONSTRAINT/BOUND TO BE REMOVED. */\r\n\treal_t y_min = INFTY * INFTY;\r\n\tint y_min_number = -1;\r\n\tBooleanType y_min_isBound = BT_FALSE;\r\n\r\n\t/* 1) Constraints. */\r\n\tfor( i=0; i<nAC; ++i )\r\n\t{\r\n\t\tii = AC_idx[i];\r\n\r\n\t\tif ( constraints.getStatus( ii ) == ST_LOWER )\r\n\t\t{\r\n\t\t\tif ( ( xiC[i] > ZERO ) && ( y[nV+ii] >= 0.0 ) )\r\n\t\t\t{\r\n\t\t\t\tif ( y[nV+ii]/xiC[i] < y_min )\r\n\t\t\t\t{\r\n\t\t\t\t\ty_min = y[nV+ii]/xiC[i];\r\n\t\t\t\t\ty_min_number = ii;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif ( ( xiC[i] < -ZERO ) && ( y[nV+ii] <= 0.0 ) )\r\n\t\t\t{\r\n\t\t\t\tif ( y[nV+ii]/xiC[i] < y_min )\r\n\t\t\t\t{\r\n\t\t\t\t\ty_min = y[nV+ii]/xiC[i];\r\n\t\t\t\t\ty_min_number = ii;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/* 2) Bounds. */\r\n\tfor( i=0; i<nFX; ++i )\r\n\t{\r\n\t\tii = FX_idx[i];\r\n\r\n\t\tif ( bounds.getStatus( ii ) == ST_LOWER )\r\n\t\t{\r\n\t\t\tif ( ( xiB[i] > ZERO ) && ( y[ii] >= 0.0 ) )\r\n\t\t\t{\r\n\t\t\t\tif ( y[ii]/xiB[i] < y_min )\r\n\t\t\t\t{\r\n\t\t\t\t\ty_min = y[ii]/xiB[i];\r\n\t\t\t\t\ty_min_number = ii;\r\n\t\t\t\t\ty_min_isBound = BT_TRUE;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif ( ( xiB[i] < -ZERO ) && ( y[ii] <= 0.0 ) )\r\n\t\t\t{\r\n\t\t\t\tif ( y[ii]/xiB[i] < y_min )\r\n\t\t\t\t{\r\n\t\t\t\t\ty_min = y[ii]/xiB[i];\r\n\t\t\t\t\ty_min_number = ii;\r\n\t\t\t\t\ty_min_isBound = BT_TRUE;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/* setup output preferences */\r\n\t#ifdef PC_DEBUG\r\n\tchar messageString[80];\r\n\tVisibilityStatus visibilityStatus;\r\n\r\n\tif ( printlevel == PL_HIGH )\r\n\t\tvisibilityStatus = VS_VISIBLE;\r\n\telse\r\n\t\tvisibilityStatus = VS_HIDDEN;\r\n\t#endif\r\n\r\n\r\n\t/* IV) REMOVE CONSTRAINT/BOUND FOR RESOLVING LINEAR DEPENDENCE: */\r\n\tif ( y_min_number >= 0 )\r\n\t{\r\n\t\t/* 1) Check for cycling due to infeasibility. */\r\n\t\tif ( ( cyclingManager.getCyclingStatus( number,BT_TRUE ) == CYC_PREV_REMOVED ) &&\r\n\t\t\t ( cyclingManager.getCyclingStatus( y_min_number,y_min_isBound ) == CYC_PREV_ADDED ) )\r\n\t\t{\r\n\t\t\tinfeasible = BT_TRUE;\r\n\r\n\t\t\treturn THROWERROR( RET_ENSURELI_FAILED_CYCLING );\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t/* set cycling data */\r\n\t\t\tcyclingManager.clearCyclingData( );\r\n\t\t\tcyclingManager.setCyclingStatus( number,BT_TRUE, CYC_PREV_ADDED );\r\n\t\t\tcyclingManager.setCyclingStatus( y_min_number,y_min_isBound, CYC_PREV_REMOVED );\r\n\t\t}\r\n\r\n\r\n\t\t/* 2) Update Lagrange multiplier... */\r\n\t\tfor( i=0; i<nAC; ++i )\r\n\t\t{\r\n\t\t\tii = AC_idx[i];\r\n\t\t\ty[nV+ii] -= y_min * xiC[i];\r\n\t\t}\r\n\t\tfor( i=0; i<nFX; ++i )\r\n\t\t{\r\n\t\t\tii = FX_idx[i];\r\n\t\t\ty[ii] -= y_min * xiB[i];\r\n\t\t}\r\n\r\n\t\t/* ... also for newly active bound ... */\r\n\t\tif ( B_status == ST_LOWER )\r\n\t\t\ty[number] = y_min;\r\n\t\telse\r\n\t\t\ty[number] = -y_min;\r\n\r\n\t\t/* ... and for bound to be removed. */\r\n\t\tif ( y_min_isBound == BT_TRUE )\r\n\t\t{\r\n\t\t\t#ifdef PC_DEBUG\r\n\t\t\tsprintf( messageString,\"bound no. %d.\",y_min_number );\r\n\t\t\tgetGlobalMessageHandler( )->throwInfo( RET_REMOVE_FROM_ACTIVESET,messageString,__FUNCTION__,__FILE__,__LINE__,visibilityStatus );\r\n\t\t\t#endif\r\n\r\n\t\t\tif ( removeBound( y_min_number,BT_TRUE ) != SUCCESSFUL_RETURN )\r\n\t\t\t\treturn THROWERROR( RET_REMOVE_FROM_ACTIVESET_FAILED );\r\n\r\n\t\t\ty[y_min_number] = 0.0;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t#ifdef PC_DEBUG\r\n\t\t\tsprintf( messageString,\"constraint no. %d.\",y_min_number );\r\n\t\t\tgetGlobalMessageHandler( )->throwInfo( RET_REMOVE_FROM_ACTIVESET,messageString,__FUNCTION__,__FILE__,__LINE__,visibilityStatus );\r\n\t\t\t#endif\r\n\r\n\t\t\tif ( removeConstraint( y_min_number,BT_TRUE ) != SUCCESSFUL_RETURN )\r\n\t\t\t\treturn THROWERROR( RET_REMOVE_FROM_ACTIVESET_FAILED );\r\n\r\n\t\t\ty[nV+y_min_number] = 0.0;\r\n\t\t}\r\n\t}\r\n\telse\r\n\t{\r\n\t\t/* no constraint/bound can be removed => QP is infeasible! */\r\n\t\tinfeasible = BT_TRUE;\r\n\r\n\t\treturn THROWERROR( RET_ENSURELI_FAILED_NOINDEX );\r\n\t}\r\n\r\n\treturn getGlobalMessageHandler( )->throwInfo( RET_LI_RESOLVED,0,__FUNCTION__,__FILE__,__LINE__,VS_HIDDEN );\r\n}\r\n\r\n\r\n\r\n/*\r\n *\tr e m o v e C o n s t r a i n t\r\n */\r\nreturnValue QProblem::removeConstraint(\tint number,\r\n\t\t\t\t\t\t\t\t\t\tBooleanType updateCholesky\r\n\t\t\t\t\t\t\t\t\t\t)\r\n{\r\n\tint i, j, ii, jj;\r\n\r\n\t/* consistency check */\r\n\tif ( ( getStatus( ) == QPS_NOTINITIALISED )    ||\r\n\t\t ( getStatus( ) == QPS_AUXILIARYQPSOLVED ) ||\r\n\t\t ( getStatus( ) == QPS_HOMOTOPYQPSOLVED )  ||\r\n \t\t ( getStatus( ) == QPS_SOLVED )            )\r\n\t{\r\n\t\treturn THROWERROR( RET_UNKNOWN_BUG );\r\n\t}\r\n\r\n\t/* some definitions */\r\n\tint nFR = getNFR( );\r\n\tint nAC = getNAC( );\r\n\tint nZ  = getNZ( );\r\n\r\n\tint tcol = sizeT - nAC;\r\n\tint number_idx = constraints.getActive( )->getIndex( number );\r\n\r\n\r\n\t/* consistency checks */\r\n\tif ( constraints.getStatus( number ) == ST_INACTIVE )\r\n\t\treturn THROWERROR( RET_CONSTRAINT_NOT_ACTIVE );\r\n\r\n\tif ( ( number_idx < 0 ) || ( number_idx >= nAC ) )\r\n\t\treturn THROWERROR( RET_CONSTRAINT_NOT_ACTIVE );\r\n\r\n\r\n\tint FR_idx[NVMAX];\r\n\tif ( bounds.getFree( )->getNumberArray( FR_idx ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_REMOVECONSTRAINT_FAILED );\r\n\r\n\r\n\t/* I) REMOVE <number>th ROW FROM T,\r\n\t *    i.e. shift rows number+1 through nAC  upwards (instead of the actual\r\n\t *    constraint number its corresponding index within matrix A is used). */\r\n\tif ( number_idx < nAC-1 )\r\n\t{\r\n\t\tfor( i=(number_idx+1); i<nAC; ++i )\r\n\t\t\tfor( j=(nAC-i-1); j<nAC; ++j )\r\n\t\t\t\tT[(i-1)*NVMAX + tcol+j] = T[i*NVMAX + tcol+j];\r\n\t\t/* gimmick: write zeros into the last row of T */\r\n\t\tfor( j=0; j<nAC; ++j )\r\n\t\t\tT[(nAC-1)*NVMAX + tcol+j] = 0.0;\r\n\r\n\r\n\t\t/* II) RESTORE TRIANGULAR FORM OF T,\r\n\t\t *     use column-wise Givens rotations to restore reverse triangular form\r\n\t\t *     of T simultanenous change of Q (i.e. Y). */\r\n\t\treal_t c, s;\r\n\r\n\t\tfor( j=(nAC-2-number_idx); j>=0; --j )\r\n\t\t{\r\n\t\t\tcomputeGivens( T[(nAC-2-j)*NVMAX + tcol+1+j],T[(nAC-2-j)*NVMAX + tcol+j], T[(nAC-2-j)*NVMAX + tcol+1+j],T[(nAC-2-j)*NVMAX + tcol+j],c,s );\r\n\r\n\t\t\tfor( i=(nAC-j-1); i<(nAC-1); ++i )\r\n\t\t\t\tapplyGivens( c,s,T[i*NVMAX + tcol+1+j],T[i*NVMAX + tcol+j], T[i*NVMAX + tcol+1+j],T[i*NVMAX + tcol+j] );\r\n\r\n\t\t\tfor( i=0; i<nFR; ++i )\r\n\t\t\t{\r\n\t\t\t\tii = FR_idx[i];\r\n\t\t\t\tapplyGivens( c,s,Q[ii*NVMAX + nZ+1+j],Q[ii*NVMAX + nZ+j], Q[ii*NVMAX + nZ+1+j],Q[ii*NVMAX + nZ+j] );\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\telse\r\n\t{\r\n\t\t/* gimmick: write zeros into the last row of T */\r\n\t\tfor( j=0; j<nAC; ++j )\r\n\t\t\tT[(nAC-1)*NVMAX + tcol+j] = 0.0;\r\n\t}\r\n\r\n\r\n\tif ( ( updateCholesky == BT_TRUE ) && ( hessianType != HST_IDENTITY ) )\r\n\t{\r\n\t\t/* III) UPDATE CHOLESKY DECOMPOSITION,\r\n\t\t *      calculate new additional column (i.e. [r sqrt(rho2)]')\r\n\t\t *      of the Cholesky factor R. */\r\n\t\treal_t Hz[NVMAX];\r\n\t\tfor ( i=0; i<nFR; ++i )\r\n\t\t\tHz[i] = 0.0;\r\n\t\treal_t rho2 = 0.0;\r\n\r\n\t\t/* 1) Calculate Hz = H*z, where z is the new rightmost column of Z\r\n\t\t *    (i.e. the old leftmost column of Y).  */\r\n\t\tfor( j=0; j<nFR; ++j )\r\n\t\t{\r\n\t\t\tjj = FR_idx[j];\r\n\t\t\tfor( i=0; i<nFR; ++i )\r\n\t\t\t\tHz[i] += H[jj*NVMAX + FR_idx[i]] * Q[jj*NVMAX + nZ];\r\n\t\t}\r\n\r\n\t\tif ( nZ > 0 )\r\n\t\t{\r\n\t\t\treal_t ZHz[NVMAX];\r\n\t\t\tfor ( i=0; i<nZ; ++i )\r\n\t\t\t\tZHz[i] = 0.0;\r\n\t\t\treal_t r[NVMAX];\r\n\r\n\t\t\t/* 2) Calculate ZHz = Z'*Hz (old Z). */\r\n\t\t\tfor( j=0; j<nFR; ++j )\r\n\t\t\t{\r\n\t\t\t\tjj = FR_idx[j];\r\n\r\n\t\t\t\tfor( i=0; i<nZ; ++i )\r\n\t\t\t\t\tZHz[i] += Q[jj*NVMAX + i] * Hz[j];\r\n\t\t\t}\r\n\r\n\t\t\t/* 3) Calculate r = R^-T * ZHz. */\r\n\t\t\tif ( backsolveR( ZHz,BT_TRUE,r ) != SUCCESSFUL_RETURN )\r\n\t\t\t\treturn THROWERROR( RET_REMOVECONSTRAINT_FAILED );\r\n\r\n\t\t\t/* 4) Calculate rho2 = rho^2 = z'*Hz - r'*r\r\n\t\t\t *    and store r into R. */\r\n\t\t\tfor( i=0; i<nZ; ++i )\r\n\t\t\t{\r\n\t\t\t\trho2 -= r[i]*r[i];\r\n\t\t\t\tR[i*NVMAX + nZ] = r[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor( j=0; j<nFR; ++j )\r\n\t\t\trho2 += Q[FR_idx[j]*NVMAX + nZ] * Hz[j];\r\n\r\n\t\t/* 5) Store rho into R. */\r\n\t\tif ( rho2 > 0.0 )\r\n\t\t\tR[nZ*NVMAX + nZ] = sqrt( rho2 );\r\n\t\telse\r\n\t\t{\r\n\t\t\thessianType = HST_SEMIDEF;\r\n\t\t\treturn THROWERROR( RET_HESSIAN_NOT_SPD );\r\n\t\t}\r\n\t}\r\n\r\n\t/* IV) UPDATE INDICES */\r\n\tif ( constraints.moveActiveToInactive( number ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_REMOVECONSTRAINT_FAILED );\r\n\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\tr e m o v e B o u n d\r\n */\r\nreturnValue QProblem::removeBound(\tint number,\r\n\t\t\t\t\t\t\t\t\tBooleanType updateCholesky\r\n\t\t\t\t\t\t\t\t\t)\r\n{\r\n\tint i, j, ii, jj;\r\n\r\n\t/* consistency checks */\r\n\tif ( bounds.getStatus( number ) == ST_INACTIVE )\r\n\t\treturn THROWERROR( RET_BOUND_NOT_ACTIVE );\r\n\r\n\tif ( ( getStatus( ) == QPS_NOTINITIALISED )    ||\r\n\t\t ( getStatus( ) == QPS_AUXILIARYQPSOLVED ) ||\r\n\t\t ( getStatus( ) == QPS_HOMOTOPYQPSOLVED )  ||\r\n \t\t ( getStatus( ) == QPS_SOLVED )            )\r\n\t{\r\n\t\treturn THROWERROR( RET_UNKNOWN_BUG );\r\n\t}\r\n\r\n\t/* some definitions */\r\n\tint nFR = getNFR( );\r\n\tint nAC = getNAC( );\r\n\tint nZ  = getNZ( );\r\n\r\n\tint tcol = sizeT - nAC;\r\n\r\n\r\n\t/* I) UPDATE INDICES */\r\n\tif ( bounds.moveFixedToFree( number ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_REMOVEBOUND_FAILED );\r\n\r\n\r\n\tint FR_idx[NVMAX];\r\n\tif ( bounds.getFree( )->getNumberArray( FR_idx ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_REMOVEBOUND_FAILED );\r\n\r\n\t/* I) APPEND <nFR+1>th UNITY VECOTR TO Q. */\r\n\tint nnFRp1 = FR_idx[nFR];\r\n\tfor( i=0; i<nFR; ++i )\r\n\t{\r\n\t\tii = FR_idx[i];\r\n\t\tQ[ii*NVMAX + nFR] = 0.0;\r\n\t\tQ[nnFRp1*NVMAX + i] = 0.0;\r\n\t}\r\n\tQ[nnFRp1*NVMAX + nFR] = 1.0;\r\n\r\n\tif ( nAC > 0 )\r\n\t{\r\n\t\t/* store new column a in a temporary vector instead of shifting T one column to the left and appending a */\r\n\t\tint AC_idx[NCMAX_ALLOC];\r\n\t\tif ( constraints.getActive( )->getNumberArray( AC_idx ) != SUCCESSFUL_RETURN )\r\n\t\t\treturn THROWERROR( RET_REMOVEBOUND_FAILED );\r\n\r\n\t\treal_t tmp[NCMAX_ALLOC];\r\n\t\tfor( i=0; i<nAC; ++i )\r\n\t\t{\r\n\t\t\tii = AC_idx[i];\r\n\t\t\ttmp[i] =  A[ii*NVMAX + number];\r\n\t\t}\r\n\r\n\r\n\t\t/* II) RESTORE TRIANGULAR FORM OF T,\r\n\t\t *     use column-wise Givens rotations to restore reverse triangular form\r\n\t\t *     of T = [T A(:,number)], simultanenous change of Q (i.e. Y and Z). */\r\n\t\treal_t c, s;\r\n\r\n\t\tfor( j=(nAC-1); j>=0; --j )\r\n\t\t{\r\n\t\t\tcomputeGivens( tmp[nAC-1-j],T[(nAC-1-j)*NVMAX + tcol+j],T[(nAC-1-j)*NVMAX + tcol+j],tmp[nAC-1-j],c,s );\r\n\r\n\t\t\tfor( i=(nAC-j); i<nAC; ++i )\r\n\t\t\t\tapplyGivens( c,s,tmp[i],T[i*NVMAX + tcol+j],T[i*NVMAX + tcol+j],tmp[i] );\r\n\r\n\t\t\tfor( i=0; i<=nFR; ++i )\r\n\t\t\t{\r\n\t\t\t\tii = FR_idx[i];\r\n\t\t\t\t/* nZ+1+nAC = nFR+1  /  nZ+(1) = nZ+1 */\r\n\t\t\t\tapplyGivens( c,s,Q[ii*NVMAX + nZ+1+j],Q[ii*NVMAX + nZ+j],Q[ii*NVMAX + nZ+1+j],Q[ii*NVMAX + nZ+j] );\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tif ( ( updateCholesky == BT_TRUE ) && ( hessianType != HST_IDENTITY ) )\r\n\t{\r\n\t\t/* III) UPDATE CHOLESKY DECOMPOSITION,\r\n\t\t *      calculate new additional column (i.e. [r sqrt(rho2)]')\r\n\t\t *      of the Cholesky factor R: */\r\n\t\treal_t z2 = Q[nnFRp1*NVMAX + nZ];\r\n\t\treal_t rho2 = H[nnFRp1*NVMAX + nnFRp1]*z2*z2; /* rho2 = h2*z2*z2 */\r\n\r\n\t\tif ( nFR > 0 )\r\n\t\t{\r\n\t\t\treal_t Hz[NVMAX];\r\n\t\t\tfor( i=0; i<nFR; ++i )\r\n\t\t\t\tHz[i] = 0.0;\r\n\t\t\t/* 1) Calculate R'*r = Zfr'*Hfr*z1 + z2*Zfr'*h1 =: Zfr'*Hz + z2*Zfr'*h1 =: rhs and\r\n\t\t\t *    rho2 = z1'*Hfr*z1 + 2*z2*h1'*z1 + h2*z2^2 - r'*r =: z1'*Hz + 2*z2*h1'*z1 + h2*z2^2 - r'r */\r\n\t\t\tfor( j=0; j<nFR; ++j )\r\n\t\t\t{\r\n\t\t\t\tjj = FR_idx[j];\r\n\t\t\t\tfor( i=0; i<nFR; ++i )\r\n\t\t\t\t{\r\n\t\t\t\t\tii = FR_idx[i];\r\n\t\t\t\t\t/*\t\t\t   H * z1 */\r\n\t\t\t\t\tHz[i] += H[jj*NVMAX + ii] * Q[jj*NVMAX + nZ];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif ( nZ > 0 )\r\n\t\t\t{\r\n\t\t\t\treal_t r[NVMAX];\r\n\t\t\t\treal_t rhs[NVMAX];\r\n\t\t\t\tfor( i=0; i<nZ; ++i )\r\n\t\t\t\t\trhs[i] = 0.0;\r\n\r\n\t\t\t\t/* 2) Calculate rhs. */\r\n\t\t\t\tfor( j=0; j<nFR; ++j )\r\n\t\t\t\t{\r\n\t\t\t\t\tjj = FR_idx[j];\r\n\t\t\t\t\tfor( i=0; i<nZ; ++i )\r\n\t\t\t\t\t\t\t\t\t\t/* Zfr' * ( Hz + z2*h1 ) */\r\n\t\t\t\t\t\trhs[i] += Q[jj*NVMAX + i] * ( Hz[j] + z2 * H[nnFRp1*NVMAX + jj] );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* 3) Calculate r = R^-T * rhs. */\r\n\t\t\t\tif ( backsolveR( rhs,BT_TRUE,BT_TRUE,r ) != SUCCESSFUL_RETURN )\r\n\t\t\t\t\treturn THROWERROR( RET_REMOVEBOUND_FAILED );\r\n\r\n\t\t\t\t/* 4) Calculate rho2 = rho^2 = z'*Hz - r'*r\r\n\t\t\t\t *    and store r into R. */\r\n\t\t\t\tfor( i=0; i<nZ; ++i )\r\n\t\t\t\t{\r\n\t\t\t\t\trho2 -= r[i]*r[i];\r\n\t\t\t\t\tR[i*NVMAX + nZ] = r[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfor( j=0; j<nFR; ++j )\r\n\t\t\t{\r\n\t\t\t\tjj = FR_idx[j];\r\n\t\t\t\t\t\t\t/* z1' * ( Hz + 2*z2*h1 ) */\r\n\t\t\t\trho2 += Q[jj*NVMAX + nZ] * ( Hz[j] + 2.0*z2*H[nnFRp1*NVMAX + jj] );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\t/* 5) Store rho into R. */\r\n\t\tif ( rho2 > 0.0 )\r\n\t\t\tR[nZ*NVMAX + nZ] = sqrt( rho2 );\r\n\t\telse\r\n\t\t{\r\n\t\t\thessianType = HST_SEMIDEF;\r\n\t\t\treturn THROWERROR( RET_HESSIAN_NOT_SPD );\r\n\t\t}\r\n\t}\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\tb a c k s o l v e R  (CODE DUPLICATE OF QProblemB CLASS!!!)\r\n */\r\nreturnValue QProblem::backsolveR(\tconst real_t* const b, BooleanType transposed,\r\n\t\t\t\t\t\t\t\t\treal_t* const a\r\n\t\t\t\t\t\t\t\t\t)\r\n{\r\n\t/* Call standard backsolve procedure (i.e. removingBound == BT_FALSE). */\r\n\treturn backsolveR( b,transposed,BT_FALSE,a );\r\n}\r\n\r\n\r\n/*\r\n *\tb a c k s o l v e R  (CODE DUPLICATE OF QProblemB CLASS!!!)\r\n */\r\nreturnValue QProblem::backsolveR(\tconst real_t* const b, BooleanType transposed,\r\n\t\t\t\t\t\t\t\t\tBooleanType removingBound,\r\n\t\t\t\t\t\t\t\t\treal_t* const a\r\n\t\t\t\t\t\t\t\t\t)\r\n{\r\n\tint i, j;\r\n\tint nR = getNZ( );\r\n\r\n\treal_t sum;\r\n\r\n\t/* if backsolve is called while removing a bound, reduce nZ by one. */\r\n\tif ( removingBound == BT_TRUE )\r\n\t\t--nR;\r\n\r\n\t/* nothing to do */\r\n\tif ( nR <= 0 )\r\n\t\treturn SUCCESSFUL_RETURN;\r\n\r\n\r\n\t/* Solve Ra = b, where R might be transposed. */\r\n\tif ( transposed == BT_FALSE )\r\n\t{\r\n\t\t/* solve Ra = b */\r\n\t\tfor( i=(nR-1); i>=0; --i )\r\n\t\t{\r\n\t\t\tsum = b[i];\r\n\t\t\tfor( j=(i+1); j<nR; ++j )\r\n\t\t\t\tsum -= R[i*NVMAX + j] * a[j];\r\n\r\n\t\t\tif ( getAbs( R[i*NVMAX + i] ) > ZERO )\r\n\t\t\t\ta[i] = sum / R[i*NVMAX + i];\r\n\t\t\telse\r\n\t\t\t\treturn THROWERROR( RET_DIV_BY_ZERO );\r\n\t\t}\r\n\t}\r\n\telse\r\n\t{\r\n\t\t/* solve R^T*a = b */\r\n\t\tfor( i=0; i<nR; ++i )\r\n\t\t{\r\n\t\t\tsum = b[i];\r\n\r\n\t\t\tfor( j=0; j<i; ++j )\r\n\t\t\t\tsum -= R[j*NVMAX + i] * a[j];\r\n\r\n\t\t\tif ( getAbs( R[i*NVMAX + i] ) > ZERO )\r\n\t\t\t\ta[i] = sum / R[i*NVMAX + i];\r\n\t\t\telse\r\n\t\t\t\treturn THROWERROR( RET_DIV_BY_ZERO );\r\n\t\t}\r\n\t}\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n\r\n/*\r\n *\tb a c k s o l v e T\r\n */\r\nreturnValue QProblem::backsolveT( const real_t* const b, BooleanType transposed, real_t* const a )\r\n{\r\n\tint i, j;\r\n\tint nT = getNAC( );\r\n\tint tcol = sizeT - nT;\r\n\r\n\treal_t sum;\r\n\r\n\t/* nothing to do */\r\n\tif ( nT <= 0 )\r\n\t\treturn SUCCESSFUL_RETURN;\r\n\r\n\r\n\t/* Solve Ta = b, where T might be transposed. */\r\n\tif ( transposed == BT_FALSE )\r\n\t{\r\n\t\t/* solve Ta = b */\r\n\t\tfor( i=0; i<nT; ++i )\r\n\t\t{\r\n\t\t\tsum = b[i];\r\n\t\t\tfor( j=0; j<i; ++j )\r\n\t\t\t\tsum -= T[i*NVMAX + sizeT-1-j] * a[nT-1-j];\r\n\r\n\t\t\tif ( getAbs( T[i*NVMAX + sizeT-1-i] ) > ZERO )\r\n\t\t\t\ta[nT-1-i] = sum / T[i*NVMAX + sizeT-1-i];\r\n\t\t\telse\r\n\t\t\t\treturn THROWERROR( RET_DIV_BY_ZERO );\r\n\t\t}\r\n\t}\r\n\telse\r\n\t{\r\n\t\t/* solve T^T*a = b */\r\n\t\tfor( i=0; i<nT; ++i )\r\n\t\t{\r\n\t\t\tsum = b[i];\r\n\t\t\tfor( j=0; j<i; ++j )\r\n\t\t\t\tsum -= T[(nT-1-j)*NVMAX + tcol+i] * a[nT-1-j];\r\n\r\n\t\t\tif ( getAbs( T[(nT-1-i)*NVMAX + tcol+i] ) > ZERO )\r\n\t\t\t\ta[nT-1-i] = sum / T[(nT-1-i)*NVMAX + tcol+i];\r\n\t\t\telse\r\n\t\t\t\treturn THROWERROR( RET_DIV_BY_ZERO );\r\n\t\t}\r\n\t}\r\n\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\th o t s t a r t _ d e t e r m i n e D a t a S h i f t\r\n */\r\nreturnValue QProblem::hotstart_determineDataShift(  const int* const FX_idx, const int* const AC_idx,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const g_new, const real_t* const lbA_new, const real_t* const ubA_new,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const lb_new, const real_t* const ub_new,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\treal_t* const delta_g, real_t* const delta_lbA, real_t* const delta_ubA,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\treal_t* const delta_lb, real_t* const delta_ub,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tBooleanType& Delta_bC_isZero, BooleanType& Delta_bB_isZero\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\r\n{\r\n\tint i, ii;\r\n\tint nC  = getNC( );\r\n\tint nAC = getNAC( );\r\n\r\n\r\n\t/* I) DETERMINE DATA SHIFT FOR BOUNDS */\r\n\tQProblemB::hotstart_determineDataShift( FX_idx,g_new,lb_new,ub_new, delta_g,delta_lb,delta_ub, Delta_bB_isZero );\r\n\r\n\r\n\t/* II) DETERMINE DATA SHIFT FOR CONSTRAINTS */\r\n\t/* 1) Calculate shift directions. */\r\n\tfor( i=0; i<nC; ++i )\r\n\t{\r\n\t\t/* if lower constraints' bounds do not exist, shift them to -infinity */\r\n\t\tif ( lbA_new != 0 )\r\n\t\t\tdelta_lbA[i] = lbA_new[i] - lbA[i];\r\n\t\telse\r\n\t\t\tdelta_lbA[i] = -INFTY - lbA[i];\r\n\t}\r\n\r\n\tfor( i=0; i<nC; ++i )\r\n\t{\r\n\t\t/* if upper constraints' bounds do not exist, shift them to infinity */\r\n\t\tif ( ubA_new != 0 )\r\n\t\t\tdelta_ubA[i] = ubA_new[i] - ubA[i];\r\n\t\telse\r\n\t\t\tdelta_ubA[i] = INFTY - ubA[i];\r\n\t}\r\n\r\n\t/* 2) Determine if active constraints' bounds are to be shifted. */\r\n\tDelta_bC_isZero = BT_TRUE;\r\n\r\n\tfor ( i=0; i<nAC; ++i )\r\n\t{\r\n\t\tii = AC_idx[i];\r\n\r\n\t\tif ( ( getAbs( delta_lbA[ii] ) > EPS ) || ( getAbs( delta_ubA[ii] ) > EPS ) )\r\n\t\t{\r\n\t\t\tDelta_bC_isZero = BT_FALSE;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\th o t s t a r t _ d e t e r m i n e S t e p D i r e c t i o n\r\n */\r\nreturnValue QProblem::hotstart_determineStepDirection(\tconst int* const FR_idx, const int* const FX_idx, const int* const AC_idx,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_g, const real_t* const delta_lbA, const real_t* const delta_ubA,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_lb, const real_t* const delta_ub,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tBooleanType Delta_bC_isZero, BooleanType Delta_bB_isZero,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\treal_t* const delta_xFX, real_t* const delta_xFR,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\treal_t* const delta_yAC, real_t* const delta_yFX\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\r\n{\r\n\tint i, j, ii, jj;\r\n\tint nFR = getNFR( );\r\n\tint nFX = getNFX( );\r\n\tint nAC = getNAC( );\r\n\tint nZ  = getNZ( );\r\n\r\n\t/* initialise auxiliary vectors */\r\n\treal_t HMX_delta_xFX[NVMAX];\r\n\treal_t YFR_delta_xFRy[NVMAX];\r\n\treal_t ZFR_delta_xFRz[NVMAX];\r\n\treal_t HFR_YFR_delta_xFRy[NVMAX];\r\n\tfor( i=0; i<nFR; ++i )\r\n\t{\r\n\t\tdelta_xFR[i] = 0.0;\r\n\t\tHMX_delta_xFX[i] = 0.0;\r\n\t\tYFR_delta_xFRy[i] = 0.0;\r\n\t\tZFR_delta_xFRz[i] = 0.0;\r\n\t\tHFR_YFR_delta_xFRy[i] = 0.0;\r\n\t}\r\n\r\n\treal_t delta_xFRy[NCMAX_ALLOC];\r\n\treal_t delta_xFRz[NVMAX];\r\n\tfor( i=0; i<nZ; ++i )\r\n\t\tdelta_xFRz[i] = 0.0;\r\n\r\n\r\n\t/* I) DETERMINE delta_xFX */\r\n\tif ( nFX > 0 )\r\n\t{\r\n\t\tfor( i=0; i<nFX; ++i )\r\n\t\t{\r\n\t\t\tii = FX_idx[i];\r\n\r\n\t\t\tif ( bounds.getStatus( ii ) == ST_LOWER )\r\n\t\t\t\tdelta_xFX[i] = delta_lb[ii];\r\n\t\t\telse\r\n\t\t\t\tdelta_xFX[i] = delta_ub[ii];\r\n\t\t}\r\n\t}\r\n\r\n\t/* II) DETERMINE delta_xFR */\r\n\tif ( nFR > 0 )\r\n\t{\r\n\t\t/* 1) Determine delta_xFRy. */\r\n\t\tif ( nAC > 0 )\r\n\t\t{\r\n\t\t\tif ( ( Delta_bC_isZero == BT_TRUE ) && ( Delta_bB_isZero == BT_TRUE ) )\r\n\t\t\t{\r\n\t\t\t\tfor( i=0; i<nAC; ++i )\r\n\t\t\t\t\tdelta_xFRy[i] = 0.0;\r\n\r\n\t\t\t\tfor( i=0; i<nFR; ++i )\r\n\t\t\t\t\tdelta_xFR[i] = 0.0;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t/* auxillary variable */\r\n\t\t\t\treal_t delta_xFRy_TMP[NCMAX_ALLOC];\r\n\r\n\t\t\t\tfor( i=0; i<nAC; ++i )\r\n\t\t\t\t{\r\n\t\t\t\t\tii = AC_idx[i];\r\n\r\n\t\t\t\t\tif ( constraints.getStatus( ii ) == ST_LOWER )\r\n\t\t\t\t\t\tdelta_xFRy_TMP[i] = delta_lbA[ii];\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tdelta_xFRy_TMP[i] = delta_ubA[ii];\r\n\r\n\t\t\t\t\tif ( Delta_bB_isZero == BT_FALSE )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tfor( j=0; j<nFX; ++j )\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tjj = FX_idx[j];\r\n\t\t\t\t\t\t\tdelta_xFRy_TMP[i] -= A[ii*NVMAX + jj] * delta_xFX[j];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( backsolveT( delta_xFRy_TMP, BT_FALSE, delta_xFRy ) != SUCCESSFUL_RETURN )\r\n\t\t\t\t\treturn THROWERROR( RET_STEPDIRECTION_FAILED_TQ );\r\n\r\n\t\t\t\tfor( i=0; i<nFR; ++i )\r\n\t\t\t\t{\r\n\t\t\t\t\tii = FR_idx[i];\r\n\t\t\t\t\tfor( j=0; j<nAC; ++j )\r\n\t\t\t\t\t\tYFR_delta_xFRy[i] += Q[ii*NVMAX + nZ+j] * delta_xFRy[j];\r\n\r\n\t\t\t\t\t/* delta_xFR = YFR*delta_xFRy (+ ZFR*delta_xFRz) */\r\n\t\t\t\t\tdelta_xFR[i] = YFR_delta_xFRy[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/* 2) Determine delta_xFRz. */\r\n\t\tif ( hessianType == HST_IDENTITY )\r\n\t\t{\r\n\t\t\tfor( j=0; j<nFR; ++j )\r\n\t\t\t{\r\n\t\t\t\tjj = FR_idx[j];\r\n\t\t\t\tfor( i=0; i<nZ; ++i )\r\n\t\t\t\t\tdelta_xFRz[i] -= Q[jj*NVMAX + i] * delta_g[jj];\r\n\t\t\t}\r\n\r\n\t\t\tif ( nZ > 0 )\r\n\t\t\t{\r\n\t\t\t\tfor( i=0; i<nFR; ++i )\r\n\t\t\t\t{\r\n\t\t\t\t\tii = FR_idx[i];\r\n\t\t\t\t\tfor( j=0; j<nZ; ++j )\r\n\t\t\t\t\t\tZFR_delta_xFRz[i] += Q[ii*NVMAX + j] * delta_xFRz[j];\r\n\r\n\t\t\t\t\tdelta_xFR[i] += ZFR_delta_xFRz[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif ( Delta_bB_isZero == BT_FALSE )\r\n\t\t\t{\r\n\t\t\t\tfor( i=0; i<nFR; ++i )\r\n\t\t\t\t{\r\n\t\t\t\t\tii = FR_idx[i];\r\n\t\t\t\t\tfor( j=0; j<nFX; ++j )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tjj = FX_idx[j];\r\n\t\t\t\t\t\tHMX_delta_xFX[i] += H[ii*NVMAX + jj] * delta_xFX[j];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif ( nAC > 0 )\r\n\t\t\t{\r\n\t\t\t\tif ( ( Delta_bC_isZero == BT_FALSE ) || ( Delta_bB_isZero == BT_FALSE ) )\r\n\t\t\t\t{\r\n\t\t\t\t\tfor( i=0; i<nFR; ++i )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tii = FR_idx[i];\r\n\t\t\t\t\t\tfor( j=0; j<nFR; ++j )\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tjj = FR_idx[j];\r\n\t\t\t\t\t\t\tHFR_YFR_delta_xFRy[i] += H[ii*NVMAX + jj] * YFR_delta_xFRy[j];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\t\t\tif ( nZ > 0 )\r\n\t\t\t{\r\n\t\t\t\t/* auxiliary variable */\r\n\t\t\t\treal_t delta_xFRz_TMP[NVMAX];\r\n\t\t\t\treal_t delta_xFRz_RHS[NVMAX];\r\n\r\n\r\n\t\t\t\tif ( ( nAC > 0 ) && ( nFX > 0 ) && ( Delta_bB_isZero == BT_FALSE ) )\r\n\t\t\t\t{\r\n\t\t\t\t\tfor( j=0; j<nFR; ++j )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tjj = FR_idx[j];\r\n\t\t\t\t\t\tdelta_xFRz_RHS[j] = delta_g[jj] + HFR_YFR_delta_xFRy[j] + HMX_delta_xFX[j];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( ( nAC == 0 ) && ( Delta_bB_isZero == BT_TRUE ) )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tfor( j=0; j<nFR; ++j )\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tjj = FR_idx[j];\r\n\t\t\t\t\t\t\tdelta_xFRz_RHS[j] = delta_g[jj];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif ( nAC > 0 ) /* => Delta_bB_isZero == BT_TRUE, as BT_FALSE would imply nFX>0 */\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tfor( j=0; j<nFR; ++j )\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tjj = FR_idx[j];\r\n\t\t\t\t\t\t\t\tdelta_xFRz_RHS[j] = delta_g[jj] + HFR_YFR_delta_xFRy[j];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse /* Delta_bB_isZero == BT_FALSE, as nAC==0 */\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tfor( j=0; j<nFR; ++j )\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tjj = FR_idx[j];\r\n\t\t\t\t\t\t\t\tdelta_xFRz_RHS[j] = delta_g[jj] + HMX_delta_xFX[j];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor( j=0; j<nFR; ++j )\r\n\t\t\t\t{\r\n\t\t\t\t\tjj = FR_idx[j];\r\n\t\t\t\t\tfor( i=0; i<nZ; ++i )\r\n\t\t\t\t\t\tdelta_xFRz[i] -= Q[jj*NVMAX + i] * delta_xFRz_RHS[j];\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\tif ( backsolveR( delta_xFRz,BT_TRUE,delta_xFRz_TMP ) != SUCCESSFUL_RETURN )\r\n\t\t\t\t\treturn THROWERROR( RET_STEPDIRECTION_FAILED_CHOLESKY );\r\n\r\n\t\t\t\tif ( backsolveR( delta_xFRz_TMP,BT_FALSE,delta_xFRz ) != SUCCESSFUL_RETURN )\r\n\t\t\t\t\treturn THROWERROR( RET_STEPDIRECTION_FAILED_CHOLESKY );\r\n\r\n\r\n\t\t\t\tfor( i=0; i<nFR; ++i )\r\n\t\t\t\t{\r\n\t\t\t\t\tii = FR_idx[i];\r\n\t\t\t\t\tfor( j=0; j<nZ; ++j )\r\n\t\t\t\t\t\tZFR_delta_xFRz[i] += Q[ii*NVMAX + j] * delta_xFRz[j];\r\n\r\n\t\t\t\t\tdelta_xFR[i] += ZFR_delta_xFRz[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/* III) DETERMINE delta_yAC */\r\n\tif ( nAC > 0 ) /* => ( nFR = nZ + nAC > 0 ) */\r\n\t{\r\n\t\t/* auxiliary variables */\r\n\t\treal_t delta_yAC_TMP[NCMAX_ALLOC];\r\n\t\tfor( i=0; i<nAC; ++i )\r\n\t\t\tdelta_yAC_TMP[i] = 0.0;\r\n\t\treal_t delta_yAC_RHS[NVMAX];\r\n\t\tfor( i=0; i<nFR; ++i )\r\n\t\t\tdelta_yAC_RHS[i] = 0.0;\r\n\r\n\t\tif ( hessianType == HST_IDENTITY )\r\n\t\t{\r\n\t\t\t/* delta_yAC = (T')^-1 * ( Yfr*delta_gFR + delta_xFRy ) */\r\n\t\t\tfor( j=0; j<nAC; ++j )\r\n\t\t\t{\r\n\t\t\t\tfor( i=0; i<nFR; ++i )\r\n\t\t\t\t{\r\n\t\t\t\t\tii = FR_idx[i];\r\n\t\t\t\t\tdelta_yAC_TMP[j] += Q[ii*NVMAX + nZ+j] * delta_g[ii];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdelta_yAC_TMP[j] += delta_xFRy[j];\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif ( ( Delta_bC_isZero == BT_TRUE ) && ( Delta_bB_isZero == BT_TRUE ) )\r\n\t\t\t{\r\n\t\t\t\tfor( i=0; i<nFR; ++i )\r\n\t\t\t\t{\r\n\t\t\t\t\tii = FR_idx[i];\r\n\t\t\t\t\tdelta_yAC_RHS[i] = delta_g[ii];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tfor( i=0; i<nFR; ++i )\r\n\t\t\t\t{\r\n\t\t\t\t\tii = FR_idx[i];\r\n\t\t\t\t\tdelta_yAC_RHS[i] = HFR_YFR_delta_xFRy[i] + delta_g[ii];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif ( nZ > 0 )\r\n\t\t\t{\r\n\t\t\t\tfor( i=0; i<nFR; ++i )\r\n\t\t\t\t{\r\n\t\t\t\t\tii = FR_idx[i];\r\n\t\t\t\t\tfor( j=0; j<nFR; ++j )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tjj = FR_idx[j];\r\n\t\t\t\t\t\tdelta_yAC_RHS[i] += H[ii*NVMAX + jj] * ZFR_delta_xFRz[j];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif ( nFX > 0 )\r\n\t\t\t{\r\n\t\t\t\tif ( Delta_bB_isZero == BT_FALSE )\r\n\t\t\t\t{\r\n\t\t\t\t\tfor( i=0; i<nFR; ++i )\r\n\t\t\t\t\t\tdelta_yAC_RHS[i] += HMX_delta_xFX[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfor( i=0; i<nAC; ++i)\r\n\t\t\t{\r\n\t\t\t\tfor( j=0; j<nFR; ++j )\r\n\t\t\t\t{\r\n\t\t\t\t\tjj = FR_idx[j];\r\n\t\t\t\t\tdelta_yAC_TMP[i] += Q[jj*NVMAX + nZ+i] * delta_yAC_RHS[j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ( backsolveT( delta_yAC_TMP,BT_TRUE,delta_yAC ) != SUCCESSFUL_RETURN )\r\n\t\t\treturn THROWERROR( RET_STEPDIRECTION_FAILED_TQ );\r\n\t}\r\n\r\n\r\n\t/* IV) DETERMINE delta_yFX */\r\n\tif ( nFX > 0 )\r\n\t{\r\n\t\tfor( i=0; i<nFX; ++i )\r\n\t\t{\r\n\t\t\tii = FX_idx[i];\r\n\r\n\t\t\tdelta_yFX[i] = delta_g[ii];\r\n\r\n\t\t\tfor( j=0; j<nAC; ++j )\r\n\t\t\t{\r\n\t\t\t\tjj = AC_idx[j];\r\n\t\t\t\tdelta_yFX[i] -= A[jj*NVMAX + ii] * delta_yAC[j];\r\n\t\t\t}\r\n\r\n\t\t\tif ( hessianType == HST_IDENTITY )\r\n\t\t\t{\r\n\t\t\t\tdelta_yFX[i] += delta_xFX[i];\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tfor( j=0; j<nFR; ++j )\r\n\t\t\t\t{\r\n\t\t\t\t\tjj = FR_idx[j];\r\n\t\t\t\t\tdelta_yFX[i] += H[ii*NVMAX + jj] * delta_xFR[j];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( Delta_bB_isZero == BT_FALSE )\r\n\t\t\t\t{\r\n\t\t\t\t\tfor( j=0; j<nFX; ++j )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tjj = FX_idx[j];\r\n\t\t\t\t\t\tdelta_yFX[i] += H[ii*NVMAX + jj] * delta_xFX[j];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\th o t s t a r t _ d e t e r m i n e S t e p L e n g t h\r\n */\r\nreturnValue QProblem::hotstart_determineStepLength(\tconst int* const FR_idx, const int* const FX_idx, const int* const AC_idx, const int* const IAC_idx,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_lbA, const real_t* const delta_ubA,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_lb, const real_t* const delta_ub,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_xFX, const real_t* const delta_xFR,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_yAC, const real_t* const delta_yFX,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\treal_t* const delta_Ax, int& BC_idx, SubjectToStatus& BC_status, BooleanType& BC_isBound\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\r\n{\r\n\tint i, j, ii, jj;\r\n\tint nV  = getNV( );\r\n\tint nC  = getNC( );\r\n\tint nFR = getNFR( );\r\n\tint nFX = getNFX( );\r\n\tint nAC = getNAC( );\r\n\tint nIAC = getNIAC( );\r\n\r\n\t/* initialise maximum steplength array */\r\n\treal_t maxStepLength[2*(NVMAX+NCMAX_ALLOC)];\r\n\tfor ( i=0; i<2*(nV+nC); ++i )\r\n\t\tmaxStepLength[i] = 1.0;\r\n\r\n\r\n\t/* I) DETERMINE MAXIMUM DUAL STEPLENGTH: */\r\n\t/* 1) Ensure that active dual constraints' bounds remain valid\r\n\t *    (ignoring inequality constraints).  */\r\n\tfor( i=0; i<nAC; ++i )\r\n\t{\r\n\t\tii = AC_idx[i];\r\n\r\n\t\tif ( constraints.getType( ii ) != ST_EQUALITY )\r\n\t\t{\r\n\t\t\tif ( constraints.getStatus( ii ) == ST_LOWER )\r\n\t\t\t{\r\n\t\t\t\t/* active lower constraints' bounds */\r\n\t\t\t\tif ( delta_yAC[i] < -ZERO )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( y[nV+ii] > 0.0 )\r\n\t\t\t\t\t\tmaxStepLength[nV+ii] = y[nV+ii] / ( -delta_yAC[i] );\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tmaxStepLength[nV+ii] = 0.0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t/* active upper constraints' bounds */\r\n\t\t\t\tif ( delta_yAC[i] > ZERO )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( y[nV+ii] < 0.0 )\r\n\t\t\t\t\t\tmaxStepLength[nV+ii] = y[nV+ii] / ( -delta_yAC[i] );\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tmaxStepLength[nV+ii] = 0.0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/* 2) Ensure that active dual bounds remain valid\r\n\t *    (ignoring implicitly fixed variables). */\r\n\tfor( i=0; i<nFX; ++i )\r\n\t{\r\n\t\tii = FX_idx[i];\r\n\r\n\t\tif ( bounds.getType( ii ) != ST_EQUALITY )\r\n\t\t{\r\n\t\t\tif ( bounds.getStatus( ii ) == ST_LOWER )\r\n\t\t\t{\r\n\t\t\t\t/* active lower bounds */\r\n\t\t\t\tif ( delta_yFX[i] < -ZERO )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( y[ii] > 0.0 )\r\n\t\t\t\t\t\tmaxStepLength[ii] = y[ii] / ( -delta_yFX[i] );\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tmaxStepLength[ii] = 0.0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t/* active upper bounds */\r\n\t\t\t\tif ( delta_yFX[i] > ZERO )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( y[ii] < 0.0 )\r\n\t\t\t\t\t\tmaxStepLength[ii] = y[ii] / ( -delta_yFX[i] );\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tmaxStepLength[ii] = 0.0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t/* II) DETERMINE MAXIMUM PRIMAL STEPLENGTH */\r\n\t/* 1) Ensure that inactive constraints' bounds remain valid\r\n\t *    (ignoring unbounded constraints). */\r\n\treal_t delta_x[NVMAX];\r\n\tfor( j=0; j<nFR; ++j )\r\n\t{\r\n\t\tjj = FR_idx[j];\r\n\t\tdelta_x[jj] = delta_xFR[j];\r\n\t}\r\n\tfor( j=0; j<nFX; ++j )\r\n\t{\r\n\t\tjj = FX_idx[j];\r\n\t\tdelta_x[jj] = delta_xFX[j];\r\n\t}\r\n\r\n\tfor( i=0; i<nIAC; ++i )\r\n\t{\r\n\t\tii = IAC_idx[i];\r\n\r\n\t\tif ( constraints.getType( ii ) != ST_UNBOUNDED )\r\n\t\t{\r\n\t\t\tdelta_Ax[ii] = 0.0;\r\n\t\t\tfor( j=0; j<nV; ++j )\r\n\t\t\t\tdelta_Ax[ii] += A[ii*NVMAX + j] * delta_x[j]; // POSSIBLE SPEEDUP!\r\n\r\n\t\t\t/* inactive lower constraints' bounds */\r\n\t\t\tif ( constraints.isNoLower( ) == BT_FALSE )\r\n\t\t\t{\r\n\t\t\t\tif ( delta_lbA[ii] > delta_Ax[ii] )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( Ax[ii] > lbA[ii] )\r\n\t\t\t\t\t\tmaxStepLength[nV+ii] = ( Ax[ii] - lbA[ii] ) / ( delta_lbA[ii] - delta_Ax[ii] );\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tmaxStepLength[nV+ii] = 0.0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t/* inactive upper constraints' bounds */\r\n\t\t\tif ( constraints.isNoUpper( ) == BT_FALSE )\r\n\t\t\t{\r\n\t\t\t\tif ( delta_ubA[ii] < delta_Ax[ii] )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( Ax[ii] < ubA[ii] )\r\n\t\t\t\t\t\tmaxStepLength[nV+nC+nV+ii] = ( Ax[ii] - ubA[ii] ) / ( delta_ubA[ii] - delta_Ax[ii] );\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tmaxStepLength[nV+nC+nV+ii] = 0.0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t/* 2) Ensure that inactive bounds remain valid\r\n\t *    (ignoring unbounded variables). */\r\n\t/* inactive lower bounds */\r\n\tif ( bounds.isNoLower( ) == BT_FALSE )\r\n\t{\r\n\t\tfor( i=0; i<nFR; ++i )\r\n\t\t{\r\n\t\t\tii = FR_idx[i];\r\n\t\t\tif ( bounds.getType( ii ) != ST_UNBOUNDED )\r\n\t\t\t\tif ( delta_lb[ii] > delta_xFR[i] )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( x[ii] > lb[ii] )\r\n\t\t\t\t\t\tmaxStepLength[ii] = ( x[ii] - lb[ii] ) / ( delta_lb[ii] - delta_xFR[i] );\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tmaxStepLength[ii] = 0.0;\r\n\t\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/* inactive upper bounds */\r\n\tif ( bounds.isNoUpper( ) == BT_FALSE )\r\n\t{\r\n\t\tfor( i=0; i<nFR; ++i )\r\n\t\t{\r\n\t\t\tii = FR_idx[i];\r\n\t\t\tif ( bounds.getType( ii ) != ST_UNBOUNDED )\r\n\t\t\t\tif ( delta_ub[ii] < delta_xFR[i] )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( x[ii] < ub[ii] )\r\n\t\t\t\t\t\tmaxStepLength[nV+nC+ii] = ( x[ii] - ub[ii] ) / ( delta_ub[ii] - delta_xFR[i] );\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tmaxStepLength[nV+nC+ii] = 0.0;\r\n\t\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t/* III) DETERMINE MAXIMUM HOMOTOPY STEPLENGTH */\r\n\treal_t tau_new = 1.0;\r\n\r\n\tBC_idx = 0;\r\n\tBC_status = ST_UNDEFINED;\r\n\tBC_isBound = BT_FALSE;\r\n\r\n\tfor ( i=0; i<nV; ++i )\r\n\t{\r\n\t\t/* 1) Consider lower/dual blocking bounds. */\r\n\t\tif ( maxStepLength[i] < tau_new )\r\n\t\t{\r\n\t\t\ttau_new = maxStepLength[i];\r\n\t\t\tBC_idx = i;\r\n\t\t\tBC_isBound = BT_TRUE;\r\n\t\t\tif ( bounds.getStatus( i ) == ST_INACTIVE ) /* inactive? */\r\n\t\t\t\tBC_status = ST_LOWER;\r\n\t\t\telse\r\n\t\t\t\tBC_status = ST_INACTIVE;\r\n\t\t}\r\n\r\n\t\t/* 2) Consider upper blocking bounds. */\r\n\t\tif ( maxStepLength[nV+nC+i] < tau_new )\r\n\t\t{\r\n\t\t\ttau_new = maxStepLength[nV+nC+i];\r\n\t\t\tBC_idx = i;\r\n\t\t\tBC_isBound = BT_TRUE;\r\n\t\t\tBC_status = ST_UPPER;\r\n\t\t}\r\n\t}\r\n\r\n\tfor ( i=nV; i<nV+nC; ++i )\r\n\t{\r\n\t\t/* 3) Consider lower/dual blocking constraints. */\r\n\t\tif ( maxStepLength[i] < tau_new )\r\n\t\t{\r\n\t\t\ttau_new = maxStepLength[i];\r\n\t\t\tBC_idx = i-nV;\r\n\t\t\tBC_isBound = BT_FALSE;\r\n\t\t\tif ( constraints.getStatus( i-nV ) == ST_INACTIVE ) /* inactive? */\r\n\t\t\t\tBC_status = ST_LOWER;\r\n\t\t\telse\r\n\t\t\t\tBC_status = ST_INACTIVE;\r\n\t\t}\r\n\r\n\t\t/* 4) Consider upper blocking constraints. */\r\n\t\tif ( maxStepLength[nV+nC+i] < tau_new )\r\n\t\t{\r\n\t\t\ttau_new = maxStepLength[nV+nC+i];\r\n\t\t\tBC_idx = i-nV;\r\n\t\t\tBC_isBound = BT_FALSE;\r\n\t\t\tBC_status = ST_UPPER;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t/* IV) CLEAR CYCLING DATA\r\n\t *     if a positive step can be taken */\r\n\tif ( tau_new > EPS )\r\n\t\tcyclingManager.clearCyclingData( );\r\n\r\n\r\n\t/* V) SET MAXIMUM HOMOTOPY STEPLENGTH */\r\n\ttau = tau_new;\r\n\r\n\t#ifdef PC_DEBUG\r\n\tif ( printlevel == PL_HIGH )\r\n\t{\r\n\r\n\t \tchar messageString[80];\r\n\r\n\t\tif ( BC_status == ST_UNDEFINED )\r\n\t\t\tsprintf( messageString,\"Stepsize is %.6e!\",tau );\r\n\t\telse\r\n\t\t\tsprintf( messageString,\"Stepsize is %.6e! (BC_idx = %d, BC_isBound = %d, BC_status = %d)\",tau,BC_idx,BC_isBound,BC_status );\r\n\r\n\t\tgetGlobalMessageHandler( )->throwInfo( RET_STEPSIZE_NONPOSITIVE,messageString,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );\r\n\t}\r\n\t#endif\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\th o t s t a r t _ p e r f o r m S t e p\r\n */\r\nreturnValue QProblem::hotstart_performStep(\tconst int* const FR_idx, const int* const FX_idx, const int* const AC_idx, const int* const IAC_idx,\r\n\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_g, const real_t* const delta_lbA, const real_t* const delta_ubA,\r\n\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_lb, const real_t* const delta_ub,\r\n\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_xFX, const real_t* const delta_xFR,\r\n\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_yAC, const real_t* const delta_yFX,\r\n\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_Ax, int BC_idx, SubjectToStatus BC_status, BooleanType BC_isBound\r\n\t\t\t\t\t\t\t\t\t\t\t)\r\n{\r\n\tint i, j, ii;\r\n\tint nV  = getNV( );\r\n\tint nC  = getNC( );\r\n\tint nFR = getNFR( );\r\n\tint nFX = getNFX( );\r\n\tint nAC = getNAC( );\r\n\tint nIAC = getNIAC( );\r\n\r\n\r\n\t/* I) CHECK (CONSTRAINTS') BOUNDS' CONSISTENCY */\r\n\tif ( areBoundsConsistent( delta_lb,delta_ub,delta_lbA,delta_ubA ) == BT_FALSE )\r\n\t{\r\n\t\tinfeasible = BT_TRUE;\r\n\t\ttau = 0.0;\r\n\r\n\t\treturn THROWERROR( RET_QP_INFEASIBLE );\r\n\t}\r\n\r\n\r\n\t/* II) GO TO ACTIVE SET CHANGE */\r\n\tif ( tau > ZERO )\r\n\t{\r\n\t\t/* 1) Perform step in primal und dual space... */\r\n\t\tfor( i=0; i<nFR; ++i )\r\n\t\t{\r\n\t\t\tii = FR_idx[i];\r\n\t\t\tx[ii] += tau*delta_xFR[i];\r\n\t\t}\r\n\r\n\t\tfor( i=0; i<nFX; ++i )\r\n\t\t{\r\n\t\t\tii = FX_idx[i];\r\n\t\t\tx[ii] += tau*delta_xFX[i];\r\n\t\t\ty[ii] += tau*delta_yFX[i];\r\n\t\t}\r\n\r\n\t\tfor( i=0; i<nAC; ++i )\r\n\t\t{\r\n\t\t\tii = AC_idx[i];\r\n\t\t\ty[nV+ii] += tau*delta_yAC[i];\r\n\t\t}\r\n\r\n\t\t/* ... also for Ax. */\r\n\t\tfor( i=0; i<nIAC; ++i )\r\n\t\t{\r\n\t\t\tii = IAC_idx[i];\r\n\t\t\tif ( constraints.getType( ii ) != ST_UNBOUNDED )\r\n\t\t\t\tAx[ii] += tau*delta_Ax[ii];\r\n\t\t}\r\n\t\tfor( i=0; i<nAC; ++i )\r\n\t\t{\r\n\t\t\tii = AC_idx[i];\r\n\r\n\t\t\tAx[ii] = 0.0;\r\n\t\t\tfor( j=0; j<nV; ++j )\r\n\t\t\t\tAx[ii] += A[ii*NVMAX + j] * x[j];\r\n\t\t}\r\n\r\n\t\t/* 2) Shift QP data. */\r\n\t\tfor( i=0; i<nV; ++i )\r\n\t\t{\r\n\t\t\tg[i]  += tau*delta_g[i];\r\n\t\t\tlb[i] += tau*delta_lb[i];\r\n\t\t\tub[i] += tau*delta_ub[i];\r\n\t\t}\r\n\r\n\t\tfor( i=0; i<nC; ++i )\r\n\t\t{\r\n\t\t\tlbA[i] += tau*delta_lbA[i];\r\n\t\t\tubA[i] += tau*delta_ubA[i];\r\n\t\t}\r\n\t}\r\n\telse\r\n\t{\r\n\t\t/* print a stepsize warning if stepsize is zero */\r\n\t\t#ifdef PC_DEBUG\r\n\t\tchar messageString[80];\r\n\t\tsprintf( messageString,\"Stepsize is %.6e\",tau );\r\n\t\tgetGlobalMessageHandler( )->throwWarning( RET_STEPSIZE,messageString,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );\r\n\t\t#endif\r\n\t}\r\n\r\n\r\n\t/* setup output preferences */\r\n\t#ifdef PC_DEBUG\r\n\tchar messageString[80];\r\n\tVisibilityStatus visibilityStatus;\r\n\r\n\tif ( printlevel == PL_HIGH )\r\n\t\tvisibilityStatus = VS_VISIBLE;\r\n\telse\r\n\t\tvisibilityStatus = VS_HIDDEN;\r\n\t#endif\r\n\r\n\t\r\n\t/* III) UPDATE ACTIVE SET */\r\n\tswitch ( BC_status )\r\n\t{\r\n\t\t/* Optimal solution found as no working set change detected. */\r\n\t\tcase ST_UNDEFINED:\r\n\t\t\treturn RET_OPTIMAL_SOLUTION_FOUND;\r\n\r\n\r\n\t\t/* Remove one variable from active set. */\r\n\t\tcase ST_INACTIVE:\r\n\t\t\tif ( BC_isBound == BT_TRUE )\r\n\t\t\t{\r\n\t\t\t\t#ifdef PC_DEBUG\r\n\t\t\t\tsprintf( messageString,\"bound no. %d.\", BC_idx );\r\n\t\t\t\tgetGlobalMessageHandler( )->throwInfo( RET_REMOVE_FROM_ACTIVESET,messageString,__FUNCTION__,__FILE__,__LINE__,visibilityStatus );\r\n\t\t\t\t#endif\r\n\r\n\t\t\t\tif ( removeBound( BC_idx,BT_TRUE ) != SUCCESSFUL_RETURN )\r\n\t\t\t\t\treturn THROWERROR( RET_REMOVE_FROM_ACTIVESET_FAILED );\r\n\r\n\t\t\t\ty[BC_idx] = 0.0;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t#ifdef PC_DEBUG\r\n\t\t\t\tsprintf( messageString,\"constraint no. %d.\", BC_idx );\r\n\t\t\t\tgetGlobalMessageHandler( )->throwInfo( RET_REMOVE_FROM_ACTIVESET,messageString,__FUNCTION__,__FILE__,__LINE__,visibilityStatus );\r\n\t\t\t\t#endif\r\n\r\n\t\t\t\tif ( removeConstraint( BC_idx,BT_TRUE ) != SUCCESSFUL_RETURN )\r\n\t\t\t\t\treturn THROWERROR( RET_REMOVE_FROM_ACTIVESET_FAILED );\r\n\r\n\t\t\t\ty[nV+BC_idx] = 0.0;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\r\n\r\n\t\t/* Add one variable to active set. */\r\n\t\tdefault:\r\n\t\t\tif ( BC_isBound == BT_TRUE )\r\n\t\t\t{\r\n\t\t\t\t#ifdef PC_DEBUG\r\n\t\t\t\tif ( BC_status == ST_LOWER )\r\n\t\t\t\t\tsprintf( messageString,\"lower bound no. %d.\", BC_idx );\r\n\t\t\t\telse\r\n\t\t\t\t\tsprintf( messageString,\"upper bound no. %d.\", BC_idx );\r\n\t\t\t\tgetGlobalMessageHandler( )->throwInfo( RET_ADD_TO_ACTIVESET,messageString,__FUNCTION__,__FILE__,__LINE__,visibilityStatus );\r\n\t\t\t\t#endif\r\n\r\n\t\t\t\tif ( addBound( BC_idx,BC_status,BT_TRUE ) != SUCCESSFUL_RETURN )\r\n\t\t\t\t\treturn THROWERROR( RET_ADD_TO_ACTIVESET_FAILED );\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t#ifdef PC_DEBUG\r\n\t\t\t\tif ( BC_status == ST_LOWER )\r\n\t\t\t\t\tsprintf( messageString,\"lower constraint's bound no. %d.\", BC_idx );\r\n\t\t\t\telse\r\n\t\t\t\t\tsprintf( messageString,\"upper constraint's bound no. %d.\", BC_idx );\r\n\t\t\t\tgetGlobalMessageHandler( )->throwInfo( RET_ADD_TO_ACTIVESET,messageString,__FUNCTION__,__FILE__,__LINE__,visibilityStatus );\r\n\t\t\t\t#endif\r\n\r\n\t\t\t\tif ( addConstraint( BC_idx,BC_status,BT_TRUE ) != SUCCESSFUL_RETURN )\r\n\t\t\t\t\treturn THROWERROR( RET_ADD_TO_ACTIVESET_FAILED );\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t}\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\ta r e B o u n d s C o n s i s t e n t\r\n */\r\nBooleanType QProblem::areBoundsConsistent(\tconst real_t* const delta_lb, const real_t* const delta_ub,\r\n\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_lbA, const real_t* const delta_ubA\r\n\t\t\t\t\t\t\t\t\t\t\t) const\r\n{\r\n\tint i;\r\n\r\n\t/* 1) Check bounds' consistency. */\r\n\tif ( QProblemB::areBoundsConsistent( delta_lb,delta_ub ) == BT_FALSE )\r\n\t\treturn BT_FALSE;\r\n\r\n\t/* 2) Check constraints' consistency, i.e.\r\n\t *    check if delta_lb[i] is greater than delta_ub[i]\r\n\t *    for a component i whose bounds are already (numerically) equal. */\r\n\tfor( i=0; i<getNC( ); ++i )\r\n\t\tif ( ( lbA[i] > ubA[i] - BOUNDTOL ) && ( delta_lbA[i] > delta_ubA[i] + EPS ) )\r\n\t\t\treturn BT_FALSE;\r\n\r\n\treturn BT_TRUE;\r\n}\r\n\r\n\r\n/*\r\n *\ts e t u p Q P d a t a\r\n */\r\nreturnValue QProblem::setupQPdata(\tconst real_t* const _H, const real_t* const _R, const real_t* const _g, const real_t* const _A,\r\n\t\t\t\t\t\t\t\t\tconst real_t* const _lb, const real_t* const _ub,\r\n\t\t\t\t\t\t\t\t\tconst real_t* const _lbA, const real_t* const _ubA\r\n\t\t\t\t\t\t\t\t\t)\r\n{\r\n\tint i, j;\r\n\tint nV = getNV( );\r\n\tint nC = getNC( );\r\n\r\n\r\n\t/* 1) Load Hessian matrix as well as lower and upper bounds vectors. */\r\n\tif (QProblemB::setupQPdata(_H, _R, _g, _lb, _ub) != SUCCESSFUL_RETURN)\r\n\t\treturn THROWERROR( RET_INVALID_ARGUMENTS );\r\n\r\n\t/* 2) Load constraint matrix. */\r\n\tif ( ( nC > 0 ) && ( _A == 0 ) )\r\n\t\treturn THROWERROR( RET_INVALID_ARGUMENTS );\r\n\r\n\tif ( nC > 0 )\r\n\t{\r\n\t\tfor( i=0; i<nC; ++i )\r\n\t\t\tfor( j=0; j<nV; ++j )\r\n\t\t\t\tA[i*NVMAX + j] = _A[i*nV + j];\r\n\r\n\t\t/* 3) Setup lower constraints' bounds vector. */\r\n\t\tif ( _lbA != 0 )\r\n\t\t{\r\n\t\t\tfor( i=0; i<nC; ++i )\r\n\t\t\t\tlbA[i] = _lbA[i];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t/* if no lower constraints' bounds are specified, set them to -infinity */\r\n\t\t\tfor( i=0; i<nC; ++i )\r\n\t\t\t\tlbA[i] = -INFTY;\r\n\t\t}\r\n\r\n\t\t/* 4) Setup upper constraints' bounds vector. */\r\n\t\tif ( _ubA != 0 )\r\n\t\t{\r\n\t\t\tfor( i=0; i<nC; ++i )\r\n\t\t\t\tubA[i] = _ubA[i];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t/* if no upper constraints' bounds are specified, set them to infinity */\r\n\t\t\tfor( i=0; i<nC; ++i )\r\n\t\t\t\tubA[i] = INFTY;\r\n\t\t}\r\n\t}\r\n\r\n// \tprintmatrix2( \"A\",A,10,20 );\r\n\t\r\n// \tprintmatrix2( \"lbA\",lbA,1,nC );\r\n// \tprintmatrix2( \"ubA\",ubA,1,nC );\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n\r\n#ifdef PC_DEBUG  /* Define print functions only for debugging! */\r\n\r\n/*\r\n *\tp r i n t I t e r a t i o n\r\n */\r\nreturnValue QProblem::printIteration( \tint iteration,\r\n\t\t\t\t\t\t\t\t\t\tint BC_idx,\tSubjectToStatus BC_status, BooleanType BC_isBound\r\n\t\t  \t\t\t\t\t\t\t\t)\r\n{\r\n\tchar myPrintfString[160];\r\n\r\n\t/* consistency check */\r\n\tif ( iteration < 0 )\r\n\t\treturn THROWERROR( RET_INVALID_ARGUMENTS );\r\n\r\n\t/* nothing to do */\r\n\tif ( printlevel != PL_MEDIUM )\r\n\t\treturn SUCCESSFUL_RETURN;\r\n\r\n\r\n\t/* 1) Print header at first iteration. */\r\n \tif ( iteration == 0 )\r\n\t{\r\n\t\tsprintf( myPrintfString,\"\\n##############  qpOASES  --  QP NO.%4.1d  ###############\\n\", count );\r\n\t\tmyPrintf( myPrintfString );\r\n\r\n\t\tsprintf( myPrintfString,\"  Iter  |  StepLength   |     Info      |  nFX  |  nAC  \\n\" );\r\n\t\tmyPrintf( myPrintfString );\r\n\t}\r\n\r\n\t/* 2) Print iteration line. */\r\n\tif ( BC_status == ST_UNDEFINED )\r\n\t{\r\n\t\tsprintf( myPrintfString,\"  %4.1d  |  %1.5e  |   QP SOLVED   | %4.1d  | %4.1d  \\n\", iteration,tau,getNFX( ),getNAC( ) );\r\n\t\tmyPrintf( myPrintfString );\r\n\t}\r\n\telse\r\n\t{\r\n\t\tchar info[8];\r\n\r\n\t\tif ( BC_status == ST_INACTIVE )\r\n\t\t\tsprintf( info,\"REM \" );\r\n\t\telse\r\n\t\t\tsprintf( info,\"ADD \" );\r\n\r\n\t\tif ( BC_isBound == BT_TRUE )\r\n\t\t\tsprintf( &(info[4]),\"BND\" );\r\n\t\telse\r\n\t\t\tsprintf( &(info[4]),\"CON\" );\r\n\r\n\t\tsprintf( myPrintfString,\"  %4.1d  |  %1.5e  |  %s%4.1d  | %4.1d  | %4.1d  \\n\", iteration,tau,info,BC_idx,getNFX( ),getNAC( ) );\r\n\t\tmyPrintf( myPrintfString );\r\n\t}\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\tp r i n t I t e r a t i o n\r\n */\r\nreturnValue QProblem::printIteration( \tint iteration,\r\n\t\t\t\t\t\t\t\t\t\tint BC_idx,\tSubjectToStatus BC_status\r\n\t\t  \t\t\t\t\t\t\t\t)\r\n{\r\n\treturn printIteration( iteration,BC_idx,BC_status,BT_TRUE );\r\n}\r\n\r\n#endif  /* PC_DEBUG */\r\n\r\n\r\n\r\n/*\r\n *\tc h e c k K K T c o n d i t i o n s\r\n */\r\nreturnValue QProblem::checkKKTconditions( )\r\n{\r\n\t#ifdef __PERFORM_KKT_TEST__\r\n\r\n\tint i, j, jj;\r\n\tint nV  = getNV( );\r\n\tint nC  = getNC( );\r\n\tint nAC = getNAC( );\r\n\r\n\treal_t tmp;\r\n\treal_t maxKKTviolation = 0.0;\r\n\r\n\tint AC_idx[NCMAX_ALLOC];\r\n\tconstraints.getActive( )->getNumberArray( AC_idx );\r\n\r\n\t/* 1) check for Hx + g - [yFX yAC]*[Id A]' = 0. */\r\n\tfor( i=0; i<nV; ++i )\r\n\t{\r\n\t\ttmp = g[i];\r\n\r\n\t\tfor( j=0; j<nV; ++j )\r\n\t\t\ttmp += H[i*NVMAX + j] * x[j];\r\n\r\n\t\ttmp -= y[i];\r\n\r\n\t\t/* Only sum over active constraints as y is zero for all inactive ones. */\r\n\t\tfor( j=0; j<nAC; ++j )\r\n\t\t{\r\n\t\t\tjj = AC_idx[j];\r\n\t\t\ttmp -= A[jj*NVMAX + i] * y[nV+jj];\r\n\t\t}\r\n\r\n\t\tif ( getAbs( tmp ) > maxKKTviolation )\r\n\t\t\tmaxKKTviolation = getAbs( tmp );\r\n\t}\r\n\r\n\t/* 2) Check for [lb lbA] <= [Id A]*x <= [ub ubA]. */\r\n\t/* lbA <= Ax <= ubA */\r\n\tfor( i=0; i<nC; ++i )\r\n\t{\r\n\t\tif ( lbA[i] - Ax[i] > maxKKTviolation )\r\n\t\t\tmaxKKTviolation = lbA[i] - Ax[i];\r\n\r\n\t\tif ( Ax[i] - ubA[i] > maxKKTviolation )\r\n\t\t\tmaxKKTviolation = Ax[i] - ubA[i];\r\n\t}\r\n\r\n\t/* lb <= x <= ub */\r\n\tfor( i=0; i<nV; ++i )\r\n\t{\r\n\t\tif ( lb[i] - x[i] > maxKKTviolation )\r\n\t\t\tmaxKKTviolation = lb[i] - x[i];\r\n\r\n\t\tif ( x[i] - ub[i] > maxKKTviolation )\r\n\t\t\tmaxKKTviolation = x[i] - ub[i];\r\n\t}\r\n\r\n\t/* 3) Check for correct sign of y and for complementary slackness. */\r\n\t/* bounds */\r\n\tfor( i=0; i<nV; ++i )\r\n\t{\r\n\t\tswitch ( bounds.getStatus( i ) )\r\n\t\t{\r\n\t\t\tcase ST_LOWER:\r\n\t\t\t\tif ( -y[i] > maxKKTviolation )\r\n\t\t\t\t\tmaxKKTviolation = -y[i];\r\n\t\t\t\tif ( getAbs( x[i] - lb[i] ) > maxKKTviolation )\r\n\t\t\t\t\tmaxKKTviolation = getAbs( x[i] - lb[i] );\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase ST_UPPER:\r\n\t\t\t\tif ( y[i] > maxKKTviolation )\r\n\t\t\t\t\tmaxKKTviolation = y[i];\r\n\t\t\t\tif ( getAbs( ub[i] - x[i] ) > maxKKTviolation )\r\n\t\t\t\t\tmaxKKTviolation = getAbs( ub[i] - x[i] );\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tdefault: /* inactive */\r\n\t\t\tif ( getAbs( y[i] ) > maxKKTviolation )\r\n\t\t\t\t\tmaxKKTviolation = getAbs( y[i] );\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\t/* constraints */\r\n\tfor( i=0; i<nC; ++i )\r\n\t{\r\n\t\tswitch ( constraints.getStatus( i ) )\r\n\t\t{\r\n\t\t\tcase ST_LOWER:\r\n\t\t\t\tif ( -y[nV+i] > maxKKTviolation )\r\n\t\t\t\t\tmaxKKTviolation = -y[nV+i];\r\n\t\t\t\tif ( getAbs( Ax[i] - lbA[i] ) > maxKKTviolation )\r\n\t\t\t\t\tmaxKKTviolation = getAbs( Ax[i] - lbA[i] );\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase ST_UPPER:\r\n\t\t\t\tif ( y[nV+i] > maxKKTviolation )\r\n\t\t\t\t\tmaxKKTviolation = y[nV+i];\r\n\t\t\t\tif ( getAbs( ubA[i] - Ax[i] ) > maxKKTviolation )\r\n\t\t\t\t\tmaxKKTviolation = getAbs( ubA[i] - Ax[i] );\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tdefault: /* inactive */\r\n\t\t\tif ( getAbs( y[nV+i] ) > maxKKTviolation )\r\n\t\t\t\t\tmaxKKTviolation = getAbs( y[nV+i] );\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tif ( maxKKTviolation > CRITICALACCURACY )\r\n\t\treturn RET_NO_SOLUTION;\r\n\r\n\tif ( maxKKTviolation > DESIREDACCURACY )\r\n\t\treturn RET_INACCURATE_SOLUTION;\r\n\r\n\t#endif /* __PERFORM_KKT_TEST__ */\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\tend of file\r\n */\r\n"
  },
  {
    "path": "externals/qpoases/SRC/QProblem.ipp",
    "content": "/*\r\n *\tThis file is part of qpOASES.\r\n *\r\n *\tqpOASES -- An Implementation of the Online Active Set Strategy.\r\n *\tCopyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.\r\n *\r\n *\tqpOASES is free software; you can redistribute it and/or\r\n *\tmodify it under the terms of the GNU Lesser General Public\r\n *\tLicense as published by the Free Software Foundation; either\r\n *\tversion 2.1 of the License, or (at your option) any later version.\r\n *\r\n *\tqpOASES is distributed in the hope that it will be useful,\r\n *\tbut WITHOUT ANY WARRANTY; without even the implied warranty of\r\n *\tMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n *\tLesser General Public License for more details.\r\n *\r\n *\tYou should have received a copy of the GNU Lesser General Public\r\n *\tLicense along with qpOASES; if not, write to the Free Software\r\n *\tFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r\n *\r\n */\r\n\r\n\r\n/**\r\n *\t\\file SRC/QProblem.ipp\r\n *\t\\author Hans Joachim Ferreau\r\n *\t\\version 1.3embedded\r\n *\t\\date 2007-2008\r\n *\r\n *\tImplementation of inlined member functions of the QProblem class which \r\n *\tis able to use the newly developed online active set strategy for \r\n *\tparametric quadratic programming.\r\n */\r\n\r\n\r\n\r\n/*****************************************************************************\r\n *  P U B L I C                                                              *\r\n *****************************************************************************/\r\n\r\n/*\r\n *\tg e t A\r\n */\r\ninline returnValue QProblem::getA( real_t* const _A ) const\r\n{\r\n\tint i;\r\n\r\n\tfor ( i=0; i<getNV( )*getNC( ); ++i )\r\n\t\t_A[i] = A[i];\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\tg e t A\r\n */\r\ninline returnValue QProblem::getA( int number, real_t* const row ) const\r\n{\r\n\tint nV = getNV( );\r\n\t\t\r\n\tif ( ( number >= 0 ) && ( number < getNC( ) ) )\r\n\t{\r\n\t\tfor ( int i=0; i<nV; ++i )\r\n\t\t\trow[i] = A[number*NVMAX + i];\r\n\r\n\t\treturn SUCCESSFUL_RETURN;\r\n\t}\r\n\telse\r\n\t\treturn THROWERROR( RET_INDEX_OUT_OF_BOUNDS );\r\n}\r\n\r\n\r\n/*\r\n *\tg e t L B A\r\n */\r\ninline returnValue QProblem::getLBA( real_t* const _lbA ) const\r\n{\r\n\tint i;\r\n\r\n\tfor ( i=0; i<getNC( ); ++i )\r\n\t\t_lbA[i] = lbA[i];\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\tg e t L B A\r\n */\r\ninline returnValue QProblem::getLBA( int number, real_t& value ) const\r\n{\r\n\tif ( ( number >= 0 ) && ( number < getNC( ) ) )\r\n\t{\r\n\t\tvalue = lbA[number];\r\n\t\treturn SUCCESSFUL_RETURN;\r\n\t}\r\n\telse\r\n\t\treturn THROWERROR( RET_INDEX_OUT_OF_BOUNDS );\r\n}\r\n\r\n\r\n/*\r\n *\tg e t U B A\r\n */\r\ninline returnValue QProblem::getUBA( real_t* const _ubA ) const\r\n{\r\n\tint i;\r\n\r\n\tfor ( i=0; i<getNC( ); ++i )\r\n\t\t_ubA[i] = ubA[i];\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\tg e t U B A\r\n */\r\ninline returnValue QProblem::getUBA( int number, real_t& value ) const\r\n{\r\n\tif ( ( number >= 0 ) && ( number < getNC( ) ) )\r\n\t{\r\n\t\tvalue = ubA[number];\r\n\t\treturn SUCCESSFUL_RETURN;\r\n\t}\r\n\telse\r\n\t\treturn THROWERROR( RET_INDEX_OUT_OF_BOUNDS );\r\n}\r\n\r\n\r\n/*\r\n *\tg e t C o n s t r a i n t s\r\n */\r\ninline returnValue QProblem::getConstraints( Constraints* const _constraints ) const\r\n{\r\n\t*_constraints = constraints;\r\n\t\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n\r\n/*\r\n *\tg e t N C\r\n */\r\ninline int QProblem::getNC( ) const\r\n{\r\n\treturn constraints.getNC( );\r\n}\r\n\r\n\r\n/*\r\n *\tg e t N E C\r\n */\r\ninline int QProblem::getNEC( ) const\r\n{\r\n\treturn constraints.getNEC( );\r\n}\r\n\r\n\r\n/*\r\n *\tg e t N A C\r\n */\r\ninline int QProblem::getNAC( )\r\n{\r\n\treturn constraints.getNAC( );\r\n}\r\n\r\n\r\n/*\r\n *\tg e t N I A C\r\n */\r\ninline int QProblem::getNIAC( )\r\n{\r\n\treturn constraints.getNIAC( );\r\n}\r\n\r\n\r\n\r\n/*****************************************************************************\r\n *  P R O T E C T E D                                                        *\r\n *****************************************************************************/\r\n \r\n\r\n/*\r\n *\ts e t A\r\n */\r\ninline returnValue QProblem::setA( const real_t* const A_new )\r\n{\r\n\tint i, j;\r\n\tint nV = getNV( );\r\n\tint nC = getNC( );\r\n\r\n\t/* Set constraint matrix AND update member AX. */\r\n\tfor( j=0; j<nC; ++j )\r\n\t{\r\n\t\tAx[j] = 0.0;\r\n\r\n\t\tfor( i=0; i<nV; ++i )\r\n\t\t{\t\r\n\t\t\tA[j*NVMAX + i] = A_new[j*nV + i];\r\n\t\t\tAx[j] += A[j*NVMAX + i] * x[i];\r\n\t\t}\r\n\t}\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\ts e t A\r\n */\r\ninline returnValue QProblem::setA( int number, const real_t* const row )\r\n{\r\n\tint i;\r\n\tint nV = getNV( );\r\n\r\n\t/* Set constraint matrix AND update member AX. */\r\n\tif ( ( number >= 0 ) && ( number < getNC( ) ) )\r\n\t{\r\n\t\tAx[number] = 0.0;\r\n\r\n\t\tfor( i=0; i<nV; ++i )\r\n\t\t{\r\n\t\t\tA[number*NVMAX + i] = row[i];\r\n\t\t\tAx[number] += A[number*NVMAX + i] * x[i];\r\n\t\t}\r\n\r\n\t\treturn SUCCESSFUL_RETURN;\r\n\t}\r\n\telse\r\n\t\treturn THROWERROR( RET_INDEX_OUT_OF_BOUNDS );\r\n}\r\n\r\n\r\n/*\r\n *\ts e t L B A\r\n */\r\ninline returnValue QProblem::setLBA( const real_t* const lbA_new )\r\n{\r\n\tint i;\r\n\tint nC = getNC();\r\n\r\n\tfor( i=0; i<nC; ++i )\r\n\t\tlbA[i] = lbA_new[i];\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\ts e t L B A\r\n */\r\ninline returnValue QProblem::setLBA( int number, real_t value )\r\n{\r\n\tif ( ( number >= 0 ) && ( number < getNC( ) ) )\r\n\t{\r\n\t\tlbA[number] = value;\r\n\t\treturn SUCCESSFUL_RETURN;\r\n\t}\r\n\telse\r\n\t\treturn THROWERROR( RET_INDEX_OUT_OF_BOUNDS );\r\n}\r\n\r\n\r\n/*\r\n *\ts e t U B A\r\n */\r\ninline returnValue QProblem::setUBA( const real_t* const ubA_new )\r\n{\r\n\tint i;\r\n\tint nC = getNC();\r\n\r\n\tfor( i=0; i<nC; ++i )\r\n\t\tubA[i] = ubA_new[i];\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\ts e t U B A\r\n */\r\ninline returnValue QProblem::setUBA( int number, real_t value )\r\n{\r\n\tif ( ( number >= 0 ) && ( number < getNC( ) ) )\r\n\t{\r\n\t\tubA[number] = value;\r\n\t\treturn SUCCESSFUL_RETURN;\r\n\t}\r\n\telse\r\n\t\treturn THROWERROR( RET_INDEX_OUT_OF_BOUNDS );\r\n}\r\n\r\n\r\n/*\r\n *\tend of file\r\n */\r\n"
  },
  {
    "path": "externals/qpoases/SRC/QProblemB.cpp",
    "content": "/*\r\n *\tThis file is part of qpOASES.\r\n *\r\n *\tqpOASES -- An Implementation of the Online Active Set Strategy.\r\n *\tCopyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.\r\n *\r\n *\tqpOASES is free software; you can redistribute it and/or\r\n *\tmodify it under the terms of the GNU Lesser General Public\r\n *\tLicense as published by the Free Software Foundation; either\r\n *\tversion 2.1 of the License, or (at your option) any later version.\r\n *\r\n *\tqpOASES is distributed in the hope that it will be useful,\r\n *\tbut WITHOUT ANY WARRANTY; without even the implied warranty of\r\n *\tMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n *\tLesser General Public License for more details.\r\n *\r\n *\tYou should have received a copy of the GNU Lesser General Public\r\n *\tLicense along with qpOASES; if not, write to the Free Software\r\n *\tFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r\n *\r\n */\r\n\r\n\r\n/**\r\n *\t\\file SRC/QProblemB.cpp\r\n *\t\\author Hans Joachim Ferreau\r\n *\t\\version 1.3embedded\r\n *\t\\date 2007-2008\r\n *\r\n *\tImplementation of the QProblemB class which is able to use the newly\r\n *\tdeveloped online active set strategy for parametric quadratic programming.\r\n */\r\n\r\n\r\n#include <QProblemB.hpp>\r\n\r\n#include <stdio.h>\r\n\r\nvoid printmatrix(char *name, double *A, int m, int n) {\r\n  int i, j;\r\n\r\n  printf(\"%s = [...\\n\", name);\r\n  for (i = 0; i < m; i++) {\r\n    for (j = 0; j < n; j++)\r\n        printf(\"  % 9.4f\", A[i*n+j]);\r\n    printf(\",\\n\");\r\n  }\r\n  printf(\"];\\n\");\r\n}\r\n\r\n\r\n\r\n/*****************************************************************************\r\n *  P U B L I C                                                              *\r\n *****************************************************************************/\r\n\r\n\r\n/*\r\n *\tQ P r o b l e m B\r\n */\r\nQProblemB::QProblemB( )\r\n{\r\n\t/* reset global message handler */\r\n\tgetGlobalMessageHandler( )->reset( );\r\n\r\n\thasHessian = BT_FALSE;\r\n\r\n\tbounds.init( 0 );\r\n\r\n\thasCholesky = BT_FALSE;\r\n\r\n\ttau = 0.0;\r\n\r\n\thessianType = HST_POSDEF_NULLSPACE; /* Hessian is assumed to be positive definite by default */\r\n\tinfeasible = BT_FALSE;\r\n\tunbounded = BT_FALSE;\r\n\r\n\tstatus = QPS_NOTINITIALISED;\r\n\r\n\t#ifdef PC_DEBUG\r\n\tprintlevel = PL_MEDIUM;\r\n\tsetPrintLevel( PL_MEDIUM );\r\n\t#else\r\n\tprintlevel = QPOASES_PRINTLEVEL;\r\n\t#endif\r\n\r\n\tcount = 0;\r\n}\r\n\r\n\r\n/*\r\n *\tQ P r o b l e m B\r\n */\r\nQProblemB::QProblemB( int _nV )\r\n{\r\n\t/* consistency check */\r\n\tif ( _nV <= 0 )\r\n\t{\r\n\t\t_nV = 1;\r\n\t\tTHROWERROR( RET_INVALID_ARGUMENTS );\r\n\t}\r\n\r\n\thasHessian = BT_FALSE;\r\n\r\n\t/* reset global message handler */\r\n\tgetGlobalMessageHandler( )->reset( );\r\n\r\n\tbounds.init( _nV );\r\n\r\n\thasCholesky = BT_FALSE;\r\n\r\n\ttau = 0.0;\r\n\r\n\thessianType = HST_POSDEF_NULLSPACE; /* Hessian is assumed to be positive definite by default */\r\n\tinfeasible = BT_FALSE;\r\n\tunbounded = BT_FALSE;\r\n\r\n\tstatus = QPS_NOTINITIALISED;\r\n\r\n\t#ifdef PC_DEBUG\r\n\tprintlevel = PL_MEDIUM;\r\n\tsetPrintLevel( PL_MEDIUM );\r\n\t#else\r\n\tprintlevel = QPOASES_PRINTLEVEL;\r\n\t#endif\r\n\r\n\tcount = 0;\r\n}\r\n\r\n\r\n/*\r\n *\tQ P r o b l e m B\r\n */\r\nQProblemB::QProblemB( const QProblemB& rhs )\r\n{\r\n\tint i, j;\r\n\r\n\tint _nV = rhs.bounds.getNV( );\r\n\r\n\tfor( i=0; i<_nV; ++i )\r\n\t\tfor( j=0; j<_nV; ++j )\r\n\t\t\tH[i*NVMAX + j] = rhs.H[i*NVMAX + j];\r\n\r\n\thasHessian = rhs.hasHessian;\r\n\r\n\tfor( i=0; i<_nV; ++i )\r\n\t\tg[i] = rhs.g[i];\r\n\r\n\tfor( i=0; i<_nV; ++i )\r\n\t\tlb[i] = rhs.lb[i];\r\n\r\n\tfor( i=0; i<_nV; ++i )\r\n\t\tub[i] = rhs.ub[i];\r\n\r\n\r\n\tbounds = rhs.bounds;\r\n\r\n\tfor( i=0; i<_nV; ++i )\r\n\t\tfor( j=0; j<_nV; ++j )\r\n\t\t\tR[i*NVMAX + j] = rhs.R[i*NVMAX + j];\r\n\thasCholesky = rhs.hasCholesky;\r\n\r\n\tfor( i=0; i<_nV; ++i )\r\n\t\tx[i] = rhs.x[i];\r\n\r\n\tfor( i=0; i<_nV; ++i )\r\n\t\ty[i] = rhs.y[i];\r\n\r\n\ttau = rhs.tau;\r\n\r\n\thessianType = rhs.hessianType;\r\n\tinfeasible = rhs.infeasible;\r\n\tunbounded = rhs.unbounded;\r\n\r\n\tstatus = rhs.status;\r\n\r\n\tprintlevel = rhs.printlevel;\r\n\r\n\tcount = rhs.count;\r\n}\r\n\r\n\r\n/*\r\n *\t~ Q P r o b l e m B\r\n */\r\nQProblemB::~QProblemB( )\r\n{\r\n}\r\n\r\n\r\n/*\r\n *\to p e r a t o r =\r\n */\r\nQProblemB& QProblemB::operator=( const QProblemB& rhs )\r\n{\r\n\tint i, j;\r\n\r\n\tif ( this != &rhs )\r\n\t{\r\n\t\tint _nV = rhs.bounds.getNV( );\r\n\r\n\t\tfor( i=0; i<_nV; ++i )\r\n\t\t\tfor( j=0; j<_nV; ++j )\r\n\t\t\t\tH[i*NVMAX + j] = rhs.H[i*NVMAX + j];\r\n\r\n\t\thasHessian = rhs.hasHessian;\r\n\r\n\t\tfor( i=0; i<_nV; ++i )\r\n\t\t\tg[i] = rhs.g[i];\r\n\r\n\t\tfor( i=0; i<_nV; ++i )\r\n\t\t\tlb[i] = rhs.lb[i];\r\n\r\n\t\tfor( i=0; i<_nV; ++i )\r\n\t\t\tub[i] = rhs.ub[i];\r\n\r\n\t\tbounds = rhs.bounds;\r\n\r\n\t\tfor( i=0; i<_nV; ++i )\r\n\t\t\tfor( j=0; j<_nV; ++j )\r\n\t\t\t\tR[i*NVMAX + j] = rhs.R[i*NVMAX + j];\r\n\t\thasCholesky = rhs.hasCholesky;\r\n\r\n\r\n\t\tfor( i=0; i<_nV; ++i )\r\n\t\t\tx[i] = rhs.x[i];\r\n\r\n\t\tfor( i=0; i<_nV; ++i )\r\n\t\t\ty[i] = rhs.y[i];\r\n\r\n\t\ttau = rhs.tau;\r\n\r\n\t\thessianType = rhs.hessianType;\r\n\t\tinfeasible = rhs.infeasible;\r\n\t\tunbounded = rhs.unbounded;\r\n\r\n\t\tstatus = rhs.status;\r\n\r\n\t\tprintlevel = rhs.printlevel;\r\n\t\tsetPrintLevel( rhs.printlevel );\r\n\r\n\t\tcount = rhs.count;\r\n\t}\r\n\r\n\treturn *this;\r\n}\r\n\r\n\r\n/*\r\n *\tr e s e t\r\n */\r\nreturnValue QProblemB::reset( )\r\n{\r\n\tint i, j;\r\n\tint nV = getNV( );\r\n\r\n\t/** 0) Reset has Hessian flag. */\r\n\thasHessian = BT_FALSE;\r\n\r\n\t/* 1) Reset bounds. */\r\n\tbounds.init( nV );\r\n\r\n\t/* 2) Reset Cholesky decomposition. */\r\n\tfor( i=0; i<nV; ++i )\r\n\t\tfor( j=0; j<nV; ++j )\r\n\t\t\tR[i*NVMAX + j] = 0.0;\r\n\thasCholesky = BT_FALSE;\r\n\r\n\t/* 3) Reset steplength and status flags. */\r\n\ttau = 0.0;\r\n\r\n\thessianType = HST_POSDEF_NULLSPACE; /* Hessian is assumed to be positive definite by default */\r\n\tinfeasible = BT_FALSE;\r\n\tunbounded = BT_FALSE;\r\n\r\n\tstatus = QPS_NOTINITIALISED;\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\ti n i t\r\n */\r\nreturnValue QProblemB::init(\tconst real_t* const _H, const real_t* const _g,\r\n\t\t\t\t\t\t\t\tconst real_t* const _lb, const real_t* const _ub,\r\n\t\t\t\t\t\t\t\tint& nWSR, const real_t* const yOpt, real_t* const cputime\r\n\t\t\t\t\t\t\t\t)\r\n{\r\n\t/* 1) Setup QP data. */\r\n\tif (setupQPdata(_H, 0, _g, _lb, _ub) != SUCCESSFUL_RETURN)\r\n\t\treturn THROWERROR( RET_INVALID_ARGUMENTS );\r\n\r\n\t/* 2) Call to main initialisation routine (without any additional information). */\r\n\treturn solveInitialQP(0, yOpt, 0, nWSR, cputime);\r\n}\r\n\r\nreturnValue QProblemB::init(\tconst real_t* const _H, const real_t* const _R, const real_t* const _g,\r\n\t\t\t\t\t\t\t\tconst real_t* const _lb, const real_t* const _ub,\r\n\t\t\t\t\t\t\t\tint& nWSR, const real_t* const yOpt, real_t* const cputime\r\n\t\t\t\t\t\t\t\t)\r\n{\r\n\t/* 1) Setup QP data. */\r\n\tif (setupQPdata(_H, _R, _g, _lb, _ub) != SUCCESSFUL_RETURN)\r\n\t\treturn THROWERROR( RET_INVALID_ARGUMENTS );\r\n\r\n\t/* 2) Call to main initialisation routine (without any additional information). */\r\n\treturn solveInitialQP(0, yOpt, 0, nWSR, cputime);\r\n}\r\n\r\n\r\n/*\r\n *\th o t s t a r t\r\n */\r\nreturnValue QProblemB::hotstart(\tconst real_t* const g_new, const real_t* const lb_new, const real_t* const ub_new,\r\n\t\t\t\t\t\t\t\t\tint& nWSR, real_t* const cputime\r\n\t\t\t\t\t\t\t\t\t)\r\n{\r\n\tint l;\r\n\r\n\t/* consistency check */\r\n\tif ( ( getStatus( ) == QPS_NOTINITIALISED )       ||\r\n\t\t ( getStatus( ) == QPS_PREPARINGAUXILIARYQP ) ||\r\n\t\t ( getStatus( ) == QPS_PERFORMINGHOMOTOPY )   )\r\n\t{\r\n\t\treturn THROWERROR( RET_HOTSTART_FAILED_AS_QP_NOT_INITIALISED );\r\n\t}\r\n\r\n\t/* start runtime measurement */\r\n\treal_t starttime = 0.0;\r\n\tif ( cputime != 0 )\r\n\t\tstarttime = getCPUtime( );\r\n\r\n\r\n\t/* I) PREPARATIONS */\r\n\t/* 1) Reset status flags and increase QP counter. */\r\n\tinfeasible = BT_FALSE;\r\n\tunbounded = BT_FALSE;\r\n\r\n\t++count;\r\n\r\n\t/* 2) Allocate delta vectors of gradient and bounds. */\r\n\treturnValue returnvalue;\r\n\tBooleanType Delta_bB_isZero;\r\n\r\n\tint FR_idx[NVMAX];\r\n\tint FX_idx[NVMAX];\r\n\r\n\treal_t delta_g[NVMAX];\r\n\treal_t delta_lb[NVMAX];\r\n\treal_t delta_ub[NVMAX];\r\n\r\n\treal_t delta_xFR[NVMAX];\r\n\treal_t delta_xFX[NVMAX];\r\n\treal_t delta_yFX[NVMAX];\r\n\r\n\tint BC_idx;\r\n\tSubjectToStatus BC_status;\r\n\r\n\t#ifdef PC_DEBUG\r\n\tchar messageString[80];\r\n\t#endif\r\n\r\n\t/* II) MAIN HOMOTOPY LOOP */\r\n\tfor( l=0; l<nWSR; ++l )\r\n\t{\r\n\t\tstatus = QPS_PERFORMINGHOMOTOPY;\r\n\r\n\t\tif ( printlevel == PL_HIGH )\r\n\t\t{\r\n\t\t\t#ifdef PC_DEBUG\r\n\t\t\tsprintf( messageString,\"%d ...\",l );\r\n\t\t\tgetGlobalMessageHandler( )->throwInfo( RET_ITERATION_STARTED,messageString,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );\r\n\t\t\t#endif\r\n\t\t}\r\n\r\n\t\t/* 1) Setup index arrays. */\r\n\t\tif ( bounds.getFree( )->getNumberArray( FR_idx ) != SUCCESSFUL_RETURN )\r\n\t\t\treturn THROWERROR( RET_HOTSTART_FAILED );\r\n\r\n\t\tif ( bounds.getFixed( )->getNumberArray( FX_idx ) != SUCCESSFUL_RETURN )\r\n\t\t\treturn THROWERROR( RET_HOTSTART_FAILED );\r\n\r\n\t\t/* 2) Initialize shift direction of the gradient and the bounds. */\r\n\t\treturnvalue = hotstart_determineDataShift(  FX_idx,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tg_new,lb_new,ub_new,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tdelta_g,delta_lb,delta_ub,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tDelta_bB_isZero\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\r\n\t\tif ( returnvalue != SUCCESSFUL_RETURN )\r\n\t\t{\r\n\t\t\tnWSR = l;\r\n\t\t\tTHROWERROR( RET_SHIFT_DETERMINATION_FAILED );\r\n\t\t\treturn returnvalue;\r\n\t\t}\r\n\r\n\t\t/* 3) Determination of step direction of X and Y. */\r\n\t\treturnvalue = hotstart_determineStepDirection(\tFR_idx,FX_idx,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdelta_g,delta_lb,delta_ub,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDelta_bB_isZero,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdelta_xFX,delta_xFR,delta_yFX\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\r\n\t\tif ( returnvalue != SUCCESSFUL_RETURN )\r\n\t\t{\r\n\t\t\tnWSR = l;\r\n\t\t\tTHROWERROR( RET_STEPDIRECTION_DETERMINATION_FAILED );\r\n\t\t\treturn returnvalue;\r\n\t\t}\r\n\r\n\r\n\t\t/* 4) Determination of step length TAU. */\r\n\t\treturnvalue = hotstart_determineStepLength(\tFR_idx,FX_idx,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tdelta_lb,delta_ub,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tdelta_xFR,delta_yFX,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tBC_idx,BC_status );\r\n\t\tif ( returnvalue != SUCCESSFUL_RETURN )\r\n\t\t{\r\n\t\t\tnWSR = l;\r\n\t\t\tTHROWERROR( RET_STEPLENGTH_DETERMINATION_FAILED );\r\n\t\t\treturn returnvalue;\r\n\t\t}\r\n\r\n\t\t/* 5) Realization of the homotopy step. */\r\n\t\treturnvalue = hotstart_performStep(\tFR_idx,FX_idx,\r\n\t\t\t\t\t\t\t\t\t\t\tdelta_g,delta_lb,delta_ub,\r\n\t\t\t\t\t\t\t\t\t\t\tdelta_xFX,delta_xFR,delta_yFX,\r\n\t\t\t\t\t\t\t\t\t\t\tBC_idx,BC_status\r\n\t\t\t\t\t\t\t\t\t\t\t);\r\n\r\n\r\n\t\tif ( returnvalue != SUCCESSFUL_RETURN )\r\n\t\t{\r\n\t\t\tnWSR = l;\r\n\r\n\t\t\t/* stop runtime measurement */\r\n\t\t\tif ( cputime != 0 )\r\n\t\t\t\t*cputime = getCPUtime( ) - starttime;\r\n\r\n\t\t\t/* optimal solution found? */\r\n\t\t\tif ( returnvalue == RET_OPTIMAL_SOLUTION_FOUND )\r\n\t\t\t{\r\n\t\t\t\tstatus = QPS_SOLVED;\r\n\r\n\t\t\t\tif ( printlevel == PL_HIGH )\r\n\t\t\t\t\tTHROWINFO( RET_OPTIMAL_SOLUTION_FOUND );\r\n\r\n\t\t\t\t#ifdef PC_DEBUG\r\n\t \t\t\tif ( printIteration( l,BC_idx,BC_status ) != SUCCESSFUL_RETURN )\r\n\t\t\t\t\tTHROWERROR( RET_PRINT_ITERATION_FAILED ); /* do not pass this as return value! */\r\n\t\t\t\t#endif\r\n\r\n\t\t\t\t/* check KKT optimality conditions */\r\n\t\t\t\treturn checkKKTconditions( );\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t/* checks for infeasibility... */\r\n\t\t\t\tif ( infeasible == BT_TRUE )\r\n\t\t\t\t{\r\n\t\t\t\t\tstatus = QPS_HOMOTOPYQPSOLVED;\r\n\t\t\t\t\treturn THROWERROR( RET_HOTSTART_STOPPED_INFEASIBILITY );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* ...unboundedness... */\r\n\t\t\t\tif ( unbounded == BT_TRUE ) /* not necessary since objective function convex! */\r\n\t\t\t\t\treturn THROWERROR( RET_HOTSTART_STOPPED_UNBOUNDEDNESS );\r\n\r\n\t\t\t\t/* ... and throw unspecific error otherwise */\r\n\t\t\t\tTHROWERROR( RET_HOMOTOPY_STEP_FAILED );\r\n\t\t\t\treturn returnvalue;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/* 6) Output information of successful QP iteration. */\r\n\t\tstatus = QPS_HOMOTOPYQPSOLVED;\r\n\r\n\t\t#ifdef PC_DEBUG\r\n\t\tif ( printIteration( l,BC_idx,BC_status ) != SUCCESSFUL_RETURN )\r\n\t\t\tTHROWERROR( RET_PRINT_ITERATION_FAILED ); /* do not pass this as return value! */\r\n\t\t#endif\r\n\t}\r\n\r\n\r\n\t/* stop runtime measurement */\r\n\tif ( cputime != 0 )\r\n\t\t*cputime = getCPUtime( ) - starttime;\r\n\r\n\r\n\t/* if programm gets to here, output information that QP could not be solved\r\n\t * within the given maximum numbers of working set changes */\r\n\tif ( printlevel == PL_HIGH )\r\n\t{\r\n\t\t#ifdef PC_DEBUG\r\n\t\tsprintf( messageString,\"(nWSR = %d)\",nWSR );\r\n\t\treturn getGlobalMessageHandler( )->throwWarning( RET_MAX_NWSR_REACHED,messageString,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );\r\n\t\t#endif\r\n\t}\r\n\r\n\t/* Finally check KKT optimality conditions. */\r\n\treturnValue returnvalueKKTcheck = checkKKTconditions( );\r\n\r\n\tif ( returnvalueKKTcheck != SUCCESSFUL_RETURN )\r\n\t\treturn returnvalueKKTcheck;\r\n\telse\r\n\t\treturn RET_MAX_NWSR_REACHED;\r\n}\r\n\r\n\r\n/*\r\n *\tg e t N Z\r\n */\r\nint QProblemB::getNZ( )\r\n{\r\n\t/* if no constraints are present: nZ=nFR */\r\n\treturn bounds.getFree( )->getLength( );\r\n}\r\n\r\n\r\n/*\r\n *\tg e t O b j V a l\r\n */\r\nreal_t QProblemB::getObjVal( ) const\r\n{\r\n\treal_t objVal;\r\n\r\n\t/* calculated optimal objective function value\r\n\t * only if current QP has been solved */\r\n\tif ( ( getStatus( ) == QPS_AUXILIARYQPSOLVED ) ||\r\n\t\t ( getStatus( ) == QPS_HOMOTOPYQPSOLVED )  ||\r\n\t\t ( getStatus( ) == QPS_SOLVED ) )\r\n\t{\r\n\t\tobjVal = getObjVal( x );\r\n\t}\r\n\telse\r\n\t{\r\n\t\tobjVal = INFTY;\r\n\t}\r\n\r\n\treturn objVal;\r\n}\r\n\r\n\r\n/*\r\n *\tg e t O b j V a l\r\n */\r\nreal_t QProblemB::getObjVal( const real_t* const _x ) const\r\n{\r\n\tint i, j;\r\n\tint nV = getNV( );\r\n\r\n\treal_t obj_tmp = 0.0;\r\n\r\n\tfor( i=0; i<nV; ++i )\r\n\t{\r\n\t\tobj_tmp += _x[i]*g[i];\r\n\r\n\t\tfor( j=0; j<nV; ++j )\r\n\t\t\tobj_tmp += 0.5*_x[i]*H[i*NVMAX + j]*_x[j];\r\n\t}\r\n\r\n\treturn obj_tmp;\r\n}\r\n\r\n\r\n/*\r\n *\tg e t P r i m a l S o l u t i o n\r\n */\r\nreturnValue QProblemB::getPrimalSolution( real_t* const xOpt ) const\r\n{\r\n\tint i;\r\n\r\n\t/* return optimal primal solution vector\r\n\t * only if current QP has been solved */\r\n\tif ( ( getStatus( ) == QPS_AUXILIARYQPSOLVED ) ||\r\n\t\t ( getStatus( ) == QPS_HOMOTOPYQPSOLVED )  ||\r\n\t\t ( getStatus( ) == QPS_SOLVED ) )\r\n\t{\r\n\t\tfor( i=0; i<getNV( ); ++i )\r\n\t\t\txOpt[i] = x[i];\r\n\r\n\t\treturn SUCCESSFUL_RETURN;\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn RET_QP_NOT_SOLVED;\r\n\t}\r\n}\r\n\r\n\r\n/*\r\n *\tg e t D u a l S o l u t i o n\r\n */\r\nreturnValue QProblemB::getDualSolution( real_t* const yOpt ) const\r\n{\r\n\tint i;\r\n\r\n\t/* return optimal dual solution vector\r\n\t * only if current QP has been solved */\r\n\tif ( ( getStatus( ) == QPS_AUXILIARYQPSOLVED ) ||\r\n\t\t ( getStatus( ) == QPS_HOMOTOPYQPSOLVED )  ||\r\n\t\t ( getStatus( ) == QPS_SOLVED ) )\r\n\t{\r\n\t\tfor( i=0; i<getNV( ); ++i )\r\n\t\t\tyOpt[i] = y[i];\r\n\r\n\t\treturn SUCCESSFUL_RETURN;\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn RET_QP_NOT_SOLVED;\r\n\t}\r\n}\r\n\r\n\r\n/*\r\n *\ts e t P r i n t L e v e l\r\n */\r\nreturnValue QProblemB::setPrintLevel( PrintLevel _printlevel )\r\n{\r\n\t#ifndef __MATLAB__\r\n\tif ( ( printlevel >= PL_MEDIUM ) && ( printlevel != _printlevel ) )\r\n\t\tTHROWINFO( RET_PRINTLEVEL_CHANGED );\r\n\t#endif\r\n\r\n\tprintlevel = _printlevel;\r\n\r\n\t/* update message handler preferences */\r\n \tswitch ( printlevel )\r\n \t{\r\n \t\tcase PL_NONE:\r\n \t\t\tgetGlobalMessageHandler( )->setErrorVisibilityStatus( VS_HIDDEN );\r\n\t\t\tgetGlobalMessageHandler( )->setWarningVisibilityStatus( VS_HIDDEN );\r\n\t\t\tgetGlobalMessageHandler( )->setInfoVisibilityStatus( VS_HIDDEN );\r\n\t\t\tbreak;\r\n\r\n\t\tcase PL_LOW:\r\n \t\t\tgetGlobalMessageHandler( )->setErrorVisibilityStatus( VS_VISIBLE );\r\n\t\t\tgetGlobalMessageHandler( )->setWarningVisibilityStatus( VS_HIDDEN );\r\n\t\t\tgetGlobalMessageHandler( )->setInfoVisibilityStatus( VS_HIDDEN );\r\n\t\t\tbreak;\r\n\r\n \t\tdefault: /* PL_MEDIUM, PL_HIGH */\r\n \t\t\tgetGlobalMessageHandler( )->setErrorVisibilityStatus( VS_VISIBLE );\r\n\t\t\tgetGlobalMessageHandler( )->setWarningVisibilityStatus( VS_VISIBLE );\r\n\t\t\tgetGlobalMessageHandler( )->setInfoVisibilityStatus( VS_VISIBLE );\r\n\t\t\tbreak;\r\n \t}\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n\r\n/*****************************************************************************\r\n *  P R O T E C T E D                                                        *\r\n *****************************************************************************/\r\n\r\n/*\r\n *\tc h e c k F o r I d e n t i t y H e s s i a n\r\n */\r\nreturnValue QProblemB::checkForIdentityHessian( )\r\n{\r\n\tint i, j;\r\n\tint nV = getNV( );\r\n\r\n\t/* nothing to do as status flag remains unaltered\r\n\t * if Hessian differs from identity matrix */\r\n\tif ( hessianType == HST_IDENTITY )\r\n\t\treturn SUCCESSFUL_RETURN;\r\n\r\n\t/* 1) If Hessian differs from identity matrix,\r\n\t *    return without changing the internal HessianType. */\r\n\tfor ( i=0; i<nV; ++i )\r\n\t\tif ( getAbs( H[i*NVMAX + i] - 1.0 ) > EPS )\r\n\t\t\treturn SUCCESSFUL_RETURN;\r\n\r\n\tfor ( i=0; i<nV; ++i )\r\n\t{\r\n\t\tfor ( j=0; j<i; ++j )\r\n\t\t\tif ( ( getAbs( H[i*NVMAX + j] ) > EPS ) || ( getAbs( H[j*NVMAX + i] ) > EPS ) )\r\n\t\t\t\treturn SUCCESSFUL_RETURN;\r\n\t}\r\n\r\n\t/* 2) If this point is reached, Hessian equals the idetity matrix. */\r\n\thessianType = HST_IDENTITY;\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\ts e t u p S u b j e c t T o T y p e\r\n */\r\nreturnValue QProblemB::setupSubjectToType( )\r\n{\r\n\tint i;\r\n\tint nV = getNV( );\r\n\r\n\r\n\t/* 1) Check if lower bounds are present. */\r\n\tbounds.setNoLower( BT_TRUE );\r\n\tfor( i=0; i<nV; ++i )\r\n\t\tif ( lb[i] > -INFTY )\r\n\t\t{\r\n\t\t\tbounds.setNoLower( BT_FALSE );\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t/* 2) Check if upper bounds are present. */\r\n\tbounds.setNoUpper( BT_TRUE );\r\n\tfor( i=0; i<nV; ++i )\r\n\t\tif ( ub[i] < INFTY )\r\n\t\t{\r\n\t\t\tbounds.setNoUpper( BT_FALSE );\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t/* 3) Determine implicitly fixed and unbounded variables. */\r\n\tint nFV = 0;\r\n\tint nUV = 0;\r\n\r\n\tfor( i=0; i<nV; ++i )\r\n\t\tif ( ( lb[i] < -INFTY + BOUNDTOL ) && ( ub[i] > INFTY - BOUNDTOL ) )\r\n\t\t{\r\n\t\t\tbounds.setType( i,ST_UNBOUNDED );\r\n\t\t\t++nUV;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif ( lb[i] > ub[i] - BOUNDTOL )\r\n\t\t\t{\r\n\t\t\t\tbounds.setType( i,ST_EQUALITY );\r\n\t\t\t\t++nFV;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tbounds.setType( i,ST_BOUNDED );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t/* 4) Set dimensions of bounds structure. */\r\n\tbounds.setNFV( nFV );\r\n\tbounds.setNUV( nUV );\r\n\tbounds.setNBV( nV - nFV - nUV );\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\tc h o l e s k y D e c o m p o s i t i o n\r\n */\r\nreturnValue QProblemB::setupCholeskyDecomposition( )\r\n{\r\n\tint i, j, k, ii, jj;\r\n\tint nV  = getNV( );\r\n\tint nFR = getNFR( );\r\n\r\n\t/* If Hessian flag is false, it means that H & R already contain Cholesky\r\n\t * factorization -- provided from outside. */\r\n\tif (hasHessian == BT_FALSE)\r\n\t\treturn SUCCESSFUL_RETURN;\r\n\r\n\t/* 1) Initialises R with all zeros. */\r\n\tfor( i=0; i<nV; ++i )\r\n\t\tfor( j=0; j<nV; ++j )\r\n\t\t\tR[i*NVMAX + j] = 0.0;\r\n\r\n\t/* 2) Calculate Cholesky decomposition of H (projected to free variables). */\r\n\tif ( hessianType == HST_IDENTITY )\r\n\t{\r\n\t\t/* if Hessian is identity, so is its Cholesky factor. */\r\n\t\tfor( i=0; i<nFR; ++i )\r\n\t\t\tR[i*NVMAX + i] = 1.0;\r\n\t}\r\n\telse\r\n\t{\r\n\t\tif ( nFR > 0 )\r\n\t\t{\r\n\t\t\tint FR_idx[NVMAX];\r\n\t\t\tif ( bounds.getFree( )->getNumberArray( FR_idx ) != SUCCESSFUL_RETURN )\r\n\t\t\t\treturn THROWERROR( RET_INDEXLIST_CORRUPTED );\r\n\r\n\t\t\t/* R'*R = H */\r\n\t\t\treal_t sum;\r\n\t\t\treal_t inv;\r\n\r\n\t\t\tfor( i=0; i<nFR; ++i )\r\n\t\t\t{\r\n\t\t\t\t/* j == i */\r\n\t\t\t\tii = FR_idx[i];\r\n\t\t\t\tsum = H[ii*NVMAX + ii];\r\n\r\n\t\t\t\tfor( k=(i-1); k>=0; --k )\r\n\t\t\t\t\tsum -= R[k*NVMAX + i] * R[k*NVMAX + i];\r\n\r\n\t\t\t\tif ( sum > 0.0 )\r\n\t\t\t\t{\r\n\t\t\t\t\tR[i*NVMAX + i] = sqrt( sum );\r\n\t\t\t\t\tinv = 1.0 / R[i*NVMAX + i];\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\thessianType = HST_SEMIDEF;\r\n\t\t\t\t\treturn THROWERROR( RET_HESSIAN_NOT_SPD );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* j > i */\r\n\t\t\t\tfor( j=(i+1); j<nFR; ++j )\r\n\t\t\t\t{\r\n\t\t\t\t\tjj = FR_idx[j];\r\n\t\t\t\t\tsum = H[jj*NVMAX + ii];\r\n\r\n\t\t\t\t\tfor( k=(i-1); k>=0; --k )\r\n\t\t\t\t\t\tsum -= R[k*NVMAX + i] * R[k*NVMAX + j];\r\n\r\n\t\t\t\t\tR[i*NVMAX + j] = sum * inv;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\ts o l v e I n i t i a l Q P\r\n */\r\nreturnValue QProblemB::solveInitialQP(\tconst real_t* const xOpt, const real_t* const yOpt,\r\n\t\t\t\t\t\t\t\t\t\tconst Bounds* const guessedBounds,\r\n\t\t\t\t\t\t\t\t\t\tint& nWSR, real_t* const cputime\r\n\t\t\t\t\t\t\t\t\t\t)\r\n{\r\n\tint i, nFR;\r\n\tint nV = getNV( );\r\n\r\n\r\n\t/* start runtime measurement */\r\n\treal_t starttime = 0.0;\r\n\tif ( cputime != 0 )\r\n\t\tstarttime = getCPUtime( );\r\n\r\n\r\n\tstatus = QPS_NOTINITIALISED;\r\n\r\n\t/* I) ANALYSE QP DATA: */\r\n\t/* 1) Check if Hessian happens to be the identity matrix. */\r\n\tif ( checkForIdentityHessian( ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_INIT_FAILED );\r\n\r\n\t/* 2) Setup type of bounds (i.e. unbounded, implicitly fixed etc.). */\r\n\tif ( setupSubjectToType( ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_INIT_FAILED );\r\n\r\n\tstatus = QPS_PREPARINGAUXILIARYQP;\r\n\r\n\r\n\t/* II) SETUP AUXILIARY QP WITH GIVEN OPTIMAL SOLUTION: */\r\n\t/* 1) Setup bounds data structure. */\r\n\tif ( bounds.setupAllFree( ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_INIT_FAILED );\r\n\r\n\t/* 2) Setup optimal primal/dual solution for auxiliary QP. */\r\n\tif ( setupAuxiliaryQPsolution( xOpt,yOpt ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_INIT_FAILED );\r\n\r\n\t/* 3) Obtain linear independent working set for auxiliary QP. */\r\n\r\n\tstatic Bounds auxiliaryBounds;\r\n\r\n\tauxiliaryBounds.init( nV );\r\n\r\n\tif ( obtainAuxiliaryWorkingSet( xOpt,yOpt,guessedBounds, &auxiliaryBounds ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_INIT_FAILED );\r\n\r\n\t/* 4) Setup working set of auxiliary QP and setup cholesky decomposition. */\r\n\tif ( setupAuxiliaryWorkingSet( &auxiliaryBounds,BT_TRUE ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_INIT_FAILED );\r\n\r\n\tnFR = getNFR();\r\n\t/* At the moment we can only provide a Cholesky of the Hessian if\r\n\t * the solver is cold-started. */\r\n\tif (hasCholesky == BT_FALSE || nFR != nV)\r\n\t\tif (setupCholeskyDecomposition() != SUCCESSFUL_RETURN)\r\n\t\t\treturn THROWERROR( RET_INIT_FAILED_CHOLESKY );\r\n\r\n\t/* 5) Store original QP formulation... */\r\n\treal_t g_original[NVMAX];\r\n\treal_t lb_original[NVMAX];\r\n\treal_t ub_original[NVMAX];\r\n\r\n\tfor( i=0; i<nV; ++i )\r\n\t\tg_original[i] = g[i];\r\n\tfor( i=0; i<nV; ++i )\r\n\t\tlb_original[i] = lb[i];\r\n\tfor( i=0; i<nV; ++i )\r\n\t\tub_original[i] = ub[i];\r\n\r\n\t/* ... and setup QP data of an auxiliary QP having an optimal solution\r\n\t * as specified by the user (or xOpt = yOpt = 0, by default). */\r\n\tif ( setupAuxiliaryQPgradient( ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_INIT_FAILED );\r\n\r\n\tif ( setupAuxiliaryQPbounds( BT_TRUE ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_INIT_FAILED );\r\n\r\n\tstatus = QPS_AUXILIARYQPSOLVED;\r\n\r\n\r\n\t/* III) SOLVE ACTUAL INITIAL QP: */\r\n\t/* Use hotstart method to find the solution of the original initial QP,... */\r\n\treturnValue returnvalue = hotstart( g_original,lb_original,ub_original, nWSR,0 );\r\n\r\n\r\n\t/* ... check for infeasibility and unboundedness... */\r\n\tif ( isInfeasible( ) == BT_TRUE )\r\n\t\treturn THROWERROR( RET_INIT_FAILED_INFEASIBILITY );\r\n\r\n\tif ( isUnbounded( ) == BT_TRUE )\r\n\t\treturn THROWERROR( RET_INIT_FAILED_UNBOUNDEDNESS );\r\n\r\n\t/* ... and internal errors. */\r\n\tif ( ( returnvalue != SUCCESSFUL_RETURN ) && ( returnvalue != RET_MAX_NWSR_REACHED )  &&\r\n\t     ( returnvalue != RET_INACCURATE_SOLUTION ) && ( returnvalue != RET_NO_SOLUTION ) )\r\n\t\treturn THROWERROR( RET_INIT_FAILED_HOTSTART );\r\n\r\n\r\n\t/* stop runtime measurement */\r\n\tif ( cputime != 0 )\r\n\t\t*cputime = getCPUtime( ) - starttime;\r\n\r\n\tif ( printlevel == PL_HIGH )\r\n\t\tTHROWINFO( RET_INIT_SUCCESSFUL );\r\n\r\n\treturn returnvalue;\r\n}\r\n\r\n\r\n/*\r\n *\to b t a i n A u x i l i a r y W o r k i n g S e t\r\n */\r\nreturnValue QProblemB::obtainAuxiliaryWorkingSet(\tconst real_t* const xOpt, const real_t* const yOpt,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst Bounds* const guessedBounds, Bounds* auxiliaryBounds\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t) const\r\n{\r\n\tint i = 0;\r\n\tint nV = getNV( );\r\n\r\n\r\n\t/* 1) Ensure that desiredBounds is allocated (and different from guessedBounds). */\r\n\tif ( ( auxiliaryBounds == 0 ) || ( auxiliaryBounds == guessedBounds ) )\r\n\t\treturn THROWERROR( RET_INVALID_ARGUMENTS );\r\n\r\n\r\n\t/* 2) Setup working set for auxiliary initial QP. */\r\n\tif ( guessedBounds != 0 )\r\n\t{\r\n\t\t/* If an initial working set is specific, use it!\r\n\t\t * Moreover, add all implictly fixed variables if specified. */\r\n\t\tfor( i=0; i<nV; ++i )\r\n\t\t{\r\n\t\t\tif ( bounds.getType( i ) == ST_EQUALITY )\r\n\t\t\t{\r\n\t\t\t\tif ( auxiliaryBounds->setupBound( i,ST_LOWER ) != SUCCESSFUL_RETURN )\r\n\t\t\t\t\treturn THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif ( auxiliaryBounds->setupBound( i,guessedBounds->getStatus( i ) ) != SUCCESSFUL_RETURN )\r\n\t\t\t\t\treturn THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\telse\t/* No initial working set specified. */\r\n\t{\r\n\t\tif ( ( xOpt != 0 ) && ( yOpt == 0 ) )\r\n\t\t{\r\n\t\t\t/* Obtain initial working set by \"clipping\". */\r\n\t\t\tfor( i=0; i<nV; ++i )\r\n\t\t\t{\r\n\t\t\t\tif ( xOpt[i] <= lb[i] + BOUNDTOL )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( auxiliaryBounds->setupBound( i,ST_LOWER ) != SUCCESSFUL_RETURN )\r\n\t\t\t\t\t\treturn THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( xOpt[i] >= ub[i] - BOUNDTOL )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( auxiliaryBounds->setupBound( i,ST_UPPER ) != SUCCESSFUL_RETURN )\r\n\t\t\t\t\t\treturn THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Moreover, add all implictly fixed variables if specified. */\r\n\t\t\t\tif ( bounds.getType( i ) == ST_EQUALITY )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( auxiliaryBounds->setupBound( i,ST_LOWER ) != SUCCESSFUL_RETURN )\r\n\t\t\t\t\t\treturn THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( auxiliaryBounds->setupBound( i,ST_INACTIVE ) != SUCCESSFUL_RETURN )\r\n\t\t\t\t\t\treturn THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ( ( xOpt == 0 ) && ( yOpt != 0 ) )\r\n\t\t{\r\n\t\t\t/* Obtain initial working set in accordance to sign of dual solution vector. */\r\n\t\t\tfor( i=0; i<nV; ++i )\r\n\t\t\t{\r\n\t\t\t\tif ( yOpt[i] > ZERO )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( auxiliaryBounds->setupBound( i,ST_LOWER ) != SUCCESSFUL_RETURN )\r\n\t\t\t\t\t\treturn THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( yOpt[i] < -ZERO )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( auxiliaryBounds->setupBound( i,ST_UPPER ) != SUCCESSFUL_RETURN )\r\n\t\t\t\t\t\treturn THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Moreover, add all implictly fixed variables if specified. */\r\n\t\t\t\tif ( bounds.getType( i ) == ST_EQUALITY )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( auxiliaryBounds->setupBound( i,ST_LOWER ) != SUCCESSFUL_RETURN )\r\n\t\t\t\t\t\treturn THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( auxiliaryBounds->setupBound( i,ST_INACTIVE ) != SUCCESSFUL_RETURN )\r\n\t\t\t\t\t\treturn THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/* If xOpt and yOpt are null pointer and no initial working is specified,\r\n\t\t * start with empty working set (or implicitly fixed bounds only)\r\n\t\t * for auxiliary QP. */\r\n\t\tif ( ( xOpt == 0 ) && ( yOpt == 0 ) )\r\n\t\t{\r\n\t\t\tfor( i=0; i<nV; ++i )\r\n\t\t\t{\r\n\t\t\t\t/* Only add all implictly fixed variables if specified. */\r\n\t\t\t\tif ( bounds.getType( i ) == ST_EQUALITY )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( auxiliaryBounds->setupBound( i,ST_LOWER ) != SUCCESSFUL_RETURN )\r\n\t\t\t\t\t\treturn THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( auxiliaryBounds->setupBound( i,ST_INACTIVE ) != SUCCESSFUL_RETURN )\r\n\t\t\t\t\t\treturn THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\ts e t u p A u x i l i a r y W o r k i n g S e t\r\n */\r\nreturnValue QProblemB::setupAuxiliaryWorkingSet( \tconst Bounds* const auxiliaryBounds,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tBooleanType setupAfresh\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\r\n{\r\n\tint i;\r\n\tint nV = getNV( );\r\n\r\n\t/* consistency checks */\r\n\tif ( auxiliaryBounds != 0 )\r\n\t{\r\n\t\tfor( i=0; i<nV; ++i )\r\n\t\t\tif ( ( bounds.getStatus( i ) == ST_UNDEFINED ) || ( auxiliaryBounds->getStatus( i ) == ST_UNDEFINED ) )\r\n\t\t\t\treturn THROWERROR( RET_UNKNOWN_BUG );\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn THROWERROR( RET_INVALID_ARGUMENTS );\r\n\t}\r\n\r\n\r\n\t/* I) SETUP CHOLESKY FLAG:\r\n\t *    Cholesky decomposition shall only be updated if working set\r\n\t *    shall be updated (i.e. NOT setup afresh!) */\r\n\tBooleanType updateCholesky;\r\n\tif ( setupAfresh == BT_TRUE )\r\n\t\tupdateCholesky = BT_FALSE;\r\n\telse\r\n\t\tupdateCholesky = BT_TRUE;\r\n\r\n\r\n\t/* II) REMOVE FORMERLY ACTIVE BOUNDS (IF NECESSARY): */\r\n\tif ( setupAfresh == BT_FALSE )\r\n\t{\r\n\t\t/* Remove all active bounds that shall be inactive AND\r\n\t\t*  all active bounds that are active at the wrong bound. */\r\n\t\tfor( i=0; i<nV; ++i )\r\n\t\t{\r\n\t\t\tif ( ( bounds.getStatus( i ) == ST_LOWER ) && ( auxiliaryBounds->getStatus( i ) != ST_LOWER ) )\r\n\t\t\t\tif ( removeBound( i,updateCholesky ) != SUCCESSFUL_RETURN )\r\n\t\t\t\t\treturn THROWERROR( RET_SETUP_WORKINGSET_FAILED );\r\n\r\n\t\t\tif ( ( bounds.getStatus( i ) == ST_UPPER ) && ( auxiliaryBounds->getStatus( i ) != ST_UPPER ) )\r\n\t\t\t\tif ( removeBound( i,updateCholesky ) != SUCCESSFUL_RETURN )\r\n\t\t\t\t\treturn THROWERROR( RET_SETUP_WORKINGSET_FAILED );\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t/* III) ADD NEWLY ACTIVE BOUNDS: */\r\n\t/*      Add all inactive bounds that shall be active AND\r\n\t *      all formerly active bounds that have been active at the wrong bound. */\r\n\tfor( i=0; i<nV; ++i )\r\n\t{\r\n\t\tif ( ( bounds.getStatus( i ) == ST_INACTIVE ) && ( auxiliaryBounds->getStatus( i ) != ST_INACTIVE ) )\r\n\t\t{\r\n\t\t\tif ( addBound( i,auxiliaryBounds->getStatus( i ),updateCholesky ) != SUCCESSFUL_RETURN )\r\n\t\t\t\treturn THROWERROR( RET_SETUP_WORKINGSET_FAILED );\r\n\t\t}\r\n\t}\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\ts e t u p A u x i l i a r y Q P s o l u t i o n\r\n */\r\nreturnValue QProblemB::setupAuxiliaryQPsolution(\tconst real_t* const xOpt, const real_t* const yOpt\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\r\n{\r\n\tint i;\r\n\tint nV = getNV( );\r\n\r\n\r\n\t/* Setup primal/dual solution vectors for auxiliary initial QP:\r\n\t * if a null pointer is passed, a zero vector is assigned;\r\n\t * old solution vector is kept if pointer to internal solution vector is passed. */\r\n\tif ( xOpt != 0 )\r\n\t{\r\n\t\tif ( xOpt != x )\r\n\t\t\tfor( i=0; i<nV; ++i )\r\n\t\t\t\tx[i] = xOpt[i];\r\n\t}\r\n\telse\r\n\t{\r\n\t\tfor( i=0; i<nV; ++i )\r\n\t\t\tx[i] = 0.0;\r\n\t}\r\n\r\n\tif ( yOpt != 0 )\r\n\t{\r\n\t\tif ( yOpt != y )\r\n\t\t\tfor( i=0; i<nV; ++i )\r\n\t\t\t\ty[i] = yOpt[i];\r\n\t}\r\n\telse\r\n\t{\r\n\t\tfor( i=0; i<nV; ++i )\r\n\t\t\ty[i] = 0.0;\r\n\t}\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\ts e t u p A u x i l i a r y Q P g r a d i e n t\r\n */\r\nreturnValue QProblemB::setupAuxiliaryQPgradient( )\r\n{\r\n\tint i, j;\r\n\tint nV = getNV( );\r\n\r\n\r\n\t/* Setup gradient vector: g = -H*x + y'*Id. */\r\n\tfor ( i=0; i<nV; ++i )\r\n\t{\r\n\t\t/* y'*Id */\r\n\t\tg[i] = y[i];\r\n\r\n\t\t/* -H*x */\r\n\t\tfor ( j=0; j<nV; ++j )\r\n\t\t\tg[i] -= H[i*NVMAX + j] * x[j];\r\n\t}\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\ts e t u p A u x i l i a r y Q P b o u n d s\r\n */\r\nreturnValue QProblemB::setupAuxiliaryQPbounds( BooleanType useRelaxation )\r\n{\r\n\tint i;\r\n\tint nV = getNV( );\r\n\r\n\r\n\t/* Setup bound vectors. */\r\n\tfor ( i=0; i<nV; ++i )\r\n\t{\r\n\t\tswitch ( bounds.getStatus( i ) )\r\n\t\t{\r\n\t\t\tcase ST_INACTIVE:\r\n\t\t\t\tif ( useRelaxation == BT_TRUE )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( bounds.getType( i ) == ST_EQUALITY )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlb[i] = x[i];\r\n\t\t\t\t\t\tub[i] = x[i];\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlb[i] = x[i] - BOUNDRELAXATION;\r\n\t\t\t\t\t\tub[i] = x[i] + BOUNDRELAXATION;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase ST_LOWER:\r\n\t\t\t\tlb[i] = x[i];\r\n\t\t\t\tif ( bounds.getType( i ) == ST_EQUALITY )\r\n\t\t\t\t{\r\n\t\t\t\t\tub[i] = x[i];\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( useRelaxation == BT_TRUE )\r\n\t\t\t\t\t\tub[i] = x[i] + BOUNDRELAXATION;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase ST_UPPER:\r\n\t\t\t\tub[i] = x[i];\r\n\t\t\t\tif ( bounds.getType( i ) == ST_EQUALITY )\r\n\t\t\t\t{\r\n\t\t\t\t\tlb[i] = x[i];\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( useRelaxation == BT_TRUE )\r\n\t\t\t\t\t\tlb[i] = x[i] - BOUNDRELAXATION;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\t\treturn THROWERROR( RET_UNKNOWN_BUG );\r\n\t\t}\r\n\t}\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\ta d d B o u n d\r\n */\r\nreturnValue QProblemB::addBound(\tint number, SubjectToStatus B_status,\r\n\t\t\t\t\t\t\t\t\tBooleanType updateCholesky\r\n\t\t\t\t\t\t\t\t\t)\r\n{\r\n\tint i, j;\r\n\tint nFR = getNFR( );\r\n\r\n\r\n\t/* consistency check */\r\n\tif ( ( getStatus( ) == QPS_NOTINITIALISED )    ||\r\n\t\t ( getStatus( ) == QPS_AUXILIARYQPSOLVED ) ||\r\n\t\t ( getStatus( ) == QPS_HOMOTOPYQPSOLVED )  ||\r\n\t\t ( getStatus( ) == QPS_SOLVED )            )\r\n\t{\r\n\t\treturn THROWERROR( RET_UNKNOWN_BUG );\r\n\t}\r\n\r\n\t/* Perform cholesky updates only if QProblemB has been initialised! */\r\n\tif ( ( getStatus( ) == QPS_PREPARINGAUXILIARYQP ) || ( updateCholesky == BT_FALSE ) )\r\n\t{\r\n\t\t/* UPDATE INDICES */\r\n\t\tif ( bounds.moveFreeToFixed( number,B_status ) != SUCCESSFUL_RETURN )\r\n\t\t\treturn THROWERROR( RET_ADDBOUND_FAILED );\r\n\r\n\t\treturn SUCCESSFUL_RETURN;\r\n\t}\r\n\r\n\r\n\t/* I) PERFORM CHOLESKY UPDATE: */\r\n\t/* 1) Index of variable to be added within the list of free variables. */\r\n\tint number_idx = bounds.getFree( )->getIndex( number );\r\n\r\n\treal_t c, s;\r\n\r\n\t/* 2) Use row-wise Givens rotations to restore upper triangular form of R. */\r\n\tfor( i=number_idx+1; i<nFR; ++i )\r\n\t{\r\n\t\tcomputeGivens( R[(i-1)*NVMAX + i],R[i*NVMAX + i], R[(i-1)*NVMAX + i],R[i*NVMAX + i],c,s );\r\n\r\n\t\tfor( j=(1+i); j<nFR; ++j ) /* last column of R is thrown away */\r\n\t\t\tapplyGivens( c,s,R[(i-1)*NVMAX + j],R[i*NVMAX + j], R[(i-1)*NVMAX + j],R[i*NVMAX + j] );\r\n\t}\r\n\r\n\t/* 3) Delete <number_idx>th column and ... */\r\n\tfor( i=0; i<nFR-1; ++i )\r\n\t\tfor( j=number_idx+1; j<nFR; ++j )\r\n\t\t\tR[i*NVMAX + j-1] = R[i*NVMAX + j];\r\n\t/* ... last column of R. */\r\n\tfor( i=0; i<nFR; ++i )\r\n\t\tR[i*NVMAX + nFR-1] = 0.0;\r\n\r\n\r\n\t/* II) UPDATE INDICES */\r\n\tif ( bounds.moveFreeToFixed( number,B_status ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_ADDBOUND_FAILED );\r\n\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\nreturnValue QProblemB::removeBound(\tint number,\r\n\t\t\t\t\t\t\t\t\tBooleanType updateCholesky\r\n\t\t\t\t\t\t\t\t\t)\r\n{\r\n\tint i, ii;\r\n\tint nFR = getNFR( );\r\n\r\n\r\n\t/* consistency check */\r\n\tif ( ( getStatus( ) == QPS_NOTINITIALISED )    ||\r\n\t\t ( getStatus( ) == QPS_AUXILIARYQPSOLVED ) ||\r\n\t\t ( getStatus( ) == QPS_HOMOTOPYQPSOLVED )  ||\r\n\t\t ( getStatus( ) == QPS_SOLVED )            )\r\n\t{\r\n\t\treturn THROWERROR( RET_UNKNOWN_BUG );\r\n\t}\r\n\r\n\r\n\t/* I) UPDATE INDICES */\r\n\tif ( bounds.moveFixedToFree( number ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_REMOVEBOUND_FAILED );\r\n\r\n\t/* Perform cholesky updates only if QProblemB has been initialised! */\r\n\tif ( ( getStatus( ) == QPS_PREPARINGAUXILIARYQP ) || ( updateCholesky == BT_FALSE ) )\r\n\t\treturn SUCCESSFUL_RETURN;\r\n\r\n\r\n\t/* II) PERFORM CHOLESKY UPDATE */\r\n\tint FR_idx[NVMAX];\r\n\tif ( bounds.getFree( )->getNumberArray( FR_idx ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_REMOVEBOUND_FAILED );\r\n\r\n\t/* 1) Calculate new column of cholesky decomposition. */\r\n\treal_t rhs[NVMAX];\r\n\treal_t r[NVMAX];\r\n\treal_t r0 = H[number*NVMAX + number];\r\n\r\n\tfor( i=0; i<nFR; ++i )\r\n\t{\r\n\t\tii = FR_idx[i];\r\n\t\trhs[i] = H[number*NVMAX + ii];\r\n\t}\r\n\r\n\tif ( backsolveR( rhs,BT_TRUE,BT_TRUE,r ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_REMOVEBOUND_FAILED );\r\n\r\n\tfor( i=0; i<nFR; ++i )\r\n\t\tr0 -= r[i]*r[i];\r\n\r\n\t/* 2) Store new column into R. */\r\n\tfor( i=0; i<nFR; ++i )\r\n\t\tR[i*NVMAX + nFR] = r[i];\r\n\r\n\tif ( r0 > 0.0 )\r\n\t\tR[nFR*NVMAX + nFR] = sqrt( r0 );\r\n\telse\r\n\t{\r\n\t\thessianType = HST_SEMIDEF;\r\n\t\treturn THROWERROR( RET_HESSIAN_NOT_SPD );\r\n\t}\r\n\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\tb a c k s o l v e R  (CODE DUPLICATED IN QProblem CLASS!!!)\r\n */\r\nreturnValue QProblemB::backsolveR(\tconst real_t* const b, BooleanType transposed,\r\n\t\t\t\t\t\t\t\t\treal_t* const a\r\n\t\t\t\t\t\t\t\t\t)\r\n{\r\n\t/* Call standard backsolve procedure (i.e. removingBound == BT_FALSE). */\r\n\treturn backsolveR( b,transposed,BT_FALSE,a );\r\n}\r\n\r\n\r\n/*\r\n *\tb a c k s o l v e R  (CODE DUPLICATED IN QProblem CLASS!!!)\r\n */\r\nreturnValue QProblemB::backsolveR(\tconst real_t* const b, BooleanType transposed,\r\n\t\t\t\t\t\t\t\t\tBooleanType removingBound,\r\n\t\t\t\t\t\t\t\t\treal_t* const a\r\n\t\t\t\t\t\t\t\t\t)\r\n{\r\n\tint i, j;\r\n\tint nR = getNZ( );\r\n\r\n\treal_t sum;\r\n\r\n\t/* if backsolve is called while removing a bound, reduce nZ by one. */\r\n\tif ( removingBound == BT_TRUE )\r\n\t\t--nR;\r\n\r\n\t/* nothing to do */\r\n\tif ( nR <= 0 )\r\n\t\treturn SUCCESSFUL_RETURN;\r\n\r\n\r\n\t/* Solve Ra = b, where R might be transposed. */\r\n\tif ( transposed == BT_FALSE )\r\n\t{\r\n\t\t/* solve Ra = b */\r\n\t\tfor( i=(nR-1); i>=0; --i )\r\n\t\t{\r\n\t\t\tsum = b[i];\r\n\t\t\tfor( j=(i+1); j<nR; ++j )\r\n\t\t\t\tsum -= R[i*NVMAX + j] * a[j];\r\n\r\n\t\t\tif ( getAbs( R[i*NVMAX + i] ) > ZERO )\r\n\t\t\t\ta[i] = sum / R[i*NVMAX + i];\r\n\t\t\telse\r\n\t\t\t\treturn THROWERROR( RET_DIV_BY_ZERO );\r\n\t\t}\r\n\t}\r\n\telse\r\n\t{\r\n\t\t/* solve R^T*a = b */\r\n\t\tfor( i=0; i<nR; ++i )\r\n\t\t{\r\n\t\t\tsum = b[i];\r\n\r\n\t\t\tfor( j=0; j<i; ++j )\r\n\t\t\t\tsum -= R[j*NVMAX + i] * a[j];\r\n\r\n\t\t\tif ( getAbs( R[i*NVMAX + i] ) > ZERO )\r\n\t\t\t\ta[i] = sum / R[i*NVMAX + i];\r\n\t\t\telse\r\n\t\t\t\treturn THROWERROR( RET_DIV_BY_ZERO );\r\n\t\t}\r\n\t}\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\th o t s t a r t _ d e t e r m i n e D a t a S h i f t\r\n */\r\nreturnValue QProblemB::hotstart_determineDataShift(\tconst int* const FX_idx,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const g_new, const real_t* const lb_new, const real_t* const ub_new,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\treal_t* const delta_g, real_t* const delta_lb, real_t* const delta_ub,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tBooleanType& Delta_bB_isZero\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\r\n{\r\n\tint i, ii;\r\n\tint nV  = getNV( );\r\n\tint nFX = getNFX( );\r\n\r\n\r\n\t/* 1) Calculate shift directions. */\r\n\tfor( i=0; i<nV; ++i )\r\n\t\tdelta_g[i]  = g_new[i]  - g[i];\r\n\r\n\tif ( lb_new != 0 )\r\n\t{\r\n\t\tfor( i=0; i<nV; ++i )\r\n\t\t\tdelta_lb[i] = lb_new[i] - lb[i];\r\n\t}\r\n\telse\r\n\t{\r\n\t\t/* if no lower bounds exist, assume the new lower bounds to be -infinity */\r\n\t\tfor( i=0; i<nV; ++i )\r\n\t\t\tdelta_lb[i] = -INFTY - lb[i];\r\n\t}\r\n\r\n\tif ( ub_new != 0 )\r\n\t{\r\n\t\tfor( i=0; i<nV; ++i )\r\n\t\t\tdelta_ub[i] = ub_new[i] - ub[i];\r\n\t}\r\n\telse\r\n\t{\r\n\t\t/* if no upper bounds exist, assume the new upper bounds to be infinity */\r\n\t\tfor( i=0; i<nV; ++i )\r\n\t\t\tdelta_ub[i] = INFTY - ub[i];\r\n\t}\r\n\r\n\t/* 2) Determine if active bounds are to be shifted. */\r\n\tDelta_bB_isZero = BT_TRUE;\r\n\r\n\tfor ( i=0; i<nFX; ++i )\r\n\t{\r\n\t\tii = FX_idx[i];\r\n\r\n\t\tif ( ( getAbs( delta_lb[ii] ) > EPS ) || ( getAbs( delta_ub[ii] ) > EPS ) )\r\n\t\t{\r\n\t\t\tDelta_bB_isZero = BT_FALSE;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\ta r e B o u n d s C o n s i s t e n t\r\n */\r\nBooleanType QProblemB::areBoundsConsistent(\tconst real_t* const delta_lb, const real_t* const delta_ub\r\n\t\t\t\t\t\t\t\t\t\t\t) const\r\n{\r\n\tint i;\r\n\r\n\t/* Check if delta_lb[i] is greater than delta_ub[i]\r\n\t * for a component i whose bounds are already (numerically) equal. */\r\n\tfor( i=0; i<getNV( ); ++i )\r\n\t\tif ( ( lb[i] > ub[i] - BOUNDTOL ) && ( delta_lb[i] > delta_ub[i] + EPS ) )\r\n\t\t\treturn BT_FALSE;\r\n\r\n\treturn BT_TRUE;\r\n}\r\n\r\n\r\n/*\r\n *\ts e t u p Q P d a t a\r\n */\r\nreturnValue QProblemB::setupQPdata(\tconst real_t* const _H, const real_t* const _R, const real_t* const _g,\r\n\t\t\t\t\t\t\t\t\tconst real_t* const _lb, const real_t* const _ub\r\n\t\t\t\t\t\t\t\t\t)\r\n{\r\n\tint i, j;\r\n\tint nV = getNV( );\r\n\r\n\t/* 1) Setup Hessian matrix and it's Cholesky factorization. */\r\n\tif (_H != 0)\r\n\t{\r\n\t\tfor( i=0; i<nV; ++i )\r\n\t\t\tfor( j=0; j<nV; ++j )\r\n\t\t\t\tH[i*NVMAX + j] = _H[i*nV + j];\r\n\t\thasHessian = BT_TRUE;\r\n\t}\r\n\telse\r\n\t\thasHessian = BT_FALSE;\r\n\r\n\tif (_R != 0)\r\n\t{\r\n\t\tfor( i=0; i<nV; ++i )\r\n\t\t\tfor( j=0; j<nV; ++j )\r\n\t\t\t\tR[i*NVMAX + j] = _R[i*nV + j];\r\n\t\thasCholesky = BT_TRUE;\r\n\r\n\t\t/* If Hessian is not provided, store it's factorization in H, and that guy\r\n\t\t * is going to be used for H * x products (R^T * R * x in this case). */\r\n\t\tif (hasHessian == BT_FALSE)\r\n\t\t\tfor( i=0; i<nV; ++i )\r\n\t\t\t\tfor( j=0; j<nV; ++j )\r\n\t\t\t\t\tH[i*NVMAX + j] = _R[i*nV + j];\r\n\t}\r\n\telse\r\n\t\thasCholesky = BT_FALSE;\r\n\r\n\tif (hasHessian == BT_FALSE && hasCholesky == BT_FALSE)\r\n\t\treturn THROWERROR( RET_INVALID_ARGUMENTS );\r\n\r\n\t/* 2) Setup gradient vector. */\r\n\tif ( _g == 0 )\r\n\t\treturn THROWERROR( RET_INVALID_ARGUMENTS );\r\n\r\n\tfor( i=0; i<nV; ++i )\r\n\t\tg[i] = _g[i];\r\n\r\n\t/* 3) Setup lower bounds vector. */\r\n\tif ( _lb != 0 )\r\n\t{\r\n\t\tfor( i=0; i<nV; ++i )\r\n\t\t\tlb[i] = _lb[i];\r\n\t}\r\n\telse\r\n\t{\r\n\t\t/* if no lower bounds are specified, set them to -infinity */\r\n\t\tfor( i=0; i<nV; ++i )\r\n\t\t\tlb[i] = -INFTY;\r\n\t}\r\n\r\n\t/* 4) Setup upper bounds vector. */\r\n\tif ( _ub != 0 )\r\n\t{\r\n\t\tfor( i=0; i<nV; ++i )\r\n\t\t\tub[i] = _ub[i];\r\n\t}\r\n\telse\r\n\t{\r\n\t\t/* if no upper bounds are specified, set them to infinity */\r\n\t\tfor( i=0; i<nV; ++i )\r\n\t\t\tub[i] = INFTY;\r\n\t}\r\n\r\n\t//printmatrix( \"H\",H,nV,nV );\r\n\t//printmatrix( \"R\",R,nV,nV );\r\n\t//printmatrix( \"g\",g,1,nV );\r\n\t//printmatrix( \"lb\",lb,1,nV );\r\n\t//printmatrix( \"ub\",ub,1,nV );\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n\r\n/*****************************************************************************\r\n *  P R I V A T E                                                            *\r\n *****************************************************************************/\r\n\r\n/*\r\n *\th o t s t a r t _ d e t e r m i n e S t e p D i r e c t i o n\r\n */\r\nreturnValue QProblemB::hotstart_determineStepDirection(\tconst int* const FR_idx, const int* const FX_idx,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_g, const real_t* const delta_lb, const real_t* const delta_ub,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tBooleanType Delta_bB_isZero,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\treal_t* const delta_xFX, real_t* const delta_xFR,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\treal_t* const delta_yFX\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\r\n{\r\n\tint i, j, ii, jj;\r\n\tint nFR = getNFR( );\r\n\tint nFX = getNFX( );\r\n\r\n\r\n\t/* initialise auxiliary vectors */\r\n\treal_t HMX_delta_xFX[NVMAX];\r\n\tfor( i=0; i<nFR; ++i )\r\n\t\tHMX_delta_xFX[i] = 0.0;\r\n\r\n\r\n\t/* I) DETERMINE delta_xFX */\r\n\tif ( nFX > 0 )\r\n\t{\r\n\t\tfor( i=0; i<nFX; ++i )\r\n\t\t{\r\n\t\t\tii = FX_idx[i];\r\n\r\n\t\t\tif ( bounds.getStatus( ii ) == ST_LOWER )\r\n\t\t\t\tdelta_xFX[i] = delta_lb[ii];\r\n\t\t\telse\r\n\t\t\t\tdelta_xFX[i] = delta_ub[ii];\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t/* II) DETERMINE delta_xFR */\r\n\tif ( nFR > 0 )\r\n\t{\r\n\t\t/* auxiliary variables */\r\n\t\treal_t delta_xFRz_TMP[NVMAX];\r\n\t\treal_t delta_xFRz_RHS[NVMAX];\r\n\r\n\t\t/* Determine delta_xFRz. */\r\n\t\tif ( Delta_bB_isZero == BT_FALSE )\r\n\t\t{\r\n\t\t\tfor( i=0; i<nFR; ++i )\r\n\t\t\t{\r\n\t\t\t\tii = FR_idx[i];\r\n\t\t\t\tfor( j=0; j<nFX; ++j )\r\n\t\t\t\t{\r\n\t\t\t\t\tjj = FX_idx[j];\r\n\t\t\t\t\tHMX_delta_xFX[i] += H[ii*NVMAX + jj] * delta_xFX[j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ( Delta_bB_isZero == BT_TRUE )\r\n\t\t{\r\n\t\t\tfor( j=0; j<nFR; ++j )\r\n\t\t\t{\r\n\t\t\t\tjj = FR_idx[j];\r\n\t\t\t\tdelta_xFRz_RHS[j] = delta_g[jj];\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tfor( j=0; j<nFR; ++j )\r\n\t\t\t{\r\n\t\t\t\tjj = FR_idx[j];\r\n\t\t\t\tdelta_xFRz_RHS[j] = delta_g[jj] + HMX_delta_xFX[j]; /* *ZFR */\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor( i=0; i<nFR; ++i )\r\n\t\t\tdelta_xFR[i] = -delta_xFRz_RHS[i];\r\n\r\n\t\tif ( backsolveR( delta_xFR,BT_TRUE,delta_xFRz_TMP ) != SUCCESSFUL_RETURN )\r\n\t\t\treturn THROWERROR( RET_STEPDIRECTION_FAILED_CHOLESKY );\r\n\r\n\t\tif ( backsolveR( delta_xFRz_TMP,BT_FALSE,delta_xFR ) != SUCCESSFUL_RETURN )\r\n\t\t\treturn THROWERROR( RET_STEPDIRECTION_FAILED_CHOLESKY );\r\n\t}\r\n\r\n\r\n\t/* III) DETERMINE delta_yFX */\r\n\tif ( nFX > 0 )\r\n\t{\r\n\t\tfor( i=0; i<nFX; ++i )\r\n\t\t{\r\n\t\t\tii = FX_idx[i];\r\n\r\n\t\t\tdelta_yFX[i] = 0.0;\r\n\t\t\tfor( j=0; j<nFR; ++j )\r\n\t\t\t{\r\n\t\t\t\tjj = FR_idx[j];\r\n\t\t\t\tdelta_yFX[i] += H[ii*NVMAX + jj] * delta_xFR[j];\r\n\t\t\t}\r\n\r\n\t\t\tif ( Delta_bB_isZero == BT_FALSE )\r\n\t\t\t{\r\n\t\t\t\tfor( j=0; j<nFX; ++j )\r\n\t\t\t\t{\r\n\t\t\t\t\tjj = FX_idx[j];\r\n\t\t\t\t\tdelta_yFX[i] += H[ii*NVMAX + jj] * delta_xFX[j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tdelta_yFX[i] += delta_g[ii];\r\n\t\t}\r\n\t}\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\th o t s t a r t _ d e t e r m i n e S t e p L e n g t h\r\n */\r\nreturnValue QProblemB::hotstart_determineStepLength(\tconst int* const FR_idx, const int* const FX_idx,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_lb, const real_t* const delta_ub,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_xFR,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_yFX,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tint& BC_idx, SubjectToStatus& BC_status\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\r\n{\r\n\tint i, ii;\r\n\tint nFR = getNFR( );\r\n\tint nFX = getNFX( );\r\n\r\n\treal_t tau_tmp;\r\n\treal_t tau_new = 1.0;\r\n\r\n\tBC_idx = 0;\r\n\tBC_status = ST_UNDEFINED;\r\n\r\n\r\n\t/* I) DETERMINE MAXIMUM DUAL STEPLENGTH, i.e. ensure that\r\n\t *    active dual bounds remain valid (ignoring implicitly fixed variables): */\r\n\tfor( i=0; i<nFX; ++i )\r\n\t{\r\n\t\tii = FX_idx[i];\r\n\r\n\t\tif ( bounds.getType( ii ) != ST_EQUALITY )\r\n\t\t{\r\n\t\t\tif ( bounds.getStatus( ii ) == ST_LOWER )\r\n\t\t\t{\r\n\t\t\t\t/* 1) Active lower bounds. */\r\n\t\t\t\tif ( ( delta_yFX[i] < -ZERO ) && ( y[ii] >= 0.0 ) )\r\n\t\t\t\t{\r\n\t\t\t\t\ttau_tmp = y[ii] / ( -delta_yFX[i] );\r\n\t\t\t\t\tif ( tau_tmp < tau_new )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif ( tau_tmp >= 0.0 )\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\ttau_new = tau_tmp;\r\n\t\t\t\t\t\t\tBC_idx = ii;\r\n\t\t\t\t\t\t\tBC_status = ST_INACTIVE;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t/* 2) Active upper bounds. */\r\n\t\t\t\tif ( ( delta_yFX[i] > ZERO ) && ( y[ii] <= 0.0 ) )\r\n\t\t\t\t{\r\n\t\t\t\t\ttau_tmp = y[ii] / ( -delta_yFX[i] );\r\n\t\t\t\t\tif ( tau_tmp < tau_new )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif ( tau_tmp >= 0.0 )\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\ttau_new = tau_tmp;\r\n\t\t\t\t\t\t\tBC_idx = ii;\r\n\t\t\t\t\t\t\tBC_status = ST_INACTIVE;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t/* II) DETERMINE MAXIMUM PRIMAL STEPLENGTH, i.e. ensure that\r\n\t *     inactive bounds remain valid (ignoring unbounded variables). */\r\n\t/* 1) Inactive lower bounds. */\r\n\tif ( bounds.isNoLower( ) == BT_FALSE )\r\n\t{\r\n\t\tfor( i=0; i<nFR; ++i )\r\n\t\t{\r\n\t\t\tii = FR_idx[i];\r\n\r\n\t\t\tif ( bounds.getType( ii ) != ST_UNBOUNDED )\r\n\t\t\t{\r\n\t\t\t\tif ( delta_lb[ii] > delta_xFR[i] )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( x[ii] > lb[ii] )\r\n\t\t\t\t\t\ttau_tmp = ( x[ii] - lb[ii] ) / ( delta_lb[ii] - delta_xFR[i] );\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\ttau_tmp = 0.0;\r\n\r\n\t\t\t\t\tif ( tau_tmp < tau_new )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif ( tau_tmp >= 0.0 )\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\ttau_new = tau_tmp;\r\n\t\t\t\t\t\t\tBC_idx = ii;\r\n\t\t\t\t\t\t\tBC_status = ST_LOWER;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/* 2) Inactive upper bounds. */\r\n\tif ( bounds.isNoUpper( ) == BT_FALSE )\r\n\t{\r\n\t\tfor( i=0; i<nFR; ++i )\r\n\t\t{\r\n\t\t\tii = FR_idx[i];\r\n\r\n\t\t\tif ( bounds.getType( ii ) != ST_UNBOUNDED )\r\n\t\t\t{\r\n\t\t\t\tif ( delta_ub[ii] < delta_xFR[i] )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( x[ii] < ub[ii] )\r\n\t\t\t\t\t\ttau_tmp = ( x[ii] - ub[ii] ) / ( delta_ub[ii] - delta_xFR[i] );\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\ttau_tmp = 0.0;\r\n\r\n\t\t\t\t\tif ( tau_tmp < tau_new )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif ( tau_tmp >= 0.0 )\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\ttau_new = tau_tmp;\r\n\t\t\t\t\t\t\tBC_idx = ii;\r\n\t\t\t\t\t\t\tBC_status = ST_UPPER;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t/* III) SET MAXIMUM HOMOTOPY STEPLENGTH */\r\n\ttau = tau_new;\r\n\r\n\tif ( printlevel ==  PL_HIGH )\r\n\t{\r\n\t\t#ifdef PC_DEBUG\r\n\t\tchar messageString[80];\r\n\r\n\t\tif ( BC_status == ST_UNDEFINED )\r\n\t\t\tsprintf( messageString,\"Stepsize is %.6e!\",tau );\r\n\t\telse\r\n\t\t\tsprintf( messageString,\"Stepsize is %.6e! (BC_idx = %d, BC_status = %d)\",tau,BC_idx,BC_status );\r\n\r\n\t\tgetGlobalMessageHandler( )->throwInfo( RET_STEPSIZE_NONPOSITIVE,messageString,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );\r\n\t\t#endif\r\n\t}\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\th o t s t a r t _ p e r f o r m S t e p\r\n */\r\nreturnValue QProblemB::hotstart_performStep(\tconst int* const FR_idx, const int* const FX_idx,\r\n\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_g, const real_t* const  delta_lb, const real_t* const delta_ub,\r\n\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_xFX, const real_t* const delta_xFR,\r\n\t\t\t\t\t\t\t\t\t\t\t\tconst real_t* const delta_yFX,\r\n\t\t\t\t\t\t\t\t\t\t\t\tint BC_idx, SubjectToStatus BC_status\r\n\t\t\t\t\t\t\t\t\t\t\t\t)\r\n{\r\n\tint i, ii;\r\n\tint nV  = getNV( );\r\n\tint nFR = getNFR( );\r\n\tint nFX = getNFX( );\r\n\r\n\r\n\t/* I) CHECK BOUNDS' CONSISTENCY */\r\n\tif ( areBoundsConsistent( delta_lb,delta_ub ) == BT_FALSE )\r\n\t{\r\n\t\tinfeasible = BT_TRUE;\r\n\t\ttau = 0.0;\r\n\r\n\t\treturn THROWERROR( RET_QP_INFEASIBLE );\r\n\t}\r\n\r\n\r\n\t/* II) GO TO ACTIVE SET CHANGE */\r\n\tif ( tau > ZERO )\r\n\t{\r\n\t\t/* 1) Perform step in primal und dual space. */\r\n\t\tfor( i=0; i<nFR; ++i )\r\n\t\t{\r\n\t\t\tii = FR_idx[i];\r\n\t\t\tx[ii] += tau*delta_xFR[i];\r\n\t\t}\r\n\r\n\t\tfor( i=0; i<nFX; ++i )\r\n\t\t{\r\n\t\t\tii = FX_idx[i];\r\n\t\t\tx[ii] += tau*delta_xFX[i];\r\n\t\t\ty[ii] += tau*delta_yFX[i];\r\n\t\t}\r\n\r\n\t\t/* 2) Shift QP data. */\r\n\t\tfor( i=0; i<nV; ++i )\r\n\t\t{\r\n\t\t\tg[i]  += tau*delta_g[i];\r\n\t\t\tlb[i] += tau*delta_lb[i];\r\n\t\t\tub[i] += tau*delta_ub[i];\r\n\t\t}\r\n\t}\r\n\telse\r\n\t{\r\n\t\t/* print a stepsize warning if stepsize is zero */\r\n\t\t#ifdef PC_DEBUG\r\n\t\tchar messageString[80];\r\n\t\tsprintf( messageString,\"Stepsize is %.6e\",tau );\r\n\t\tgetGlobalMessageHandler( )->throwWarning( RET_STEPSIZE,messageString,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );\r\n\t\t#endif\r\n\t}\r\n\r\n\r\n\t/* setup output preferences */\r\n\t#ifdef PC_DEBUG\r\n\tchar messageString[80];\r\n  \tVisibilityStatus visibilityStatus;\r\n\r\n  \tif ( printlevel == PL_HIGH )\r\n\t\tvisibilityStatus = VS_VISIBLE;\r\n\telse\r\n\t\tvisibilityStatus = VS_HIDDEN;\r\n\t#endif\r\n\r\n\r\n\t/* III) UPDATE ACTIVE SET */\r\n\tswitch ( BC_status )\r\n\t{\r\n\t\t/* Optimal solution found as no working set change detected. */\r\n\t\tcase ST_UNDEFINED:\r\n\t\t\treturn RET_OPTIMAL_SOLUTION_FOUND;\r\n\r\n\r\n\t\t/* Remove one variable from active set. */\r\n\t\tcase ST_INACTIVE:\r\n\t\t\t#ifdef PC_DEBUG\r\n\t\t\tsprintf( messageString,\"bound no. %d.\", BC_idx );\r\n\t\t\tgetGlobalMessageHandler( )->throwInfo( RET_REMOVE_FROM_ACTIVESET,messageString,__FUNCTION__,__FILE__,__LINE__,visibilityStatus );\r\n\t\t\t#endif\r\n\r\n\t\t\tif ( removeBound( BC_idx,BT_TRUE ) != SUCCESSFUL_RETURN )\r\n\t\t\t\treturn THROWERROR( RET_REMOVE_FROM_ACTIVESET_FAILED );\r\n\r\n\t\t\ty[BC_idx] = 0.0;\r\n\t\t\tbreak;\r\n\r\n\r\n\t\t/* Add one variable to active set. */\r\n\t\tdefault:\r\n\t\t\t#ifdef PC_DEBUG\r\n\t\t\tif ( BC_status == ST_LOWER )\r\n\t\t\t\tsprintf( messageString,\"lower bound no. %d.\", BC_idx );\r\n\t\t\telse\r\n\t\t\t\tsprintf( messageString,\"upper bound no. %d.\", BC_idx );\r\n\t\t\t\tgetGlobalMessageHandler( )->throwInfo( RET_ADD_TO_ACTIVESET,messageString,__FUNCTION__,__FILE__,__LINE__,visibilityStatus );\r\n\t\t\t#endif\r\n\r\n\t\t\tif ( addBound( BC_idx,BC_status,BT_TRUE ) != SUCCESSFUL_RETURN )\r\n\t\t\t\treturn THROWERROR( RET_ADD_TO_ACTIVESET_FAILED );\r\n\t\t\tbreak;\r\n\t}\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n#ifdef PC_DEBUG  /* Define print functions only for debugging! */\r\n\r\n/*\r\n *\tp r i n t I t e r a t i o n\r\n */\r\nreturnValue QProblemB::printIteration( \tint iteration,\r\n\t\t\t\t\t\t\t\t\t\tint BC_idx,\tSubjectToStatus BC_status\r\n\t\t  \t\t\t\t\t\t\t\t)\r\n{\r\n\tchar myPrintfString[160];\r\n\r\n\t/* consistency check */\r\n\tif ( iteration < 0 )\r\n\t\treturn THROWERROR( RET_INVALID_ARGUMENTS );\r\n\r\n\t/* nothing to do */\r\n\tif ( printlevel != PL_MEDIUM )\r\n\t\treturn SUCCESSFUL_RETURN;\r\n\r\n\r\n\t/* 1) Print header at first iteration. */\r\n \tif ( iteration == 0 )\r\n\t{\r\n\t\tsprintf( myPrintfString,\"\\n##############  qpOASES  --  QP NO.%4.1d  ###############\\n\", count );\r\n\t\tmyPrintf( myPrintfString );\r\n\r\n\t\tsprintf( myPrintfString,\"   Iter   |   StepLength    |       Info      |   nFX   \\n\" );\r\n\t\tmyPrintf( myPrintfString );\r\n\t}\r\n\r\n\t/* 2) Print iteration line. */\r\n\tif ( BC_status == ST_UNDEFINED )\r\n\t{\r\n\t\tsprintf( myPrintfString,\"   %4.1d   |   %1.5e   |    QP SOLVED    |  %4.1d   \\n\", iteration,tau,getNFX( ) );\r\n\t\tmyPrintf( myPrintfString );\r\n\t}\r\n\telse\r\n\t{\r\n\t\tchar info[8];\r\n\r\n\t\tif ( BC_status == ST_INACTIVE )\r\n\t\t\tsprintf( info,\"REM BND\" );\r\n\t\telse\r\n\t\t\tsprintf( info,\"ADD BND\" );\r\n\r\n\t\tsprintf( myPrintfString,\"   %4.1d   |   %1.5e   |   %s%4.1d   |  %4.1d   \\n\", iteration,tau,info,BC_idx,getNFX( ) );\r\n\t\tmyPrintf( myPrintfString );\r\n\t}\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n#endif  /* PC_DEBUG */\r\n\r\n\r\n\r\n/*\r\n *\tc h e c k K K T c o n d i t i o n s\r\n */\r\nreturnValue QProblemB::checkKKTconditions( )\r\n{\r\n\t#ifdef __PERFORM_KKT_TEST__\r\n\r\n\tint i, j;\r\n\tint nV = getNV( );\r\n\r\n\treal_t tmp;\r\n\treal_t maxKKTviolation = 0.0;\r\n\r\n\r\n\t/* 1) Check for Hx + g - y*A' = 0  (here: A = Id). */\r\n\tfor( i=0; i<nV; ++i )\r\n\t{\r\n\t\ttmp = g[i];\r\n\r\n\t\tfor( j=0; j<nV; ++j )\r\n\t\t\ttmp += H[i*nV + j] * x[j];\r\n\r\n\t\ttmp -= y[i];\r\n\r\n\t\tif ( getAbs( tmp ) > maxKKTviolation )\r\n\t\t\tmaxKKTviolation = getAbs( tmp );\r\n\t}\r\n\r\n\t/* 2) Check for lb <= x <= ub. */\r\n\tfor( i=0; i<nV; ++i )\r\n\t{\r\n\t\tif ( lb[i] - x[i] > maxKKTviolation )\r\n\t\t\tmaxKKTviolation = lb[i] - x[i];\r\n\r\n\t\tif ( x[i] - ub[i] > maxKKTviolation )\r\n\t\t\tmaxKKTviolation = x[i] - ub[i];\r\n\t}\r\n\r\n\t/* 3) Check for correct sign of y and for complementary slackness. */\r\n\tfor( i=0; i<nV; ++i )\r\n\t{\r\n\t\tswitch ( bounds.getStatus( i ) )\r\n\t\t{\r\n\t\t\tcase ST_LOWER:\r\n\t\t\t\tif ( -y[i] > maxKKTviolation )\r\n\t\t\t\t\tmaxKKTviolation = -y[i];\r\n\t\t\t\tif ( getAbs( ( x[i] - lb[i] ) * y[i] ) > maxKKTviolation )\r\n\t\t\t\t\tmaxKKTviolation = getAbs( ( x[i] - lb[i] ) * y[i] );\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase ST_UPPER:\r\n\t\t\t\tif ( y[i] > maxKKTviolation )\r\n\t\t\t\t\tmaxKKTviolation = y[i];\r\n\t\t\t\tif ( getAbs( ( ub[i] - x[i] ) * y[i] ) > maxKKTviolation )\r\n\t\t\t\t\tmaxKKTviolation = getAbs( ( ub[i] - x[i] ) * y[i] );\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tdefault: /* inactive */\r\n\t\t\tif ( getAbs( y[i] ) > maxKKTviolation )\r\n\t\t\t\t\tmaxKKTviolation = getAbs( y[i] );\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\tif ( maxKKTviolation > CRITICALACCURACY )\r\n\t\treturn RET_NO_SOLUTION;\r\n\r\n\tif ( maxKKTviolation > DESIREDACCURACY )\r\n\t\treturn RET_INACCURATE_SOLUTION;\r\n\r\n\t#endif /* __PERFORM_KKT_TEST__ */\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n\r\n/*\r\n *\tend of file\r\n */\r\n"
  },
  {
    "path": "externals/qpoases/SRC/QProblemB.ipp",
    "content": "/*\r\n *\tThis file is part of qpOASES.\r\n *\r\n *\tqpOASES -- An Implementation of the Online Active Set Strategy.\r\n *\tCopyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.\r\n *\r\n *\tqpOASES is free software; you can redistribute it and/or\r\n *\tmodify it under the terms of the GNU Lesser General Public\r\n *\tLicense as published by the Free Software Foundation; either\r\n *\tversion 2.1 of the License, or (at your option) any later version.\r\n *\r\n *\tqpOASES is distributed in the hope that it will be useful,\r\n *\tbut WITHOUT ANY WARRANTY; without even the implied warranty of\r\n *\tMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n *\tLesser General Public License for more details.\r\n *\r\n *\tYou should have received a copy of the GNU Lesser General Public\r\n *\tLicense along with qpOASES; if not, write to the Free Software\r\n *\tFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r\n *\r\n */\r\n\r\n\r\n/**\r\n *\t\\file SRC/QProblemB.ipp\r\n *\t\\author Hans Joachim Ferreau\r\n *\t\\version 1.3embedded\r\n *\t\\date 2007-2008\r\n *\r\n *\tImplementation of inlined member functions of the QProblemB class which \r\n *\tis able to use the newly developed online active set strategy for \r\n *\tparametric quadratic programming.\r\n */\r\n\r\n\r\n\r\n#include <math.h>\r\n\r\n\r\n\r\n/*****************************************************************************\r\n *  P U B L I C                                                              *\r\n *****************************************************************************/\r\n\r\n/*\r\n *\tg e t H\r\n */\r\ninline returnValue QProblemB::getH( real_t* const _H ) const\r\n{\r\n\tint i;\r\n\r\n\tfor ( i=0; i<getNV( )*getNV( ); ++i )\r\n\t\t_H[i] = H[i];\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\tg e t G\r\n */\r\ninline returnValue QProblemB::getG( real_t* const _g ) const\r\n{\r\n\tint i;\r\n\r\n\tfor ( i=0; i<getNV( ); ++i )\r\n\t\t_g[i] = g[i];\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\tg e t L B\r\n */\r\ninline returnValue QProblemB::getLB( real_t* const _lb ) const\r\n{\r\n\tint i;\r\n\r\n\tfor ( i=0; i<getNV( ); ++i )\r\n\t\t_lb[i] = lb[i];\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\tg e t L B\r\n */\r\ninline returnValue QProblemB::getLB( int number, real_t& value ) const\r\n{\r\n\tif ( ( number >= 0 ) && ( number < getNV( ) ) )\r\n\t{\r\n\t\tvalue = lb[number];\r\n\t\treturn SUCCESSFUL_RETURN;\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn THROWERROR( RET_INDEX_OUT_OF_BOUNDS );\r\n\t}\r\n}\r\n\r\n\r\n/*\r\n *\tg e t U B\r\n */\r\ninline returnValue QProblemB::getUB( real_t* const _ub ) const\r\n{\r\n\tint i;\r\n\r\n\tfor ( i=0; i<getNV( ); ++i )\r\n\t\t_ub[i] = ub[i];\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\tg e t U B\r\n */\r\ninline returnValue QProblemB::getUB( int number, real_t& value ) const\r\n{\r\n\tif ( ( number >= 0 ) && ( number < getNV( ) ) )\r\n\t{\r\n\t\tvalue = ub[number];\r\n\t\treturn SUCCESSFUL_RETURN;\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn THROWERROR( RET_INDEX_OUT_OF_BOUNDS );\r\n\t}\r\n}\r\n\r\n\r\n/*\r\n *\tg e t B o u n d s\r\n */\r\ninline returnValue QProblemB::getBounds( Bounds* const _bounds ) const\r\n{\r\n\t*_bounds = bounds;\r\n\t\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\tg e t N V\r\n */\r\ninline int QProblemB::getNV( ) const\r\n{\r\n\treturn bounds.getNV( );\r\n}\r\n\r\n\r\n/*\r\n *\tg e t N F R\r\n */\r\ninline int QProblemB::getNFR( )\r\n{\r\n\treturn bounds.getNFR( );\r\n}\r\n\r\n\r\n/*\r\n *\tg e t N F X\r\n */\r\ninline int QProblemB::getNFX( )\r\n{\r\n\treturn bounds.getNFX( );\r\n}\r\n\r\n\r\n/*\r\n *\tg e t N F V\r\n */\r\ninline int QProblemB::getNFV( ) const\r\n{\r\n\treturn bounds.getNFV( );\r\n}\r\n\r\n\r\n/*\r\n *\tg e t S t a t u s\r\n */\r\ninline QProblemStatus QProblemB::getStatus( ) const\r\n{\r\n\treturn status;\r\n}\r\n\r\n\r\n/*\r\n *\ti s I n i t i a l i s e d\r\n */\r\ninline BooleanType QProblemB::isInitialised( ) const\r\n{\r\n\tif ( status == QPS_NOTINITIALISED )\r\n\t\treturn BT_FALSE;\r\n\telse\r\n\t\treturn BT_TRUE;\r\n}\r\n\r\n\r\n/*\r\n *\ti s S o l v e d\r\n */\r\ninline BooleanType QProblemB::isSolved( ) const\r\n{\r\n\tif ( status == QPS_SOLVED )\r\n\t\treturn BT_TRUE;\r\n\telse\r\n\t\treturn BT_FALSE;\r\n}\r\n\r\n\r\n/*\r\n *\ti s I n f e a s i b l e\r\n */\r\ninline BooleanType QProblemB::isInfeasible( ) const\r\n{\r\n\treturn infeasible;\r\n}\r\n\r\n\r\n/*\r\n *\ti s U n b o u n d e d\r\n */\r\ninline BooleanType QProblemB::isUnbounded( ) const\r\n{\r\n\treturn unbounded;\r\n}\r\n\r\n\r\n/*\r\n *\tg e t P r i n t L e v e l\r\n */\r\ninline PrintLevel QProblemB::getPrintLevel( ) const\r\n{\r\n\treturn printlevel;\r\n}\r\n\r\n\r\n/*\r\n *\tg e t H e s s i a n T y p e\r\n */\r\ninline HessianType QProblemB::getHessianType( ) const\r\n{\r\n\treturn hessianType;\r\n}\r\n\r\n\r\n/*\r\n *\ts e t H e s s i a n T y p e\r\n */\r\ninline returnValue QProblemB::setHessianType( HessianType _hessianType )\r\n{\r\n\thessianType = _hessianType;\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n\r\n/*****************************************************************************\r\n *  P R O T E C T E D                                                        *\r\n *****************************************************************************/\r\n\r\n/*\r\n *\ts e t H\r\n */\r\ninline returnValue QProblemB::setH( const real_t* const H_new )\r\n{\r\n\tint i, j;\r\n\r\n\tint nV = getNV();\r\n\r\n\tfor( i=0; i<nV; ++i )\r\n\t\tfor( j=0; j<nV; ++j )\r\n\t\t\tH[i*NVMAX + j] = H_new[i*nV + j];\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\ts e t G\r\n */\r\ninline returnValue QProblemB::setG( const real_t* const g_new )\r\n{\r\n\tint i;\r\n\r\n\tint nV = getNV();\r\n\r\n\tfor( i=0; i<nV; ++i )\r\n\t\tg[i] = g_new[i];\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\ts e t L B\r\n */\r\ninline returnValue QProblemB::setLB( const real_t* const lb_new )\r\n{\r\n\tint i;\r\n\r\n\tint nV = getNV();\r\n\r\n\tfor( i=0; i<nV; ++i )\r\n\t\tlb[i] = lb_new[i];\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\ts e t L B\r\n */\r\ninline returnValue QProblemB::setLB( int number, real_t value )\r\n{\r\n\tif ( ( number >= 0 ) && ( number < getNV( ) ) )\r\n\t{\r\n\t\tlb[number] = value;\r\n\t\treturn SUCCESSFUL_RETURN;\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn THROWERROR( RET_INDEX_OUT_OF_BOUNDS );\r\n\t}\r\n}\r\n\r\n\r\n/*\r\n *\ts e t U B\r\n */\r\ninline returnValue QProblemB::setUB( const real_t* const ub_new )\r\n{\r\n\tint i;\r\n\r\n\tint nV = getNV();\r\n\r\n\tfor( i=0; i<nV; ++i )\r\n\t\tub[i] = ub_new[i];\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\ts e t U B\r\n */\r\ninline returnValue QProblemB::setUB( int number, real_t value )\r\n{\r\n\tif ( ( number >= 0 ) && ( number < getNV( ) ) )\r\n\t{\r\n\t\tub[number] = value;\r\n\r\n\t\treturn SUCCESSFUL_RETURN;\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn THROWERROR( RET_INDEX_OUT_OF_BOUNDS );\r\n\t}\r\n}\r\n\r\n\r\n/*\r\n *\tc o m p u t e G i v e n s\r\n */\r\ninline void QProblemB::computeGivens(\treal_t xold, real_t yold, real_t& xnew, real_t& ynew,\r\n\t\t\t\t\t\t\t\t\t\treal_t& c, real_t& s \r\n\t\t\t\t\t\t\t\t\t\t) const\r\n{\r\n    if ( getAbs( yold ) <= ZERO )\r\n\t{\r\n        c = 1.0;\r\n        s = 0.0;\r\n\t\t\r\n\t\txnew = xold;\r\n\t\tynew = yold;\r\n\t}\r\n    else\r\n\t{\r\n\t\treal_t t, mu;\r\n\r\n        mu = getAbs( xold );\r\n\t\tif ( getAbs( yold ) > mu )\r\n\t\t\tmu = getAbs( yold );\r\n\t\t\r\n        t = mu * sqrt( (xold/mu)*(xold/mu) + (yold/mu)*(yold/mu) );\r\n\t\t\r\n\t\tif ( xold < 0.0 )\r\n            t = -t;\r\n\t\t\r\n        c = xold/t;\r\n        s = yold/t;\r\n        xnew = t;\r\n        ynew = 0.0;\r\n\t}\r\n\t\r\n\treturn;\r\n}\r\n\r\n\t\t\r\n/*\r\n *\ta p p l y G i v e n s\r\n */\r\ninline void QProblemB::applyGivens(\treal_t c, real_t s, real_t xold, real_t yold,\r\n\t\t\t\t\t\t\t\t\treal_t& xnew, real_t& ynew \r\n\t\t\t\t\t\t\t\t\t) const\r\n{\r\n\t/* Usual Givens plane rotation requiring four multiplications. */\r\n\txnew =  c*xold + s*yold;\r\n\tynew = -s*xold + c*yold;\r\n// \tdouble nu = s/(1.0+c);\r\n// \r\n// \txnew = xold*c + yold*s;\r\n// \tynew = (xnew+xold)*nu - yold;\r\n\t\r\n\treturn;\r\n}\r\n\r\n\r\n/*\r\n *\tend of file\r\n */\r\n"
  },
  {
    "path": "externals/qpoases/SRC/SubjectTo.cpp",
    "content": "/*\r\n *\tThis file is part of qpOASES.\r\n *\r\n *\tqpOASES -- An Implementation of the Online Active Set Strategy.\r\n *\tCopyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.\r\n *\r\n *\tqpOASES is free software; you can redistribute it and/or\r\n *\tmodify it under the terms of the GNU Lesser General Public\r\n *\tLicense as published by the Free Software Foundation; either\r\n *\tversion 2.1 of the License, or (at your option) any later version.\r\n *\r\n *\tqpOASES is distributed in the hope that it will be useful,\r\n *\tbut WITHOUT ANY WARRANTY; without even the implied warranty of\r\n *\tMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n *\tLesser General Public License for more details.\r\n *\r\n *\tYou should have received a copy of the GNU Lesser General Public\r\n *\tLicense along with qpOASES; if not, write to the Free Software\r\n *\tFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r\n *\r\n */\r\n\r\n\r\n/**\r\n *\t\\file SRC/SubjectTo.cpp\r\n *\t\\author Hans Joachim Ferreau\r\n *\t\\version 1.3embedded\r\n *\t\\date 2007-2008\r\n *\r\n *\tImplementation of the SubjectTo class designed to manage working sets of\r\n *\tconstraints and bounds within a QProblem.\r\n */\r\n\r\n\r\n#include <SubjectTo.hpp>\r\n\r\n\r\n/*****************************************************************************\r\n *  P U B L I C                                                              *\r\n *****************************************************************************/\r\n\r\n\r\n/*\r\n *\tS u b j e c t T o\r\n */\r\nSubjectTo::SubjectTo( ) :\tnoLower( BT_TRUE ),\r\n\t\t\t\t\t\t\tnoUpper( BT_TRUE ),\r\n\t\t\t\t\t\t\tsize( 0 )\r\n{\r\n\tint i;\r\n\r\n\tfor( i=0; i<size; ++i )\r\n\t{\r\n\t\ttype[i] = ST_UNKNOWN;\r\n\t\tstatus[i] = ST_UNDEFINED;\r\n\t}\r\n}\r\n\r\n\r\n/*\r\n *\tS u b j e c t T o\r\n */\r\nSubjectTo::SubjectTo( const SubjectTo& rhs ) :\tnoLower( rhs.noLower ),\r\n\t\t\t\t\t\t\t\t\t\t\t\tnoUpper( rhs.noUpper ),\r\n\t\t\t\t\t\t\t\t\t\t\t\tsize( rhs.size )\r\n{\r\n\tint i;\r\n\r\n\tfor( i=0; i<size; ++i )\r\n\t{\r\n\t\ttype[i] = rhs.type[i];\r\n\t\tstatus[i] = rhs.status[i];\r\n\t}\r\n}\r\n\r\n\r\n/*\r\n *\t~ S u b j e c t T o\r\n */\r\nSubjectTo::~SubjectTo( )\r\n{\r\n}\r\n\r\n\r\n/*\r\n *\to p e r a t o r =\r\n */\r\nSubjectTo& SubjectTo::operator=( const SubjectTo& rhs )\r\n{\r\n\tint i;\r\n\r\n\tif ( this != &rhs )\r\n\t{\r\n\t\tsize = rhs.size;\r\n\r\n\t\tfor( i=0; i<size; ++i )\r\n\t\t{\r\n\t\t\ttype[i] = rhs.type[i];\r\n\t\t\tstatus[i] = rhs.status[i];\r\n\t\t}\r\n\r\n\t\tnoLower = rhs.noLower;\r\n\t\tnoUpper = rhs.noUpper;\r\n\t}\r\n\r\n\treturn *this;\r\n}\r\n\r\n\r\n\r\n/*\r\n *\ti n i t\r\n */\r\nreturnValue SubjectTo::init( int n )\r\n{\r\n\tint i;\r\n\r\n\tsize = n;\r\n\r\n\tnoLower = BT_TRUE;\r\n\tnoUpper = BT_TRUE;\r\n\r\n\tfor( i=0; i<size; ++i )\r\n\t{\r\n\t\ttype[i] = ST_UNKNOWN;\r\n\t\tstatus[i] = ST_UNDEFINED;\r\n\t}\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n\r\n/*****************************************************************************\r\n *  P R O T E C T E D                                                        *\r\n *****************************************************************************/\r\n\r\n/*\r\n *\ta d d I n d e x\r\n */\r\nreturnValue SubjectTo::addIndex(\tIndexlist* const indexlist,\r\n\t\t\t\t\t\t\t\t\tint newnumber, SubjectToStatus newstatus\r\n\t\t\t\t\t\t\t\t\t)\r\n{\r\n\t/* consistency check */\r\n\tif ( status[newnumber] == newstatus )\r\n\t\treturn THROWERROR( RET_INDEX_ALREADY_OF_DESIRED_STATUS );\r\n\r\n\tstatus[newnumber] = newstatus;\r\n\r\n\tif ( indexlist->addNumber( newnumber ) == RET_INDEXLIST_EXCEEDS_MAX_LENGTH )\r\n\t\treturn THROWERROR( RET_ADDINDEX_FAILED );\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\tr e m o v e I n d e x\r\n */\r\nreturnValue SubjectTo::removeIndex(\tIndexlist* const indexlist, \r\n\t\t\t\t\t\t\t\t\tint removenumber\r\n\t\t\t\t\t\t\t\t\t)\r\n{\r\n\tstatus[removenumber] = ST_UNDEFINED;\r\n\r\n\tif ( indexlist->removeNumber( removenumber ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_UNKNOWN_BUG );\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\ts w a p I n d e x\r\n */\r\nreturnValue SubjectTo::swapIndex(\tIndexlist* const indexlist,\r\n\t\t\t\t\t\t\t\t\tint number1, int number2\r\n\t\t\t\t\t\t\t\t\t)\r\n{\r\n\t/* consistency checks */\r\n\tif ( status[number1] != status[number2] )\r\n\t\treturn THROWERROR( RET_SWAPINDEX_FAILED );\r\n\r\n\tif ( number1 == number2 )\r\n\t{\r\n\t\tTHROWWARNING( RET_NOTHING_TO_DO );\r\n\t\treturn SUCCESSFUL_RETURN;\r\n\t}\r\n\r\n\tif ( indexlist->swapNumbers( number1,number2 ) != SUCCESSFUL_RETURN )\r\n\t\treturn THROWERROR( RET_SWAPINDEX_FAILED );\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\tend of file\r\n */\r\n"
  },
  {
    "path": "externals/qpoases/SRC/SubjectTo.ipp",
    "content": "/*\r\n *\tThis file is part of qpOASES.\r\n *\r\n *\tqpOASES -- An Implementation of the Online Active Set Strategy.\r\n *\tCopyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.\r\n *\r\n *\tqpOASES is free software; you can redistribute it and/or\r\n *\tmodify it under the terms of the GNU Lesser General Public\r\n *\tLicense as published by the Free Software Foundation; either\r\n *\tversion 2.1 of the License, or (at your option) any later version.\r\n *\r\n *\tqpOASES is distributed in the hope that it will be useful,\r\n *\tbut WITHOUT ANY WARRANTY; without even the implied warranty of\r\n *\tMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n *\tLesser General Public License for more details.\r\n *\r\n *\tYou should have received a copy of the GNU Lesser General Public\r\n *\tLicense along with qpOASES; if not, write to the Free Software\r\n *\tFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r\n *\r\n */\r\n\r\n\r\n/**\r\n *\t\\file SRC/SubjectTo.ipp\r\n *\t\\author Hans Joachim Ferreau\r\n *\t\\version 1.3embedded\r\n *\t\\date 2007-2008\r\n *\r\n *\tImplementation of the inlined member functions of the SubjectTo class \r\n *\tdesigned to manage working sets of constraints and bounds within a QProblem.\r\n */\r\n\r\n\r\n/*****************************************************************************\r\n *  P U B L I C                                                              *\r\n *****************************************************************************/\r\n \r\n\r\n/*\r\n *\tg e t T y p e\r\n */\r\ninline SubjectToType SubjectTo::getType( int i ) const\r\n{\r\n\tif ( ( i >= 0 ) && ( i < size ) )\r\n\t\treturn type[i];\r\n\telse\r\n\t\treturn ST_UNKNOWN;\r\n}\r\n\r\n\r\n/*\r\n *\tg e t S t a t u s\r\n */\r\ninline SubjectToStatus SubjectTo::getStatus( int i ) const\r\n{\r\n\tif ( ( i >= 0 ) && ( i < size ) )\r\n\t\treturn status[i];\r\n\telse\r\n\t\treturn ST_UNDEFINED;\r\n}\r\n\r\n\r\n/*\r\n *\ts e t T y p e\r\n */\r\ninline returnValue SubjectTo::setType( int i, SubjectToType value )\r\n{\r\n\tif ( ( i >= 0 ) && ( i < size ) )\r\n\t{\r\n\t\ttype[i] = value;\r\n\t\treturn SUCCESSFUL_RETURN;\r\n\t}\r\n\telse\r\n\t\treturn THROWERROR( RET_INDEX_OUT_OF_BOUNDS );\r\n}\r\n\r\n\r\n/*\r\n *\ts e t S t a t u s\r\n */\r\ninline returnValue SubjectTo::setStatus( int i, SubjectToStatus value )\r\n{\r\n\tif ( ( i >= 0 ) && ( i < size ) )\r\n\t{\r\n\t\tstatus[i] = value;\r\n\t\treturn SUCCESSFUL_RETURN;\r\n\t}\r\n\telse\r\n\t\treturn THROWERROR( RET_INDEX_OUT_OF_BOUNDS );\r\n}\r\n\r\n\r\n/*\r\n *\ts e t N o L o w e r\r\n */\r\ninline void SubjectTo::setNoLower( BooleanType _status )\r\n{\r\n\tnoLower = _status;\r\n}\r\n \r\n\r\n/*\r\n *\ts e t N o U p p e r\r\n */\r\ninline void SubjectTo::setNoUpper( BooleanType _status )\r\n{\r\n\tnoUpper = _status;\r\n}\r\n\r\n\r\n/*\r\n *\ti s N o L o w e r\r\n */\r\ninline BooleanType SubjectTo::isNoLower( ) const\r\n{\r\n\treturn noLower;\r\n}\r\n\r\n \r\n/*\r\n *\ti s N o L o w e r\r\n */\r\ninline BooleanType SubjectTo::isNoUpper( ) const\r\n{\r\n\treturn noUpper;\r\n}\r\n\r\n\r\n/*\r\n *\tend of file\r\n */\r\n"
  },
  {
    "path": "externals/qpoases/SRC/Utils.cpp",
    "content": "/*\r\n *\tThis file is part of qpOASES.\r\n *\r\n *\tqpOASES -- An Implementation of the Online Active Set Strategy.\r\n *\tCopyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.\r\n *\r\n *\tqpOASES is free software; you can redistribute it and/or\r\n *\tmodify it under the terms of the GNU Lesser General Public\r\n *\tLicense as published by the Free Software Foundation; either\r\n *\tversion 2.1 of the License, or (at your option) any later version.\r\n *\r\n *\tqpOASES is distributed in the hope that it will be useful,\r\n *\tbut WITHOUT ANY WARRANTY; without even the implied warranty of\r\n *\tMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n *\tLesser General Public License for more details.\r\n *\r\n *\tYou should have received a copy of the GNU Lesser General Public\r\n *\tLicense along with qpOASES; if not, write to the Free Software\r\n *\tFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r\n *\r\n */\r\n\r\n\r\n/**\r\n *\t\\file SRC/Utils.cpp\r\n *\t\\author Hans Joachim Ferreau, Eckhard Arnold\r\n *\t\\version 1.3embedded\r\n *\t\\date 2007-2008\r\n *\r\n *\tImplementation of some inlined utilities for working with the different QProblem\r\n *  classes.\r\n */\r\n\r\n\r\n#include <math.h>\r\n\r\n#if defined(__WIN32__) || defined(WIN32)\r\n  #include <windows.h>\r\n#elif defined(LINUX)\r\n  #include <sys/stat.h>\r\n  #include <sys/time.h>\r\n#endif\r\n\r\n#ifdef __MATLAB__\r\n  #include <mex.h>\r\n#endif\r\n\r\n\r\n#include <Utils.hpp>\r\n\r\n\r\n\r\n#ifdef PC_DEBUG  /* Define print functions only for debugging! */\r\n/*\r\n *\tp r i n t\r\n */\r\nreturnValue print( const real_t* const v, int n )\r\n{\r\n\tint i;\r\n\tchar myPrintfString[160];\r\n\r\n\t/* Print a vector. */\r\n\tmyPrintf( \"[\\t\" );\r\n\tfor( i=0; i<n; ++i )\r\n\t{\r\n\t\tsprintf( myPrintfString,\" %.16e\\t\", v[i] );\r\n\t\tmyPrintf( myPrintfString );\r\n\t}\r\n\tmyPrintf( \"]\\n\" );\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\tp r i n t\r\n */\r\nreturnValue print(\tconst real_t* const v, int n,\r\n\t\t\t\t\tconst int* const V_idx\r\n\t\t\t\t\t)\r\n{\r\n\tint i;\r\n\tchar myPrintfString[160];\r\n\r\n\t/* Print a permuted vector. */\r\n\tmyPrintf( \"[\\t\" );\r\n\tfor( i=0; i<n; ++i )\r\n\t{\r\n\t\tsprintf( myPrintfString,\" %.16e\\t\", v[ V_idx[i] ] );\r\n\t\tmyPrintf( myPrintfString );\r\n\t}\r\n\tmyPrintf( \"]\\n\" );\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\tp r i n t\r\n */\r\nreturnValue print(\tconst real_t* const v, int n,\r\n\t\t\t\t\tconst char* name\r\n\t\t\t\t\t)\r\n{\r\n\tchar myPrintfString[160];\r\n\r\n\t/* Print vector name ... */\r\n\tsprintf( myPrintfString,\"%s = \", name );\r\n\tmyPrintf( myPrintfString );\r\n\r\n\t/* ... and the vector itself. */\r\n\treturn print( v, n );\r\n}\r\n\r\n\r\n/*\r\n *\tp r i n t\r\n */\r\nreturnValue print( const real_t* const M, int nrow, int ncol )\r\n{\r\n\tint i;\r\n\r\n\t/* Print a matrix as a collection of row vectors. */\r\n\tfor( i=0; i<nrow; ++i )\r\n\t\tprint( &(M[i*ncol]), ncol );\r\n\tmyPrintf( \"\\n\" );\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\tp r i n t\r\n */\r\nreturnValue print(\tconst real_t* const M, int nrow, int ncol,\r\n\t\t\t\t\tconst int* const ROW_idx, const int* const COL_idx\r\n\t\t\t\t\t)\r\n{\r\n\tint i;\r\n\r\n\t/* Print a permuted matrix as a collection of permuted row vectors. */\r\n\tfor( i=0; i<nrow; ++i )\r\n\t\tprint( &( M[ ROW_idx[i]*ncol ] ), ncol, COL_idx );\r\n\tmyPrintf( \"\\n\" );\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\tp r i n t\r\n */\r\nreturnValue print(\tconst real_t* const M, int nrow, int ncol,\r\n\t\t\t\t\tconst char* name\r\n\t\t\t\t\t)\r\n{\r\n\tchar myPrintfString[160];\r\n\r\n\t/* Print matrix name ... */\r\n\tsprintf( myPrintfString,\"%s = \", name );\r\n\tmyPrintf( myPrintfString );\r\n\r\n\t/* ... and the matrix itself. */\r\n\treturn print( M, nrow, ncol );\r\n}\r\n\r\n\r\n/*\r\n *\tp r i n t\r\n */\r\nreturnValue print( const int* const index, int n )\r\n{\r\n\tint i;\r\n\tchar myPrintfString[160];\r\n\r\n\t/* Print a indexlist. */\r\n\tmyPrintf( \"[\\t\" );\r\n\tfor( i=0; i<n; ++i )\r\n\t{\r\n\t\tsprintf( myPrintfString,\" %d\\t\", index[i] );\r\n\t\tmyPrintf( myPrintfString );\r\n\t}\r\n\tmyPrintf( \"]\\n\" );\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\tp r i n t\r\n */\r\nreturnValue print(\tconst int* const index, int n,\r\n\t\t\t\t\tconst char* name\r\n\t\t\t\t\t)\r\n{\r\n\tchar myPrintfString[160];\r\n\r\n\t/* Print indexlist name ... */\r\n\tsprintf( myPrintfString,\"%s = \", name );\r\n\tmyPrintf( myPrintfString );\r\n\r\n\t/* ... and the indexlist itself. */\r\n\treturn print( index, n );\r\n}\r\n\r\n\r\n/*\r\n *\tm y P r i n t f\r\n */\r\nreturnValue myPrintf( const char* s )\r\n{\r\n\t#ifdef __MATLAB__\r\n\tmexPrintf( s );\r\n\t#else\r\n\tmyFILE* outputfile = getGlobalMessageHandler( )->getOutputFile( );\r\n\tif ( outputfile == 0 )\r\n\t\treturn THROWERROR( RET_NO_GLOBAL_MESSAGE_OUTPUTFILE );\r\n\r\n\tfprintf( outputfile, \"%s\", s );\r\n\t#endif\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\tp r i n t C o p y r i g h t N o t i c e\r\n */\r\nreturnValue printCopyrightNotice( )\r\n{\r\n\treturn myPrintf( \"\\nqpOASES -- An Implementation of the Online Active Set Strategy.\\nCopyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.\\n\\nqpOASES is distributed under the terms of the \\nGNU Lesser General Public License 2.1 in the hope that it will be \\nuseful, but WITHOUT ANY WARRANTY; without even the implied warranty \\nof MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. \\nSee the GNU Lesser General Public License for more details.\\n\\n\" );\r\n}\r\n\r\n\r\n/*\r\n *\tr e a d F r o m F i l e\r\n */\r\nreturnValue readFromFile(\treal_t* data, int nrow, int ncol,\r\n\t\t\t\t\t\t\tconst char* datafilename\r\n\t\t\t\t\t\t\t)\r\n{\r\n\tint i, j;\r\n\tfloat float_data;\r\n\tmyFILE* datafile;\r\n\r\n\t/* 1) Open file. */\r\n\tif ( ( datafile = fopen( datafilename, \"r\" ) ) == 0 )\r\n\t{\r\n\t\tchar errstr[80];\r\n\t\tsprintf( errstr,\"(%s)\",datafilename );\r\n\t\treturn getGlobalMessageHandler( )->throwError( RET_UNABLE_TO_OPEN_FILE,errstr,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );\r\n\t}\r\n\r\n\t/* 2) Read data from file. */\r\n\tfor( i=0; i<nrow; ++i )\r\n\t{\r\n\t\tfor( j=0; j<ncol; ++j )\r\n\t\t{\r\n\t\t\tif ( fscanf( datafile, \"%f \", &float_data ) == 0 )\r\n\t\t\t{\r\n\t\t\t\tfclose( datafile );\r\n\t\t\t\tchar errstr[80];\r\n\t\t\t\tsprintf( errstr,\"(%s)\",datafilename );\r\n\t\t\t\treturn getGlobalMessageHandler( )->throwError( RET_UNABLE_TO_READ_FILE,errstr,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );\r\n\t\t\t}\r\n\t\t\tdata[i*ncol + j] = ( (real_t) float_data );\r\n\t\t}\r\n\t}\r\n\r\n\t/* 3) Close file. */\r\n\tfclose( datafile );\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\tr e a d F r o m F i l e\r\n */\r\nreturnValue readFromFile(\treal_t* data, int n,\r\n\t\t\t\t\t\t\tconst char* datafilename\r\n\t\t\t\t\t\t\t)\r\n{\r\n\treturn readFromFile( data, n, 1, datafilename );\r\n}\r\n\r\n\r\n\r\n/*\r\n *\tr e a d F r o m F i l e\r\n */\r\nreturnValue readFromFile(\tint* data, int n,\r\n\t\t\t\t\t\t\tconst char* datafilename\r\n\t\t\t\t\t\t\t)\r\n{\r\n\tint i;\r\n\tmyFILE* datafile;\r\n\r\n\t/* 1) Open file. */\r\n\tif ( ( datafile = fopen( datafilename, \"r\" ) ) == 0 )\r\n\t{\r\n\t\tchar errstr[80];\r\n\t\tsprintf( errstr,\"(%s)\",datafilename );\r\n\t\treturn getGlobalMessageHandler( )->throwError( RET_UNABLE_TO_OPEN_FILE,errstr,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );\r\n\t}\r\n\r\n\t/* 2) Read data from file. */\r\n\tfor( i=0; i<n; ++i )\r\n\t{\r\n\t\tif ( fscanf( datafile, \"%d\\n\", &(data[i]) ) == 0 )\r\n\t\t{\r\n\t\t\tfclose( datafile );\r\n\t\t\tchar errstr[80];\r\n\t\t\tsprintf( errstr,\"(%s)\",datafilename );\r\n\t\t\treturn getGlobalMessageHandler( )->throwError( RET_UNABLE_TO_READ_FILE,errstr,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );\r\n\t\t}\r\n\t}\r\n\r\n\t/* 3) Close file. */\r\n\tfclose( datafile );\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\tw r i t e I n t o F i l e\r\n */\r\nreturnValue writeIntoFile(\tconst real_t* const data, int nrow, int ncol,\r\n\t\t\t\t\t\t\tconst char* datafilename, BooleanType append\r\n\t\t\t\t\t\t\t)\r\n{\r\n\tint i, j;\r\n\tmyFILE* datafile;\r\n\r\n\t/* 1) Open file. */\r\n\tif ( append == BT_TRUE )\r\n\t{\r\n\t\t/* append data */\r\n\t\tif ( ( datafile = fopen( datafilename, \"a\" ) ) == 0 )\r\n\t\t{\r\n\t\t\tchar errstr[80];\r\n\t\t\tsprintf( errstr,\"(%s)\",datafilename );\r\n\t\t\treturn getGlobalMessageHandler( )->throwError( RET_UNABLE_TO_OPEN_FILE,errstr,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );\r\n\t\t}\r\n\t}\r\n\telse\r\n\t{\r\n\t\t/* do not append data */\r\n\t\tif ( ( datafile = fopen( datafilename, \"w\" ) ) == 0 )\r\n\t\t{\r\n\t\t\tchar errstr[80];\r\n\t\t\tsprintf( errstr,\"(%s)\",datafilename );\r\n\t\t\treturn getGlobalMessageHandler( )->throwError( RET_UNABLE_TO_OPEN_FILE,errstr,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );\r\n\t\t}\r\n\t}\r\n\r\n\t/* 2) Write data into file. */\r\n\tfor( i=0; i<nrow; ++i )\r\n\t{\r\n\t\tfor( j=0; j<ncol; ++j )\r\n\t\t \tfprintf( datafile, \"%.16e \", data[i*ncol+j] );\r\n\r\n\t\tfprintf( datafile, \"\\n\" );\r\n\t}\r\n\r\n\t/* 3) Close file. */\r\n\tfclose( datafile );\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n\r\n\r\n/*\r\n *\tw r i t e I n t o F i l e\r\n */\r\nreturnValue writeIntoFile(\tconst real_t* const data, int n,\r\n\t\t\t\t\t\t\tconst char* datafilename, BooleanType append\r\n\t\t\t\t\t\t\t)\r\n{\r\n\treturn writeIntoFile( data,1,n,datafilename,append );\r\n}\r\n\r\n\r\n/*\r\n *\tw r i t e I n t o F i l e\r\n */\r\nreturnValue writeIntoFile(\tconst int* const data, int n,\r\n\t\t\t\t\t\t\tconst char* datafilename, BooleanType append\r\n\t\t\t\t\t\t\t)\r\n{\r\n\tint i;\r\n\r\n\tmyFILE* datafile;\r\n\r\n\t/* 1) Open file. */\r\n\tif ( append == BT_TRUE )\r\n\t{\r\n\t\t/* append data */\r\n\t\tif ( ( datafile = fopen( datafilename, \"a\" ) ) == 0 )\r\n\t\t{\r\n\t\t\tchar errstr[80];\r\n\t\t\tsprintf( errstr,\"(%s)\",datafilename );\r\n\t\t\treturn getGlobalMessageHandler( )->throwError( RET_UNABLE_TO_OPEN_FILE,errstr,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );\r\n\t\t}\r\n\t}\r\n\telse\r\n\t{\r\n\t\t/* do not append data */\r\n\t\tif ( ( datafile = fopen( datafilename, \"w\" ) ) == 0 )\r\n\t\t{\r\n\t\t\tchar errstr[80];\r\n\t\t\tsprintf( errstr,\"(%s)\",datafilename );\r\n\t\t\treturn getGlobalMessageHandler( )->throwError( RET_UNABLE_TO_OPEN_FILE,errstr,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );\r\n\t\t}\r\n\t}\r\n\r\n\t/* 2) Write data into file. */\r\n\tfor( i=0; i<n; ++i )\r\n\t\tfprintf( datafile, \"%d\\n\", data[i] );\r\n\r\n\t/* 3) Close file. */\r\n\tfclose( datafile );\r\n\r\n\treturn SUCCESSFUL_RETURN;\r\n}\r\n#endif  /* PC_DEBUG */\r\n\r\n\r\n/*\r\n *\tg e t C P U t i m e\r\n */\r\nreal_t getCPUtime( )\r\n{\r\n\treal_t current_time = -1.0;\r\n\r\n\t#if defined(__WIN32__) || defined(WIN32)\r\n\tLARGE_INTEGER counter, frequency;\r\n\tQueryPerformanceFrequency(&frequency);\r\n\tQueryPerformanceCounter(&counter);\r\n\tcurrent_time = ((real_t) counter.QuadPart) / ((real_t) frequency.QuadPart);\r\n\t#elif defined(LINUX)\r\n\tstruct timeval theclock;\r\n\tgettimeofday( &theclock,0 );\r\n\tcurrent_time = 1.0*theclock.tv_sec + 1.0e-6*theclock.tv_usec;\r\n\t#endif\r\n\r\n\treturn current_time;\r\n}\r\n\r\n\r\n/*\r\n *\tg e t N o r m\r\n */\r\nreal_t getNorm( const real_t* const v, int n )\r\n{\r\n\tint i;\r\n\r\n\treal_t norm = 0.0;\r\n\r\n\tfor( i=0; i<n; ++i )\r\n\t\tnorm += v[i]*v[i];\r\n\r\n\treturn sqrt( norm );\r\n}\r\n\r\n\r\n\r\n/*\r\n *\tend of file\r\n */\r\n"
  },
  {
    "path": "externals/qpoases/SRC/Utils.ipp",
    "content": "/*\r\n *\tThis file is part of qpOASES.\r\n *\r\n *\tqpOASES -- An Implementation of the Online Active Set Strategy.\r\n *\tCopyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.\r\n *\r\n *\tqpOASES is free software; you can redistribute it and/or\r\n *\tmodify it under the terms of the GNU Lesser General Public\r\n *\tLicense as published by the Free Software Foundation; either\r\n *\tversion 2.1 of the License, or (at your option) any later version.\r\n *\r\n *\tqpOASES is distributed in the hope that it will be useful,\r\n *\tbut WITHOUT ANY WARRANTY; without even the implied warranty of\r\n *\tMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n *\tLesser General Public License for more details.\r\n *\r\n *\tYou should have received a copy of the GNU Lesser General Public\r\n *\tLicense along with qpOASES; if not, write to the Free Software\r\n *\tFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r\n *\r\n */\r\n\r\n\r\n\r\n/**\r\n *\t\\file SRC/Utils.ipp\r\n *\t\\author Hans Joachim Ferreau\r\n *\t\\version 1.3embedded\r\n *\t\\date 2007-2008\r\n *\r\n *\tImplementation of some inlined utilities for working with the different QProblem \r\n *  classes.\r\n */\r\n\r\n\r\n\r\n/*\r\n *\tg e t A b s\r\n */\r\ninline real_t getAbs( real_t x )\r\n{\r\n\tif ( x < 0.0 )\r\n\t\treturn -x;\r\n\telse\r\n\t\treturn x;\r\n}\r\n\r\n\r\n/*\r\n *\tend of file\r\n */\r\n"
  },
  {
    "path": "externals/qpoases/VERSIONS.txt",
    "content": "##\r\n##\tqpOASES -- An Implementation of the Online Active Set Strategy.\r\n##\tCopyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.\r\n##\r\n##\tqpOASES is free software; you can redistribute it and/or\r\n##\tmodify it under the terms of the GNU Lesser General Public\r\n##\tLicense as published by the Free Software Foundation; either\r\n##\tversion 2.1 of the License, or (at your option) any later version.\r\n##\r\n##\tqpOASES is distributed in the hope that it will be useful,\r\n##\tbut WITHOUT ANY WARRANTY; without even the implied warranty of\r\n##\tMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n##\tLesser General Public License for more details.\r\n##\r\n##\tYou should have received a copy of the GNU Lesser General Public\r\n##\tLicense along with qpOASES; if not, write to the Free Software\r\n##\tFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA\r\n##\r\n\r\n\r\n\r\nVERSION HISTORY\r\n===============\r\n\r\n1.3embedded (last updated on 30th April 2009):\r\n-----------------------------------------------------------------------\r\n\r\n+ Re-programming of internal memory management to avoid dynamic memory allocations \r\n+ Most #ifdef directives removed\r\n+ Almost all type definitions gathered within INCLUDE/Types.hpp\r\n+ Irrelevant functionality removed (like the SQProblem class, functionality \r\n  for loading data from files or the SCILAB interface)\r\n+ Replacement of all doubles by real_t\r\n+ Introduction of define \"PC_DEBUG\" for switching off all print functions\r\n+ stdio.h was made optional, string.h is no longer needed\r\n+ relative paths removed from #include directives\r\n+ made auxiliary objects locally static within solveInitialQP()\r\n+ Matlab interface fixed for single precision\r\n+ New return value -2 from Legacy wrapper added to Matlab/Simulink interfaces\r\n+ KKT optimality check moved into QProblem(B) class, SolutionAnalysis class removed\r\n\r\n\r\n1.3 (released on 2nd June 2008, last updated on 19th June 2008):\r\n-----------------------------------------------------------------------\r\n\r\n+ Implementation of \"initialised homotopy\" concept\r\n+ Addition of the SolutionAnalysis class\r\n+ Utility functions for solving test problems in OQP format added\r\n+ Flexibility of Matlab(R) interface enhanced\r\n+ Major source code cleanup\r\n  (Attention: a few class names and calling interfaces have changed!)\r\n\r\n\r\n\r\n1.2 (released on 9th October 2007):\r\n-----------------------------------------------------------------------\r\n\r\n+ Special treatment of diagonal Hessians\r\n+ Improved infeasibility detection\r\n+ Further improved Matlab(R) interface\r\n+ Extended Simulink(R) interface\r\n+ scilab interface added\r\n+ Code cleanup and several bugfixes\r\n\r\n\r\n\r\n1.1 (released on 8th July 2007):\r\n--------------------------------\r\n\r\n+ Implementation of the QProblemB class\r\n+ Basic implementation of the SQProblem class\r\n+ Improved Matlab(R) interface\r\n+ Enabling/Disabling of constraints introduced\r\n+ Several bugfixes\r\n\r\n\r\n\r\n1.0 (released on 17th April 2007):\r\n----------------------------------\r\n\r\nInitial release.\r\n\r\n\r\n\r\n##\r\n##\tend of file\r\n##\r\n"
  },
  {
    "path": "include/rpg_mpc/mpc_controller.h",
    "content": "/*    rpg_quadrotor_mpc\n *    A model predictive control implementation for quadrotors.\n *    Copyright (C) 2017-2018 Philipp Foehn, \n *    Robotics and Perception Group, University of Zurich\n * \n *    Intended to be used with rpg_quadrotor_control and rpg_quadrotor_common.\n *    https://github.com/uzh-rpg/rpg_quadrotor_control\n *\n *    This program is free software: you can redistribute it and/or modify\n *    it under the terms of the GNU General Public License as published by\n *    the Free Software Foundation, either version 3 of the License, or\n *    (at your option) any later version.\n *\n *    This program is distributed in the hope that it will be useful,\n *    but WITHOUT ANY WARRANTY; without even the implied warranty of\n *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n *    GNU General Public License for more details.\n *\n *    You should have received a copy of the GNU General Public License\n *    along with this program.  If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n\n#pragma once\n\n#include <thread>\n\n#include <Eigen/Eigen>\n#include <geometry_msgs/PoseStamped.h>\n#include <geometry_msgs/PointStamped.h>\n#include <nav_msgs/Path.h>\n#include <quadrotor_common/control_command.h>\n#include <quadrotor_common/quad_state_estimate.h>\n#include <quadrotor_common/trajectory.h>\n#include <quadrotor_common/trajectory_point.h>\n#include <ros/ros.h>\n#include <std_msgs/Bool.h>\n#include <std_msgs/Empty.h>\n#include <trajectory_msgs/MultiDOFJointTrajectory.h>\n\n#include \"rpg_mpc/mpc_wrapper.h\"\n#include \"rpg_mpc/mpc_params.h\"\n\nnamespace rpg_mpc {\n\nenum STATE {\n  kPosX = 0,\n  kPosY = 1,\n  kPosZ = 2,\n  kOriW = 3,\n  kOriX = 4,\n  kOriY = 5,\n  kOriZ = 6,\n  kVelX = 7,\n  kVelY = 8,\n  kVelZ = 9\n};\n\nenum INPUT {\n  kThrust = 0,\n  kRateX = 1,\n  kRateY = 2,\n  kRateZ = 3\n};\n\ntemplate<typename T>\nclass MpcController {\npublic:\n\n  EIGEN_MAKE_ALIGNED_OPERATOR_NEW\n\n  static_assert(kStateSize == 10,\n                \"MpcController: Wrong model size. Number of states does not match.\");\n  static_assert(kInputSize == 4,\n                \"MpcController: Wrong model size. Number of inputs does not match.\");\n\n  MpcController(const ros::NodeHandle& nh,\n                const ros::NodeHandle& pnh,\n                const std::string& topic = \"mpc/trajectory_predicted\");\n\n  MpcController() : MpcController(ros::NodeHandle(), ros::NodeHandle(\"~\")) {}\n\n  quadrotor_common::ControlCommand off();\n\n  quadrotor_common::ControlCommand run(\n      const quadrotor_common::QuadStateEstimate& state_estimate,\n      const quadrotor_common::Trajectory& reference_trajectory,\n      const MpcParams<T>& params);\n\n\nprivate:\n  // Internal helper functions.\n\n  void pointOfInterestCallback(\n      const geometry_msgs::PointStamped::ConstPtr& msg);\n\n  void offCallback(const std_msgs::Empty::ConstPtr& msg);\n\n  bool setStateEstimate(\n      const quadrotor_common::QuadStateEstimate& state_estimate);\n\n  bool setReference(const quadrotor_common::Trajectory& reference_trajectory);\n\n  quadrotor_common::ControlCommand updateControlCommand(\n      const Eigen::Ref<const Eigen::Matrix<T, kStateSize, 1>> state,\n      const Eigen::Ref<const Eigen::Matrix<T, kInputSize, 1>> input,\n      ros::Time& time);\n\n  bool publishPrediction(\n      const Eigen::Ref<const Eigen::Matrix<T, kStateSize, kSamples + 1>> states,\n      const Eigen::Ref<const Eigen::Matrix<T, kInputSize, kSamples>> inputs,\n      ros::Time& time);\n\n  void preparationThread();\n\n  bool setNewParams(MpcParams<T>& params);\n\n  // Handles\n  ros::NodeHandle nh_;\n  ros::NodeHandle pnh_;\n\n  // Subscribers and publisher.\n  ros::Subscriber sub_point_of_interest_;\n  ros::Subscriber sub_autopilot_off_;\n  ros::Publisher pub_predicted_trajectory_;\n\n  // Parameters\n  MpcParams<T> params_;\n\n  // MPC\n  MpcWrapper<T> mpc_wrapper_;\n\n  // Preparation Thread\n  std::thread preparation_thread_;\n\n  // Variables\n  T timing_feedback_, timing_preparation_;\n  bool solve_from_scratch_;\n  Eigen::Matrix<T, kStateSize, 1> est_state_;\n  Eigen::Matrix<T, kStateSize, kSamples + 1> reference_states_;\n  Eigen::Matrix<T, kInputSize, kSamples + 1> reference_inputs_;\n  Eigen::Matrix<T, kStateSize, kSamples + 1> predicted_states_;\n  Eigen::Matrix<T, kInputSize, kSamples> predicted_inputs_;\n  Eigen::Matrix<T, 3, 1> point_of_interest_;\n};\n\n\n} // namespace MPC\n"
  },
  {
    "path": "include/rpg_mpc/mpc_params.h",
    "content": "/*    rpg_quadrotor_mpc\n *    A model predictive control implementation for quadrotors.\n *    Copyright (C) 2017-2018 Philipp Foehn, \n *    Robotics and Perception Group, University of Zurich\n * \n *    Intended to be used with rpg_quadrotor_control and rpg_quadrotor_common.\n *    https://github.com/uzh-rpg/rpg_quadrotor_control\n *\n *    This program is free software: you can redistribute it and/or modify\n *    it under the terms of the GNU General Public License as published by\n *    the Free Software Foundation, either version 3 of the License, or\n *    (at your option) any later version.\n *\n *    This program is distributed in the hope that it will be useful,\n *    but WITHOUT ANY WARRANTY; without even the implied warranty of\n *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n *    GNU General Public License for more details.\n *\n *    You should have received a copy of the GNU General Public License\n *    along with this program.  If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n\n#pragma once\n\n#include <ros/ros.h>\n#include <rpg_mpc/mpc_wrapper.h>\n\n#include \"quadrotor_common/parameter_helper.h\"\n\nnamespace rpg_mpc\n{\n\ntemplate <typename T>\nclass MpcParams {\n public:\n\n  EIGEN_MAKE_ALIGNED_OPERATOR_NEW\n  \n  MpcParams() :\n    changed_(false),\n    print_info_(false),\n    state_cost_exponential_(0.0),\n    input_cost_exponential_(0.0),\n    max_bodyrate_xy_(0.0),\n    max_bodyrate_z_(0.0),\n    min_thrust_(0.0),\n    max_thrust_(0.0),\n    p_B_C_(Eigen::Matrix<T, 3, 1>::Zero()),\n    q_B_C_(Eigen::Quaternion<T>(1.0, 0.0, 0.0, 0.0)),\n    Q_(Eigen::Matrix<T, kCostSize, kCostSize>::Zero()),\n    R_(Eigen::Matrix<T, kInputSize, kInputSize>::Zero())\n  {\n  }\n\n  ~MpcParams()\n  {\n  }\n\n  bool loadParameters(ros::NodeHandle& pnh)\n  {\n    #define GET_PARAM(name) \\\n    if (!quadrotor_common::getParam(#name, name, pnh)) \\\n      return false\n\n    #define GET_PARAM_(name) \\\n    if (!quadrotor_common::getParam(#name, name ## _, pnh)) \\\n      return false\n\n    // Read state costs.\n    T Q_pos_xy, Q_pos_z, Q_attitude, Q_velocity, Q_perception;\n    GET_PARAM(Q_pos_xy);\n    GET_PARAM(Q_pos_z);\n    GET_PARAM(Q_attitude);\n    GET_PARAM(Q_velocity);\n    quadrotor_common::getParam(\"Q_perception\", Q_perception, (T)0.0, pnh);\n\n    // Check whether all state costs are positive.\n    if(Q_pos_xy     <= 0.0 ||\n       Q_pos_z      <= 0.0 ||\n       Q_attitude   <= 0.0 ||\n       Q_velocity   <= 0.0 ||\n       Q_perception < 0.0)      // Perception cost can be zero to deactivate.\n    {\n      ROS_ERROR(\"MPC: State cost Q has negative enries!\");\n      return false;\n    }\n\n    // Read input costs.\n    T R_thrust, R_pitchroll, R_yaw;\n    GET_PARAM(R_thrust);\n    GET_PARAM(R_pitchroll);\n    GET_PARAM(R_yaw);\n\n    // Check whether all input costs are positive.\n    if(R_thrust    <= 0.0 ||\n       R_pitchroll <= 0.0 ||\n       R_yaw       <= 0.0)\n    {\n      ROS_ERROR(\"MPC: Input cost R has negative enries!\");\n      return false;\n    }\n\n    // Set state and input cost matrices.\n    Q_ = (Eigen::Matrix<T, kCostSize, 1>() <<\n      Q_pos_xy, Q_pos_xy, Q_pos_z,\n      Q_attitude, Q_attitude, Q_attitude, Q_attitude,\n      Q_velocity, Q_velocity, Q_velocity,\n      Q_perception, Q_perception).finished().asDiagonal();\n    R_ = (Eigen::Matrix<T, kInputSize, 1>() <<\n      R_thrust, R_pitchroll, R_pitchroll, R_yaw).finished().asDiagonal();\n\n    // Read cost scaling values\n    quadrotor_common::getParam(\"state_cost_exponential\",\n      state_cost_exponential_, (T)0.0, pnh);\n    quadrotor_common::getParam(\"input_cost_exponential\",\n      input_cost_exponential_, (T)0.0, pnh);\n\n    // Read input limits.\n    GET_PARAM_(max_bodyrate_xy);\n    GET_PARAM_(max_bodyrate_z);\n    GET_PARAM_(min_thrust);\n    GET_PARAM_(max_thrust);\n\n    // Check whether all input limits are positive.\n    if(max_bodyrate_xy_ <= 0.0 ||\n       max_bodyrate_z_  <= 0.0 ||\n       min_thrust_      <= 0.0 ||\n       max_thrust_      <= 0.0)\n    {\n      ROS_ERROR(\"MPC: All limits must be positive non-zero values!\");\n      return false;\n    }\n\n    // Optional parameters\n    std::vector<T> p_B_C(3), q_B_C(4);\n    if(!pnh.getParam(\"p_B_C\", p_B_C))\n    {\n      ROS_WARN(\"MPC: Camera extrinsic translation is not set.\");\n    }\n    else\n    {\n      p_B_C_ = Eigen::Matrix<T, 3, 1>(p_B_C[0], p_B_C[1], p_B_C[2]);\n    }\n    if(!pnh.getParam(\"q_B_C\", q_B_C))\n    {\n      ROS_WARN(\"MPC: Camera extrinsic rotation is not set.\");\n    }\n    else\n    {\n      q_B_C_ = Eigen::Quaternion<T>(q_B_C[0], q_B_C[1], q_B_C[2], q_B_C[3]);\n    }\n\n    quadrotor_common::getParam(\"print_info\", print_info_, false, pnh);\n    if(print_info_) ROS_INFO(\"MPC: Informative printing enabled.\");\n\n    changed_ = true;\n\n    #undef GET_PARAM\n    #undef GET_PARAM_OPT\n    #undef GET_PARAM_\n    #undef GET_PARAM_OPT_\n\n    return true;\n  }\n\n  bool changed_;\n\n  bool print_info_;\n\n  T state_cost_exponential_;\n  T input_cost_exponential_;\n\n  T max_bodyrate_xy_;\n  T max_bodyrate_z_;\n  T min_thrust_;\n  T max_thrust_;\n\n  Eigen::Matrix<T, 3, 1> p_B_C_;\n  Eigen::Quaternion<T> q_B_C_;\n\n  Eigen::Matrix<T, kCostSize, kCostSize> Q_;\n  Eigen::Matrix<T, kInputSize, kInputSize> R_;\n};\n\n\n\n} // namespace rpg_mpc"
  },
  {
    "path": "include/rpg_mpc/mpc_wrapper.h",
    "content": "/*    rpg_quadrotor_mpc\n *    A model predictive control implementation for quadrotors.\n *    Copyright (C) 2017-2018 Philipp Foehn, \n *    Robotics and Perception Group, University of Zurich\n * \n *    Intended to be used with rpg_quadrotor_control and rpg_quadrotor_common.\n *    https://github.com/uzh-rpg/rpg_quadrotor_control\n *\n *    This program is free software: you can redistribute it and/or modify\n *    it under the terms of the GNU General Public License as published by\n *    the Free Software Foundation, either version 3 of the License, or\n *    (at your option) any later version.\n *\n *    This program is distributed in the hope that it will be useful,\n *    but WITHOUT ANY WARRANTY; without even the implied warranty of\n *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n *    GNU General Public License for more details.\n *\n *    You should have received a copy of the GNU General Public License\n *    along with this program.  If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n\n#pragma once\n\n#include <Eigen/Eigen>\n#include <ros/ros.h>\n\nnamespace rpg_mpc {\n\n#include \"acado_auxiliary_functions.h\"\n#include \"acado_common.h\"\n\nstatic constexpr int kSamples = ACADO_N;      // number of samples\nstatic constexpr int kStateSize = ACADO_NX;   // number of states\nstatic constexpr int kRefSize = ACADO_NY;     // number of reference states\nstatic constexpr int kEndRefSize = ACADO_NYN; // number of end reference states\nstatic constexpr int kInputSize = ACADO_NU;   // number of inputs\nstatic constexpr int kCostSize = ACADO_NY - ACADO_NU; // number of state costs\nstatic constexpr int kOdSize = ACADO_NOD;     // number of online data\n\nACADOvariables acadoVariables;\nACADOworkspace acadoWorkspace;\n\n\ntemplate <typename T>\nclass MpcWrapper\n{\n public:\n\n  EIGEN_MAKE_ALIGNED_OPERATOR_NEW\n\n  MpcWrapper();\n  MpcWrapper(\n    const Eigen::Ref<const Eigen::Matrix<T, kCostSize, kCostSize>> Q,\n    const Eigen::Ref<const Eigen::Matrix<T, kInputSize, kInputSize>> R);\n\n  bool setCosts(\n    const Eigen::Ref<const Eigen::Matrix<T, kCostSize, kCostSize>> Q,\n    const Eigen::Ref<const Eigen::Matrix<T, kInputSize, kInputSize>> R,\n    const T state_cost_scaling = 0.0, const T input_cost_scaling = 0.0);\n\n  bool setLimits(T min_thrust, T max_thrust,\n    T max_rollpitchrate, T max_yawrate);\n  bool setCameraParameters(\n    const Eigen::Ref<const Eigen::Matrix<T, 3, 1>>& p_B_C,\n    Eigen::Quaternion<T>& q_B_C);\n  bool setPointOfInterest(\n    const Eigen::Ref<const Eigen::Matrix<T, 3, 1>>& position);\n\n  bool setReferencePose(\n    const Eigen::Ref<const Eigen::Matrix<T, kStateSize, 1>> state);\n  bool setTrajectory(\n    const Eigen::Ref<const Eigen::Matrix<T, kStateSize, kSamples+1>> states,\n    const Eigen::Ref<const Eigen::Matrix<T, kInputSize, kSamples+1>> inputs);\n\n  bool solve(const Eigen::Ref<const Eigen::Matrix<T, kStateSize, 1>> state);\n  bool update(const Eigen::Ref<const Eigen::Matrix<T, kStateSize, 1>> state,\n              bool do_preparation = true);\n  bool prepare();\n\n  void getState(const int node_index,\n    Eigen::Ref<Eigen::Matrix<T, kStateSize, 1>> return_state);\n  void getStates(\n    Eigen::Ref<Eigen::Matrix<T, kStateSize, kSamples+1>> return_states);\n  void getInput(const int node_index,\n    Eigen::Ref<Eigen::Matrix<T, kInputSize, 1>> return_input);\n  void getInputs(\n    Eigen::Ref<Eigen::Matrix<T, kInputSize, kSamples>> return_input);\n  T getTimestep() { return dt_; }\n\n private:\n  Eigen::Map<Eigen::Matrix<float, kRefSize, kSamples, Eigen::ColMajor>>\n    acado_reference_states_{acadoVariables.y};\n\n  Eigen::Map<Eigen::Matrix<float, kEndRefSize, 1, Eigen::ColMajor>>\n    acado_reference_end_state_{acadoVariables.yN};\n\n  Eigen::Map<Eigen::Matrix<float, kStateSize, 1, Eigen::ColMajor>>\n    acado_initial_state_{acadoVariables.x0};\n\n  Eigen::Map<Eigen::Matrix<float, kStateSize, kSamples+1, Eigen::ColMajor>>\n    acado_states_{acadoVariables.x};\n\n  Eigen::Map<Eigen::Matrix<float, kInputSize, kSamples, Eigen::ColMajor>>\n    acado_inputs_{acadoVariables.u};\n\n  Eigen::Map<Eigen::Matrix<float, kOdSize, kSamples+1, Eigen::ColMajor>>\n    acado_online_data_{acadoVariables.od};\n\n  Eigen::Map<Eigen::Matrix<float, kRefSize, kRefSize * kSamples>>\n    acado_W_{acadoVariables.W};\n\n  Eigen::Map<Eigen::Matrix<float, kEndRefSize, kEndRefSize>>\n    acado_W_end_{acadoVariables.WN};\n\n  Eigen::Map<Eigen::Matrix<float, 4, kSamples, Eigen::ColMajor>>\n    acado_lower_bounds_{acadoVariables.lbValues};\n\n  Eigen::Map<Eigen::Matrix<float, 4, kSamples, Eigen::ColMajor>>\n    acado_upper_bounds_{acadoVariables.ubValues};\n\n  Eigen::Matrix<T, kRefSize, kRefSize> W_ = (Eigen::Matrix<T, kRefSize, 1>() <<\n    10 * Eigen::Matrix<T, 3, 1>::Ones(),\n    100 * Eigen::Matrix<T, 4, 1>::Ones(),\n    10 * Eigen::Matrix<T, 3, 1>::Ones(),\n    Eigen::Matrix<T, 2, 1>::Zero(),\n    1, 10, 10, 1).finished().asDiagonal();\n\n  Eigen::Matrix<T, kEndRefSize, kEndRefSize> WN_ =\n    W_.block(0, 0, kEndRefSize, kEndRefSize);\n\n  bool acado_is_prepared_{false};\n  const T dt_{0.1};\n  const Eigen::Matrix<real_t, kInputSize, 1> kHoverInput_ =\n    (Eigen::Matrix<real_t, kInputSize, 1>() << 9.81, 0.0, 0.0, 0.0).finished();\n};\n\n\n\n} // namespace MPC"
  },
  {
    "path": "launch/mpc_controller.launch",
    "content": "<!--  rpg_quadrotor_mpc\n      A model predictive control implementation for quadrotors.\n      Copyright (C) 2017-2018 Philipp Foehn, \n      Robotics and Perception Group, University of Zurich\n   \n      Intended to be used with rpg_quadrotor_control and rpg_quadrotor_common.\n      https://github.com/uzh-rpg/rpg_quadrotor_control\n  \n      This program is free software: you can redistribute it and/or modify\n      it under the terms of the GNU General Public License as published by\n      the Free Software Foundation, either version 3 of the License, or\n      (at your option) any later version.\n  \n      This program is distributed in the hope that it will be useful,\n      but WITHOUT ANY WARRANTY; without even the implied warranty of\n      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n      GNU General Public License for more details.\n  \n      You should have received a copy of the GNU General Public License\n      along with this program.  If not, see <http://www.gnu.org/licenses/>.\n-->\n\n\n<launch>\n  <arg name=\"quad_name\" />\n  <group ns=\"$(arg quad_name)\" >\n\n    <node pkg=\"rpg_mpc\" type=\"mpc_controller_node\" name=\"mpc_controller_node\" output=\"screen\" >\n      <rosparam file=\"$(find rpg_mpc)/parameters/default.yaml\" />\n    </node>\n\n  </group>\n</launch>"
  },
  {
    "path": "model/CMakeLists.txt",
    "content": "#     rpg_quadrotor_mpc\n#     A model predictive control implementation for quadrotors.\n#     Copyright (C) 2017-2018 Philipp Foehn, \n#     Robotics and Perception Group, University of Zurich\n#  \n#     Intended to be used with rpg_quadrotor_control and rpg_quadrotor_common.\n#     https://github.com/uzh-rpg/rpg_quadrotor_control\n# \n#     This program is free software: you can redistribute it and/or modify\n#     it under the terms of the GNU General Public License as published by\n#     the Free Software Foundation, either version 3 of the License, or\n#     (at your option) any later version.\n# \n#     This program is distributed in the hope that it will be useful,\n#     but WITHOUT ANY WARRANTY; without even the implied warranty of\n#     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n#     GNU General Public License for more details.\n# \n#     You should have received a copy of the GNU General Public License\n#     along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\n\n# Minimum required version of cmake \nCMAKE_MINIMUM_REQUIRED( VERSION 2.8 )\n\n# Project name and programming languages used\nPROJECT( quadrotor_model )\n\n# CMake module(s) path\nSET( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR} )\n# activate c++ 11\nIF(CMAKE_COMPILER_IS_GNUCC)\n  SET(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -std=c++0x\")\nELSE()\n  SET(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -std=c++11\")\nENDIF()\n\n#\n# Prerequisites\n#\nFIND_PACKAGE( ACADO REQUIRED )\n\n#\n# Include directories\n#\nINCLUDE_DIRECTORIES( . ${ACADO_INCLUDE_DIRS} )\n\n#\n# Build an executable\n#\nADD_EXECUTABLE(        quadrotor_model_codegen quadrotor_model_thrustrates.cpp )\nTARGET_LINK_LIBRARIES( quadrotor_model_codegen ${ACADO_SHARED_LIBRARIES} )\nSET_TARGET_PROPERTIES( quadrotor_model_codegen PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )"
  },
  {
    "path": "model/FindACADO.cmake",
    "content": "################################################################################\n#\n# Description:\n# ACADO Toolkit package configuration file\n#\n# Defines:\n#   - Variable: ACADO_INCLUDE_DIRS\n#   - Variable: ACADO_LIBRARY_DIRS\n#   - Variable: ACADO_STATIC_LIBS_FOUND\n#   - Variable: ACADO_STATIC_LIBRARIES\n#   - Variable: ACADO_SHARED_LIBS_FOUND\n#   - Variable: ACADO_SHARED_LIBRARIES\n#\n# Authors:\n# Milan Vukov, milan.vukov@esat.kuleuven.be\n#\n# Year:\n# 2011 - 2013.\n#\n# NOTE:\n# - This script is for Linux/Unix use only.\n# - Use this script only (and only :)) if you do not want to install ACADO\n#   toolkit. If you install ACADO toolkit you do not need this script.\n#\n# - PREREQUISITE: sourced acado_env.sh in your ~/.bashrc file. This script\n#   will try to find ACADO folders, libraries etc., but looking for them\n#   in enviromental variables.\n#\n# Usage:\n# - Linux/Unix: TODO\n#\n################################################################################\n\n################################################################################\n#\n# Search for package components\n#\n################################################################################\n\nMESSAGE( STATUS \"********************************************************************************\" )\nMESSAGE( STATUS \"---> Looking for ACADO toolkit:\" )\n\n#\n# Include folders\n#\nSET( ACADO_INCLUDE_DIRS $ENV{ACADO_ENV_INCLUDE_DIRS} )\nIF( ACADO_INCLUDE_DIRS )\n  MESSAGE( STATUS \"Found ACADO toolkit include directories: ${ACADO_INCLUDE_DIRS}\" )\n  SET( ACADO_INCLUDE_DIRS_FOUND TRUE )\nELSE( ACADO_INCLUDE_DIRS )\n  MESSAGE( STATUS \"Could not find ACADO toolkit include directories\" )\nENDIF( ACADO_INCLUDE_DIRS )\n\n#\n# Library folders\n#\nSET( ACADO_LIBRARY_DIRS $ENV{ACADO_ENV_LIBRARY_DIRS} )\nIF( ACADO_LIBRARY_DIRS )\n  MESSAGE( STATUS \"Found ACADO toolkit library directories: ${ACADO_LIBRARY_DIRS}\" )\n  SET( ACADO_LIBRARY_DIRS_FOUND TRUE )\nELSE( ACADO_LIBRARY_DIRS )\n  MESSAGE( STATUS \"Could not find ACADO toolkit library directories\" )\nENDIF( ACADO_LIBRARY_DIRS )\n\n#\n# Static libs\n#\n\nSET ( STATIC_TMP $ENV{ACADO_ENV_STATIC_LIBRARIES})\nIF ( NOT STATIC_TMP )\n  MESSAGE( STATUS \"Could not find ACADO static library.\" )\n  SET( ACADO_STATIC_LIBS_FOUND FALSE )\nELSE()\n  SET( ACADO_STATIC_LIBS_FOUND TRUE )\n  UNSET( ACADO_STATIC_LIBRARIES )\n  FOREACH( LIB $ENV{ACADO_ENV_STATIC_LIBRARIES} )\n    UNSET( ACADO_TOOLKIT_STATIC_${LIB} )\n  \n    FIND_LIBRARY( ACADO_TOOLKIT_STATIC_${LIB}\n      NAMES ${LIB}\n      PATHS ${ACADO_LIBRARY_DIRS}\n      NO_DEFAULT_PATH\n    )\n  \n    IF( ACADO_TOOLKIT_STATIC_${LIB} )\n      MESSAGE( STATUS \"Found ACADO static library: ${LIB}\" )\n      SET( ACADO_STATIC_LIBRARIES\n        ${ACADO_STATIC_LIBRARIES} ${ACADO_TOOLKIT_STATIC_${LIB}}\n      )\n    ELSE( )\n      MESSAGE( STATUS \"Could not find ACADO static library: ${LIB}\" )\n      SET( ACADO_STATIC_LIBS_FOUND FALSE )\n    ENDIF( )\n  ENDFOREACH()\nENDIF()\n\nSET( ACADO_BUILD_STATIC ${ACADO_STATIC_LIBS_FOUND} )\n\nIF( VERBOSE )\n  MESSAGE( STATUS \"Static libraries: ${ACADO_STATIC_LIBRARIES}\\n\" )\nENDIF()\n\n#\n# Shared libs\n#\nSET( SHARED_TMP $ENV{ACADO_ENV_SHARED_LIBRARIES} )\nIF ( NOT SHARED_TMP )\n  MESSAGE( STATUS \"Could not find ACADO shared library.\" )\n  SET( ACADO_SHARED_LIBS_FOUND FALSE )\nELSE()\nSET( ACADO_SHARED_LIBS_FOUND TRUE )\n  UNSET( ACADO_SHARED_LIBRARIES )\n  FOREACH( LIB $ENV{ACADO_ENV_SHARED_LIBRARIES} )\n    UNSET( ACADO_TOOLKIT_SHARED_${LIB} )\n  \n    FIND_LIBRARY( ACADO_TOOLKIT_SHARED_${LIB}\n      NAMES ${LIB}\n      PATHS ${ACADO_LIBRARY_DIRS}\n      NO_DEFAULT_PATH\n    )\n  \n    IF( ACADO_TOOLKIT_SHARED_${LIB} )\n      MESSAGE( STATUS \"Found ACADO shared library: ${LIB}\" )\n      SET( ACADO_SHARED_LIBRARIES\n        ${ACADO_SHARED_LIBRARIES} ${ACADO_TOOLKIT_SHARED_${LIB}}\n      )\n    ELSE( )\n      MESSAGE( STATUS \"Could not find ACADO shared library: ${LIB}\" )\n      SET( ACADO_SHARED_LIBS_FOUND FALSE )\n    ENDIF( )\n  ENDFOREACH()\nENDIF()\n\nSET( ACADO_BUILD_SHARED ${ACADO_SHARED_LIBS_FOUND} )\n\nIF( VERBOSE )\n  MESSAGE( STATUS \"${ACADO_SHARED_LIBRARIES}\\n\" )\nENDIF()\n\n#\n# qpOASES embedded source files and include folders\n# TODO: checks\n#\nSET( ACADO_QPOASES_EMBEDDED_SOURCES $ENV{ACADO_ENV_QPOASES_EMBEDDED_SOURCES} )\nSET( ACADO_QPOASES_EMBEDDED_INC_DIRS $ENV{ACADO_ENV_QPOASES_EMBEDDED_INC_DIRS} )\n\n\n#\n# And finally set found flag...\n#\nIF( ACADO_INCLUDE_DIRS_FOUND AND ACADO_LIBRARY_DIRS_FOUND \n    AND (ACADO_STATIC_LIBS_FOUND OR ACADO_SHARED_LIBS_FOUND) )\n  SET( ACADO_FOUND TRUE )\nENDIF()\n\nMESSAGE( STATUS \"********************************************************************************\" )\n"
  },
  {
    "path": "model/README.md",
    "content": "# How to compile the MPC code generation and analysis\n\n1. Install ACADO as described in http://acado.github.io/install_linux.html\n\n2. Source the file ACADO_ROOT/build/acdo_env.sh\n\n3. Go into rpg_mpc/model\n\n4. Prepare the make with \"cmake .\"\n\n5. Compile it with \"make\"\n\n6. Run the executable to generate all code \"./quadrotor_model_codegen\""
  },
  {
    "path": "model/quadrotor_model_thrustrates.cpp",
    "content": "/*    rpg_quadrotor_mpc\n *    A model predictive control implementation for quadrotors.\n *    Copyright (C) 2017-2018 Philipp Foehn, \n *    Robotics and Perception Group, University of Zurich\n * \n *    Intended to be used with rpg_quadrotor_control and rpg_quadrotor_common.\n *    https://github.com/uzh-rpg/rpg_quadrotor_control\n *\n *    This program is free software: you can redistribute it and/or modify\n *    it under the terms of the GNU General Public License as published by\n *    the Free Software Foundation, either version 3 of the License, or\n *    (at your option) any later version.\n *\n *    This program is distributed in the hope that it will be useful,\n *    but WITHOUT ANY WARRANTY; without even the implied warranty of\n *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n *    GNU General Public License for more details.\n *\n *    You should have received a copy of the GNU General Public License\n *    along with this program.  If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n\n#include <memory>\n#include <acado_optimal_control.hpp>\n#include <acado_code_generation.hpp>\n#include <acado_gnuplot.hpp>\n\n// Standalone code generation for a parameter-free quadrotor model\n// with thrust and rates input. \n\nint main( ){\n  // Use Acado\n  USING_NAMESPACE_ACADO\n\n  /*\n  Switch between code generation and analysis.\n\n  If CODE_GEN is true the system is compiled into an optimizaiton problem\n  for real-time iteration and all code to run it online is generated.\n  Constraints and reference structure is used but the values will be set on\n  runtinme.\n\n  If CODE_GEN is false, the system is compiled into a standalone optimization\n  and solved on execution. The reference and constraints must be set in here.\n  */\n  const bool CODE_GEN = true;\n\n  // System variables\n  DifferentialState     p_x, p_y, p_z;\n  DifferentialState     q_w, q_x, q_y, q_z;\n  DifferentialState     v_x, v_y, v_z;\n  Control               T, w_x, w_y, w_z;\n  DifferentialEquation  f;\n  Function              h, hN;\n  OnlineData            p_F_x, p_F_y, p_F_z;\n  OnlineData            t_B_C_x, t_B_C_y, t_B_C_z;\n  OnlineData            q_B_C_w, q_B_C_x, q_B_C_y, q_B_C_z;\n\n  // Parameters with exemplary values. These are set/overwritten at runtime.\n  const double t_start = 0.0;     // Initial time [s]\n  const double t_end = 2.0;       // Time horizon [s]\n  const double dt = 0.1;          // Discretization time [s]\n  const int N = round(t_end/dt);  // Number of nodes\n  const double g_z = 9.8066;      // Gravity is everywhere [m/s^2]\n  const double w_max_yaw = 1;     // Maximal yaw rate [rad/s]\n  const double w_max_xy = 3;      // Maximal pitch and roll rate [rad/s]\n  const double T_min = 2;         // Minimal thrust [N]\n  const double T_max = 20;        // Maximal thrust [N]\n\n  // Bias to prevent division by zero.\n  const double epsilon = 0.1;     // Camera projection recover bias [m]\n\n\n  // System Dynamics\n  f << dot(p_x) ==  v_x;\n  f << dot(p_y) ==  v_y;\n  f << dot(p_z) ==  v_z;\n  f << dot(q_w) ==  0.5 * ( - w_x * q_x - w_y * q_y - w_z * q_z);\n  f << dot(q_x) ==  0.5 * ( w_x * q_w + w_z * q_y - w_y * q_z);\n  f << dot(q_y) ==  0.5 * ( w_y * q_w - w_z * q_x + w_x * q_z);\n  f << dot(q_z) ==  0.5 * ( w_z * q_w + w_y * q_x - w_x * q_y);\n  f << dot(v_x) ==  2 * ( q_w * q_y + q_x * q_z ) * T;\n  f << dot(v_y) ==  2 * ( q_y * q_z - q_w * q_x ) * T;\n  f << dot(v_z) ==  ( 1 - 2 * q_x * q_x - 2 * q_y * q_y ) * T - g_z;\n\n  // Intermediate states to calculate point of interest projection!\n  IntermediateState intSx = ((((-q_x)*q_B_C_x+(-q_y)*q_B_C_y+(-q_z)*q_B_C_z+q_B_C_w*q_w)*((-q_x)*q_B_C_x+(-q_y)*q_B_C_y+(-q_z)*q_B_C_z+q_B_C_w*q_w)+((-q_x)*q_B_C_z+q_B_C_w*q_y+q_B_C_x*q_z+q_B_C_y*q_w)*(-(-q_x)*q_B_C_z-q_B_C_w*q_y-q_B_C_x*q_z-q_B_C_y*q_w)+((-q_y)*q_B_C_x+q_B_C_w*q_z+q_B_C_y*q_x+q_B_C_z*q_w)*(-(-q_y)*q_B_C_x-q_B_C_w*q_z-q_B_C_y*q_x-q_B_C_z*q_w)+((-q_z)*q_B_C_y+q_B_C_w*q_x+q_B_C_x*q_w+q_B_C_z*q_y)*((-q_z)*q_B_C_y+q_B_C_w*q_x+q_B_C_x*q_w+q_B_C_z*q_y))*(p_F_x-p_x)+(((-q_x)*q_B_C_x+(-q_y)*q_B_C_y+(-q_z)*q_B_C_z+q_B_C_w*q_w)*((-q_y)*q_B_C_x+q_B_C_w*q_z+q_B_C_y*q_x+q_B_C_z*q_w)+((-q_x)*q_B_C_x+(-q_y)*q_B_C_y+(-q_z)*q_B_C_z+q_B_C_w*q_w)*((-q_y)*q_B_C_x+q_B_C_w*q_z+q_B_C_y*q_x+q_B_C_z*q_w)+((-q_x)*q_B_C_z+q_B_C_w*q_y+q_B_C_x*q_z+q_B_C_y*q_w)*((-q_z)*q_B_C_y+q_B_C_w*q_x+q_B_C_x*q_w+q_B_C_z*q_y)+(-(-q_x)*q_B_C_z-q_B_C_w*q_y-q_B_C_x*q_z-q_B_C_y*q_w)*(-(-q_z)*q_B_C_y-q_B_C_w*q_x-q_B_C_x*q_w-q_B_C_z*q_y))*(p_F_y-p_y)+(((-q_x)*q_B_C_x+(-q_y)*q_B_C_y+(-q_z)*q_B_C_z+q_B_C_w*q_w)*(-(-q_x)*q_B_C_z-q_B_C_w*q_y-q_B_C_x*q_z-q_B_C_y*q_w)+((-q_x)*q_B_C_x+(-q_y)*q_B_C_y+(-q_z)*q_B_C_z+q_B_C_w*q_w)*(-(-q_x)*q_B_C_z-q_B_C_w*q_y-q_B_C_x*q_z-q_B_C_y*q_w)+((-q_y)*q_B_C_x+q_B_C_w*q_z+q_B_C_y*q_x+q_B_C_z*q_w)*((-q_z)*q_B_C_y+q_B_C_w*q_x+q_B_C_x*q_w+q_B_C_z*q_y)+((-q_y)*q_B_C_x+q_B_C_w*q_z+q_B_C_y*q_x+q_B_C_z*q_w)*((-q_z)*q_B_C_y+q_B_C_w*q_x+q_B_C_x*q_w+q_B_C_z*q_y))*(p_F_z-p_z));\n  IntermediateState intSy = ((((-q_x)*q_B_C_x+(-q_y)*q_B_C_y+(-q_z)*q_B_C_z+q_B_C_w*q_w)*((-q_x)*q_B_C_x+(-q_y)*q_B_C_y+(-q_z)*q_B_C_z+q_B_C_w*q_w)+((-q_x)*q_B_C_z+q_B_C_w*q_y+q_B_C_x*q_z+q_B_C_y*q_w)*((-q_x)*q_B_C_z+q_B_C_w*q_y+q_B_C_x*q_z+q_B_C_y*q_w)+((-q_y)*q_B_C_x+q_B_C_w*q_z+q_B_C_y*q_x+q_B_C_z*q_w)*(-(-q_y)*q_B_C_x-q_B_C_w*q_z-q_B_C_y*q_x-q_B_C_z*q_w)+((-q_z)*q_B_C_y+q_B_C_w*q_x+q_B_C_x*q_w+q_B_C_z*q_y)*(-(-q_z)*q_B_C_y-q_B_C_w*q_x-q_B_C_x*q_w-q_B_C_z*q_y))*(p_F_y-p_y)+(((-q_x)*q_B_C_x+(-q_y)*q_B_C_y+(-q_z)*q_B_C_z+q_B_C_w*q_w)*((-q_z)*q_B_C_y+q_B_C_w*q_x+q_B_C_x*q_w+q_B_C_z*q_y)+((-q_x)*q_B_C_x+(-q_y)*q_B_C_y+(-q_z)*q_B_C_z+q_B_C_w*q_w)*((-q_z)*q_B_C_y+q_B_C_w*q_x+q_B_C_x*q_w+q_B_C_z*q_y)+((-q_x)*q_B_C_z+q_B_C_w*q_y+q_B_C_x*q_z+q_B_C_y*q_w)*((-q_y)*q_B_C_x+q_B_C_w*q_z+q_B_C_y*q_x+q_B_C_z*q_w)+(-(-q_x)*q_B_C_z-q_B_C_w*q_y-q_B_C_x*q_z-q_B_C_y*q_w)*(-(-q_y)*q_B_C_x-q_B_C_w*q_z-q_B_C_y*q_x-q_B_C_z*q_w))*(p_F_z-p_z)+(((-q_x)*q_B_C_x+(-q_y)*q_B_C_y+(-q_z)*q_B_C_z+q_B_C_w*q_w)*(-(-q_y)*q_B_C_x-q_B_C_w*q_z-q_B_C_y*q_x-q_B_C_z*q_w)+((-q_x)*q_B_C_x+(-q_y)*q_B_C_y+(-q_z)*q_B_C_z+q_B_C_w*q_w)*(-(-q_y)*q_B_C_x-q_B_C_w*q_z-q_B_C_y*q_x-q_B_C_z*q_w)+((-q_x)*q_B_C_z+q_B_C_w*q_y+q_B_C_x*q_z+q_B_C_y*q_w)*((-q_z)*q_B_C_y+q_B_C_w*q_x+q_B_C_x*q_w+q_B_C_z*q_y)+((-q_x)*q_B_C_z+q_B_C_w*q_y+q_B_C_x*q_z+q_B_C_y*q_w)*((-q_z)*q_B_C_y+q_B_C_w*q_x+q_B_C_x*q_w+q_B_C_z*q_y))*(p_F_x-p_x));\n  IntermediateState intSz = ((((-q_x)*q_B_C_x+(-q_y)*q_B_C_y+(-q_z)*q_B_C_z+q_B_C_w*q_w)*((-q_x)*q_B_C_x+(-q_y)*q_B_C_y+(-q_z)*q_B_C_z+q_B_C_w*q_w)+((-q_x)*q_B_C_z+q_B_C_w*q_y+q_B_C_x*q_z+q_B_C_y*q_w)*(-(-q_x)*q_B_C_z-q_B_C_w*q_y-q_B_C_x*q_z-q_B_C_y*q_w)+((-q_y)*q_B_C_x+q_B_C_w*q_z+q_B_C_y*q_x+q_B_C_z*q_w)*((-q_y)*q_B_C_x+q_B_C_w*q_z+q_B_C_y*q_x+q_B_C_z*q_w)+((-q_z)*q_B_C_y+q_B_C_w*q_x+q_B_C_x*q_w+q_B_C_z*q_y)*(-(-q_z)*q_B_C_y-q_B_C_w*q_x-q_B_C_x*q_w-q_B_C_z*q_y))*(p_F_z-p_z)+(((-q_x)*q_B_C_x+(-q_y)*q_B_C_y+(-q_z)*q_B_C_z+q_B_C_w*q_w)*((-q_x)*q_B_C_z+q_B_C_w*q_y+q_B_C_x*q_z+q_B_C_y*q_w)+((-q_x)*q_B_C_x+(-q_y)*q_B_C_y+(-q_z)*q_B_C_z+q_B_C_w*q_w)*((-q_x)*q_B_C_z+q_B_C_w*q_y+q_B_C_x*q_z+q_B_C_y*q_w)+((-q_y)*q_B_C_x+q_B_C_w*q_z+q_B_C_y*q_x+q_B_C_z*q_w)*((-q_z)*q_B_C_y+q_B_C_w*q_x+q_B_C_x*q_w+q_B_C_z*q_y)+(-(-q_y)*q_B_C_x-q_B_C_w*q_z-q_B_C_y*q_x-q_B_C_z*q_w)*(-(-q_z)*q_B_C_y-q_B_C_w*q_x-q_B_C_x*q_w-q_B_C_z*q_y))*(p_F_x-p_x)+(((-q_x)*q_B_C_x+(-q_y)*q_B_C_y+(-q_z)*q_B_C_z+q_B_C_w*q_w)*(-(-q_z)*q_B_C_y-q_B_C_w*q_x-q_B_C_x*q_w-q_B_C_z*q_y)+((-q_x)*q_B_C_x+(-q_y)*q_B_C_y+(-q_z)*q_B_C_z+q_B_C_w*q_w)*(-(-q_z)*q_B_C_y-q_B_C_w*q_x-q_B_C_x*q_w-q_B_C_z*q_y)+((-q_x)*q_B_C_z+q_B_C_w*q_y+q_B_C_x*q_z+q_B_C_y*q_w)*((-q_y)*q_B_C_x+q_B_C_w*q_z+q_B_C_y*q_x+q_B_C_z*q_w)+((-q_x)*q_B_C_z+q_B_C_w*q_y+q_B_C_x*q_z+q_B_C_y*q_w)*((-q_y)*q_B_C_x+q_B_C_w*q_z+q_B_C_y*q_x+q_B_C_z*q_w))*(p_F_y-p_y));\n\n  // Cost: Sum(i=0, ..., N-1){h_i' * Q * h_i} + h_N' * Q_N * h_N\n  // Running cost vector consists of all states and inputs.\n  h << p_x << p_y << p_z\n    << q_w << q_x << q_y << q_z\n    << v_x << v_y << v_z\n    << intSx/(intSz + epsilon) << intSy/(intSz + epsilon) \n    << T << w_x << w_y << w_z;\n\n  // End cost vector consists of all states (no inputs at last state).\n  hN << p_x << p_y << p_z\n    << q_w << q_x << q_y << q_z\n    << v_x << v_y << v_z\n    << intSx/(intSz + epsilon) << intSy/(intSz + epsilon);\n\n  // Running cost weight matrix\n  DMatrix Q(h.getDim(), h.getDim());\n  Q.setIdentity();\n  Q(0,0) = 100;   // x\n  Q(1,1) = 100;   // y\n  Q(2,2) = 100;   // z\n  Q(3,3) = 100;   // qw\n  Q(4,4) = 100;   // qx\n  Q(5,5) = 100;   // qy\n  Q(6,6) = 100;   // qz\n  Q(7,7) = 10;   // vx\n  Q(8,8) = 10;   // vy\n  Q(9,9) = 10;   // vz\n  Q(10,10) = 0;  // Cost on perception\n  Q(11,11) = 0;  // Cost on perception\n  Q(12,12) = 1;   // T\n  Q(13,13) = 1;   // wx\n  Q(14,14) = 1;   // wy\n  Q(15,15) = 1;   // wz\n\n  // End cost weight matrix\n  DMatrix QN(hN.getDim(), hN.getDim());\n  QN.setIdentity();\n  QN(0,0) = Q(0,0);   // x\n  QN(1,1) = Q(1,1);   // y\n  QN(2,2) = Q(2,2);   // z\n  QN(3,3) = Q(3,3);   // qw\n  QN(4,4) = Q(4,4);   // qx\n  QN(5,5) = Q(5,5);   // qy\n  QN(6,6) = Q(6,6);   // qz\n  QN(7,7) = Q(7,7);   // vx\n  QN(8,8) = Q(8,8);   // vy\n  QN(9,9) = Q(9,9);   // vz\n  QN(10,10) = 0;  // Cost on perception\n  QN(11,11) = 0;  // Cost on perception\n\n  // Set a reference for the analysis (if CODE_GEN is false).\n  // Reference is at x = 2.0m in hover (qw = 1).\n  DVector r(h.getDim());    // Running cost reference\n  r.setZero();\n  r(0) = 2.0;\n  r(3) = 1.0;\n  r(10) = g_z;\n\n  DVector rN(hN.getDim());   // End cost reference\n  rN.setZero();\n  rN(0) = r(0);\n  rN(3) = r(3);\n\n\n  // DEFINE AN OPTIMAL CONTROL PROBLEM:\n  // ----------------------------------\n  OCP ocp( t_start, t_end, N );\n  if(!CODE_GEN)\n  {\n    // For analysis, set references.\n    ocp.minimizeLSQ( Q, h, r );\n    ocp.minimizeLSQEndTerm( QN, hN, rN );\n  }else{\n    // For code generation, references are set during run time.\n    BMatrix Q_sparse(h.getDim(), h.getDim());\n    Q_sparse.setIdentity();\n    BMatrix QN_sparse(hN.getDim(), hN.getDim());\n    QN_sparse.setIdentity();\n    ocp.minimizeLSQ( Q_sparse, h);\n    ocp.minimizeLSQEndTerm( QN_sparse, hN );\n  }\n\n  // Add system dynamics\n  ocp.subjectTo( f );\n  // Add constraints\n  ocp.subjectTo(-w_max_xy <= w_x <= w_max_xy);\n  ocp.subjectTo(-w_max_xy <= w_y <= w_max_xy);\n  ocp.subjectTo(-w_max_yaw <= w_z <= w_max_yaw);\n  ocp.subjectTo( T_min <= T <= T_max);\n\n  ocp.setNOD(10);\n\n\n  if(!CODE_GEN)\n  {\n    // Set initial state\n    ocp.subjectTo( AT_START, p_x ==  0.0 );\n    ocp.subjectTo( AT_START, p_y ==  0.0 );\n    ocp.subjectTo( AT_START, p_z ==  0.0 );\n    ocp.subjectTo( AT_START, q_w ==  1.0 );\n    ocp.subjectTo( AT_START, q_x ==  0.0 );\n    ocp.subjectTo( AT_START, q_y ==  0.0 );\n    ocp.subjectTo( AT_START, q_z ==  0.0 );\n    ocp.subjectTo( AT_START, v_x ==  0.0 );\n    ocp.subjectTo( AT_START, v_y ==  0.0 );\n    ocp.subjectTo( AT_START, v_z ==  0.0 );\n    ocp.subjectTo( AT_START, w_x ==  0.0 );\n    ocp.subjectTo( AT_START, w_y ==  0.0 );\n    ocp.subjectTo( AT_START, w_z ==  0.0 );\n\n    // Setup some visualization\n    GnuplotWindow window1( PLOT_AT_EACH_ITERATION );\n    window1.addSubplot( p_x,\"position x\" );\n    window1.addSubplot( p_y,\"position y\" );\n    window1.addSubplot( p_z,\"position z\" );\n    window1.addSubplot( v_x,\"verlocity x\" );\n    window1.addSubplot( v_y,\"verlocity y\" );\n    window1.addSubplot( v_z,\"verlocity z\" );\n\n    GnuplotWindow window3( PLOT_AT_EACH_ITERATION );\n    window3.addSubplot( w_x,\"rotation-acc x\" );\n    window3.addSubplot( w_y,\"rotation-acc y\" );\n    window3.addSubplot( w_z,\"rotation-acc z\" ); \n    window3.addSubplot( T,\"Thrust\" );\n\n\n    // Define an algorithm to solve it.\n    OptimizationAlgorithm algorithm(ocp);\n    algorithm.set( INTEGRATOR_TOLERANCE, 1e-6 );\n    algorithm.set( KKT_TOLERANCE, 1e-3 );\n    algorithm << window1;\n    algorithm << window3;\n    algorithm.solve();\n\n  }else{\n    // For code generation, we can set some properties.\n    // The main reason for a setting is given as comment.\n    OCPexport mpc(ocp);\n\n    mpc.set(HESSIAN_APPROXIMATION,  GAUSS_NEWTON);        // is robust, stable\n    mpc.set(DISCRETIZATION_TYPE,    MULTIPLE_SHOOTING);   // good convergence\n    mpc.set(SPARSE_QP_SOLUTION,     FULL_CONDENSING_N2);  // due to qpOASES\n    mpc.set(INTEGRATOR_TYPE,        INT_IRK_GL4);         // accurate\n    mpc.set(NUM_INTEGRATOR_STEPS,   N);\n    mpc.set(QP_SOLVER,              QP_QPOASES);          // free, source code\n    mpc.set(HOTSTART_QP,            YES);\n    mpc.set(CG_USE_OPENMP,                    YES);       // paralellization\n    mpc.set(CG_HARDCODE_CONSTRAINT_VALUES,    NO);        // set on runtime\n    mpc.set(CG_USE_VARIABLE_WEIGHTING_MATRIX, YES);       // time-varying costs\n    mpc.set( USE_SINGLE_PRECISION,        YES);           // Single precision\n\n    // Do not generate tests, makes or matlab-related interfaces.\n    mpc.set( GENERATE_TEST_FILE,          NO);\n    mpc.set( GENERATE_MAKE_FILE,          NO);\n    mpc.set( GENERATE_MATLAB_INTERFACE,   NO);\n    mpc.set( GENERATE_SIMULINK_INTERFACE, NO);\n\n    // Finally, export everything.\n    if(mpc.exportCode(\"quadrotor_mpc_codegen\") != SUCCESSFUL_RETURN)\n      exit( EXIT_FAILURE );\n    mpc.printDimensionsQP( );\n  }\n\n  return EXIT_SUCCESS;\n}"
  },
  {
    "path": "model/quadrotor_mpc_codegen/acado_auxiliary_functions.c",
    "content": "/*\n *    This file was auto-generated using the ACADO Toolkit.\n *    \n *    While ACADO Toolkit is free software released under the terms of\n *    the GNU Lesser General Public License (LGPL), the generated code\n *    as such remains the property of the user who used ACADO Toolkit\n *    to generate this code. In particular, user dependent data of the code\n *    do not inherit the GNU LGPL license. On the other hand, parts of the\n *    generated code that are a direct copy of source code from the\n *    ACADO Toolkit or the software tools it is based on, remain, as derived\n *    work, automatically covered by the LGPL license.\n *    \n *    ACADO Toolkit is distributed in the hope that it will be useful,\n *    but WITHOUT ANY WARRANTY; without even the implied warranty of\n *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n *    \n */\n\n\n#include \"acado_auxiliary_functions.h\"\n\n#include <stdio.h>\n\nreal_t* acado_getVariablesX( )\n{\n\treturn acadoVariables.x;\n}\n\nreal_t* acado_getVariablesU( )\n{\n\treturn acadoVariables.u;\n}\n\n#if ACADO_NY > 0\nreal_t* acado_getVariablesY( )\n{\n\treturn acadoVariables.y;\n}\n#endif\n\n#if ACADO_NYN > 0\nreal_t* acado_getVariablesYN( )\n{\n\treturn acadoVariables.yN;\n}\n#endif\n\nreal_t* acado_getVariablesX0( )\n{\n#if ACADO_INITIAL_VALUE_FIXED\n\treturn acadoVariables.x0;\n#else\n\treturn 0;\n#endif\n}\n\n/** Print differential variables. */\nvoid acado_printDifferentialVariables( )\n{\n\tint i, j;\n\tprintf(\"\\nDifferential variables:\\n[\\n\");\n\tfor (i = 0; i < ACADO_N + 1; ++i)\n\t{\n\t\tfor (j = 0; j < ACADO_NX; ++j)\n\t\t\tprintf(\"\\t%e\", acadoVariables.x[i * ACADO_NX + j]);\n\t\tprintf(\"\\n\");\n\t}\n\tprintf(\"]\\n\\n\");\n}\n\n/** Print control variables. */\nvoid acado_printControlVariables( )\n{\n\tint i, j;\n\tprintf(\"\\nControl variables:\\n[\\n\");\n\tfor (i = 0; i < ACADO_N; ++i)\n\t{\n\t\tfor (j = 0; j < ACADO_NU; ++j)\n\t\t\tprintf(\"\\t%e\", acadoVariables.u[i * ACADO_NU + j]);\n\t\tprintf(\"\\n\");\n\t}\n\tprintf(\"]\\n\\n\");\n}\n\n/** Print ACADO code generation notice. */\nvoid acado_printHeader( )\n{\n\tprintf(\n\t\t\"\\nACADO Toolkit -- A Toolkit for Automatic Control and Dynamic Optimization.\\n\"\n\t\t\"Copyright (C) 2008-2015 by Boris Houska, Hans Joachim Ferreau,\\n\" \n\t\t\"Milan Vukov and Rien Quirynen, KU Leuven.\\n\"\n\t);\n\t\n\tprintf(\n\t\t\"Developed within the Optimization in Engineering Center (OPTEC) under\\n\"\n\t\t\"supervision of Moritz Diehl. All rights reserved.\\n\\n\"\n\t\t\"ACADO Toolkit is distributed under the terms of the GNU Lesser\\n\"\n\t\t\"General Public License 3 in the hope that it will be useful,\\n\"\n\t\t\"but WITHOUT ANY WARRANTY; without even the implied warranty of\\n\"\n\t\t\"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n\"\n\t\t\"GNU Lesser General Public License for more details.\\n\\n\"\n\t);\n}\n\n#if !(defined _DSPACE)\n#if (defined _WIN32 || defined _WIN64) && !(defined __MINGW32__ || defined __MINGW64__)\n\nvoid acado_tic( acado_timer* t )\n{\n\tQueryPerformanceFrequency(&t->freq);\n\tQueryPerformanceCounter(&t->tic);\n}\n\nreal_t acado_toc( acado_timer* t )\n{\n\tQueryPerformanceCounter(&t->toc);\n\treturn ((t->toc.QuadPart - t->tic.QuadPart) / (real_t)t->freq.QuadPart);\n}\n\n\n#elif (defined __APPLE__)\n\nvoid acado_tic( acado_timer* t )\n{\n    /* read current clock cycles */\n    t->tic = mach_absolute_time();\n}\n\nreal_t acado_toc( acado_timer* t )\n{\n\n    uint64_t duration; /* elapsed time in clock cycles*/\n    \n    t->toc = mach_absolute_time();\n    duration = t->toc - t->tic;\n    \n    /*conversion from clock cycles to nanoseconds*/\n    mach_timebase_info(&(t->tinfo));\n    duration *= t->tinfo.numer;\n    duration /= t->tinfo.denom;\n\n    return (real_t)duration / 1e9;\n}\n\n#else\n\n#if __STDC_VERSION__ >= 199901L\n/* C99 mode */\n\n/* read current time */\nvoid acado_tic( acado_timer* t )\n{\n\tgettimeofday(&t->tic, 0);\n}\n\n/* return time passed since last call to tic on this timer */\nreal_t acado_toc( acado_timer* t )\n{\n\tstruct timeval temp;\n\t\n\tgettimeofday(&t->toc, 0);\n    \n\tif ((t->toc.tv_usec - t->tic.tv_usec) < 0)\n\t{\n\t\ttemp.tv_sec = t->toc.tv_sec - t->tic.tv_sec - 1;\n\t\ttemp.tv_usec = 1000000 + t->toc.tv_usec - t->tic.tv_usec;\n\t}\n\telse\n\t{\n\t\ttemp.tv_sec = t->toc.tv_sec - t->tic.tv_sec;\n\t\ttemp.tv_usec = t->toc.tv_usec - t->tic.tv_usec;\n\t}\n\t\n\treturn (real_t)temp.tv_sec + (real_t)temp.tv_usec / 1e6;\n}\n\n#else\n/* ANSI */\n\n/* read current time */\nvoid acado_tic( acado_timer* t )\n{\n\tclock_gettime(CLOCK_MONOTONIC, &t->tic);\n}\n\n\n/* return time passed since last call to tic on this timer */\nreal_t acado_toc( acado_timer* t )\n{\n\tstruct timespec temp;\n    \n\tclock_gettime(CLOCK_MONOTONIC, &t->toc);\t\n    \n\tif ((t->toc.tv_nsec - t->tic.tv_nsec) < 0)\n\t{\n\t\ttemp.tv_sec = t->toc.tv_sec - t->tic.tv_sec - 1;\n\t\ttemp.tv_nsec = 1000000000+t->toc.tv_nsec - t->tic.tv_nsec;\n\t}\n\telse\n\t{\n\t\ttemp.tv_sec = t->toc.tv_sec - t->tic.tv_sec;\n\t\ttemp.tv_nsec = t->toc.tv_nsec - t->tic.tv_nsec;\n\t}\n\t\n\treturn (real_t)temp.tv_sec + (real_t)temp.tv_nsec / 1e9;\n}\n\n#endif /* __STDC_VERSION__ >= 199901L */\n\n#endif /* (defined _WIN32 || _WIN64) */\n\n#endif\n"
  },
  {
    "path": "model/quadrotor_mpc_codegen/acado_auxiliary_functions.h",
    "content": "/*\n *    This file was auto-generated using the ACADO Toolkit.\n *    \n *    While ACADO Toolkit is free software released under the terms of\n *    the GNU Lesser General Public License (LGPL), the generated code\n *    as such remains the property of the user who used ACADO Toolkit\n *    to generate this code. In particular, user dependent data of the code\n *    do not inherit the GNU LGPL license. On the other hand, parts of the\n *    generated code that are a direct copy of source code from the\n *    ACADO Toolkit or the software tools it is based on, remain, as derived\n *    work, automatically covered by the LGPL license.\n *    \n *    ACADO Toolkit is distributed in the hope that it will be useful,\n *    but WITHOUT ANY WARRANTY; without even the implied warranty of\n *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n *    \n */\n\n\n#ifndef ACADO_AUXILIARY_FUNCTIONS_H\n#define ACADO_AUXILIARY_FUNCTIONS_H\n\n#include \"acado_common.h\"\n\n#ifndef __MATLAB__\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n#endif /* __MATLAB__ */\n\n/** Get pointer to the matrix with differential variables. */\nreal_t* acado_getVariablesX( );\n\n/** Get pointer to the matrix with control variables. */\nreal_t* acado_getVariablesU( );\n\n#if ACADO_NY > 0\n/** Get pointer to the matrix with references/measurements. */\nreal_t* acado_getVariablesY( );\n#endif\n\n#if ACADO_NYN > 0\n/** Get pointer to the vector with references/measurement on the last node. */\nreal_t* acado_getVariablesYN( );\n#endif\n\n/** Get pointer to the current state feedback vector. Only applicable for NMPC. */\nreal_t* acado_getVariablesX0( );\n\n/** Print differential variables. */\nvoid acado_printDifferentialVariables( );\n\n/** Print control variables. */\nvoid acado_printControlVariables( );\n\n/** Print ACADO code generation notice. */\nvoid acado_printHeader( );\n\n/*\n * A huge thanks goes to Alexander Domahidi from ETHZ, Switzerland, for \n * providing us with the following timing routines.\n */\n\n#if !(defined _DSPACE)\n#if (defined _WIN32 || defined _WIN64) && !(defined __MINGW32__ || defined __MINGW64__)\n\n/* Use Windows QueryPerformanceCounter for timing. */\n#include <Windows.h>\n\n/** A structure for keeping internal timer data. */\ntypedef struct acado_timer_\n{\n\tLARGE_INTEGER tic;\n\tLARGE_INTEGER toc;\n\tLARGE_INTEGER freq;\n} acado_timer;\n\n\n#elif (defined __APPLE__)\n\n#include \"unistd.h\"\n#include <mach/mach_time.h>\n\n/** A structure for keeping internal timer data. */\ntypedef struct acado_timer_\n{\n\tuint64_t tic;\n\tuint64_t toc;\n\tmach_timebase_info_data_t tinfo;\n} acado_timer;\n\n#else\n\n/* Use POSIX clock_gettime() for timing on non-Windows machines. */\n#include <time.h>\n\n#if __STDC_VERSION__ >= 199901L\n/* C99 mode of operation. */\n\n#include <sys/stat.h>\n#include <sys/time.h>\n\ntypedef struct acado_timer_\n{\n\tstruct timeval tic;\n\tstruct timeval toc;\n} acado_timer;\n\n#else\n/* ANSI C */\n\n/** A structure for keeping internal timer data. */\ntypedef struct acado_timer_\n{\n\tstruct timespec tic;\n\tstruct timespec toc;\n} acado_timer;\n\n#endif /* __STDC_VERSION__ >= 199901L */\n\n#endif /* (defined _WIN32 || defined _WIN64) */\n\n/** A function for measurement of the current time. */\nvoid acado_tic( acado_timer* t );\n\n/** A function which returns the elapsed time. */\nreal_t acado_toc( acado_timer* t );\n\n#endif\n\n#ifndef __MATLAB__\n#ifdef __cplusplus\n} /* extern \"C\" */\n#endif /* __cplusplus */\n#endif /* __MATLAB__ */\n\n#endif /* ACADO_AUXILIARY_FUNCTIONS_H */\n"
  },
  {
    "path": "model/quadrotor_mpc_codegen/acado_common.h",
    "content": "/*\n *    This file was auto-generated using the ACADO Toolkit.\n *    \n *    While ACADO Toolkit is free software released under the terms of\n *    the GNU Lesser General Public License (LGPL), the generated code\n *    as such remains the property of the user who used ACADO Toolkit\n *    to generate this code. In particular, user dependent data of the code\n *    do not inherit the GNU LGPL license. On the other hand, parts of the\n *    generated code that are a direct copy of source code from the\n *    ACADO Toolkit or the software tools it is based on, remain, as derived\n *    work, automatically covered by the LGPL license.\n *    \n *    ACADO Toolkit is distributed in the hope that it will be useful,\n *    but WITHOUT ANY WARRANTY; without even the implied warranty of\n *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n *    \n */\n\n\n#ifndef ACADO_COMMON_H\n#define ACADO_COMMON_H\n\n#include <math.h>\n#include <string.h>\n\n#ifndef __MATLAB__\n#ifdef __cplusplus\nextern \"C\"\n{\n#endif /* __cplusplus */\n#endif /* __MATLAB__ */\n\n/** \\defgroup ACADO ACADO CGT generated module. */\n/** @{ */\n\n/** qpOASES QP solver indicator. */\n#define ACADO_QPOASES  0\n#define ACADO_QPOASES3 1\n/** FORCES QP solver indicator.*/\n#define ACADO_FORCES   2\n/** qpDUNES QP solver indicator.*/\n#define ACADO_QPDUNES  3\n/** HPMPC QP solver indicator. */\n#define ACADO_HPMPC    4\n#define ACADO_GENERIC    5\n\n/** Indicator for determining the QP solver used by the ACADO solver code. */\n#define ACADO_QP_SOLVER ACADO_QPOASES\n\n#include \"acado_qpoases_interface.hpp\"\n\n\n/*\n * Common definitions\n */\n/** User defined block based condensing. */\n#define ACADO_BLOCK_CONDENSING 0\n/** Compute covariance matrix of the last state estimate. */\n#define ACADO_COMPUTE_COVARIANCE_MATRIX 0\n/** Flag indicating whether constraint values are hard-coded or not. */\n#define ACADO_HARDCODED_CONSTRAINT_VALUES 0\n/** Indicator for fixed initial state. */\n#define ACADO_INITIAL_STATE_FIXED 1\n/** Number of control/estimation intervals. */\n#define ACADO_N 20\n/** Number of online data values. */\n#define ACADO_NOD 10\n/** Number of path constraints. */\n#define ACADO_NPAC 0\n/** Number of control variables. */\n#define ACADO_NU 4\n/** Number of differential variables. */\n#define ACADO_NX 10\n/** Number of algebraic variables. */\n#define ACADO_NXA 0\n/** Number of differential derivative variables. */\n#define ACADO_NXD 0\n/** Number of references/measurements per node on the first N nodes. */\n#define ACADO_NY 16\n/** Number of references/measurements on the last (N + 1)st node. */\n#define ACADO_NYN 12\n/** Total number of QP optimization variables. */\n#define ACADO_QP_NV 80\n/** Number of integration steps per shooting interval. */\n#define ACADO_RK_NIS 1\n/** Number of Runge-Kutta stages per integration step. */\n#define ACADO_RK_NSTAGES 2\n/** Providing interface for arrival cost. */\n#define ACADO_USE_ARRIVAL_COST 0\n/** Indicator for usage of non-hard-coded linear terms in the objective. */\n#define ACADO_USE_LINEAR_TERMS 0\n/** Indicator for type of fixed weighting matrices. */\n#define ACADO_WEIGHTING_MATRICES_TYPE 2\n\n\n/*\n * Globally used structure definitions\n */\n\n/** The structure containing the user data.\n * \n *  Via this structure the user \"communicates\" with the solver code.\n */\ntypedef struct ACADOvariables_\n{\nint dummy;\n/** Matrix of size: 21 x 10 (row major format)\n * \n *  Matrix containing 21 differential variable vectors.\n */\nreal_t x[ 210 ];\n\n/** Matrix of size: 20 x 4 (row major format)\n * \n *  Matrix containing 20 control variable vectors.\n */\nreal_t u[ 80 ];\n\n/** Matrix of size: 21 x 10 (row major format)\n * \n *  Matrix containing 21 online data vectors.\n */\nreal_t od[ 210 ];\n\n/** Column vector of size: 320\n * \n *  Matrix containing 20 reference/measurement vectors of size 16 for first 20 nodes.\n */\nreal_t y[ 320 ];\n\n/** Column vector of size: 12\n * \n *  Reference/measurement vector for the 21. node.\n */\nreal_t yN[ 12 ];\n\n/** Matrix of size: 320 x 16 (row major format) */\nreal_t W[ 5120 ];\n\n/** Matrix of size: 12 x 12 (row major format) */\nreal_t WN[ 144 ];\n\n/** Column vector of size: 10\n * \n *  Current state feedback vector.\n */\nreal_t x0[ 10 ];\n\n/** Column vector of size: 80\n * \n *  Lower bounds values.\n */\nreal_t lbValues[ 80 ];\n\n/** Column vector of size: 80\n * \n *  Upper bounds values.\n */\nreal_t ubValues[ 80 ];\n\n\n} ACADOvariables;\n\n/** Private workspace used by the auto-generated code.\n * \n *  Data members of this structure are private to the solver.\n *  In other words, the user code should not modify values of this \n *  structure. \n */\ntypedef struct ACADOworkspace_\n{\n/** Column vector of size: 200 */\nreal_t d[ 200 ];\n\n/** Column vector of size: 320 */\nreal_t Dy[ 320 ];\n\n/** Column vector of size: 12 */\nreal_t DyN[ 12 ];\n\n/** Matrix of size: 200 x 10 (row major format) */\nreal_t evGx[ 2000 ];\n\n/** Matrix of size: 200 x 4 (row major format) */\nreal_t evGu[ 800 ];\n\n/** Column vector of size: 35 */\nreal_t objAuxVar[ 35 ];\n\n/** Row vector of size: 24 */\nreal_t objValueIn[ 24 ];\n\n/** Row vector of size: 176 */\nreal_t objValueOut[ 176 ];\n\n/** Matrix of size: 200 x 10 (row major format) */\nreal_t Q1[ 2000 ];\n\n/** Matrix of size: 200 x 16 (row major format) */\nreal_t Q2[ 3200 ];\n\n/** Matrix of size: 80 x 4 (row major format) */\nreal_t R1[ 320 ];\n\n/** Matrix of size: 80 x 16 (row major format) */\nreal_t R2[ 1280 ];\n\n/** Matrix of size: 10 x 10 (row major format) */\nreal_t QN1[ 100 ];\n\n/** Matrix of size: 10 x 12 (row major format) */\nreal_t QN2[ 120 ];\n\n/** Column vector of size: 210 */\nreal_t sbar[ 210 ];\n\n/** Column vector of size: 10 */\nreal_t Dx0[ 10 ];\n\n/** Matrix of size: 10 x 4 (row major format) */\nreal_t W1[ 40 ];\n\n/** Matrix of size: 10 x 4 (row major format) */\nreal_t W2[ 40 ];\n\n/** Matrix of size: 2100 x 4 (row major format) */\nreal_t E[ 8400 ];\n\n/** Column vector of size: 210 */\nreal_t QDy[ 210 ];\n\n/** Column vector of size: 10 */\nreal_t w1[ 10 ];\n\n/** Column vector of size: 10 */\nreal_t w2[ 10 ];\n\n/** Matrix of size: 80 x 80 (row major format) */\nreal_t H[ 6400 ];\n\n/** Column vector of size: 80 */\nreal_t g[ 80 ];\n\n/** Column vector of size: 80 */\nreal_t lb[ 80 ];\n\n/** Column vector of size: 80 */\nreal_t ub[ 80 ];\n\n/** Column vector of size: 80 */\nreal_t x[ 80 ];\n\n/** Column vector of size: 80 */\nreal_t y[ 80 ];\n\n\n} ACADOworkspace;\n\n/* \n * Forward function declarations. \n */\n\n\n/** Performs the integration and sensitivity propagation for one shooting interval.\n *\n *  \\param rk_eta Working array of size 24 to pass the input values and return the results.\n *  \\param resetIntegrator The internal memory of the integrator can be reset.\n *\n *  \\return Status code of the integrator.\n */\nint acado_integrate( real_t* const rk_eta, int resetIntegrator );\n\n/** Export of an ACADO symbolic function.\n *\n *  \\param in Input to the exported function.\n *  \\param out Output of the exported function.\n */\nvoid acado_rhs(const real_t* in, real_t* out);\n\n/** Export of an ACADO symbolic function.\n *\n *  \\param in Input to the exported function.\n *  \\param out Output of the exported function.\n */\nvoid acado_diffs(const real_t* in, real_t* out);\n\n/** Preparation step of the RTI scheme.\n *\n *  \\return Status of the integration module. =0: OK, otherwise the error code.\n */\nint acado_preparationStep(  );\n\n/** Feedback/estimation step of the RTI scheme.\n *\n *  \\return Status code of the qpOASES QP solver.\n */\nint acado_feedbackStep(  );\n\n/** Solver initialization. Must be called once before any other function call.\n *\n *  \\return =0: OK, otherwise an error code of a QP solver.\n */\nint acado_initializeSolver(  );\n\n/** Initialize shooting nodes by a forward simulation starting from the first node.\n */\nvoid acado_initializeNodesByForwardSimulation(  );\n\n/** Shift differential variables vector by one interval.\n *\n *  \\param strategy Shifting strategy: 1. Initialize node 21 with xEnd. 2. Initialize node 21 by forward simulation.\n *  \\param xEnd Value for the x vector on the last node. If =0 the old value is used.\n *  \\param uEnd Value for the u vector on the second to last node. If =0 the old value is used.\n */\nvoid acado_shiftStates( int strategy, real_t* const xEnd, real_t* const uEnd );\n\n/** Shift controls vector by one interval.\n *\n *  \\param uEnd Value for the u vector on the second to last node. If =0 the old value is used.\n */\nvoid acado_shiftControls( real_t* const uEnd );\n\n/** Get the KKT tolerance of the current iterate.\n *\n *  \\return The KKT tolerance value.\n */\nreal_t acado_getKKT(  );\n\n/** Calculate the objective value.\n *\n *  \\return Value of the objective function.\n */\nreal_t acado_getObjective(  );\n\n\n/* \n * Extern declarations. \n */\n\nextern ACADOworkspace acadoWorkspace;\nextern ACADOvariables acadoVariables;\n\n/** @} */\n\n#ifndef __MATLAB__\n#ifdef __cplusplus\n} /* extern \"C\" */\n#endif /* __cplusplus */\n#endif /* __MATLAB__ */\n\n#endif /* ACADO_COMMON_H */\n"
  },
  {
    "path": "model/quadrotor_mpc_codegen/acado_integrator.c",
    "content": "/*\n *    This file was auto-generated using the ACADO Toolkit.\n *    \n *    While ACADO Toolkit is free software released under the terms of\n *    the GNU Lesser General Public License (LGPL), the generated code\n *    as such remains the property of the user who used ACADO Toolkit\n *    to generate this code. In particular, user dependent data of the code\n *    do not inherit the GNU LGPL license. On the other hand, parts of the\n *    generated code that are a direct copy of source code from the\n *    ACADO Toolkit or the software tools it is based on, remain, as derived\n *    work, automatically covered by the LGPL license.\n *    \n *    ACADO Toolkit is distributed in the hope that it will be useful,\n *    but WITHOUT ANY WARRANTY; without even the implied warranty of\n *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n *    \n */\n\n\n#include \"acado_common.h\"\n\n\nreal_t rk_dim20_swap;\n\n/** Column vector of size: 20 */\nreal_t rk_dim20_bPerm[ 20 ];\n\nreal_t rk_ttt;\n\n/** Row vector of size: 24 */\nreal_t rk_xxx[ 24 ];\n\n/** Matrix of size: 10 x 2 (row major format) */\nreal_t rk_kkk[ 20 ];\n\n/** Matrix of size: 20 x 20 (row major format) */\nreal_t rk_A[ 400 ];\n\n/** Column vector of size: 20 */\nreal_t rk_b[ 20 ];\n\n/** Row vector of size: 20 */\nint rk_dim20_perm[ 20 ];\n\n/** Column vector of size: 10 */\nreal_t rk_rhsTemp[ 10 ];\n\n/** Matrix of size: 2 x 140 (row major format) */\nreal_t rk_diffsTemp2[ 280 ];\n\n/** Matrix of size: 10 x 2 (row major format) */\nreal_t rk_diffK[ 20 ];\n\n/** Matrix of size: 10 x 14 (row major format) */\nreal_t rk_diffsNew2[ 140 ];\n\n#pragma omp threadprivate( auxVar, rk_ttt, rk_xxx, rk_kkk, rk_diffK, rk_rhsTemp, rk_dim20_perm, rk_A, rk_b, rk_diffsNew2, rk_diffsTemp2, rk_dim20_swap, rk_dim20_bPerm )\n\nvoid acado_rhs(const real_t* in, real_t* out)\n{\nconst real_t* xd = in;\nconst real_t* u = in + 10;\n\n/* Compute outputs: */\nout[0] = xd[7];\nout[1] = xd[8];\nout[2] = xd[9];\nout[3] = ((real_t)(5.0000000000000000e-01)*(((((real_t)(0.0000000000000000e+00)-u[1])*xd[4])-(u[2]*xd[5]))-(u[3]*xd[6])));\nout[4] = ((real_t)(5.0000000000000000e-01)*(((u[1]*xd[3])+(u[3]*xd[5]))-(u[2]*xd[6])));\nout[5] = ((real_t)(5.0000000000000000e-01)*(((u[2]*xd[3])-(u[3]*xd[4]))+(u[1]*xd[6])));\nout[6] = ((real_t)(5.0000000000000000e-01)*(((u[3]*xd[3])+(u[2]*xd[4]))-(u[1]*xd[5])));\nout[7] = (((real_t)(2.0000000000000000e+00)*((xd[3]*xd[5])+(xd[4]*xd[6])))*u[0]);\nout[8] = (((real_t)(2.0000000000000000e+00)*((xd[5]*xd[6])-(xd[3]*xd[4])))*u[0]);\nout[9] = (((((real_t)(1.0000000000000000e+00)-(((real_t)(2.0000000000000000e+00)*xd[4])*xd[4]))-(((real_t)(2.0000000000000000e+00)*xd[5])*xd[5]))*u[0])-(real_t)(9.8065999999999995e+00));\n}\n\n\n\nvoid acado_diffs(const real_t* in, real_t* out)\n{\nconst real_t* xd = in;\nconst real_t* u = in + 10;\n\n/* Compute outputs: */\nout[0] = (real_t)(0.0000000000000000e+00);\nout[1] = (real_t)(0.0000000000000000e+00);\nout[2] = (real_t)(0.0000000000000000e+00);\nout[3] = (real_t)(0.0000000000000000e+00);\nout[4] = (real_t)(0.0000000000000000e+00);\nout[5] = (real_t)(0.0000000000000000e+00);\nout[6] = (real_t)(0.0000000000000000e+00);\nout[7] = (real_t)(1.0000000000000000e+00);\nout[8] = (real_t)(0.0000000000000000e+00);\nout[9] = (real_t)(0.0000000000000000e+00);\nout[10] = (real_t)(0.0000000000000000e+00);\nout[11] = (real_t)(0.0000000000000000e+00);\nout[12] = (real_t)(0.0000000000000000e+00);\nout[13] = (real_t)(0.0000000000000000e+00);\nout[14] = (real_t)(0.0000000000000000e+00);\nout[15] = (real_t)(0.0000000000000000e+00);\nout[16] = (real_t)(0.0000000000000000e+00);\nout[17] = (real_t)(0.0000000000000000e+00);\nout[18] = (real_t)(0.0000000000000000e+00);\nout[19] = (real_t)(0.0000000000000000e+00);\nout[20] = (real_t)(0.0000000000000000e+00);\nout[21] = (real_t)(0.0000000000000000e+00);\nout[22] = (real_t)(1.0000000000000000e+00);\nout[23] = (real_t)(0.0000000000000000e+00);\nout[24] = (real_t)(0.0000000000000000e+00);\nout[25] = (real_t)(0.0000000000000000e+00);\nout[26] = (real_t)(0.0000000000000000e+00);\nout[27] = (real_t)(0.0000000000000000e+00);\nout[28] = (real_t)(0.0000000000000000e+00);\nout[29] = (real_t)(0.0000000000000000e+00);\nout[30] = (real_t)(0.0000000000000000e+00);\nout[31] = (real_t)(0.0000000000000000e+00);\nout[32] = (real_t)(0.0000000000000000e+00);\nout[33] = (real_t)(0.0000000000000000e+00);\nout[34] = (real_t)(0.0000000000000000e+00);\nout[35] = (real_t)(0.0000000000000000e+00);\nout[36] = (real_t)(0.0000000000000000e+00);\nout[37] = (real_t)(1.0000000000000000e+00);\nout[38] = (real_t)(0.0000000000000000e+00);\nout[39] = (real_t)(0.0000000000000000e+00);\nout[40] = (real_t)(0.0000000000000000e+00);\nout[41] = (real_t)(0.0000000000000000e+00);\nout[42] = (real_t)(0.0000000000000000e+00);\nout[43] = (real_t)(0.0000000000000000e+00);\nout[44] = (real_t)(0.0000000000000000e+00);\nout[45] = (real_t)(0.0000000000000000e+00);\nout[46] = ((real_t)(5.0000000000000000e-01)*((real_t)(0.0000000000000000e+00)-u[1]));\nout[47] = ((real_t)(5.0000000000000000e-01)*((real_t)(0.0000000000000000e+00)-u[2]));\nout[48] = ((real_t)(5.0000000000000000e-01)*((real_t)(0.0000000000000000e+00)-u[3]));\nout[49] = (real_t)(0.0000000000000000e+00);\nout[50] = (real_t)(0.0000000000000000e+00);\nout[51] = (real_t)(0.0000000000000000e+00);\nout[52] = (real_t)(0.0000000000000000e+00);\nout[53] = ((real_t)(5.0000000000000000e-01)*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*xd[4]));\nout[54] = ((real_t)(5.0000000000000000e-01)*((real_t)(0.0000000000000000e+00)-xd[5]));\nout[55] = ((real_t)(5.0000000000000000e-01)*((real_t)(0.0000000000000000e+00)-xd[6]));\nout[56] = (real_t)(0.0000000000000000e+00);\nout[57] = (real_t)(0.0000000000000000e+00);\nout[58] = (real_t)(0.0000000000000000e+00);\nout[59] = ((real_t)(5.0000000000000000e-01)*u[1]);\nout[60] = (real_t)(0.0000000000000000e+00);\nout[61] = ((real_t)(5.0000000000000000e-01)*u[3]);\nout[62] = ((real_t)(5.0000000000000000e-01)*((real_t)(0.0000000000000000e+00)-u[2]));\nout[63] = (real_t)(0.0000000000000000e+00);\nout[64] = (real_t)(0.0000000000000000e+00);\nout[65] = (real_t)(0.0000000000000000e+00);\nout[66] = (real_t)(0.0000000000000000e+00);\nout[67] = ((real_t)(5.0000000000000000e-01)*xd[3]);\nout[68] = ((real_t)(5.0000000000000000e-01)*((real_t)(0.0000000000000000e+00)-xd[6]));\nout[69] = ((real_t)(5.0000000000000000e-01)*xd[5]);\nout[70] = (real_t)(0.0000000000000000e+00);\nout[71] = (real_t)(0.0000000000000000e+00);\nout[72] = (real_t)(0.0000000000000000e+00);\nout[73] = ((real_t)(5.0000000000000000e-01)*u[2]);\nout[74] = ((real_t)(5.0000000000000000e-01)*((real_t)(0.0000000000000000e+00)-u[3]));\nout[75] = (real_t)(0.0000000000000000e+00);\nout[76] = ((real_t)(5.0000000000000000e-01)*u[1]);\nout[77] = (real_t)(0.0000000000000000e+00);\nout[78] = (real_t)(0.0000000000000000e+00);\nout[79] = (real_t)(0.0000000000000000e+00);\nout[80] = (real_t)(0.0000000000000000e+00);\nout[81] = ((real_t)(5.0000000000000000e-01)*xd[6]);\nout[82] = ((real_t)(5.0000000000000000e-01)*xd[3]);\nout[83] = ((real_t)(5.0000000000000000e-01)*((real_t)(0.0000000000000000e+00)-xd[4]));\nout[84] = (real_t)(0.0000000000000000e+00);\nout[85] = (real_t)(0.0000000000000000e+00);\nout[86] = (real_t)(0.0000000000000000e+00);\nout[87] = ((real_t)(5.0000000000000000e-01)*u[3]);\nout[88] = ((real_t)(5.0000000000000000e-01)*u[2]);\nout[89] = ((real_t)(5.0000000000000000e-01)*((real_t)(0.0000000000000000e+00)-u[1]));\nout[90] = (real_t)(0.0000000000000000e+00);\nout[91] = (real_t)(0.0000000000000000e+00);\nout[92] = (real_t)(0.0000000000000000e+00);\nout[93] = (real_t)(0.0000000000000000e+00);\nout[94] = (real_t)(0.0000000000000000e+00);\nout[95] = ((real_t)(5.0000000000000000e-01)*((real_t)(0.0000000000000000e+00)-xd[5]));\nout[96] = ((real_t)(5.0000000000000000e-01)*xd[4]);\nout[97] = ((real_t)(5.0000000000000000e-01)*xd[3]);\nout[98] = (real_t)(0.0000000000000000e+00);\nout[99] = (real_t)(0.0000000000000000e+00);\nout[100] = (real_t)(0.0000000000000000e+00);\nout[101] = (((real_t)(2.0000000000000000e+00)*xd[5])*u[0]);\nout[102] = (((real_t)(2.0000000000000000e+00)*xd[6])*u[0]);\nout[103] = (((real_t)(2.0000000000000000e+00)*xd[3])*u[0]);\nout[104] = (((real_t)(2.0000000000000000e+00)*xd[4])*u[0]);\nout[105] = (real_t)(0.0000000000000000e+00);\nout[106] = (real_t)(0.0000000000000000e+00);\nout[107] = (real_t)(0.0000000000000000e+00);\nout[108] = ((real_t)(2.0000000000000000e+00)*((xd[3]*xd[5])+(xd[4]*xd[6])));\nout[109] = (real_t)(0.0000000000000000e+00);\nout[110] = (real_t)(0.0000000000000000e+00);\nout[111] = (real_t)(0.0000000000000000e+00);\nout[112] = (real_t)(0.0000000000000000e+00);\nout[113] = (real_t)(0.0000000000000000e+00);\nout[114] = (real_t)(0.0000000000000000e+00);\nout[115] = (((real_t)(2.0000000000000000e+00)*((real_t)(0.0000000000000000e+00)-xd[4]))*u[0]);\nout[116] = (((real_t)(2.0000000000000000e+00)*((real_t)(0.0000000000000000e+00)-xd[3]))*u[0]);\nout[117] = (((real_t)(2.0000000000000000e+00)*xd[6])*u[0]);\nout[118] = (((real_t)(2.0000000000000000e+00)*xd[5])*u[0]);\nout[119] = (real_t)(0.0000000000000000e+00);\nout[120] = (real_t)(0.0000000000000000e+00);\nout[121] = (real_t)(0.0000000000000000e+00);\nout[122] = ((real_t)(2.0000000000000000e+00)*((xd[5]*xd[6])-(xd[3]*xd[4])));\nout[123] = (real_t)(0.0000000000000000e+00);\nout[124] = (real_t)(0.0000000000000000e+00);\nout[125] = (real_t)(0.0000000000000000e+00);\nout[126] = (real_t)(0.0000000000000000e+00);\nout[127] = (real_t)(0.0000000000000000e+00);\nout[128] = (real_t)(0.0000000000000000e+00);\nout[129] = (real_t)(0.0000000000000000e+00);\nout[130] = (((real_t)(0.0000000000000000e+00)-(((real_t)(2.0000000000000000e+00)*xd[4])+((real_t)(2.0000000000000000e+00)*xd[4])))*u[0]);\nout[131] = (((real_t)(0.0000000000000000e+00)-(((real_t)(2.0000000000000000e+00)*xd[5])+((real_t)(2.0000000000000000e+00)*xd[5])))*u[0]);\nout[132] = (real_t)(0.0000000000000000e+00);\nout[133] = (real_t)(0.0000000000000000e+00);\nout[134] = (real_t)(0.0000000000000000e+00);\nout[135] = (real_t)(0.0000000000000000e+00);\nout[136] = (((real_t)(1.0000000000000000e+00)-(((real_t)(2.0000000000000000e+00)*xd[4])*xd[4]))-(((real_t)(2.0000000000000000e+00)*xd[5])*xd[5]));\nout[137] = (real_t)(0.0000000000000000e+00);\nout[138] = (real_t)(0.0000000000000000e+00);\nout[139] = (real_t)(0.0000000000000000e+00);\n}\n\n\n\nvoid acado_solve_dim20_triangular( real_t* const A, real_t* const b )\n{\n\nb[19] = b[19]/A[399];\nb[18] -= + A[379]*b[19];\nb[18] = b[18]/A[378];\nb[17] -= + A[359]*b[19];\nb[17] -= + A[358]*b[18];\nb[17] = b[17]/A[357];\nb[16] -= + A[339]*b[19];\nb[16] -= + A[338]*b[18];\nb[16] -= + A[337]*b[17];\nb[16] = b[16]/A[336];\nb[15] -= + A[319]*b[19];\nb[15] -= + A[318]*b[18];\nb[15] -= + A[317]*b[17];\nb[15] -= + A[316]*b[16];\nb[15] = b[15]/A[315];\nb[14] -= + A[299]*b[19];\nb[14] -= + A[298]*b[18];\nb[14] -= + A[297]*b[17];\nb[14] -= + A[296]*b[16];\nb[14] -= + A[295]*b[15];\nb[14] = b[14]/A[294];\nb[13] -= + A[279]*b[19];\nb[13] -= + A[278]*b[18];\nb[13] -= + A[277]*b[17];\nb[13] -= + A[276]*b[16];\nb[13] -= + A[275]*b[15];\nb[13] -= + A[274]*b[14];\nb[13] = b[13]/A[273];\nb[12] -= + A[259]*b[19];\nb[12] -= + A[258]*b[18];\nb[12] -= + A[257]*b[17];\nb[12] -= + A[256]*b[16];\nb[12] -= + A[255]*b[15];\nb[12] -= + A[254]*b[14];\nb[12] -= + A[253]*b[13];\nb[12] = b[12]/A[252];\nb[11] -= + A[239]*b[19];\nb[11] -= + A[238]*b[18];\nb[11] -= + A[237]*b[17];\nb[11] -= + A[236]*b[16];\nb[11] -= + A[235]*b[15];\nb[11] -= + A[234]*b[14];\nb[11] -= + A[233]*b[13];\nb[11] -= + A[232]*b[12];\nb[11] = b[11]/A[231];\nb[10] -= + A[219]*b[19];\nb[10] -= + A[218]*b[18];\nb[10] -= + A[217]*b[17];\nb[10] -= + A[216]*b[16];\nb[10] -= + A[215]*b[15];\nb[10] -= + A[214]*b[14];\nb[10] -= + A[213]*b[13];\nb[10] -= + A[212]*b[12];\nb[10] -= + A[211]*b[11];\nb[10] = b[10]/A[210];\nb[9] -= + A[199]*b[19];\nb[9] -= + A[198]*b[18];\nb[9] -= + A[197]*b[17];\nb[9] -= + A[196]*b[16];\nb[9] -= + A[195]*b[15];\nb[9] -= + A[194]*b[14];\nb[9] -= + A[193]*b[13];\nb[9] -= + A[192]*b[12];\nb[9] -= + A[191]*b[11];\nb[9] -= + A[190]*b[10];\nb[9] = b[9]/A[189];\nb[8] -= + A[179]*b[19];\nb[8] -= + A[178]*b[18];\nb[8] -= + A[177]*b[17];\nb[8] -= + A[176]*b[16];\nb[8] -= + A[175]*b[15];\nb[8] -= + A[174]*b[14];\nb[8] -= + A[173]*b[13];\nb[8] -= + A[172]*b[12];\nb[8] -= + A[171]*b[11];\nb[8] -= + A[170]*b[10];\nb[8] -= + A[169]*b[9];\nb[8] = b[8]/A[168];\nb[7] -= + A[159]*b[19];\nb[7] -= + A[158]*b[18];\nb[7] -= + A[157]*b[17];\nb[7] -= + A[156]*b[16];\nb[7] -= + A[155]*b[15];\nb[7] -= + A[154]*b[14];\nb[7] -= + A[153]*b[13];\nb[7] -= + A[152]*b[12];\nb[7] -= + A[151]*b[11];\nb[7] -= + A[150]*b[10];\nb[7] -= + A[149]*b[9];\nb[7] -= + A[148]*b[8];\nb[7] = b[7]/A[147];\nb[6] -= + A[139]*b[19];\nb[6] -= + A[138]*b[18];\nb[6] -= + A[137]*b[17];\nb[6] -= + A[136]*b[16];\nb[6] -= + A[135]*b[15];\nb[6] -= + A[134]*b[14];\nb[6] -= + A[133]*b[13];\nb[6] -= + A[132]*b[12];\nb[6] -= + A[131]*b[11];\nb[6] -= + A[130]*b[10];\nb[6] -= + A[129]*b[9];\nb[6] -= + A[128]*b[8];\nb[6] -= + A[127]*b[7];\nb[6] = b[6]/A[126];\nb[5] -= + A[119]*b[19];\nb[5] -= + A[118]*b[18];\nb[5] -= + A[117]*b[17];\nb[5] -= + A[116]*b[16];\nb[5] -= + A[115]*b[15];\nb[5] -= + A[114]*b[14];\nb[5] -= + A[113]*b[13];\nb[5] -= + A[112]*b[12];\nb[5] -= + A[111]*b[11];\nb[5] -= + A[110]*b[10];\nb[5] -= + A[109]*b[9];\nb[5] -= + A[108]*b[8];\nb[5] -= + A[107]*b[7];\nb[5] -= + A[106]*b[6];\nb[5] = b[5]/A[105];\nb[4] -= + A[99]*b[19];\nb[4] -= + A[98]*b[18];\nb[4] -= + A[97]*b[17];\nb[4] -= + A[96]*b[16];\nb[4] -= + A[95]*b[15];\nb[4] -= + A[94]*b[14];\nb[4] -= + A[93]*b[13];\nb[4] -= + A[92]*b[12];\nb[4] -= + A[91]*b[11];\nb[4] -= + A[90]*b[10];\nb[4] -= + A[89]*b[9];\nb[4] -= + A[88]*b[8];\nb[4] -= + A[87]*b[7];\nb[4] -= + A[86]*b[6];\nb[4] -= + A[85]*b[5];\nb[4] = b[4]/A[84];\nb[3] -= + A[79]*b[19];\nb[3] -= + A[78]*b[18];\nb[3] -= + A[77]*b[17];\nb[3] -= + A[76]*b[16];\nb[3] -= + A[75]*b[15];\nb[3] -= + A[74]*b[14];\nb[3] -= + A[73]*b[13];\nb[3] -= + A[72]*b[12];\nb[3] -= + A[71]*b[11];\nb[3] -= + A[70]*b[10];\nb[3] -= + A[69]*b[9];\nb[3] -= + A[68]*b[8];\nb[3] -= + A[67]*b[7];\nb[3] -= + A[66]*b[6];\nb[3] -= + A[65]*b[5];\nb[3] -= + A[64]*b[4];\nb[3] = b[3]/A[63];\nb[2] -= + A[59]*b[19];\nb[2] -= + A[58]*b[18];\nb[2] -= + A[57]*b[17];\nb[2] -= + A[56]*b[16];\nb[2] -= + A[55]*b[15];\nb[2] -= + A[54]*b[14];\nb[2] -= + A[53]*b[13];\nb[2] -= + A[52]*b[12];\nb[2] -= + A[51]*b[11];\nb[2] -= + A[50]*b[10];\nb[2] -= + A[49]*b[9];\nb[2] -= + A[48]*b[8];\nb[2] -= + A[47]*b[7];\nb[2] -= + A[46]*b[6];\nb[2] -= + A[45]*b[5];\nb[2] -= + A[44]*b[4];\nb[2] -= + A[43]*b[3];\nb[2] = b[2]/A[42];\nb[1] -= + A[39]*b[19];\nb[1] -= + A[38]*b[18];\nb[1] -= + A[37]*b[17];\nb[1] -= + A[36]*b[16];\nb[1] -= + A[35]*b[15];\nb[1] -= + A[34]*b[14];\nb[1] -= + A[33]*b[13];\nb[1] -= + A[32]*b[12];\nb[1] -= + A[31]*b[11];\nb[1] -= + A[30]*b[10];\nb[1] -= + A[29]*b[9];\nb[1] -= + A[28]*b[8];\nb[1] -= + A[27]*b[7];\nb[1] -= + A[26]*b[6];\nb[1] -= + A[25]*b[5];\nb[1] -= + A[24]*b[4];\nb[1] -= + A[23]*b[3];\nb[1] -= + A[22]*b[2];\nb[1] = b[1]/A[21];\nb[0] -= + A[19]*b[19];\nb[0] -= + A[18]*b[18];\nb[0] -= + A[17]*b[17];\nb[0] -= + A[16]*b[16];\nb[0] -= + A[15]*b[15];\nb[0] -= + A[14]*b[14];\nb[0] -= + A[13]*b[13];\nb[0] -= + A[12]*b[12];\nb[0] -= + A[11]*b[11];\nb[0] -= + A[10]*b[10];\nb[0] -= + A[9]*b[9];\nb[0] -= + A[8]*b[8];\nb[0] -= + A[7]*b[7];\nb[0] -= + A[6]*b[6];\nb[0] -= + A[5]*b[5];\nb[0] -= + A[4]*b[4];\nb[0] -= + A[3]*b[3];\nb[0] -= + A[2]*b[2];\nb[0] -= + A[1]*b[1];\nb[0] = b[0]/A[0];\n}\n\nreal_t acado_solve_dim20_system( real_t* const A, real_t* const b, int* const rk_perm )\n{\nreal_t det;\n\nint i;\nint j;\nint k;\n\nint indexMax;\n\nint intSwap;\n\nreal_t valueMax;\n\nreal_t temp;\n\nfor (i = 0; i < 20; ++i)\n{\nrk_perm[i] = i;\n}\ndet = 1.0000000000000000e+00;\nfor( i=0; i < (19); i++ ) {\n\tindexMax = i;\n\tvalueMax = fabs(A[i*20+i]);\n\tfor( j=(i+1); j < 20; j++ ) {\n\t\ttemp = fabs(A[j*20+i]);\n\t\tif( temp > valueMax ) {\n\t\t\tindexMax = j;\n\t\t\tvalueMax = temp;\n\t\t}\n\t}\n\tif( indexMax > i ) {\nfor (k = 0; k < 20; ++k)\n{\n\trk_dim20_swap = A[i*20+k];\n\tA[i*20+k] = A[indexMax*20+k];\n\tA[indexMax*20+k] = rk_dim20_swap;\n}\n\trk_dim20_swap = b[i];\n\tb[i] = b[indexMax];\n\tb[indexMax] = rk_dim20_swap;\n\tintSwap = rk_perm[i];\n\trk_perm[i] = rk_perm[indexMax];\n\trk_perm[indexMax] = intSwap;\n\t}\n\tdet *= A[i*20+i];\n\tfor( j=i+1; j < 20; j++ ) {\n\t\tA[j*20+i] = -A[j*20+i]/A[i*20+i];\n\t\tfor( k=i+1; k < 20; k++ ) {\n\t\t\tA[j*20+k] += A[j*20+i] * A[i*20+k];\n\t\t}\n\t\tb[j] += A[j*20+i] * b[i];\n\t}\n}\ndet *= A[399];\ndet = fabs(det);\nacado_solve_dim20_triangular( A, b );\nreturn det;\n}\n\nvoid acado_solve_dim20_system_reuse( real_t* const A, real_t* const b, int* const rk_perm )\n{\n\nrk_dim20_bPerm[0] = b[rk_perm[0]];\nrk_dim20_bPerm[1] = b[rk_perm[1]];\nrk_dim20_bPerm[2] = b[rk_perm[2]];\nrk_dim20_bPerm[3] = b[rk_perm[3]];\nrk_dim20_bPerm[4] = b[rk_perm[4]];\nrk_dim20_bPerm[5] = b[rk_perm[5]];\nrk_dim20_bPerm[6] = b[rk_perm[6]];\nrk_dim20_bPerm[7] = b[rk_perm[7]];\nrk_dim20_bPerm[8] = b[rk_perm[8]];\nrk_dim20_bPerm[9] = b[rk_perm[9]];\nrk_dim20_bPerm[10] = b[rk_perm[10]];\nrk_dim20_bPerm[11] = b[rk_perm[11]];\nrk_dim20_bPerm[12] = b[rk_perm[12]];\nrk_dim20_bPerm[13] = b[rk_perm[13]];\nrk_dim20_bPerm[14] = b[rk_perm[14]];\nrk_dim20_bPerm[15] = b[rk_perm[15]];\nrk_dim20_bPerm[16] = b[rk_perm[16]];\nrk_dim20_bPerm[17] = b[rk_perm[17]];\nrk_dim20_bPerm[18] = b[rk_perm[18]];\nrk_dim20_bPerm[19] = b[rk_perm[19]];\nrk_dim20_bPerm[1] += A[20]*rk_dim20_bPerm[0];\n\nrk_dim20_bPerm[2] += A[40]*rk_dim20_bPerm[0];\nrk_dim20_bPerm[2] += A[41]*rk_dim20_bPerm[1];\n\nrk_dim20_bPerm[3] += A[60]*rk_dim20_bPerm[0];\nrk_dim20_bPerm[3] += A[61]*rk_dim20_bPerm[1];\nrk_dim20_bPerm[3] += A[62]*rk_dim20_bPerm[2];\n\nrk_dim20_bPerm[4] += A[80]*rk_dim20_bPerm[0];\nrk_dim20_bPerm[4] += A[81]*rk_dim20_bPerm[1];\nrk_dim20_bPerm[4] += A[82]*rk_dim20_bPerm[2];\nrk_dim20_bPerm[4] += A[83]*rk_dim20_bPerm[3];\n\nrk_dim20_bPerm[5] += A[100]*rk_dim20_bPerm[0];\nrk_dim20_bPerm[5] += A[101]*rk_dim20_bPerm[1];\nrk_dim20_bPerm[5] += A[102]*rk_dim20_bPerm[2];\nrk_dim20_bPerm[5] += A[103]*rk_dim20_bPerm[3];\nrk_dim20_bPerm[5] += A[104]*rk_dim20_bPerm[4];\n\nrk_dim20_bPerm[6] += A[120]*rk_dim20_bPerm[0];\nrk_dim20_bPerm[6] += A[121]*rk_dim20_bPerm[1];\nrk_dim20_bPerm[6] += A[122]*rk_dim20_bPerm[2];\nrk_dim20_bPerm[6] += A[123]*rk_dim20_bPerm[3];\nrk_dim20_bPerm[6] += A[124]*rk_dim20_bPerm[4];\nrk_dim20_bPerm[6] += A[125]*rk_dim20_bPerm[5];\n\nrk_dim20_bPerm[7] += A[140]*rk_dim20_bPerm[0];\nrk_dim20_bPerm[7] += A[141]*rk_dim20_bPerm[1];\nrk_dim20_bPerm[7] += A[142]*rk_dim20_bPerm[2];\nrk_dim20_bPerm[7] += A[143]*rk_dim20_bPerm[3];\nrk_dim20_bPerm[7] += A[144]*rk_dim20_bPerm[4];\nrk_dim20_bPerm[7] += A[145]*rk_dim20_bPerm[5];\nrk_dim20_bPerm[7] += A[146]*rk_dim20_bPerm[6];\n\nrk_dim20_bPerm[8] += A[160]*rk_dim20_bPerm[0];\nrk_dim20_bPerm[8] += A[161]*rk_dim20_bPerm[1];\nrk_dim20_bPerm[8] += A[162]*rk_dim20_bPerm[2];\nrk_dim20_bPerm[8] += A[163]*rk_dim20_bPerm[3];\nrk_dim20_bPerm[8] += A[164]*rk_dim20_bPerm[4];\nrk_dim20_bPerm[8] += A[165]*rk_dim20_bPerm[5];\nrk_dim20_bPerm[8] += A[166]*rk_dim20_bPerm[6];\nrk_dim20_bPerm[8] += A[167]*rk_dim20_bPerm[7];\n\nrk_dim20_bPerm[9] += A[180]*rk_dim20_bPerm[0];\nrk_dim20_bPerm[9] += A[181]*rk_dim20_bPerm[1];\nrk_dim20_bPerm[9] += A[182]*rk_dim20_bPerm[2];\nrk_dim20_bPerm[9] += A[183]*rk_dim20_bPerm[3];\nrk_dim20_bPerm[9] += A[184]*rk_dim20_bPerm[4];\nrk_dim20_bPerm[9] += A[185]*rk_dim20_bPerm[5];\nrk_dim20_bPerm[9] += A[186]*rk_dim20_bPerm[6];\nrk_dim20_bPerm[9] += A[187]*rk_dim20_bPerm[7];\nrk_dim20_bPerm[9] += A[188]*rk_dim20_bPerm[8];\n\nrk_dim20_bPerm[10] += A[200]*rk_dim20_bPerm[0];\nrk_dim20_bPerm[10] += A[201]*rk_dim20_bPerm[1];\nrk_dim20_bPerm[10] += A[202]*rk_dim20_bPerm[2];\nrk_dim20_bPerm[10] += A[203]*rk_dim20_bPerm[3];\nrk_dim20_bPerm[10] += A[204]*rk_dim20_bPerm[4];\nrk_dim20_bPerm[10] += A[205]*rk_dim20_bPerm[5];\nrk_dim20_bPerm[10] += A[206]*rk_dim20_bPerm[6];\nrk_dim20_bPerm[10] += A[207]*rk_dim20_bPerm[7];\nrk_dim20_bPerm[10] += A[208]*rk_dim20_bPerm[8];\nrk_dim20_bPerm[10] += A[209]*rk_dim20_bPerm[9];\n\nrk_dim20_bPerm[11] += A[220]*rk_dim20_bPerm[0];\nrk_dim20_bPerm[11] += A[221]*rk_dim20_bPerm[1];\nrk_dim20_bPerm[11] += A[222]*rk_dim20_bPerm[2];\nrk_dim20_bPerm[11] += A[223]*rk_dim20_bPerm[3];\nrk_dim20_bPerm[11] += A[224]*rk_dim20_bPerm[4];\nrk_dim20_bPerm[11] += A[225]*rk_dim20_bPerm[5];\nrk_dim20_bPerm[11] += A[226]*rk_dim20_bPerm[6];\nrk_dim20_bPerm[11] += A[227]*rk_dim20_bPerm[7];\nrk_dim20_bPerm[11] += A[228]*rk_dim20_bPerm[8];\nrk_dim20_bPerm[11] += A[229]*rk_dim20_bPerm[9];\nrk_dim20_bPerm[11] += A[230]*rk_dim20_bPerm[10];\n\nrk_dim20_bPerm[12] += A[240]*rk_dim20_bPerm[0];\nrk_dim20_bPerm[12] += A[241]*rk_dim20_bPerm[1];\nrk_dim20_bPerm[12] += A[242]*rk_dim20_bPerm[2];\nrk_dim20_bPerm[12] += A[243]*rk_dim20_bPerm[3];\nrk_dim20_bPerm[12] += A[244]*rk_dim20_bPerm[4];\nrk_dim20_bPerm[12] += A[245]*rk_dim20_bPerm[5];\nrk_dim20_bPerm[12] += A[246]*rk_dim20_bPerm[6];\nrk_dim20_bPerm[12] += A[247]*rk_dim20_bPerm[7];\nrk_dim20_bPerm[12] += A[248]*rk_dim20_bPerm[8];\nrk_dim20_bPerm[12] += A[249]*rk_dim20_bPerm[9];\nrk_dim20_bPerm[12] += A[250]*rk_dim20_bPerm[10];\nrk_dim20_bPerm[12] += A[251]*rk_dim20_bPerm[11];\n\nrk_dim20_bPerm[13] += A[260]*rk_dim20_bPerm[0];\nrk_dim20_bPerm[13] += A[261]*rk_dim20_bPerm[1];\nrk_dim20_bPerm[13] += A[262]*rk_dim20_bPerm[2];\nrk_dim20_bPerm[13] += A[263]*rk_dim20_bPerm[3];\nrk_dim20_bPerm[13] += A[264]*rk_dim20_bPerm[4];\nrk_dim20_bPerm[13] += A[265]*rk_dim20_bPerm[5];\nrk_dim20_bPerm[13] += A[266]*rk_dim20_bPerm[6];\nrk_dim20_bPerm[13] += A[267]*rk_dim20_bPerm[7];\nrk_dim20_bPerm[13] += A[268]*rk_dim20_bPerm[8];\nrk_dim20_bPerm[13] += A[269]*rk_dim20_bPerm[9];\nrk_dim20_bPerm[13] += A[270]*rk_dim20_bPerm[10];\nrk_dim20_bPerm[13] += A[271]*rk_dim20_bPerm[11];\nrk_dim20_bPerm[13] += A[272]*rk_dim20_bPerm[12];\n\nrk_dim20_bPerm[14] += A[280]*rk_dim20_bPerm[0];\nrk_dim20_bPerm[14] += A[281]*rk_dim20_bPerm[1];\nrk_dim20_bPerm[14] += A[282]*rk_dim20_bPerm[2];\nrk_dim20_bPerm[14] += A[283]*rk_dim20_bPerm[3];\nrk_dim20_bPerm[14] += A[284]*rk_dim20_bPerm[4];\nrk_dim20_bPerm[14] += A[285]*rk_dim20_bPerm[5];\nrk_dim20_bPerm[14] += A[286]*rk_dim20_bPerm[6];\nrk_dim20_bPerm[14] += A[287]*rk_dim20_bPerm[7];\nrk_dim20_bPerm[14] += A[288]*rk_dim20_bPerm[8];\nrk_dim20_bPerm[14] += A[289]*rk_dim20_bPerm[9];\nrk_dim20_bPerm[14] += A[290]*rk_dim20_bPerm[10];\nrk_dim20_bPerm[14] += A[291]*rk_dim20_bPerm[11];\nrk_dim20_bPerm[14] += A[292]*rk_dim20_bPerm[12];\nrk_dim20_bPerm[14] += A[293]*rk_dim20_bPerm[13];\n\nrk_dim20_bPerm[15] += A[300]*rk_dim20_bPerm[0];\nrk_dim20_bPerm[15] += A[301]*rk_dim20_bPerm[1];\nrk_dim20_bPerm[15] += A[302]*rk_dim20_bPerm[2];\nrk_dim20_bPerm[15] += A[303]*rk_dim20_bPerm[3];\nrk_dim20_bPerm[15] += A[304]*rk_dim20_bPerm[4];\nrk_dim20_bPerm[15] += A[305]*rk_dim20_bPerm[5];\nrk_dim20_bPerm[15] += A[306]*rk_dim20_bPerm[6];\nrk_dim20_bPerm[15] += A[307]*rk_dim20_bPerm[7];\nrk_dim20_bPerm[15] += A[308]*rk_dim20_bPerm[8];\nrk_dim20_bPerm[15] += A[309]*rk_dim20_bPerm[9];\nrk_dim20_bPerm[15] += A[310]*rk_dim20_bPerm[10];\nrk_dim20_bPerm[15] += A[311]*rk_dim20_bPerm[11];\nrk_dim20_bPerm[15] += A[312]*rk_dim20_bPerm[12];\nrk_dim20_bPerm[15] += A[313]*rk_dim20_bPerm[13];\nrk_dim20_bPerm[15] += A[314]*rk_dim20_bPerm[14];\n\nrk_dim20_bPerm[16] += A[320]*rk_dim20_bPerm[0];\nrk_dim20_bPerm[16] += A[321]*rk_dim20_bPerm[1];\nrk_dim20_bPerm[16] += A[322]*rk_dim20_bPerm[2];\nrk_dim20_bPerm[16] += A[323]*rk_dim20_bPerm[3];\nrk_dim20_bPerm[16] += A[324]*rk_dim20_bPerm[4];\nrk_dim20_bPerm[16] += A[325]*rk_dim20_bPerm[5];\nrk_dim20_bPerm[16] += A[326]*rk_dim20_bPerm[6];\nrk_dim20_bPerm[16] += A[327]*rk_dim20_bPerm[7];\nrk_dim20_bPerm[16] += A[328]*rk_dim20_bPerm[8];\nrk_dim20_bPerm[16] += A[329]*rk_dim20_bPerm[9];\nrk_dim20_bPerm[16] += A[330]*rk_dim20_bPerm[10];\nrk_dim20_bPerm[16] += A[331]*rk_dim20_bPerm[11];\nrk_dim20_bPerm[16] += A[332]*rk_dim20_bPerm[12];\nrk_dim20_bPerm[16] += A[333]*rk_dim20_bPerm[13];\nrk_dim20_bPerm[16] += A[334]*rk_dim20_bPerm[14];\nrk_dim20_bPerm[16] += A[335]*rk_dim20_bPerm[15];\n\nrk_dim20_bPerm[17] += A[340]*rk_dim20_bPerm[0];\nrk_dim20_bPerm[17] += A[341]*rk_dim20_bPerm[1];\nrk_dim20_bPerm[17] += A[342]*rk_dim20_bPerm[2];\nrk_dim20_bPerm[17] += A[343]*rk_dim20_bPerm[3];\nrk_dim20_bPerm[17] += A[344]*rk_dim20_bPerm[4];\nrk_dim20_bPerm[17] += A[345]*rk_dim20_bPerm[5];\nrk_dim20_bPerm[17] += A[346]*rk_dim20_bPerm[6];\nrk_dim20_bPerm[17] += A[347]*rk_dim20_bPerm[7];\nrk_dim20_bPerm[17] += A[348]*rk_dim20_bPerm[8];\nrk_dim20_bPerm[17] += A[349]*rk_dim20_bPerm[9];\nrk_dim20_bPerm[17] += A[350]*rk_dim20_bPerm[10];\nrk_dim20_bPerm[17] += A[351]*rk_dim20_bPerm[11];\nrk_dim20_bPerm[17] += A[352]*rk_dim20_bPerm[12];\nrk_dim20_bPerm[17] += A[353]*rk_dim20_bPerm[13];\nrk_dim20_bPerm[17] += A[354]*rk_dim20_bPerm[14];\nrk_dim20_bPerm[17] += A[355]*rk_dim20_bPerm[15];\nrk_dim20_bPerm[17] += A[356]*rk_dim20_bPerm[16];\n\nrk_dim20_bPerm[18] += A[360]*rk_dim20_bPerm[0];\nrk_dim20_bPerm[18] += A[361]*rk_dim20_bPerm[1];\nrk_dim20_bPerm[18] += A[362]*rk_dim20_bPerm[2];\nrk_dim20_bPerm[18] += A[363]*rk_dim20_bPerm[3];\nrk_dim20_bPerm[18] += A[364]*rk_dim20_bPerm[4];\nrk_dim20_bPerm[18] += A[365]*rk_dim20_bPerm[5];\nrk_dim20_bPerm[18] += A[366]*rk_dim20_bPerm[6];\nrk_dim20_bPerm[18] += A[367]*rk_dim20_bPerm[7];\nrk_dim20_bPerm[18] += A[368]*rk_dim20_bPerm[8];\nrk_dim20_bPerm[18] += A[369]*rk_dim20_bPerm[9];\nrk_dim20_bPerm[18] += A[370]*rk_dim20_bPerm[10];\nrk_dim20_bPerm[18] += A[371]*rk_dim20_bPerm[11];\nrk_dim20_bPerm[18] += A[372]*rk_dim20_bPerm[12];\nrk_dim20_bPerm[18] += A[373]*rk_dim20_bPerm[13];\nrk_dim20_bPerm[18] += A[374]*rk_dim20_bPerm[14];\nrk_dim20_bPerm[18] += A[375]*rk_dim20_bPerm[15];\nrk_dim20_bPerm[18] += A[376]*rk_dim20_bPerm[16];\nrk_dim20_bPerm[18] += A[377]*rk_dim20_bPerm[17];\n\nrk_dim20_bPerm[19] += A[380]*rk_dim20_bPerm[0];\nrk_dim20_bPerm[19] += A[381]*rk_dim20_bPerm[1];\nrk_dim20_bPerm[19] += A[382]*rk_dim20_bPerm[2];\nrk_dim20_bPerm[19] += A[383]*rk_dim20_bPerm[3];\nrk_dim20_bPerm[19] += A[384]*rk_dim20_bPerm[4];\nrk_dim20_bPerm[19] += A[385]*rk_dim20_bPerm[5];\nrk_dim20_bPerm[19] += A[386]*rk_dim20_bPerm[6];\nrk_dim20_bPerm[19] += A[387]*rk_dim20_bPerm[7];\nrk_dim20_bPerm[19] += A[388]*rk_dim20_bPerm[8];\nrk_dim20_bPerm[19] += A[389]*rk_dim20_bPerm[9];\nrk_dim20_bPerm[19] += A[390]*rk_dim20_bPerm[10];\nrk_dim20_bPerm[19] += A[391]*rk_dim20_bPerm[11];\nrk_dim20_bPerm[19] += A[392]*rk_dim20_bPerm[12];\nrk_dim20_bPerm[19] += A[393]*rk_dim20_bPerm[13];\nrk_dim20_bPerm[19] += A[394]*rk_dim20_bPerm[14];\nrk_dim20_bPerm[19] += A[395]*rk_dim20_bPerm[15];\nrk_dim20_bPerm[19] += A[396]*rk_dim20_bPerm[16];\nrk_dim20_bPerm[19] += A[397]*rk_dim20_bPerm[17];\nrk_dim20_bPerm[19] += A[398]*rk_dim20_bPerm[18];\n\n\nacado_solve_dim20_triangular( A, rk_dim20_bPerm );\nb[0] = rk_dim20_bPerm[0];\nb[1] = rk_dim20_bPerm[1];\nb[2] = rk_dim20_bPerm[2];\nb[3] = rk_dim20_bPerm[3];\nb[4] = rk_dim20_bPerm[4];\nb[5] = rk_dim20_bPerm[5];\nb[6] = rk_dim20_bPerm[6];\nb[7] = rk_dim20_bPerm[7];\nb[8] = rk_dim20_bPerm[8];\nb[9] = rk_dim20_bPerm[9];\nb[10] = rk_dim20_bPerm[10];\nb[11] = rk_dim20_bPerm[11];\nb[12] = rk_dim20_bPerm[12];\nb[13] = rk_dim20_bPerm[13];\nb[14] = rk_dim20_bPerm[14];\nb[15] = rk_dim20_bPerm[15];\nb[16] = rk_dim20_bPerm[16];\nb[17] = rk_dim20_bPerm[17];\nb[18] = rk_dim20_bPerm[18];\nb[19] = rk_dim20_bPerm[19];\n}\n\n\n\n/** Matrix of size: 2 x 2 (row major format) */\nstatic const real_t acado_Ah_mat[ 4 ] = \n{ 2.5000000000000001e-02, 5.3867513459481292e-02, \n-3.8675134594812867e-03, 2.5000000000000001e-02 };\n\n\n/* Fixed step size:0.1 */\nint acado_integrate( real_t* const rk_eta, int resetIntegrator )\n{\nint error;\n\nint i;\nint j;\nint k;\nint run;\nint run1;\nint tmp_index1;\nint tmp_index2;\n\nreal_t det;\n\nrk_ttt = 0.0000000000000000e+00;\nrk_xxx[10] = rk_eta[150];\nrk_xxx[11] = rk_eta[151];\nrk_xxx[12] = rk_eta[152];\nrk_xxx[13] = rk_eta[153];\nrk_xxx[14] = rk_eta[154];\nrk_xxx[15] = rk_eta[155];\nrk_xxx[16] = rk_eta[156];\nrk_xxx[17] = rk_eta[157];\nrk_xxx[18] = rk_eta[158];\nrk_xxx[19] = rk_eta[159];\nrk_xxx[20] = rk_eta[160];\nrk_xxx[21] = rk_eta[161];\nrk_xxx[22] = rk_eta[162];\nrk_xxx[23] = rk_eta[163];\n\nfor (run = 0; run < 1; ++run)\n{\nif( resetIntegrator ) {\nfor (i = 0; i < 1; ++i)\n{\nfor (run1 = 0; run1 < 2; ++run1)\n{\nfor (j = 0; j < 10; ++j)\n{\nrk_xxx[j] = rk_eta[j];\ntmp_index1 = j;\nrk_xxx[j] += + acado_Ah_mat[run1 * 2]*rk_kkk[tmp_index1 * 2];\nrk_xxx[j] += + acado_Ah_mat[run1 * 2 + 1]*rk_kkk[tmp_index1 * 2 + 1];\n}\nacado_diffs( rk_xxx, &(rk_diffsTemp2[ run1 * 140 ]) );\nfor (j = 0; j < 10; ++j)\n{\ntmp_index1 = (run1 * 10) + (j);\nrk_A[tmp_index1 * 20] = + acado_Ah_mat[run1 * 2]*rk_diffsTemp2[(run1 * 140) + (j * 14)];\nrk_A[tmp_index1 * 20 + 1] = + acado_Ah_mat[run1 * 2]*rk_diffsTemp2[(run1 * 140) + (j * 14 + 1)];\nrk_A[tmp_index1 * 20 + 2] = + acado_Ah_mat[run1 * 2]*rk_diffsTemp2[(run1 * 140) + (j * 14 + 2)];\nrk_A[tmp_index1 * 20 + 3] = + acado_Ah_mat[run1 * 2]*rk_diffsTemp2[(run1 * 140) + (j * 14 + 3)];\nrk_A[tmp_index1 * 20 + 4] = + acado_Ah_mat[run1 * 2]*rk_diffsTemp2[(run1 * 140) + (j * 14 + 4)];\nrk_A[tmp_index1 * 20 + 5] = + acado_Ah_mat[run1 * 2]*rk_diffsTemp2[(run1 * 140) + (j * 14 + 5)];\nrk_A[tmp_index1 * 20 + 6] = + acado_Ah_mat[run1 * 2]*rk_diffsTemp2[(run1 * 140) + (j * 14 + 6)];\nrk_A[tmp_index1 * 20 + 7] = + acado_Ah_mat[run1 * 2]*rk_diffsTemp2[(run1 * 140) + (j * 14 + 7)];\nrk_A[tmp_index1 * 20 + 8] = + acado_Ah_mat[run1 * 2]*rk_diffsTemp2[(run1 * 140) + (j * 14 + 8)];\nrk_A[tmp_index1 * 20 + 9] = + acado_Ah_mat[run1 * 2]*rk_diffsTemp2[(run1 * 140) + (j * 14 + 9)];\nif( 0 == run1 ) rk_A[(tmp_index1 * 20) + (j)] -= 1.0000000000000000e+00;\nrk_A[tmp_index1 * 20 + 10] = + acado_Ah_mat[run1 * 2 + 1]*rk_diffsTemp2[(run1 * 140) + (j * 14)];\nrk_A[tmp_index1 * 20 + 11] = + acado_Ah_mat[run1 * 2 + 1]*rk_diffsTemp2[(run1 * 140) + (j * 14 + 1)];\nrk_A[tmp_index1 * 20 + 12] = + acado_Ah_mat[run1 * 2 + 1]*rk_diffsTemp2[(run1 * 140) + (j * 14 + 2)];\nrk_A[tmp_index1 * 20 + 13] = + acado_Ah_mat[run1 * 2 + 1]*rk_diffsTemp2[(run1 * 140) + (j * 14 + 3)];\nrk_A[tmp_index1 * 20 + 14] = + acado_Ah_mat[run1 * 2 + 1]*rk_diffsTemp2[(run1 * 140) + (j * 14 + 4)];\nrk_A[tmp_index1 * 20 + 15] = + acado_Ah_mat[run1 * 2 + 1]*rk_diffsTemp2[(run1 * 140) + (j * 14 + 5)];\nrk_A[tmp_index1 * 20 + 16] = + acado_Ah_mat[run1 * 2 + 1]*rk_diffsTemp2[(run1 * 140) + (j * 14 + 6)];\nrk_A[tmp_index1 * 20 + 17] = + acado_Ah_mat[run1 * 2 + 1]*rk_diffsTemp2[(run1 * 140) + (j * 14 + 7)];\nrk_A[tmp_index1 * 20 + 18] = + acado_Ah_mat[run1 * 2 + 1]*rk_diffsTemp2[(run1 * 140) + (j * 14 + 8)];\nrk_A[tmp_index1 * 20 + 19] = + acado_Ah_mat[run1 * 2 + 1]*rk_diffsTemp2[(run1 * 140) + (j * 14 + 9)];\nif( 1 == run1 ) rk_A[(tmp_index1 * 20) + (j + 10)] -= 1.0000000000000000e+00;\n}\nacado_rhs( rk_xxx, rk_rhsTemp );\nrk_b[run1 * 10] = rk_kkk[run1] - rk_rhsTemp[0];\nrk_b[run1 * 10 + 1] = rk_kkk[run1 + 2] - rk_rhsTemp[1];\nrk_b[run1 * 10 + 2] = rk_kkk[run1 + 4] - rk_rhsTemp[2];\nrk_b[run1 * 10 + 3] = rk_kkk[run1 + 6] - rk_rhsTemp[3];\nrk_b[run1 * 10 + 4] = rk_kkk[run1 + 8] - rk_rhsTemp[4];\nrk_b[run1 * 10 + 5] = rk_kkk[run1 + 10] - rk_rhsTemp[5];\nrk_b[run1 * 10 + 6] = rk_kkk[run1 + 12] - rk_rhsTemp[6];\nrk_b[run1 * 10 + 7] = rk_kkk[run1 + 14] - rk_rhsTemp[7];\nrk_b[run1 * 10 + 8] = rk_kkk[run1 + 16] - rk_rhsTemp[8];\nrk_b[run1 * 10 + 9] = rk_kkk[run1 + 18] - rk_rhsTemp[9];\n}\ndet = acado_solve_dim20_system( rk_A, rk_b, rk_dim20_perm );\nfor (j = 0; j < 2; ++j)\n{\nrk_kkk[j] += rk_b[j * 10];\nrk_kkk[j + 2] += rk_b[j * 10 + 1];\nrk_kkk[j + 4] += rk_b[j * 10 + 2];\nrk_kkk[j + 6] += rk_b[j * 10 + 3];\nrk_kkk[j + 8] += rk_b[j * 10 + 4];\nrk_kkk[j + 10] += rk_b[j * 10 + 5];\nrk_kkk[j + 12] += rk_b[j * 10 + 6];\nrk_kkk[j + 14] += rk_b[j * 10 + 7];\nrk_kkk[j + 16] += rk_b[j * 10 + 8];\nrk_kkk[j + 18] += rk_b[j * 10 + 9];\n}\n}\n}\nfor (i = 0; i < 5; ++i)\n{\nfor (run1 = 0; run1 < 2; ++run1)\n{\nfor (j = 0; j < 10; ++j)\n{\nrk_xxx[j] = rk_eta[j];\ntmp_index1 = j;\nrk_xxx[j] += + acado_Ah_mat[run1 * 2]*rk_kkk[tmp_index1 * 2];\nrk_xxx[j] += + acado_Ah_mat[run1 * 2 + 1]*rk_kkk[tmp_index1 * 2 + 1];\n}\nacado_rhs( rk_xxx, rk_rhsTemp );\nrk_b[run1 * 10] = rk_kkk[run1] - rk_rhsTemp[0];\nrk_b[run1 * 10 + 1] = rk_kkk[run1 + 2] - rk_rhsTemp[1];\nrk_b[run1 * 10 + 2] = rk_kkk[run1 + 4] - rk_rhsTemp[2];\nrk_b[run1 * 10 + 3] = rk_kkk[run1 + 6] - rk_rhsTemp[3];\nrk_b[run1 * 10 + 4] = rk_kkk[run1 + 8] - rk_rhsTemp[4];\nrk_b[run1 * 10 + 5] = rk_kkk[run1 + 10] - rk_rhsTemp[5];\nrk_b[run1 * 10 + 6] = rk_kkk[run1 + 12] - rk_rhsTemp[6];\nrk_b[run1 * 10 + 7] = rk_kkk[run1 + 14] - rk_rhsTemp[7];\nrk_b[run1 * 10 + 8] = rk_kkk[run1 + 16] - rk_rhsTemp[8];\nrk_b[run1 * 10 + 9] = rk_kkk[run1 + 18] - rk_rhsTemp[9];\n}\nacado_solve_dim20_system_reuse( rk_A, rk_b, rk_dim20_perm );\nfor (j = 0; j < 2; ++j)\n{\nrk_kkk[j] += rk_b[j * 10];\nrk_kkk[j + 2] += rk_b[j * 10 + 1];\nrk_kkk[j + 4] += rk_b[j * 10 + 2];\nrk_kkk[j + 6] += rk_b[j * 10 + 3];\nrk_kkk[j + 8] += rk_b[j * 10 + 4];\nrk_kkk[j + 10] += rk_b[j * 10 + 5];\nrk_kkk[j + 12] += rk_b[j * 10 + 6];\nrk_kkk[j + 14] += rk_b[j * 10 + 7];\nrk_kkk[j + 16] += rk_b[j * 10 + 8];\nrk_kkk[j + 18] += rk_b[j * 10 + 9];\n}\n}\nfor (run1 = 0; run1 < 2; ++run1)\n{\nfor (j = 0; j < 10; ++j)\n{\nrk_xxx[j] = rk_eta[j];\ntmp_index1 = j;\nrk_xxx[j] += + acado_Ah_mat[run1 * 2]*rk_kkk[tmp_index1 * 2];\nrk_xxx[j] += + acado_Ah_mat[run1 * 2 + 1]*rk_kkk[tmp_index1 * 2 + 1];\n}\nacado_diffs( rk_xxx, &(rk_diffsTemp2[ run1 * 140 ]) );\nfor (j = 0; j < 10; ++j)\n{\ntmp_index1 = (run1 * 10) + (j);\nrk_A[tmp_index1 * 20] = + acado_Ah_mat[run1 * 2]*rk_diffsTemp2[(run1 * 140) + (j * 14)];\nrk_A[tmp_index1 * 20 + 1] = + acado_Ah_mat[run1 * 2]*rk_diffsTemp2[(run1 * 140) + (j * 14 + 1)];\nrk_A[tmp_index1 * 20 + 2] = + acado_Ah_mat[run1 * 2]*rk_diffsTemp2[(run1 * 140) + (j * 14 + 2)];\nrk_A[tmp_index1 * 20 + 3] = + acado_Ah_mat[run1 * 2]*rk_diffsTemp2[(run1 * 140) + (j * 14 + 3)];\nrk_A[tmp_index1 * 20 + 4] = + acado_Ah_mat[run1 * 2]*rk_diffsTemp2[(run1 * 140) + (j * 14 + 4)];\nrk_A[tmp_index1 * 20 + 5] = + acado_Ah_mat[run1 * 2]*rk_diffsTemp2[(run1 * 140) + (j * 14 + 5)];\nrk_A[tmp_index1 * 20 + 6] = + acado_Ah_mat[run1 * 2]*rk_diffsTemp2[(run1 * 140) + (j * 14 + 6)];\nrk_A[tmp_index1 * 20 + 7] = + acado_Ah_mat[run1 * 2]*rk_diffsTemp2[(run1 * 140) + (j * 14 + 7)];\nrk_A[tmp_index1 * 20 + 8] = + acado_Ah_mat[run1 * 2]*rk_diffsTemp2[(run1 * 140) + (j * 14 + 8)];\nrk_A[tmp_index1 * 20 + 9] = + acado_Ah_mat[run1 * 2]*rk_diffsTemp2[(run1 * 140) + (j * 14 + 9)];\nif( 0 == run1 ) rk_A[(tmp_index1 * 20) + (j)] -= 1.0000000000000000e+00;\nrk_A[tmp_index1 * 20 + 10] = + acado_Ah_mat[run1 * 2 + 1]*rk_diffsTemp2[(run1 * 140) + (j * 14)];\nrk_A[tmp_index1 * 20 + 11] = + acado_Ah_mat[run1 * 2 + 1]*rk_diffsTemp2[(run1 * 140) + (j * 14 + 1)];\nrk_A[tmp_index1 * 20 + 12] = + acado_Ah_mat[run1 * 2 + 1]*rk_diffsTemp2[(run1 * 140) + (j * 14 + 2)];\nrk_A[tmp_index1 * 20 + 13] = + acado_Ah_mat[run1 * 2 + 1]*rk_diffsTemp2[(run1 * 140) + (j * 14 + 3)];\nrk_A[tmp_index1 * 20 + 14] = + acado_Ah_mat[run1 * 2 + 1]*rk_diffsTemp2[(run1 * 140) + (j * 14 + 4)];\nrk_A[tmp_index1 * 20 + 15] = + acado_Ah_mat[run1 * 2 + 1]*rk_diffsTemp2[(run1 * 140) + (j * 14 + 5)];\nrk_A[tmp_index1 * 20 + 16] = + acado_Ah_mat[run1 * 2 + 1]*rk_diffsTemp2[(run1 * 140) + (j * 14 + 6)];\nrk_A[tmp_index1 * 20 + 17] = + acado_Ah_mat[run1 * 2 + 1]*rk_diffsTemp2[(run1 * 140) + (j * 14 + 7)];\nrk_A[tmp_index1 * 20 + 18] = + acado_Ah_mat[run1 * 2 + 1]*rk_diffsTemp2[(run1 * 140) + (j * 14 + 8)];\nrk_A[tmp_index1 * 20 + 19] = + acado_Ah_mat[run1 * 2 + 1]*rk_diffsTemp2[(run1 * 140) + (j * 14 + 9)];\nif( 1 == run1 ) rk_A[(tmp_index1 * 20) + (j + 10)] -= 1.0000000000000000e+00;\n}\n}\nfor (run1 = 0; run1 < 10; ++run1)\n{\nfor (i = 0; i < 2; ++i)\n{\nrk_b[i * 10] = - rk_diffsTemp2[(i * 140) + (run1)];\nrk_b[i * 10 + 1] = - rk_diffsTemp2[(i * 140) + (run1 + 14)];\nrk_b[i * 10 + 2] = - rk_diffsTemp2[(i * 140) + (run1 + 28)];\nrk_b[i * 10 + 3] = - rk_diffsTemp2[(i * 140) + (run1 + 42)];\nrk_b[i * 10 + 4] = - rk_diffsTemp2[(i * 140) + (run1 + 56)];\nrk_b[i * 10 + 5] = - rk_diffsTemp2[(i * 140) + (run1 + 70)];\nrk_b[i * 10 + 6] = - rk_diffsTemp2[(i * 140) + (run1 + 84)];\nrk_b[i * 10 + 7] = - rk_diffsTemp2[(i * 140) + (run1 + 98)];\nrk_b[i * 10 + 8] = - rk_diffsTemp2[(i * 140) + (run1 + 112)];\nrk_b[i * 10 + 9] = - rk_diffsTemp2[(i * 140) + (run1 + 126)];\n}\nif( 0 == run1 ) {\ndet = acado_solve_dim20_system( rk_A, rk_b, rk_dim20_perm );\n}\n else {\nacado_solve_dim20_system_reuse( rk_A, rk_b, rk_dim20_perm );\n}\nfor (i = 0; i < 2; ++i)\n{\nrk_diffK[i] = rk_b[i * 10];\nrk_diffK[i + 2] = rk_b[i * 10 + 1];\nrk_diffK[i + 4] = rk_b[i * 10 + 2];\nrk_diffK[i + 6] = rk_b[i * 10 + 3];\nrk_diffK[i + 8] = rk_b[i * 10 + 4];\nrk_diffK[i + 10] = rk_b[i * 10 + 5];\nrk_diffK[i + 12] = rk_b[i * 10 + 6];\nrk_diffK[i + 14] = rk_b[i * 10 + 7];\nrk_diffK[i + 16] = rk_b[i * 10 + 8];\nrk_diffK[i + 18] = rk_b[i * 10 + 9];\n}\nfor (i = 0; i < 10; ++i)\n{\nrk_diffsNew2[(i * 14) + (run1)] = (i == run1-0);\nrk_diffsNew2[(i * 14) + (run1)] += + rk_diffK[i * 2]*(real_t)5.0000000000000003e-02 + rk_diffK[i * 2 + 1]*(real_t)5.0000000000000003e-02;\n}\n}\nfor (run1 = 0; run1 < 4; ++run1)\n{\nfor (i = 0; i < 2; ++i)\n{\nfor (j = 0; j < 10; ++j)\n{\ntmp_index1 = (i * 10) + (j);\ntmp_index2 = (run1) + (j * 14);\nrk_b[tmp_index1] = - rk_diffsTemp2[(i * 140) + (tmp_index2 + 10)];\n}\n}\nacado_solve_dim20_system_reuse( rk_A, rk_b, rk_dim20_perm );\nfor (i = 0; i < 2; ++i)\n{\nrk_diffK[i] = rk_b[i * 10];\nrk_diffK[i + 2] = rk_b[i * 10 + 1];\nrk_diffK[i + 4] = rk_b[i * 10 + 2];\nrk_diffK[i + 6] = rk_b[i * 10 + 3];\nrk_diffK[i + 8] = rk_b[i * 10 + 4];\nrk_diffK[i + 10] = rk_b[i * 10 + 5];\nrk_diffK[i + 12] = rk_b[i * 10 + 6];\nrk_diffK[i + 14] = rk_b[i * 10 + 7];\nrk_diffK[i + 16] = rk_b[i * 10 + 8];\nrk_diffK[i + 18] = rk_b[i * 10 + 9];\n}\nfor (i = 0; i < 10; ++i)\n{\nrk_diffsNew2[(i * 14) + (run1 + 10)] = + rk_diffK[i * 2]*(real_t)5.0000000000000003e-02 + rk_diffK[i * 2 + 1]*(real_t)5.0000000000000003e-02;\n}\n}\nrk_eta[0] += + rk_kkk[0]*(real_t)5.0000000000000003e-02 + rk_kkk[1]*(real_t)5.0000000000000003e-02;\nrk_eta[1] += + rk_kkk[2]*(real_t)5.0000000000000003e-02 + rk_kkk[3]*(real_t)5.0000000000000003e-02;\nrk_eta[2] += + rk_kkk[4]*(real_t)5.0000000000000003e-02 + rk_kkk[5]*(real_t)5.0000000000000003e-02;\nrk_eta[3] += + rk_kkk[6]*(real_t)5.0000000000000003e-02 + rk_kkk[7]*(real_t)5.0000000000000003e-02;\nrk_eta[4] += + rk_kkk[8]*(real_t)5.0000000000000003e-02 + rk_kkk[9]*(real_t)5.0000000000000003e-02;\nrk_eta[5] += + rk_kkk[10]*(real_t)5.0000000000000003e-02 + rk_kkk[11]*(real_t)5.0000000000000003e-02;\nrk_eta[6] += + rk_kkk[12]*(real_t)5.0000000000000003e-02 + rk_kkk[13]*(real_t)5.0000000000000003e-02;\nrk_eta[7] += + rk_kkk[14]*(real_t)5.0000000000000003e-02 + rk_kkk[15]*(real_t)5.0000000000000003e-02;\nrk_eta[8] += + rk_kkk[16]*(real_t)5.0000000000000003e-02 + rk_kkk[17]*(real_t)5.0000000000000003e-02;\nrk_eta[9] += + rk_kkk[18]*(real_t)5.0000000000000003e-02 + rk_kkk[19]*(real_t)5.0000000000000003e-02;\nfor (i = 0; i < 10; ++i)\n{\nfor (j = 0; j < 10; ++j)\n{\ntmp_index2 = (j) + (i * 10);\nrk_eta[tmp_index2 + 10] = rk_diffsNew2[(i * 14) + (j)];\n}\nfor (j = 0; j < 4; ++j)\n{\ntmp_index2 = (j) + (i * 4);\nrk_eta[tmp_index2 + 110] = rk_diffsNew2[(i * 14) + (j + 10)];\n}\n}\nresetIntegrator = 0;\nrk_ttt += 1.0000000000000000e+00;\n}\nfor (i = 0; i < 10; ++i)\n{\n}\nif( det < 1e-12 ) {\nerror = 2;\n} else if( det < 1e-6 ) {\nerror = 1;\n} else {\nerror = 0;\n}\nreturn error;\n}\n\n\n\n"
  },
  {
    "path": "model/quadrotor_mpc_codegen/acado_qpoases_interface.cpp",
    "content": "/*\n *    This file was auto-generated using the ACADO Toolkit.\n *    \n *    While ACADO Toolkit is free software released under the terms of\n *    the GNU Lesser General Public License (LGPL), the generated code\n *    as such remains the property of the user who used ACADO Toolkit\n *    to generate this code. In particular, user dependent data of the code\n *    do not inherit the GNU LGPL license. On the other hand, parts of the\n *    generated code that are a direct copy of source code from the\n *    ACADO Toolkit or the software tools it is based on, remain, as derived\n *    work, automatically covered by the LGPL license.\n *    \n *    ACADO Toolkit is distributed in the hope that it will be useful,\n *    but WITHOUT ANY WARRANTY; without even the implied warranty of\n *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n *    \n */\n\n\nextern \"C\"\n{\n#include \"acado_common.h\"\n}\n\n#include \"INCLUDE/QProblemB.hpp\"\n\n#if ACADO_COMPUTE_COVARIANCE_MATRIX == 1\n#include \"INCLUDE/EXTRAS/SolutionAnalysis.hpp\"\n#endif /* ACADO_COMPUTE_COVARIANCE_MATRIX */\n\nstatic int acado_nWSR;\n\n\n\n#if ACADO_COMPUTE_COVARIANCE_MATRIX == 1\nstatic SolutionAnalysis acado_sa;\n#endif /* ACADO_COMPUTE_COVARIANCE_MATRIX */\n\nint acado_solve( void )\n{\n\tacado_nWSR = QPOASES_NWSRMAX;\n\n\tQProblemB qp( 80 );\n\t\n\treturnValue retVal = qp.init(acadoWorkspace.H, acadoWorkspace.g, acadoWorkspace.lb, acadoWorkspace.ub, acado_nWSR, acadoWorkspace.y);\n\n    qp.getPrimalSolution( acadoWorkspace.x );\n    qp.getDualSolution( acadoWorkspace.y );\n\t\n#if ACADO_COMPUTE_COVARIANCE_MATRIX == 1\n\n\tif (retVal != SUCCESSFUL_RETURN)\n\t\treturn (int)retVal;\n\t\t\n\tretVal = acado_sa.getHessianInverse( &qp, );\n\n#endif /* ACADO_COMPUTE_COVARIANCE_MATRIX */\n\n\treturn (int)retVal;\n}\n\nint acado_getNWSR( void )\n{\n\treturn acado_nWSR;\n}\n\nconst char* acado_getErrorString( int error )\n{\n\treturn MessageHandling::getErrorString( error );\n}\n"
  },
  {
    "path": "model/quadrotor_mpc_codegen/acado_qpoases_interface.hpp",
    "content": "/*\n *    This file was auto-generated using the ACADO Toolkit.\n *    \n *    While ACADO Toolkit is free software released under the terms of\n *    the GNU Lesser General Public License (LGPL), the generated code\n *    as such remains the property of the user who used ACADO Toolkit\n *    to generate this code. In particular, user dependent data of the code\n *    do not inherit the GNU LGPL license. On the other hand, parts of the\n *    generated code that are a direct copy of source code from the\n *    ACADO Toolkit or the software tools it is based on, remain, as derived\n *    work, automatically covered by the LGPL license.\n *    \n *    ACADO Toolkit is distributed in the hope that it will be useful,\n *    but WITHOUT ANY WARRANTY; without even the implied warranty of\n *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n *    \n */\n\n\n#ifndef QPOASES_HEADER\n#define QPOASES_HEADER\n\n#ifdef PC_DEBUG\n#include <stdio.h>\n#endif /* PC_DEBUG */\n\n#include <math.h>\n\n#ifdef __cplusplus\n#define EXTERNC extern \"C\"\n#else\n#define EXTERNC\n#endif\n\n/*\n * A set of options for qpOASES\n */\n\n/** Maximum number of optimization variables. */\n#define QPOASES_NVMAX      80\n/** Maximum number of constraints. */\n#define QPOASES_NCMAX      0\n/** Maximum number of working set recalculations. */\n#define QPOASES_NWSRMAX    240\n/** Print level for qpOASES. */\n#define QPOASES_PRINTLEVEL PL_NONE\n/** The value of EPS */\n#define QPOASES_EPS        1.193e-07\n/** Internally used floating point type */\ntypedef float real_t;\n\n/*\n * Forward function declarations\n */\n\n/** A function that calls the QP solver */\nEXTERNC int acado_solve( void );\n\n/** Get the number of active set changes */\nEXTERNC int acado_getNWSR( void );\n\n/** Get the error string. */\nconst char* acado_getErrorString( int error );\n\n#endif /* QPOASES_HEADER */\n"
  },
  {
    "path": "model/quadrotor_mpc_codegen/acado_solver.c",
    "content": "/*\n *    This file was auto-generated using the ACADO Toolkit.\n *    \n *    While ACADO Toolkit is free software released under the terms of\n *    the GNU Lesser General Public License (LGPL), the generated code\n *    as such remains the property of the user who used ACADO Toolkit\n *    to generate this code. In particular, user dependent data of the code\n *    do not inherit the GNU LGPL license. On the other hand, parts of the\n *    generated code that are a direct copy of source code from the\n *    ACADO Toolkit or the software tools it is based on, remain, as derived\n *    work, automatically covered by the LGPL license.\n *    \n *    ACADO Toolkit is distributed in the hope that it will be useful,\n *    but WITHOUT ANY WARRANTY; without even the implied warranty of\n *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n *    \n */\n\n\n#include \"acado_common.h\"\n\n\n\n\n/******************************************************************************/\n/*                                                                            */\n/* ACADO code generation                                                      */\n/*                                                                            */\n/******************************************************************************/\n\n\n/** Row vector of size: 164 */\nreal_t state[ 164 ];\n\nint acado_modelSimulation(  )\n{\nint ret;\n\nint lRun1;\nret = 0;\n#pragma omp parallel for private(lRun1, state) shared(acadoWorkspace, acadoVariables)\nfor (lRun1 = 0; lRun1 < 20; ++lRun1)\n{\nstate[0] = acadoVariables.x[lRun1 * 10];\nstate[1] = acadoVariables.x[lRun1 * 10 + 1];\nstate[2] = acadoVariables.x[lRun1 * 10 + 2];\nstate[3] = acadoVariables.x[lRun1 * 10 + 3];\nstate[4] = acadoVariables.x[lRun1 * 10 + 4];\nstate[5] = acadoVariables.x[lRun1 * 10 + 5];\nstate[6] = acadoVariables.x[lRun1 * 10 + 6];\nstate[7] = acadoVariables.x[lRun1 * 10 + 7];\nstate[8] = acadoVariables.x[lRun1 * 10 + 8];\nstate[9] = acadoVariables.x[lRun1 * 10 + 9];\n\nstate[150] = acadoVariables.u[lRun1 * 4];\nstate[151] = acadoVariables.u[lRun1 * 4 + 1];\nstate[152] = acadoVariables.u[lRun1 * 4 + 2];\nstate[153] = acadoVariables.u[lRun1 * 4 + 3];\nstate[154] = acadoVariables.od[lRun1 * 10];\nstate[155] = acadoVariables.od[lRun1 * 10 + 1];\nstate[156] = acadoVariables.od[lRun1 * 10 + 2];\nstate[157] = acadoVariables.od[lRun1 * 10 + 3];\nstate[158] = acadoVariables.od[lRun1 * 10 + 4];\nstate[159] = acadoVariables.od[lRun1 * 10 + 5];\nstate[160] = acadoVariables.od[lRun1 * 10 + 6];\nstate[161] = acadoVariables.od[lRun1 * 10 + 7];\nstate[162] = acadoVariables.od[lRun1 * 10 + 8];\nstate[163] = acadoVariables.od[lRun1 * 10 + 9];\n\nret = acado_integrate(state, 1);\n\nacadoWorkspace.d[lRun1 * 10] = state[0] - acadoVariables.x[lRun1 * 10 + 10];\nacadoWorkspace.d[lRun1 * 10 + 1] = state[1] - acadoVariables.x[lRun1 * 10 + 11];\nacadoWorkspace.d[lRun1 * 10 + 2] = state[2] - acadoVariables.x[lRun1 * 10 + 12];\nacadoWorkspace.d[lRun1 * 10 + 3] = state[3] - acadoVariables.x[lRun1 * 10 + 13];\nacadoWorkspace.d[lRun1 * 10 + 4] = state[4] - acadoVariables.x[lRun1 * 10 + 14];\nacadoWorkspace.d[lRun1 * 10 + 5] = state[5] - acadoVariables.x[lRun1 * 10 + 15];\nacadoWorkspace.d[lRun1 * 10 + 6] = state[6] - acadoVariables.x[lRun1 * 10 + 16];\nacadoWorkspace.d[lRun1 * 10 + 7] = state[7] - acadoVariables.x[lRun1 * 10 + 17];\nacadoWorkspace.d[lRun1 * 10 + 8] = state[8] - acadoVariables.x[lRun1 * 10 + 18];\nacadoWorkspace.d[lRun1 * 10 + 9] = state[9] - acadoVariables.x[lRun1 * 10 + 19];\n\nacadoWorkspace.evGx[lRun1 * 100] = state[10];\nacadoWorkspace.evGx[lRun1 * 100 + 1] = state[11];\nacadoWorkspace.evGx[lRun1 * 100 + 2] = state[12];\nacadoWorkspace.evGx[lRun1 * 100 + 3] = state[13];\nacadoWorkspace.evGx[lRun1 * 100 + 4] = state[14];\nacadoWorkspace.evGx[lRun1 * 100 + 5] = state[15];\nacadoWorkspace.evGx[lRun1 * 100 + 6] = state[16];\nacadoWorkspace.evGx[lRun1 * 100 + 7] = state[17];\nacadoWorkspace.evGx[lRun1 * 100 + 8] = state[18];\nacadoWorkspace.evGx[lRun1 * 100 + 9] = state[19];\nacadoWorkspace.evGx[lRun1 * 100 + 10] = state[20];\nacadoWorkspace.evGx[lRun1 * 100 + 11] = state[21];\nacadoWorkspace.evGx[lRun1 * 100 + 12] = state[22];\nacadoWorkspace.evGx[lRun1 * 100 + 13] = state[23];\nacadoWorkspace.evGx[lRun1 * 100 + 14] = state[24];\nacadoWorkspace.evGx[lRun1 * 100 + 15] = state[25];\nacadoWorkspace.evGx[lRun1 * 100 + 16] = state[26];\nacadoWorkspace.evGx[lRun1 * 100 + 17] = state[27];\nacadoWorkspace.evGx[lRun1 * 100 + 18] = state[28];\nacadoWorkspace.evGx[lRun1 * 100 + 19] = state[29];\nacadoWorkspace.evGx[lRun1 * 100 + 20] = state[30];\nacadoWorkspace.evGx[lRun1 * 100 + 21] = state[31];\nacadoWorkspace.evGx[lRun1 * 100 + 22] = state[32];\nacadoWorkspace.evGx[lRun1 * 100 + 23] = state[33];\nacadoWorkspace.evGx[lRun1 * 100 + 24] = state[34];\nacadoWorkspace.evGx[lRun1 * 100 + 25] = state[35];\nacadoWorkspace.evGx[lRun1 * 100 + 26] = state[36];\nacadoWorkspace.evGx[lRun1 * 100 + 27] = state[37];\nacadoWorkspace.evGx[lRun1 * 100 + 28] = state[38];\nacadoWorkspace.evGx[lRun1 * 100 + 29] = state[39];\nacadoWorkspace.evGx[lRun1 * 100 + 30] = state[40];\nacadoWorkspace.evGx[lRun1 * 100 + 31] = state[41];\nacadoWorkspace.evGx[lRun1 * 100 + 32] = state[42];\nacadoWorkspace.evGx[lRun1 * 100 + 33] = state[43];\nacadoWorkspace.evGx[lRun1 * 100 + 34] = state[44];\nacadoWorkspace.evGx[lRun1 * 100 + 35] = state[45];\nacadoWorkspace.evGx[lRun1 * 100 + 36] = state[46];\nacadoWorkspace.evGx[lRun1 * 100 + 37] = state[47];\nacadoWorkspace.evGx[lRun1 * 100 + 38] = state[48];\nacadoWorkspace.evGx[lRun1 * 100 + 39] = state[49];\nacadoWorkspace.evGx[lRun1 * 100 + 40] = state[50];\nacadoWorkspace.evGx[lRun1 * 100 + 41] = state[51];\nacadoWorkspace.evGx[lRun1 * 100 + 42] = state[52];\nacadoWorkspace.evGx[lRun1 * 100 + 43] = state[53];\nacadoWorkspace.evGx[lRun1 * 100 + 44] = state[54];\nacadoWorkspace.evGx[lRun1 * 100 + 45] = state[55];\nacadoWorkspace.evGx[lRun1 * 100 + 46] = state[56];\nacadoWorkspace.evGx[lRun1 * 100 + 47] = state[57];\nacadoWorkspace.evGx[lRun1 * 100 + 48] = state[58];\nacadoWorkspace.evGx[lRun1 * 100 + 49] = state[59];\nacadoWorkspace.evGx[lRun1 * 100 + 50] = state[60];\nacadoWorkspace.evGx[lRun1 * 100 + 51] = state[61];\nacadoWorkspace.evGx[lRun1 * 100 + 52] = state[62];\nacadoWorkspace.evGx[lRun1 * 100 + 53] = state[63];\nacadoWorkspace.evGx[lRun1 * 100 + 54] = state[64];\nacadoWorkspace.evGx[lRun1 * 100 + 55] = state[65];\nacadoWorkspace.evGx[lRun1 * 100 + 56] = state[66];\nacadoWorkspace.evGx[lRun1 * 100 + 57] = state[67];\nacadoWorkspace.evGx[lRun1 * 100 + 58] = state[68];\nacadoWorkspace.evGx[lRun1 * 100 + 59] = state[69];\nacadoWorkspace.evGx[lRun1 * 100 + 60] = state[70];\nacadoWorkspace.evGx[lRun1 * 100 + 61] = state[71];\nacadoWorkspace.evGx[lRun1 * 100 + 62] = state[72];\nacadoWorkspace.evGx[lRun1 * 100 + 63] = state[73];\nacadoWorkspace.evGx[lRun1 * 100 + 64] = state[74];\nacadoWorkspace.evGx[lRun1 * 100 + 65] = state[75];\nacadoWorkspace.evGx[lRun1 * 100 + 66] = state[76];\nacadoWorkspace.evGx[lRun1 * 100 + 67] = state[77];\nacadoWorkspace.evGx[lRun1 * 100 + 68] = state[78];\nacadoWorkspace.evGx[lRun1 * 100 + 69] = state[79];\nacadoWorkspace.evGx[lRun1 * 100 + 70] = state[80];\nacadoWorkspace.evGx[lRun1 * 100 + 71] = state[81];\nacadoWorkspace.evGx[lRun1 * 100 + 72] = state[82];\nacadoWorkspace.evGx[lRun1 * 100 + 73] = state[83];\nacadoWorkspace.evGx[lRun1 * 100 + 74] = state[84];\nacadoWorkspace.evGx[lRun1 * 100 + 75] = state[85];\nacadoWorkspace.evGx[lRun1 * 100 + 76] = state[86];\nacadoWorkspace.evGx[lRun1 * 100 + 77] = state[87];\nacadoWorkspace.evGx[lRun1 * 100 + 78] = state[88];\nacadoWorkspace.evGx[lRun1 * 100 + 79] = state[89];\nacadoWorkspace.evGx[lRun1 * 100 + 80] = state[90];\nacadoWorkspace.evGx[lRun1 * 100 + 81] = state[91];\nacadoWorkspace.evGx[lRun1 * 100 + 82] = state[92];\nacadoWorkspace.evGx[lRun1 * 100 + 83] = state[93];\nacadoWorkspace.evGx[lRun1 * 100 + 84] = state[94];\nacadoWorkspace.evGx[lRun1 * 100 + 85] = state[95];\nacadoWorkspace.evGx[lRun1 * 100 + 86] = state[96];\nacadoWorkspace.evGx[lRun1 * 100 + 87] = state[97];\nacadoWorkspace.evGx[lRun1 * 100 + 88] = state[98];\nacadoWorkspace.evGx[lRun1 * 100 + 89] = state[99];\nacadoWorkspace.evGx[lRun1 * 100 + 90] = state[100];\nacadoWorkspace.evGx[lRun1 * 100 + 91] = state[101];\nacadoWorkspace.evGx[lRun1 * 100 + 92] = state[102];\nacadoWorkspace.evGx[lRun1 * 100 + 93] = state[103];\nacadoWorkspace.evGx[lRun1 * 100 + 94] = state[104];\nacadoWorkspace.evGx[lRun1 * 100 + 95] = state[105];\nacadoWorkspace.evGx[lRun1 * 100 + 96] = state[106];\nacadoWorkspace.evGx[lRun1 * 100 + 97] = state[107];\nacadoWorkspace.evGx[lRun1 * 100 + 98] = state[108];\nacadoWorkspace.evGx[lRun1 * 100 + 99] = state[109];\n\nacadoWorkspace.evGu[lRun1 * 40] = state[110];\nacadoWorkspace.evGu[lRun1 * 40 + 1] = state[111];\nacadoWorkspace.evGu[lRun1 * 40 + 2] = state[112];\nacadoWorkspace.evGu[lRun1 * 40 + 3] = state[113];\nacadoWorkspace.evGu[lRun1 * 40 + 4] = state[114];\nacadoWorkspace.evGu[lRun1 * 40 + 5] = state[115];\nacadoWorkspace.evGu[lRun1 * 40 + 6] = state[116];\nacadoWorkspace.evGu[lRun1 * 40 + 7] = state[117];\nacadoWorkspace.evGu[lRun1 * 40 + 8] = state[118];\nacadoWorkspace.evGu[lRun1 * 40 + 9] = state[119];\nacadoWorkspace.evGu[lRun1 * 40 + 10] = state[120];\nacadoWorkspace.evGu[lRun1 * 40 + 11] = state[121];\nacadoWorkspace.evGu[lRun1 * 40 + 12] = state[122];\nacadoWorkspace.evGu[lRun1 * 40 + 13] = state[123];\nacadoWorkspace.evGu[lRun1 * 40 + 14] = state[124];\nacadoWorkspace.evGu[lRun1 * 40 + 15] = state[125];\nacadoWorkspace.evGu[lRun1 * 40 + 16] = state[126];\nacadoWorkspace.evGu[lRun1 * 40 + 17] = state[127];\nacadoWorkspace.evGu[lRun1 * 40 + 18] = state[128];\nacadoWorkspace.evGu[lRun1 * 40 + 19] = state[129];\nacadoWorkspace.evGu[lRun1 * 40 + 20] = state[130];\nacadoWorkspace.evGu[lRun1 * 40 + 21] = state[131];\nacadoWorkspace.evGu[lRun1 * 40 + 22] = state[132];\nacadoWorkspace.evGu[lRun1 * 40 + 23] = state[133];\nacadoWorkspace.evGu[lRun1 * 40 + 24] = state[134];\nacadoWorkspace.evGu[lRun1 * 40 + 25] = state[135];\nacadoWorkspace.evGu[lRun1 * 40 + 26] = state[136];\nacadoWorkspace.evGu[lRun1 * 40 + 27] = state[137];\nacadoWorkspace.evGu[lRun1 * 40 + 28] = state[138];\nacadoWorkspace.evGu[lRun1 * 40 + 29] = state[139];\nacadoWorkspace.evGu[lRun1 * 40 + 30] = state[140];\nacadoWorkspace.evGu[lRun1 * 40 + 31] = state[141];\nacadoWorkspace.evGu[lRun1 * 40 + 32] = state[142];\nacadoWorkspace.evGu[lRun1 * 40 + 33] = state[143];\nacadoWorkspace.evGu[lRun1 * 40 + 34] = state[144];\nacadoWorkspace.evGu[lRun1 * 40 + 35] = state[145];\nacadoWorkspace.evGu[lRun1 * 40 + 36] = state[146];\nacadoWorkspace.evGu[lRun1 * 40 + 37] = state[147];\nacadoWorkspace.evGu[lRun1 * 40 + 38] = state[148];\nacadoWorkspace.evGu[lRun1 * 40 + 39] = state[149];\n}\nreturn ret;\n}\n\nvoid acado_evaluateLSQ(const real_t* in, real_t* out)\n{\nconst real_t* xd = in;\nconst real_t* u = in + 10;\nconst real_t* od = in + 14;\n/* Vector of auxiliary variables; number of elements: 35. */\nreal_t* a = acadoWorkspace.objAuxVar;\n\n/* Compute intermediate quantities: */\na[0] = (((((((((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))))*(od[0]-xd[0]))+(((((((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5]))))*(od[1]-xd[1])))+(((((((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))))*(od[2]-xd[2])));\na[1] = (((((((((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5]))))*(od[2]-xd[2]))+(((((((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5]))))*(od[0]-xd[0])))+(((((((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5]))))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))))*(od[1]-xd[1])));\na[2] = (((((((((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5]))))*(od[1]-xd[1]))+(((((((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3]))))*(od[2]-xd[2])))+(((((((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))))*(od[0]-xd[0])));\na[3] = (((((((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))))*((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)));\na[4] = ((real_t)(1.0000000000000000e+00)/(a[1]+(real_t)(1.0000000000000001e-01)));\na[5] = (((((((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5]))))*((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)));\na[6] = (a[4]*a[4]);\na[7] = (((((((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5]))))*((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)));\na[8] = (((((((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5]))))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))))*((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)));\na[9] = (((((((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))))*((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)));\na[10] = (((((((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5]))))*((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)));\na[11] = ((((((((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[6]))+((od[8]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[8]))))+((od[9]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[9]))))+((od[7]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*od[7])))*(od[0]-xd[0]))+((((((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[9]))+((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[9])))+((od[8]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[7])))+((((real_t)(0.0000000000000000e+00)-od[8])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[7]))))*(od[1]-xd[1])))+((((((od[6]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[8])))+((od[6]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[8]))))+((od[9]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*od[7])))+((od[9]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*od[7])))*(od[2]-xd[2])));\na[12] = ((((((((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[6]))+((od[8]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[8]))))+((od[9]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*od[9])))+((od[7]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*((real_t)(0.0000000000000000e+00)-od[7]))))*(od[2]-xd[2]))+((((((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[8]))+((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[8])))+((od[9]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*od[7])))+((((real_t)(0.0000000000000000e+00)-od[9])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[7]))))*(od[0]-xd[0])))+((((((od[6]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[7])))+((od[6]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[7]))))+((od[8]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[9])))+((od[8]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[9])))*(od[1]-xd[1])));\na[13] = (((((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*(((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[9]))))+((od[8]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[8]))))+((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*od[6])))*(od[0]-xd[0]))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[8]))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[8])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[6])))+(((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[9])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[6]))))*(od[1]-xd[1])))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[9])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[9]))))+((od[8]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*od[6])))+((od[8]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*od[6])))*(od[2]-xd[2])));\na[14] = (((((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*(((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[9]))))+((od[8]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*od[8])))+((od[6]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*((real_t)(0.0000000000000000e+00)-od[6]))))*(od[2]-xd[2]))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9]))))+((od[8]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*od[6])))+((((real_t)(0.0000000000000000e+00)-od[8])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[6]))))*(od[0]-xd[0])))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[6])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[6]))))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[8])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[8])))*(od[1]-xd[1])));\na[15] = (((((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])))+((od[6]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[6]))))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*(((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[7]))))+((od[9]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*od[9])))*(od[0]-xd[0]))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7]))))+((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[9])))+((((real_t)(0.0000000000000000e+00)-od[6])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[9]))))*(od[1]-xd[1])))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[6])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[6]))))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*od[9])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*od[9])))*(od[2]-xd[2])));\na[16] = (((((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])))+((od[6]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[6]))))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7]))))+((od[9]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*((real_t)(0.0000000000000000e+00)-od[9]))))*(od[2]-xd[2]))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[6]))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[6])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*od[9])))+(((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[7])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[9]))))*(od[0]-xd[0])))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[9])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[9]))))+((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7]))))+((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7]))))*(od[1]-xd[1])));\na[17] = (((((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])))+((od[7]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[7]))))+((od[6]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[6]))))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8]))))*(od[0]-xd[0]))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[6]))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[6])))+((od[7]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8]))))+((((real_t)(0.0000000000000000e+00)-od[7])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3]))*(((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[8]))))*(od[1]-xd[1])))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[7])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[7]))))+((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8]))))+((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8]))))*(od[2]-xd[2])));\na[18] = (((((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])))+((od[7]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[7]))))+((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*od[6])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*(((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[8]))))*(od[2]-xd[2]))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[7]))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[7])))+((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8]))))+((((real_t)(0.0000000000000000e+00)-od[6])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3]))*(((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[8]))))*(od[0]-xd[0])))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[8])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[8]))))+((od[7]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[6])))+((od[7]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[6])))*(od[1]-xd[1])));\na[19] = (((((((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))))*((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)));\na[20] = ((real_t)(1.0000000000000000e+00)/(a[1]+(real_t)(1.0000000000000001e-01)));\na[21] = (((((((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5]))))*((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)));\na[22] = (a[20]*a[20]);\na[23] = (((((((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5]))))*((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)));\na[24] = (((((((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5]))))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))))*((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)));\na[25] = (((((((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3]))))*((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)));\na[26] = (((((((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5]))))*((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)));\na[27] = ((((((((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[6]))+((od[8]*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[8])))+((od[9]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[9]))))+((od[7]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*((real_t)(0.0000000000000000e+00)-od[7]))))*(od[1]-xd[1]))+((((((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[7]))+((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[7])))+((od[8]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[9])))+((((real_t)(0.0000000000000000e+00)-od[8])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[9]))))*(od[2]-xd[2])))+((((((od[6]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[9])))+((od[6]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[9]))))+((od[8]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[7])))+((od[8]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[7])))*(od[0]-xd[0])));\na[28] = ((((((((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[6]))+((od[8]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[8]))))+((od[9]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*od[9])))+((od[7]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*((real_t)(0.0000000000000000e+00)-od[7]))))*(od[2]-xd[2]))+((((((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[8]))+((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[8])))+((od[9]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*od[7])))+((((real_t)(0.0000000000000000e+00)-od[9])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[7]))))*(od[0]-xd[0])))+((((((od[6]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[7])))+((od[6]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[7]))))+((od[8]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[9])))+((od[8]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[9])))*(od[1]-xd[1])));\na[29] = (((((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9]))))+((od[8]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[8]))))+((od[6]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*((real_t)(0.0000000000000000e+00)-od[6]))))*(od[1]-xd[1]))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[6]))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[6])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[8])))+(((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[9])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[8]))))*(od[2]-xd[2])))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[8])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[8]))))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[6])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[6])))*(od[0]-xd[0])));\na[30] = (((((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*(((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[9]))))+((od[8]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*od[8])))+((od[6]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*((real_t)(0.0000000000000000e+00)-od[6]))))*(od[2]-xd[2]))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9]))))+((od[8]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*od[6])))+((((real_t)(0.0000000000000000e+00)-od[8])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[6]))))*(od[0]-xd[0])))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[6])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[6]))))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[8])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[8])))*(od[1]-xd[1])));\na[31] = (((((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])))+((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[6])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*(((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[7]))))+((od[9]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*((real_t)(0.0000000000000000e+00)-od[9]))))*(od[1]-xd[1]))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[9]))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[9])))+((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7]))))+((((real_t)(0.0000000000000000e+00)-od[6])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3]))*(((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[7]))))*(od[2]-xd[2])))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[7])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[7]))))+((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[9])))+((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[9])))*(od[0]-xd[0])));\na[32] = (((((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])))+((od[6]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[6]))))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7]))))+((od[9]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*((real_t)(0.0000000000000000e+00)-od[9]))))*(od[2]-xd[2]))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[6]))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[6])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*od[9])))+(((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[7])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[9]))))*(od[0]-xd[0])))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[9])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[9]))))+((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7]))))+((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7]))))*(od[1]-xd[1])));\na[33] = (((((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])))+((od[7]*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[7])))+((od[6]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[6]))))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*(((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[8]))))*(od[1]-xd[1]))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8]))))+((od[7]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[6])))+((((real_t)(0.0000000000000000e+00)-od[7])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[6]))))*(od[2]-xd[2])))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[6])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[6]))))+((od[7]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8]))))+((od[7]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8]))))*(od[0]-xd[0])));\na[34] = (((((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])))+((od[7]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[7]))))+((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*od[6])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*(((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[8]))))*(od[2]-xd[2]))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[7]))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[7])))+((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8]))))+((((real_t)(0.0000000000000000e+00)-od[6])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3]))*(((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[8]))))*(od[0]-xd[0])))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[8])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[8]))))+((od[7]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[6])))+((od[7]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[6])))*(od[1]-xd[1])));\n\n/* Compute outputs: */\nout[0] = xd[0];\nout[1] = xd[1];\nout[2] = xd[2];\nout[3] = xd[3];\nout[4] = xd[4];\nout[5] = xd[5];\nout[6] = xd[6];\nout[7] = xd[7];\nout[8] = xd[8];\nout[9] = xd[9];\nout[10] = (a[0]/(a[1]+(real_t)(1.0000000000000001e-01)));\nout[11] = (a[2]/(a[1]+(real_t)(1.0000000000000001e-01)));\nout[12] = u[0];\nout[13] = u[1];\nout[14] = u[2];\nout[15] = u[3];\nout[16] = (real_t)(1.0000000000000000e+00);\nout[17] = (real_t)(0.0000000000000000e+00);\nout[18] = (real_t)(0.0000000000000000e+00);\nout[19] = (real_t)(0.0000000000000000e+00);\nout[20] = (real_t)(0.0000000000000000e+00);\nout[21] = (real_t)(0.0000000000000000e+00);\nout[22] = (real_t)(0.0000000000000000e+00);\nout[23] = (real_t)(0.0000000000000000e+00);\nout[24] = (real_t)(0.0000000000000000e+00);\nout[25] = (real_t)(0.0000000000000000e+00);\nout[26] = (real_t)(0.0000000000000000e+00);\nout[27] = (real_t)(1.0000000000000000e+00);\nout[28] = (real_t)(0.0000000000000000e+00);\nout[29] = (real_t)(0.0000000000000000e+00);\nout[30] = (real_t)(0.0000000000000000e+00);\nout[31] = (real_t)(0.0000000000000000e+00);\nout[32] = (real_t)(0.0000000000000000e+00);\nout[33] = (real_t)(0.0000000000000000e+00);\nout[34] = (real_t)(0.0000000000000000e+00);\nout[35] = (real_t)(0.0000000000000000e+00);\nout[36] = (real_t)(0.0000000000000000e+00);\nout[37] = (real_t)(0.0000000000000000e+00);\nout[38] = (real_t)(1.0000000000000000e+00);\nout[39] = (real_t)(0.0000000000000000e+00);\nout[40] = (real_t)(0.0000000000000000e+00);\nout[41] = (real_t)(0.0000000000000000e+00);\nout[42] = (real_t)(0.0000000000000000e+00);\nout[43] = (real_t)(0.0000000000000000e+00);\nout[44] = (real_t)(0.0000000000000000e+00);\nout[45] = (real_t)(0.0000000000000000e+00);\nout[46] = (real_t)(0.0000000000000000e+00);\nout[47] = (real_t)(0.0000000000000000e+00);\nout[48] = (real_t)(0.0000000000000000e+00);\nout[49] = (real_t)(1.0000000000000000e+00);\nout[50] = (real_t)(0.0000000000000000e+00);\nout[51] = (real_t)(0.0000000000000000e+00);\nout[52] = (real_t)(0.0000000000000000e+00);\nout[53] = (real_t)(0.0000000000000000e+00);\nout[54] = (real_t)(0.0000000000000000e+00);\nout[55] = (real_t)(0.0000000000000000e+00);\nout[56] = (real_t)(0.0000000000000000e+00);\nout[57] = (real_t)(0.0000000000000000e+00);\nout[58] = (real_t)(0.0000000000000000e+00);\nout[59] = (real_t)(0.0000000000000000e+00);\nout[60] = (real_t)(1.0000000000000000e+00);\nout[61] = (real_t)(0.0000000000000000e+00);\nout[62] = (real_t)(0.0000000000000000e+00);\nout[63] = (real_t)(0.0000000000000000e+00);\nout[64] = (real_t)(0.0000000000000000e+00);\nout[65] = (real_t)(0.0000000000000000e+00);\nout[66] = (real_t)(0.0000000000000000e+00);\nout[67] = (real_t)(0.0000000000000000e+00);\nout[68] = (real_t)(0.0000000000000000e+00);\nout[69] = (real_t)(0.0000000000000000e+00);\nout[70] = (real_t)(0.0000000000000000e+00);\nout[71] = (real_t)(1.0000000000000000e+00);\nout[72] = (real_t)(0.0000000000000000e+00);\nout[73] = (real_t)(0.0000000000000000e+00);\nout[74] = (real_t)(0.0000000000000000e+00);\nout[75] = (real_t)(0.0000000000000000e+00);\nout[76] = (real_t)(0.0000000000000000e+00);\nout[77] = (real_t)(0.0000000000000000e+00);\nout[78] = (real_t)(0.0000000000000000e+00);\nout[79] = (real_t)(0.0000000000000000e+00);\nout[80] = (real_t)(0.0000000000000000e+00);\nout[81] = (real_t)(0.0000000000000000e+00);\nout[82] = (real_t)(1.0000000000000000e+00);\nout[83] = (real_t)(0.0000000000000000e+00);\nout[84] = (real_t)(0.0000000000000000e+00);\nout[85] = (real_t)(0.0000000000000000e+00);\nout[86] = (real_t)(0.0000000000000000e+00);\nout[87] = (real_t)(0.0000000000000000e+00);\nout[88] = (real_t)(0.0000000000000000e+00);\nout[89] = (real_t)(0.0000000000000000e+00);\nout[90] = (real_t)(0.0000000000000000e+00);\nout[91] = (real_t)(0.0000000000000000e+00);\nout[92] = (real_t)(0.0000000000000000e+00);\nout[93] = (real_t)(1.0000000000000000e+00);\nout[94] = (real_t)(0.0000000000000000e+00);\nout[95] = (real_t)(0.0000000000000000e+00);\nout[96] = (real_t)(0.0000000000000000e+00);\nout[97] = (real_t)(0.0000000000000000e+00);\nout[98] = (real_t)(0.0000000000000000e+00);\nout[99] = (real_t)(0.0000000000000000e+00);\nout[100] = (real_t)(0.0000000000000000e+00);\nout[101] = (real_t)(0.0000000000000000e+00);\nout[102] = (real_t)(0.0000000000000000e+00);\nout[103] = (real_t)(0.0000000000000000e+00);\nout[104] = (real_t)(1.0000000000000000e+00);\nout[105] = (real_t)(0.0000000000000000e+00);\nout[106] = (real_t)(0.0000000000000000e+00);\nout[107] = (real_t)(0.0000000000000000e+00);\nout[108] = (real_t)(0.0000000000000000e+00);\nout[109] = (real_t)(0.0000000000000000e+00);\nout[110] = (real_t)(0.0000000000000000e+00);\nout[111] = (real_t)(0.0000000000000000e+00);\nout[112] = (real_t)(0.0000000000000000e+00);\nout[113] = (real_t)(0.0000000000000000e+00);\nout[114] = (real_t)(0.0000000000000000e+00);\nout[115] = (real_t)(1.0000000000000000e+00);\nout[116] = ((a[3]*a[4])-((a[0]*a[5])*a[6]));\nout[117] = ((a[7]*a[4])-((a[0]*a[8])*a[6]));\nout[118] = ((a[9]*a[4])-((a[0]*a[10])*a[6]));\nout[119] = ((a[11]*a[4])-((a[0]*a[12])*a[6]));\nout[120] = ((a[13]*a[4])-((a[0]*a[14])*a[6]));\nout[121] = ((a[15]*a[4])-((a[0]*a[16])*a[6]));\nout[122] = ((a[17]*a[4])-((a[0]*a[18])*a[6]));\nout[123] = (real_t)(0.0000000000000000e+00);\nout[124] = (real_t)(0.0000000000000000e+00);\nout[125] = (real_t)(0.0000000000000000e+00);\nout[126] = ((a[19]*a[20])-((a[2]*a[21])*a[22]));\nout[127] = ((a[23]*a[20])-((a[2]*a[24])*a[22]));\nout[128] = ((a[25]*a[20])-((a[2]*a[26])*a[22]));\nout[129] = ((a[27]*a[20])-((a[2]*a[28])*a[22]));\nout[130] = ((a[29]*a[20])-((a[2]*a[30])*a[22]));\nout[131] = ((a[31]*a[20])-((a[2]*a[32])*a[22]));\nout[132] = ((a[33]*a[20])-((a[2]*a[34])*a[22]));\nout[133] = (real_t)(0.0000000000000000e+00);\nout[134] = (real_t)(0.0000000000000000e+00);\nout[135] = (real_t)(0.0000000000000000e+00);\nout[136] = (real_t)(0.0000000000000000e+00);\nout[137] = (real_t)(0.0000000000000000e+00);\nout[138] = (real_t)(0.0000000000000000e+00);\nout[139] = (real_t)(0.0000000000000000e+00);\nout[140] = (real_t)(0.0000000000000000e+00);\nout[141] = (real_t)(0.0000000000000000e+00);\nout[142] = (real_t)(0.0000000000000000e+00);\nout[143] = (real_t)(0.0000000000000000e+00);\nout[144] = (real_t)(0.0000000000000000e+00);\nout[145] = (real_t)(0.0000000000000000e+00);\nout[146] = (real_t)(0.0000000000000000e+00);\nout[147] = (real_t)(0.0000000000000000e+00);\nout[148] = (real_t)(0.0000000000000000e+00);\nout[149] = (real_t)(0.0000000000000000e+00);\nout[150] = (real_t)(0.0000000000000000e+00);\nout[151] = (real_t)(0.0000000000000000e+00);\nout[152] = (real_t)(0.0000000000000000e+00);\nout[153] = (real_t)(0.0000000000000000e+00);\nout[154] = (real_t)(0.0000000000000000e+00);\nout[155] = (real_t)(0.0000000000000000e+00);\nout[156] = (real_t)(0.0000000000000000e+00);\nout[157] = (real_t)(0.0000000000000000e+00);\nout[158] = (real_t)(0.0000000000000000e+00);\nout[159] = (real_t)(0.0000000000000000e+00);\nout[160] = (real_t)(0.0000000000000000e+00);\nout[161] = (real_t)(0.0000000000000000e+00);\nout[162] = (real_t)(0.0000000000000000e+00);\nout[163] = (real_t)(0.0000000000000000e+00);\nout[164] = (real_t)(0.0000000000000000e+00);\nout[165] = (real_t)(0.0000000000000000e+00);\nout[166] = (real_t)(0.0000000000000000e+00);\nout[167] = (real_t)(0.0000000000000000e+00);\nout[168] = (real_t)(0.0000000000000000e+00);\nout[169] = (real_t)(0.0000000000000000e+00);\nout[170] = (real_t)(0.0000000000000000e+00);\nout[171] = (real_t)(0.0000000000000000e+00);\nout[172] = (real_t)(0.0000000000000000e+00);\nout[173] = (real_t)(0.0000000000000000e+00);\nout[174] = (real_t)(0.0000000000000000e+00);\nout[175] = (real_t)(0.0000000000000000e+00);\n}\n\nvoid acado_evaluateLSQEndTerm(const real_t* in, real_t* out)\n{\nconst real_t* xd = in;\nconst real_t* od = in + 10;\n/* Vector of auxiliary variables; number of elements: 35. */\nreal_t* a = acadoWorkspace.objAuxVar;\n\n/* Compute intermediate quantities: */\na[0] = (((((((((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))))*(od[0]-xd[0]))+(((((((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5]))))*(od[1]-xd[1])))+(((((((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))))*(od[2]-xd[2])));\na[1] = (((((((((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5]))))*(od[2]-xd[2]))+(((((((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5]))))*(od[0]-xd[0])))+(((((((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5]))))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))))*(od[1]-xd[1])));\na[2] = (((((((((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5]))))*(od[1]-xd[1]))+(((((((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3]))))*(od[2]-xd[2])))+(((((((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))))*(od[0]-xd[0])));\na[3] = (((((((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))))*((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)));\na[4] = ((real_t)(1.0000000000000000e+00)/(a[1]+(real_t)(1.0000000000000001e-01)));\na[5] = (((((((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5]))))*((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)));\na[6] = (a[4]*a[4]);\na[7] = (((((((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5]))))*((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)));\na[8] = (((((((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5]))))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))))*((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)));\na[9] = (((((((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))))*((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)));\na[10] = (((((((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5]))))*((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)));\na[11] = ((((((((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[6]))+((od[8]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[8]))))+((od[9]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[9]))))+((od[7]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*od[7])))*(od[0]-xd[0]))+((((((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[9]))+((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[9])))+((od[8]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[7])))+((((real_t)(0.0000000000000000e+00)-od[8])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[7]))))*(od[1]-xd[1])))+((((((od[6]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[8])))+((od[6]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[8]))))+((od[9]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*od[7])))+((od[9]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*od[7])))*(od[2]-xd[2])));\na[12] = ((((((((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[6]))+((od[8]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[8]))))+((od[9]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*od[9])))+((od[7]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*((real_t)(0.0000000000000000e+00)-od[7]))))*(od[2]-xd[2]))+((((((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[8]))+((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[8])))+((od[9]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*od[7])))+((((real_t)(0.0000000000000000e+00)-od[9])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[7]))))*(od[0]-xd[0])))+((((((od[6]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[7])))+((od[6]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[7]))))+((od[8]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[9])))+((od[8]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[9])))*(od[1]-xd[1])));\na[13] = (((((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*(((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[9]))))+((od[8]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[8]))))+((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*od[6])))*(od[0]-xd[0]))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[8]))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[8])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[6])))+(((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[9])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[6]))))*(od[1]-xd[1])))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[9])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[9]))))+((od[8]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*od[6])))+((od[8]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*od[6])))*(od[2]-xd[2])));\na[14] = (((((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*(((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[9]))))+((od[8]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*od[8])))+((od[6]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*((real_t)(0.0000000000000000e+00)-od[6]))))*(od[2]-xd[2]))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9]))))+((od[8]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*od[6])))+((((real_t)(0.0000000000000000e+00)-od[8])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[6]))))*(od[0]-xd[0])))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[6])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[6]))))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[8])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[8])))*(od[1]-xd[1])));\na[15] = (((((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])))+((od[6]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[6]))))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*(((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[7]))))+((od[9]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*od[9])))*(od[0]-xd[0]))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7]))))+((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[9])))+((((real_t)(0.0000000000000000e+00)-od[6])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[9]))))*(od[1]-xd[1])))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[6])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[6]))))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*od[9])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*od[9])))*(od[2]-xd[2])));\na[16] = (((((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])))+((od[6]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[6]))))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7]))))+((od[9]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*((real_t)(0.0000000000000000e+00)-od[9]))))*(od[2]-xd[2]))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[6]))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[6])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*od[9])))+(((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[7])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[9]))))*(od[0]-xd[0])))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[9])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[9]))))+((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7]))))+((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7]))))*(od[1]-xd[1])));\na[17] = (((((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])))+((od[7]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[7]))))+((od[6]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[6]))))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8]))))*(od[0]-xd[0]))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[6]))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[6])))+((od[7]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8]))))+((((real_t)(0.0000000000000000e+00)-od[7])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3]))*(((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[8]))))*(od[1]-xd[1])))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[7])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[7]))))+((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8]))))+((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8]))))*(od[2]-xd[2])));\na[18] = (((((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])))+((od[7]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[7]))))+((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*od[6])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*(((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[8]))))*(od[2]-xd[2]))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[7]))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[7])))+((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8]))))+((((real_t)(0.0000000000000000e+00)-od[6])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3]))*(((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[8]))))*(od[0]-xd[0])))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[8])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[8]))))+((od[7]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[6])))+((od[7]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[6])))*(od[1]-xd[1])));\na[19] = (((((((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))))*((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)));\na[20] = ((real_t)(1.0000000000000000e+00)/(a[1]+(real_t)(1.0000000000000001e-01)));\na[21] = (((((((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5]))))*((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)));\na[22] = (a[20]*a[20]);\na[23] = (((((((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5]))))*((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)));\na[24] = (((((((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5]))))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))))*((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)));\na[25] = (((((((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3]))))*((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)));\na[26] = (((((((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5]))))*((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)));\na[27] = ((((((((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[6]))+((od[8]*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[8])))+((od[9]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[9]))))+((od[7]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*((real_t)(0.0000000000000000e+00)-od[7]))))*(od[1]-xd[1]))+((((((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[7]))+((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[7])))+((od[8]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[9])))+((((real_t)(0.0000000000000000e+00)-od[8])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[9]))))*(od[2]-xd[2])))+((((((od[6]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[9])))+((od[6]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[9]))))+((od[8]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[7])))+((od[8]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[7])))*(od[0]-xd[0])));\na[28] = ((((((((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[6]))+((od[8]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[8]))))+((od[9]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*od[9])))+((od[7]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*((real_t)(0.0000000000000000e+00)-od[7]))))*(od[2]-xd[2]))+((((((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[8]))+((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[8])))+((od[9]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*od[7])))+((((real_t)(0.0000000000000000e+00)-od[9])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[7]))))*(od[0]-xd[0])))+((((((od[6]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[7])))+((od[6]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[7]))))+((od[8]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[9])))+((od[8]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[9])))*(od[1]-xd[1])));\na[29] = (((((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9]))))+((od[8]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[8]))))+((od[6]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*((real_t)(0.0000000000000000e+00)-od[6]))))*(od[1]-xd[1]))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[6]))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[6])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[8])))+(((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[9])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[8]))))*(od[2]-xd[2])))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[8])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[8]))))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[6])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[6])))*(od[0]-xd[0])));\na[30] = (((((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*(((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[9]))))+((od[8]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*od[8])))+((od[6]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*((real_t)(0.0000000000000000e+00)-od[6]))))*(od[2]-xd[2]))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9]))))+((od[8]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*od[6])))+((((real_t)(0.0000000000000000e+00)-od[8])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[6]))))*(od[0]-xd[0])))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[6])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[6]))))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[8])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[8])))*(od[1]-xd[1])));\na[31] = (((((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])))+((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[6])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*(((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[7]))))+((od[9]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*((real_t)(0.0000000000000000e+00)-od[9]))))*(od[1]-xd[1]))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[9]))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[9])))+((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7]))))+((((real_t)(0.0000000000000000e+00)-od[6])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3]))*(((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[7]))))*(od[2]-xd[2])))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[7])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[7]))))+((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[9])))+((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[9])))*(od[0]-xd[0])));\na[32] = (((((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])))+((od[6]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[6]))))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7]))))+((od[9]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*((real_t)(0.0000000000000000e+00)-od[9]))))*(od[2]-xd[2]))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[6]))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[6])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7])*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*od[9])))+(((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[7])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[9]))))*(od[0]-xd[0])))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[9])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[9]))))+((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7]))))+((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[7]))))*(od[1]-xd[1])));\na[33] = (((((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])))+((od[7]*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[7])))+((od[6]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[6]))))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*(((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[8]))))*(od[1]-xd[1]))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8]))))+((od[7]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[6])))+((((real_t)(0.0000000000000000e+00)-od[7])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[6]))))*(od[2]-xd[2])))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[6])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[6]))))+((od[7]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8]))))+((od[7]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8]))))*(od[0]-xd[0])));\na[34] = (((((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])))+((od[7]*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[4]))*od[9])-(od[6]*xd[5]))-(od[7]*xd[6]))-(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*((real_t)(0.0000000000000000e+00)-od[7]))))+((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*od[6])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5]))*(((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[8]))))*(od[2]-xd[2]))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[7]))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*od[7])))+((od[6]*((((((real_t)(0.0000000000000000e+00)-xd[6])*od[8])+(od[6]*xd[4]))+(od[7]*xd[3]))+(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3]))*(((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[8]))))+((((real_t)(0.0000000000000000e+00)-od[6])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[5]))*od[7])-(od[6]*xd[6]))-(od[8]*xd[4]))-(od[9]*xd[3]))*(((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[8]))))*(od[0]-xd[0])))+(((((((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[8])))+(((((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*od[9])*((((((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-xd[6]))*od[8])-(od[6]*xd[4]))-(od[7]*xd[3]))-(od[9]*xd[5])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[7])+(((real_t)(0.0000000000000000e+00)-xd[5])*od[8]))+(((real_t)(0.0000000000000000e+00)-xd[6])*od[9]))+(od[6]*xd[3]))*(((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*od[8]))))+((od[7]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[6])))+((od[7]*((((((real_t)(0.0000000000000000e+00)-xd[5])*od[7])+(od[6]*xd[6]))+(od[8]*xd[4]))+(od[9]*xd[3])))+(((((((real_t)(0.0000000000000000e+00)-xd[4])*od[9])+(od[6]*xd[5]))+(od[7]*xd[6]))+(od[8]*xd[3]))*od[6])))*(od[1]-xd[1])));\n\n/* Compute outputs: */\nout[0] = xd[0];\nout[1] = xd[1];\nout[2] = xd[2];\nout[3] = xd[3];\nout[4] = xd[4];\nout[5] = xd[5];\nout[6] = xd[6];\nout[7] = xd[7];\nout[8] = xd[8];\nout[9] = xd[9];\nout[10] = (a[0]/(a[1]+(real_t)(1.0000000000000001e-01)));\nout[11] = (a[2]/(a[1]+(real_t)(1.0000000000000001e-01)));\nout[12] = (real_t)(1.0000000000000000e+00);\nout[13] = (real_t)(0.0000000000000000e+00);\nout[14] = (real_t)(0.0000000000000000e+00);\nout[15] = (real_t)(0.0000000000000000e+00);\nout[16] = (real_t)(0.0000000000000000e+00);\nout[17] = (real_t)(0.0000000000000000e+00);\nout[18] = (real_t)(0.0000000000000000e+00);\nout[19] = (real_t)(0.0000000000000000e+00);\nout[20] = (real_t)(0.0000000000000000e+00);\nout[21] = (real_t)(0.0000000000000000e+00);\nout[22] = (real_t)(0.0000000000000000e+00);\nout[23] = (real_t)(1.0000000000000000e+00);\nout[24] = (real_t)(0.0000000000000000e+00);\nout[25] = (real_t)(0.0000000000000000e+00);\nout[26] = (real_t)(0.0000000000000000e+00);\nout[27] = (real_t)(0.0000000000000000e+00);\nout[28] = (real_t)(0.0000000000000000e+00);\nout[29] = (real_t)(0.0000000000000000e+00);\nout[30] = (real_t)(0.0000000000000000e+00);\nout[31] = (real_t)(0.0000000000000000e+00);\nout[32] = (real_t)(0.0000000000000000e+00);\nout[33] = (real_t)(0.0000000000000000e+00);\nout[34] = (real_t)(1.0000000000000000e+00);\nout[35] = (real_t)(0.0000000000000000e+00);\nout[36] = (real_t)(0.0000000000000000e+00);\nout[37] = (real_t)(0.0000000000000000e+00);\nout[38] = (real_t)(0.0000000000000000e+00);\nout[39] = (real_t)(0.0000000000000000e+00);\nout[40] = (real_t)(0.0000000000000000e+00);\nout[41] = (real_t)(0.0000000000000000e+00);\nout[42] = (real_t)(0.0000000000000000e+00);\nout[43] = (real_t)(0.0000000000000000e+00);\nout[44] = (real_t)(0.0000000000000000e+00);\nout[45] = (real_t)(1.0000000000000000e+00);\nout[46] = (real_t)(0.0000000000000000e+00);\nout[47] = (real_t)(0.0000000000000000e+00);\nout[48] = (real_t)(0.0000000000000000e+00);\nout[49] = (real_t)(0.0000000000000000e+00);\nout[50] = (real_t)(0.0000000000000000e+00);\nout[51] = (real_t)(0.0000000000000000e+00);\nout[52] = (real_t)(0.0000000000000000e+00);\nout[53] = (real_t)(0.0000000000000000e+00);\nout[54] = (real_t)(0.0000000000000000e+00);\nout[55] = (real_t)(0.0000000000000000e+00);\nout[56] = (real_t)(1.0000000000000000e+00);\nout[57] = (real_t)(0.0000000000000000e+00);\nout[58] = (real_t)(0.0000000000000000e+00);\nout[59] = (real_t)(0.0000000000000000e+00);\nout[60] = (real_t)(0.0000000000000000e+00);\nout[61] = (real_t)(0.0000000000000000e+00);\nout[62] = (real_t)(0.0000000000000000e+00);\nout[63] = (real_t)(0.0000000000000000e+00);\nout[64] = (real_t)(0.0000000000000000e+00);\nout[65] = (real_t)(0.0000000000000000e+00);\nout[66] = (real_t)(0.0000000000000000e+00);\nout[67] = (real_t)(1.0000000000000000e+00);\nout[68] = (real_t)(0.0000000000000000e+00);\nout[69] = (real_t)(0.0000000000000000e+00);\nout[70] = (real_t)(0.0000000000000000e+00);\nout[71] = (real_t)(0.0000000000000000e+00);\nout[72] = (real_t)(0.0000000000000000e+00);\nout[73] = (real_t)(0.0000000000000000e+00);\nout[74] = (real_t)(0.0000000000000000e+00);\nout[75] = (real_t)(0.0000000000000000e+00);\nout[76] = (real_t)(0.0000000000000000e+00);\nout[77] = (real_t)(0.0000000000000000e+00);\nout[78] = (real_t)(1.0000000000000000e+00);\nout[79] = (real_t)(0.0000000000000000e+00);\nout[80] = (real_t)(0.0000000000000000e+00);\nout[81] = (real_t)(0.0000000000000000e+00);\nout[82] = (real_t)(0.0000000000000000e+00);\nout[83] = (real_t)(0.0000000000000000e+00);\nout[84] = (real_t)(0.0000000000000000e+00);\nout[85] = (real_t)(0.0000000000000000e+00);\nout[86] = (real_t)(0.0000000000000000e+00);\nout[87] = (real_t)(0.0000000000000000e+00);\nout[88] = (real_t)(0.0000000000000000e+00);\nout[89] = (real_t)(1.0000000000000000e+00);\nout[90] = (real_t)(0.0000000000000000e+00);\nout[91] = (real_t)(0.0000000000000000e+00);\nout[92] = (real_t)(0.0000000000000000e+00);\nout[93] = (real_t)(0.0000000000000000e+00);\nout[94] = (real_t)(0.0000000000000000e+00);\nout[95] = (real_t)(0.0000000000000000e+00);\nout[96] = (real_t)(0.0000000000000000e+00);\nout[97] = (real_t)(0.0000000000000000e+00);\nout[98] = (real_t)(0.0000000000000000e+00);\nout[99] = (real_t)(0.0000000000000000e+00);\nout[100] = (real_t)(1.0000000000000000e+00);\nout[101] = (real_t)(0.0000000000000000e+00);\nout[102] = (real_t)(0.0000000000000000e+00);\nout[103] = (real_t)(0.0000000000000000e+00);\nout[104] = (real_t)(0.0000000000000000e+00);\nout[105] = (real_t)(0.0000000000000000e+00);\nout[106] = (real_t)(0.0000000000000000e+00);\nout[107] = (real_t)(0.0000000000000000e+00);\nout[108] = (real_t)(0.0000000000000000e+00);\nout[109] = (real_t)(0.0000000000000000e+00);\nout[110] = (real_t)(0.0000000000000000e+00);\nout[111] = (real_t)(1.0000000000000000e+00);\nout[112] = ((a[3]*a[4])-((a[0]*a[5])*a[6]));\nout[113] = ((a[7]*a[4])-((a[0]*a[8])*a[6]));\nout[114] = ((a[9]*a[4])-((a[0]*a[10])*a[6]));\nout[115] = ((a[11]*a[4])-((a[0]*a[12])*a[6]));\nout[116] = ((a[13]*a[4])-((a[0]*a[14])*a[6]));\nout[117] = ((a[15]*a[4])-((a[0]*a[16])*a[6]));\nout[118] = ((a[17]*a[4])-((a[0]*a[18])*a[6]));\nout[119] = (real_t)(0.0000000000000000e+00);\nout[120] = (real_t)(0.0000000000000000e+00);\nout[121] = (real_t)(0.0000000000000000e+00);\nout[122] = ((a[19]*a[20])-((a[2]*a[21])*a[22]));\nout[123] = ((a[23]*a[20])-((a[2]*a[24])*a[22]));\nout[124] = ((a[25]*a[20])-((a[2]*a[26])*a[22]));\nout[125] = ((a[27]*a[20])-((a[2]*a[28])*a[22]));\nout[126] = ((a[29]*a[20])-((a[2]*a[30])*a[22]));\nout[127] = ((a[31]*a[20])-((a[2]*a[32])*a[22]));\nout[128] = ((a[33]*a[20])-((a[2]*a[34])*a[22]));\nout[129] = (real_t)(0.0000000000000000e+00);\nout[130] = (real_t)(0.0000000000000000e+00);\nout[131] = (real_t)(0.0000000000000000e+00);\n}\n\nvoid acado_setObjQ1Q2( real_t* const tmpFx, real_t* const tmpObjS, real_t* const tmpQ1, real_t* const tmpQ2 )\n{\ntmpQ2[0] = + tmpFx[0]*tmpObjS[0] + tmpFx[10]*tmpObjS[16] + tmpFx[20]*tmpObjS[32] + tmpFx[30]*tmpObjS[48] + tmpFx[40]*tmpObjS[64] + tmpFx[50]*tmpObjS[80] + tmpFx[60]*tmpObjS[96] + tmpFx[70]*tmpObjS[112] + tmpFx[80]*tmpObjS[128] + tmpFx[90]*tmpObjS[144] + tmpFx[100]*tmpObjS[160] + tmpFx[110]*tmpObjS[176] + tmpFx[120]*tmpObjS[192] + tmpFx[130]*tmpObjS[208] + tmpFx[140]*tmpObjS[224] + tmpFx[150]*tmpObjS[240];\ntmpQ2[1] = + tmpFx[0]*tmpObjS[1] + tmpFx[10]*tmpObjS[17] + tmpFx[20]*tmpObjS[33] + tmpFx[30]*tmpObjS[49] + tmpFx[40]*tmpObjS[65] + tmpFx[50]*tmpObjS[81] + tmpFx[60]*tmpObjS[97] + tmpFx[70]*tmpObjS[113] + tmpFx[80]*tmpObjS[129] + tmpFx[90]*tmpObjS[145] + tmpFx[100]*tmpObjS[161] + tmpFx[110]*tmpObjS[177] + tmpFx[120]*tmpObjS[193] + tmpFx[130]*tmpObjS[209] + tmpFx[140]*tmpObjS[225] + tmpFx[150]*tmpObjS[241];\ntmpQ2[2] = + tmpFx[0]*tmpObjS[2] + tmpFx[10]*tmpObjS[18] + tmpFx[20]*tmpObjS[34] + tmpFx[30]*tmpObjS[50] + tmpFx[40]*tmpObjS[66] + tmpFx[50]*tmpObjS[82] + tmpFx[60]*tmpObjS[98] + tmpFx[70]*tmpObjS[114] + tmpFx[80]*tmpObjS[130] + tmpFx[90]*tmpObjS[146] + tmpFx[100]*tmpObjS[162] + tmpFx[110]*tmpObjS[178] + tmpFx[120]*tmpObjS[194] + tmpFx[130]*tmpObjS[210] + tmpFx[140]*tmpObjS[226] + tmpFx[150]*tmpObjS[242];\ntmpQ2[3] = + tmpFx[0]*tmpObjS[3] + tmpFx[10]*tmpObjS[19] + tmpFx[20]*tmpObjS[35] + tmpFx[30]*tmpObjS[51] + tmpFx[40]*tmpObjS[67] + tmpFx[50]*tmpObjS[83] + tmpFx[60]*tmpObjS[99] + tmpFx[70]*tmpObjS[115] + tmpFx[80]*tmpObjS[131] + tmpFx[90]*tmpObjS[147] + tmpFx[100]*tmpObjS[163] + tmpFx[110]*tmpObjS[179] + tmpFx[120]*tmpObjS[195] + tmpFx[130]*tmpObjS[211] + tmpFx[140]*tmpObjS[227] + tmpFx[150]*tmpObjS[243];\ntmpQ2[4] = + tmpFx[0]*tmpObjS[4] + tmpFx[10]*tmpObjS[20] + tmpFx[20]*tmpObjS[36] + tmpFx[30]*tmpObjS[52] + tmpFx[40]*tmpObjS[68] + tmpFx[50]*tmpObjS[84] + tmpFx[60]*tmpObjS[100] + tmpFx[70]*tmpObjS[116] + tmpFx[80]*tmpObjS[132] + tmpFx[90]*tmpObjS[148] + tmpFx[100]*tmpObjS[164] + tmpFx[110]*tmpObjS[180] + tmpFx[120]*tmpObjS[196] + tmpFx[130]*tmpObjS[212] + tmpFx[140]*tmpObjS[228] + tmpFx[150]*tmpObjS[244];\ntmpQ2[5] = + tmpFx[0]*tmpObjS[5] + tmpFx[10]*tmpObjS[21] + tmpFx[20]*tmpObjS[37] + tmpFx[30]*tmpObjS[53] + tmpFx[40]*tmpObjS[69] + tmpFx[50]*tmpObjS[85] + tmpFx[60]*tmpObjS[101] + tmpFx[70]*tmpObjS[117] + tmpFx[80]*tmpObjS[133] + tmpFx[90]*tmpObjS[149] + tmpFx[100]*tmpObjS[165] + tmpFx[110]*tmpObjS[181] + tmpFx[120]*tmpObjS[197] + tmpFx[130]*tmpObjS[213] + tmpFx[140]*tmpObjS[229] + tmpFx[150]*tmpObjS[245];\ntmpQ2[6] = + tmpFx[0]*tmpObjS[6] + tmpFx[10]*tmpObjS[22] + tmpFx[20]*tmpObjS[38] + tmpFx[30]*tmpObjS[54] + tmpFx[40]*tmpObjS[70] + tmpFx[50]*tmpObjS[86] + tmpFx[60]*tmpObjS[102] + tmpFx[70]*tmpObjS[118] + tmpFx[80]*tmpObjS[134] + tmpFx[90]*tmpObjS[150] + tmpFx[100]*tmpObjS[166] + tmpFx[110]*tmpObjS[182] + tmpFx[120]*tmpObjS[198] + tmpFx[130]*tmpObjS[214] + tmpFx[140]*tmpObjS[230] + tmpFx[150]*tmpObjS[246];\ntmpQ2[7] = + tmpFx[0]*tmpObjS[7] + tmpFx[10]*tmpObjS[23] + tmpFx[20]*tmpObjS[39] + tmpFx[30]*tmpObjS[55] + tmpFx[40]*tmpObjS[71] + tmpFx[50]*tmpObjS[87] + tmpFx[60]*tmpObjS[103] + tmpFx[70]*tmpObjS[119] + tmpFx[80]*tmpObjS[135] + tmpFx[90]*tmpObjS[151] + tmpFx[100]*tmpObjS[167] + tmpFx[110]*tmpObjS[183] + tmpFx[120]*tmpObjS[199] + tmpFx[130]*tmpObjS[215] + tmpFx[140]*tmpObjS[231] + tmpFx[150]*tmpObjS[247];\ntmpQ2[8] = + tmpFx[0]*tmpObjS[8] + tmpFx[10]*tmpObjS[24] + tmpFx[20]*tmpObjS[40] + tmpFx[30]*tmpObjS[56] + tmpFx[40]*tmpObjS[72] + tmpFx[50]*tmpObjS[88] + tmpFx[60]*tmpObjS[104] + tmpFx[70]*tmpObjS[120] + tmpFx[80]*tmpObjS[136] + tmpFx[90]*tmpObjS[152] + tmpFx[100]*tmpObjS[168] + tmpFx[110]*tmpObjS[184] + tmpFx[120]*tmpObjS[200] + tmpFx[130]*tmpObjS[216] + tmpFx[140]*tmpObjS[232] + tmpFx[150]*tmpObjS[248];\ntmpQ2[9] = + tmpFx[0]*tmpObjS[9] + tmpFx[10]*tmpObjS[25] + tmpFx[20]*tmpObjS[41] + tmpFx[30]*tmpObjS[57] + tmpFx[40]*tmpObjS[73] + tmpFx[50]*tmpObjS[89] + tmpFx[60]*tmpObjS[105] + tmpFx[70]*tmpObjS[121] + tmpFx[80]*tmpObjS[137] + tmpFx[90]*tmpObjS[153] + tmpFx[100]*tmpObjS[169] + tmpFx[110]*tmpObjS[185] + tmpFx[120]*tmpObjS[201] + tmpFx[130]*tmpObjS[217] + tmpFx[140]*tmpObjS[233] + tmpFx[150]*tmpObjS[249];\ntmpQ2[10] = + tmpFx[0]*tmpObjS[10] + tmpFx[10]*tmpObjS[26] + tmpFx[20]*tmpObjS[42] + tmpFx[30]*tmpObjS[58] + tmpFx[40]*tmpObjS[74] + tmpFx[50]*tmpObjS[90] + tmpFx[60]*tmpObjS[106] + tmpFx[70]*tmpObjS[122] + tmpFx[80]*tmpObjS[138] + tmpFx[90]*tmpObjS[154] + tmpFx[100]*tmpObjS[170] + tmpFx[110]*tmpObjS[186] + tmpFx[120]*tmpObjS[202] + tmpFx[130]*tmpObjS[218] + tmpFx[140]*tmpObjS[234] + tmpFx[150]*tmpObjS[250];\ntmpQ2[11] = + tmpFx[0]*tmpObjS[11] + tmpFx[10]*tmpObjS[27] + tmpFx[20]*tmpObjS[43] + tmpFx[30]*tmpObjS[59] + tmpFx[40]*tmpObjS[75] + tmpFx[50]*tmpObjS[91] + tmpFx[60]*tmpObjS[107] + tmpFx[70]*tmpObjS[123] + tmpFx[80]*tmpObjS[139] + tmpFx[90]*tmpObjS[155] + tmpFx[100]*tmpObjS[171] + tmpFx[110]*tmpObjS[187] + tmpFx[120]*tmpObjS[203] + tmpFx[130]*tmpObjS[219] + tmpFx[140]*tmpObjS[235] + tmpFx[150]*tmpObjS[251];\ntmpQ2[12] = + tmpFx[0]*tmpObjS[12] + tmpFx[10]*tmpObjS[28] + tmpFx[20]*tmpObjS[44] + tmpFx[30]*tmpObjS[60] + tmpFx[40]*tmpObjS[76] + tmpFx[50]*tmpObjS[92] + tmpFx[60]*tmpObjS[108] + tmpFx[70]*tmpObjS[124] + tmpFx[80]*tmpObjS[140] + tmpFx[90]*tmpObjS[156] + tmpFx[100]*tmpObjS[172] + tmpFx[110]*tmpObjS[188] + tmpFx[120]*tmpObjS[204] + tmpFx[130]*tmpObjS[220] + tmpFx[140]*tmpObjS[236] + tmpFx[150]*tmpObjS[252];\ntmpQ2[13] = + tmpFx[0]*tmpObjS[13] + tmpFx[10]*tmpObjS[29] + tmpFx[20]*tmpObjS[45] + tmpFx[30]*tmpObjS[61] + tmpFx[40]*tmpObjS[77] + tmpFx[50]*tmpObjS[93] + tmpFx[60]*tmpObjS[109] + tmpFx[70]*tmpObjS[125] + tmpFx[80]*tmpObjS[141] + tmpFx[90]*tmpObjS[157] + tmpFx[100]*tmpObjS[173] + tmpFx[110]*tmpObjS[189] + tmpFx[120]*tmpObjS[205] + tmpFx[130]*tmpObjS[221] + tmpFx[140]*tmpObjS[237] + tmpFx[150]*tmpObjS[253];\ntmpQ2[14] = + tmpFx[0]*tmpObjS[14] + tmpFx[10]*tmpObjS[30] + tmpFx[20]*tmpObjS[46] + tmpFx[30]*tmpObjS[62] + tmpFx[40]*tmpObjS[78] + tmpFx[50]*tmpObjS[94] + tmpFx[60]*tmpObjS[110] + tmpFx[70]*tmpObjS[126] + tmpFx[80]*tmpObjS[142] + tmpFx[90]*tmpObjS[158] + tmpFx[100]*tmpObjS[174] + tmpFx[110]*tmpObjS[190] + tmpFx[120]*tmpObjS[206] + tmpFx[130]*tmpObjS[222] + tmpFx[140]*tmpObjS[238] + tmpFx[150]*tmpObjS[254];\ntmpQ2[15] = + tmpFx[0]*tmpObjS[15] + tmpFx[10]*tmpObjS[31] + tmpFx[20]*tmpObjS[47] + tmpFx[30]*tmpObjS[63] + tmpFx[40]*tmpObjS[79] + tmpFx[50]*tmpObjS[95] + tmpFx[60]*tmpObjS[111] + tmpFx[70]*tmpObjS[127] + tmpFx[80]*tmpObjS[143] + tmpFx[90]*tmpObjS[159] + tmpFx[100]*tmpObjS[175] + tmpFx[110]*tmpObjS[191] + tmpFx[120]*tmpObjS[207] + tmpFx[130]*tmpObjS[223] + tmpFx[140]*tmpObjS[239] + tmpFx[150]*tmpObjS[255];\ntmpQ2[16] = + tmpFx[1]*tmpObjS[0] + tmpFx[11]*tmpObjS[16] + tmpFx[21]*tmpObjS[32] + tmpFx[31]*tmpObjS[48] + tmpFx[41]*tmpObjS[64] + tmpFx[51]*tmpObjS[80] + tmpFx[61]*tmpObjS[96] + tmpFx[71]*tmpObjS[112] + tmpFx[81]*tmpObjS[128] + tmpFx[91]*tmpObjS[144] + tmpFx[101]*tmpObjS[160] + tmpFx[111]*tmpObjS[176] + tmpFx[121]*tmpObjS[192] + tmpFx[131]*tmpObjS[208] + tmpFx[141]*tmpObjS[224] + tmpFx[151]*tmpObjS[240];\ntmpQ2[17] = + tmpFx[1]*tmpObjS[1] + tmpFx[11]*tmpObjS[17] + tmpFx[21]*tmpObjS[33] + tmpFx[31]*tmpObjS[49] + tmpFx[41]*tmpObjS[65] + tmpFx[51]*tmpObjS[81] + tmpFx[61]*tmpObjS[97] + tmpFx[71]*tmpObjS[113] + tmpFx[81]*tmpObjS[129] + tmpFx[91]*tmpObjS[145] + tmpFx[101]*tmpObjS[161] + tmpFx[111]*tmpObjS[177] + tmpFx[121]*tmpObjS[193] + tmpFx[131]*tmpObjS[209] + tmpFx[141]*tmpObjS[225] + tmpFx[151]*tmpObjS[241];\ntmpQ2[18] = + tmpFx[1]*tmpObjS[2] + tmpFx[11]*tmpObjS[18] + tmpFx[21]*tmpObjS[34] + tmpFx[31]*tmpObjS[50] + tmpFx[41]*tmpObjS[66] + tmpFx[51]*tmpObjS[82] + tmpFx[61]*tmpObjS[98] + tmpFx[71]*tmpObjS[114] + tmpFx[81]*tmpObjS[130] + tmpFx[91]*tmpObjS[146] + tmpFx[101]*tmpObjS[162] + tmpFx[111]*tmpObjS[178] + tmpFx[121]*tmpObjS[194] + tmpFx[131]*tmpObjS[210] + tmpFx[141]*tmpObjS[226] + tmpFx[151]*tmpObjS[242];\ntmpQ2[19] = + tmpFx[1]*tmpObjS[3] + tmpFx[11]*tmpObjS[19] + tmpFx[21]*tmpObjS[35] + tmpFx[31]*tmpObjS[51] + tmpFx[41]*tmpObjS[67] + tmpFx[51]*tmpObjS[83] + tmpFx[61]*tmpObjS[99] + tmpFx[71]*tmpObjS[115] + tmpFx[81]*tmpObjS[131] + tmpFx[91]*tmpObjS[147] + tmpFx[101]*tmpObjS[163] + tmpFx[111]*tmpObjS[179] + tmpFx[121]*tmpObjS[195] + tmpFx[131]*tmpObjS[211] + tmpFx[141]*tmpObjS[227] + tmpFx[151]*tmpObjS[243];\ntmpQ2[20] = + tmpFx[1]*tmpObjS[4] + tmpFx[11]*tmpObjS[20] + tmpFx[21]*tmpObjS[36] + tmpFx[31]*tmpObjS[52] + tmpFx[41]*tmpObjS[68] + tmpFx[51]*tmpObjS[84] + tmpFx[61]*tmpObjS[100] + tmpFx[71]*tmpObjS[116] + tmpFx[81]*tmpObjS[132] + tmpFx[91]*tmpObjS[148] + tmpFx[101]*tmpObjS[164] + tmpFx[111]*tmpObjS[180] + tmpFx[121]*tmpObjS[196] + tmpFx[131]*tmpObjS[212] + tmpFx[141]*tmpObjS[228] + tmpFx[151]*tmpObjS[244];\ntmpQ2[21] = + tmpFx[1]*tmpObjS[5] + tmpFx[11]*tmpObjS[21] + tmpFx[21]*tmpObjS[37] + tmpFx[31]*tmpObjS[53] + tmpFx[41]*tmpObjS[69] + tmpFx[51]*tmpObjS[85] + tmpFx[61]*tmpObjS[101] + tmpFx[71]*tmpObjS[117] + tmpFx[81]*tmpObjS[133] + tmpFx[91]*tmpObjS[149] + tmpFx[101]*tmpObjS[165] + tmpFx[111]*tmpObjS[181] + tmpFx[121]*tmpObjS[197] + tmpFx[131]*tmpObjS[213] + tmpFx[141]*tmpObjS[229] + tmpFx[151]*tmpObjS[245];\ntmpQ2[22] = + tmpFx[1]*tmpObjS[6] + tmpFx[11]*tmpObjS[22] + tmpFx[21]*tmpObjS[38] + tmpFx[31]*tmpObjS[54] + tmpFx[41]*tmpObjS[70] + tmpFx[51]*tmpObjS[86] + tmpFx[61]*tmpObjS[102] + tmpFx[71]*tmpObjS[118] + tmpFx[81]*tmpObjS[134] + tmpFx[91]*tmpObjS[150] + tmpFx[101]*tmpObjS[166] + tmpFx[111]*tmpObjS[182] + tmpFx[121]*tmpObjS[198] + tmpFx[131]*tmpObjS[214] + tmpFx[141]*tmpObjS[230] + tmpFx[151]*tmpObjS[246];\ntmpQ2[23] = + tmpFx[1]*tmpObjS[7] + tmpFx[11]*tmpObjS[23] + tmpFx[21]*tmpObjS[39] + tmpFx[31]*tmpObjS[55] + tmpFx[41]*tmpObjS[71] + tmpFx[51]*tmpObjS[87] + tmpFx[61]*tmpObjS[103] + tmpFx[71]*tmpObjS[119] + tmpFx[81]*tmpObjS[135] + tmpFx[91]*tmpObjS[151] + tmpFx[101]*tmpObjS[167] + tmpFx[111]*tmpObjS[183] + tmpFx[121]*tmpObjS[199] + tmpFx[131]*tmpObjS[215] + tmpFx[141]*tmpObjS[231] + tmpFx[151]*tmpObjS[247];\ntmpQ2[24] = + tmpFx[1]*tmpObjS[8] + tmpFx[11]*tmpObjS[24] + tmpFx[21]*tmpObjS[40] + tmpFx[31]*tmpObjS[56] + tmpFx[41]*tmpObjS[72] + tmpFx[51]*tmpObjS[88] + tmpFx[61]*tmpObjS[104] + tmpFx[71]*tmpObjS[120] + tmpFx[81]*tmpObjS[136] + tmpFx[91]*tmpObjS[152] + tmpFx[101]*tmpObjS[168] + tmpFx[111]*tmpObjS[184] + tmpFx[121]*tmpObjS[200] + tmpFx[131]*tmpObjS[216] + tmpFx[141]*tmpObjS[232] + tmpFx[151]*tmpObjS[248];\ntmpQ2[25] = + tmpFx[1]*tmpObjS[9] + tmpFx[11]*tmpObjS[25] + tmpFx[21]*tmpObjS[41] + tmpFx[31]*tmpObjS[57] + tmpFx[41]*tmpObjS[73] + tmpFx[51]*tmpObjS[89] + tmpFx[61]*tmpObjS[105] + tmpFx[71]*tmpObjS[121] + tmpFx[81]*tmpObjS[137] + tmpFx[91]*tmpObjS[153] + tmpFx[101]*tmpObjS[169] + tmpFx[111]*tmpObjS[185] + tmpFx[121]*tmpObjS[201] + tmpFx[131]*tmpObjS[217] + tmpFx[141]*tmpObjS[233] + tmpFx[151]*tmpObjS[249];\ntmpQ2[26] = + tmpFx[1]*tmpObjS[10] + tmpFx[11]*tmpObjS[26] + tmpFx[21]*tmpObjS[42] + tmpFx[31]*tmpObjS[58] + tmpFx[41]*tmpObjS[74] + tmpFx[51]*tmpObjS[90] + tmpFx[61]*tmpObjS[106] + tmpFx[71]*tmpObjS[122] + tmpFx[81]*tmpObjS[138] + tmpFx[91]*tmpObjS[154] + tmpFx[101]*tmpObjS[170] + tmpFx[111]*tmpObjS[186] + tmpFx[121]*tmpObjS[202] + tmpFx[131]*tmpObjS[218] + tmpFx[141]*tmpObjS[234] + tmpFx[151]*tmpObjS[250];\ntmpQ2[27] = + tmpFx[1]*tmpObjS[11] + tmpFx[11]*tmpObjS[27] + tmpFx[21]*tmpObjS[43] + tmpFx[31]*tmpObjS[59] + tmpFx[41]*tmpObjS[75] + tmpFx[51]*tmpObjS[91] + tmpFx[61]*tmpObjS[107] + tmpFx[71]*tmpObjS[123] + tmpFx[81]*tmpObjS[139] + tmpFx[91]*tmpObjS[155] + tmpFx[101]*tmpObjS[171] + tmpFx[111]*tmpObjS[187] + tmpFx[121]*tmpObjS[203] + tmpFx[131]*tmpObjS[219] + tmpFx[141]*tmpObjS[235] + tmpFx[151]*tmpObjS[251];\ntmpQ2[28] = + tmpFx[1]*tmpObjS[12] + tmpFx[11]*tmpObjS[28] + tmpFx[21]*tmpObjS[44] + tmpFx[31]*tmpObjS[60] + tmpFx[41]*tmpObjS[76] + tmpFx[51]*tmpObjS[92] + tmpFx[61]*tmpObjS[108] + tmpFx[71]*tmpObjS[124] + tmpFx[81]*tmpObjS[140] + tmpFx[91]*tmpObjS[156] + tmpFx[101]*tmpObjS[172] + tmpFx[111]*tmpObjS[188] + tmpFx[121]*tmpObjS[204] + tmpFx[131]*tmpObjS[220] + tmpFx[141]*tmpObjS[236] + tmpFx[151]*tmpObjS[252];\ntmpQ2[29] = + tmpFx[1]*tmpObjS[13] + tmpFx[11]*tmpObjS[29] + tmpFx[21]*tmpObjS[45] + tmpFx[31]*tmpObjS[61] + tmpFx[41]*tmpObjS[77] + tmpFx[51]*tmpObjS[93] + tmpFx[61]*tmpObjS[109] + tmpFx[71]*tmpObjS[125] + tmpFx[81]*tmpObjS[141] + tmpFx[91]*tmpObjS[157] + tmpFx[101]*tmpObjS[173] + tmpFx[111]*tmpObjS[189] + tmpFx[121]*tmpObjS[205] + tmpFx[131]*tmpObjS[221] + tmpFx[141]*tmpObjS[237] + tmpFx[151]*tmpObjS[253];\ntmpQ2[30] = + tmpFx[1]*tmpObjS[14] + tmpFx[11]*tmpObjS[30] + tmpFx[21]*tmpObjS[46] + tmpFx[31]*tmpObjS[62] + tmpFx[41]*tmpObjS[78] + tmpFx[51]*tmpObjS[94] + tmpFx[61]*tmpObjS[110] + tmpFx[71]*tmpObjS[126] + tmpFx[81]*tmpObjS[142] + tmpFx[91]*tmpObjS[158] + tmpFx[101]*tmpObjS[174] + tmpFx[111]*tmpObjS[190] + tmpFx[121]*tmpObjS[206] + tmpFx[131]*tmpObjS[222] + tmpFx[141]*tmpObjS[238] + tmpFx[151]*tmpObjS[254];\ntmpQ2[31] = + tmpFx[1]*tmpObjS[15] + tmpFx[11]*tmpObjS[31] + tmpFx[21]*tmpObjS[47] + tmpFx[31]*tmpObjS[63] + tmpFx[41]*tmpObjS[79] + tmpFx[51]*tmpObjS[95] + tmpFx[61]*tmpObjS[111] + tmpFx[71]*tmpObjS[127] + tmpFx[81]*tmpObjS[143] + tmpFx[91]*tmpObjS[159] + tmpFx[101]*tmpObjS[175] + tmpFx[111]*tmpObjS[191] + tmpFx[121]*tmpObjS[207] + tmpFx[131]*tmpObjS[223] + tmpFx[141]*tmpObjS[239] + tmpFx[151]*tmpObjS[255];\ntmpQ2[32] = + tmpFx[2]*tmpObjS[0] + tmpFx[12]*tmpObjS[16] + tmpFx[22]*tmpObjS[32] + tmpFx[32]*tmpObjS[48] + tmpFx[42]*tmpObjS[64] + tmpFx[52]*tmpObjS[80] + tmpFx[62]*tmpObjS[96] + tmpFx[72]*tmpObjS[112] + tmpFx[82]*tmpObjS[128] + tmpFx[92]*tmpObjS[144] + tmpFx[102]*tmpObjS[160] + tmpFx[112]*tmpObjS[176] + tmpFx[122]*tmpObjS[192] + tmpFx[132]*tmpObjS[208] + tmpFx[142]*tmpObjS[224] + tmpFx[152]*tmpObjS[240];\ntmpQ2[33] = + tmpFx[2]*tmpObjS[1] + tmpFx[12]*tmpObjS[17] + tmpFx[22]*tmpObjS[33] + tmpFx[32]*tmpObjS[49] + tmpFx[42]*tmpObjS[65] + tmpFx[52]*tmpObjS[81] + tmpFx[62]*tmpObjS[97] + tmpFx[72]*tmpObjS[113] + tmpFx[82]*tmpObjS[129] + tmpFx[92]*tmpObjS[145] + tmpFx[102]*tmpObjS[161] + tmpFx[112]*tmpObjS[177] + tmpFx[122]*tmpObjS[193] + tmpFx[132]*tmpObjS[209] + tmpFx[142]*tmpObjS[225] + tmpFx[152]*tmpObjS[241];\ntmpQ2[34] = + tmpFx[2]*tmpObjS[2] + tmpFx[12]*tmpObjS[18] + tmpFx[22]*tmpObjS[34] + tmpFx[32]*tmpObjS[50] + tmpFx[42]*tmpObjS[66] + tmpFx[52]*tmpObjS[82] + tmpFx[62]*tmpObjS[98] + tmpFx[72]*tmpObjS[114] + tmpFx[82]*tmpObjS[130] + tmpFx[92]*tmpObjS[146] + tmpFx[102]*tmpObjS[162] + tmpFx[112]*tmpObjS[178] + tmpFx[122]*tmpObjS[194] + tmpFx[132]*tmpObjS[210] + tmpFx[142]*tmpObjS[226] + tmpFx[152]*tmpObjS[242];\ntmpQ2[35] = + tmpFx[2]*tmpObjS[3] + tmpFx[12]*tmpObjS[19] + tmpFx[22]*tmpObjS[35] + tmpFx[32]*tmpObjS[51] + tmpFx[42]*tmpObjS[67] + tmpFx[52]*tmpObjS[83] + tmpFx[62]*tmpObjS[99] + tmpFx[72]*tmpObjS[115] + tmpFx[82]*tmpObjS[131] + tmpFx[92]*tmpObjS[147] + tmpFx[102]*tmpObjS[163] + tmpFx[112]*tmpObjS[179] + tmpFx[122]*tmpObjS[195] + tmpFx[132]*tmpObjS[211] + tmpFx[142]*tmpObjS[227] + tmpFx[152]*tmpObjS[243];\ntmpQ2[36] = + tmpFx[2]*tmpObjS[4] + tmpFx[12]*tmpObjS[20] + tmpFx[22]*tmpObjS[36] + tmpFx[32]*tmpObjS[52] + tmpFx[42]*tmpObjS[68] + tmpFx[52]*tmpObjS[84] + tmpFx[62]*tmpObjS[100] + tmpFx[72]*tmpObjS[116] + tmpFx[82]*tmpObjS[132] + tmpFx[92]*tmpObjS[148] + tmpFx[102]*tmpObjS[164] + tmpFx[112]*tmpObjS[180] + tmpFx[122]*tmpObjS[196] + tmpFx[132]*tmpObjS[212] + tmpFx[142]*tmpObjS[228] + tmpFx[152]*tmpObjS[244];\ntmpQ2[37] = + tmpFx[2]*tmpObjS[5] + tmpFx[12]*tmpObjS[21] + tmpFx[22]*tmpObjS[37] + tmpFx[32]*tmpObjS[53] + tmpFx[42]*tmpObjS[69] + tmpFx[52]*tmpObjS[85] + tmpFx[62]*tmpObjS[101] + tmpFx[72]*tmpObjS[117] + tmpFx[82]*tmpObjS[133] + tmpFx[92]*tmpObjS[149] + tmpFx[102]*tmpObjS[165] + tmpFx[112]*tmpObjS[181] + tmpFx[122]*tmpObjS[197] + tmpFx[132]*tmpObjS[213] + tmpFx[142]*tmpObjS[229] + tmpFx[152]*tmpObjS[245];\ntmpQ2[38] = + tmpFx[2]*tmpObjS[6] + tmpFx[12]*tmpObjS[22] + tmpFx[22]*tmpObjS[38] + tmpFx[32]*tmpObjS[54] + tmpFx[42]*tmpObjS[70] + tmpFx[52]*tmpObjS[86] + tmpFx[62]*tmpObjS[102] + tmpFx[72]*tmpObjS[118] + tmpFx[82]*tmpObjS[134] + tmpFx[92]*tmpObjS[150] + tmpFx[102]*tmpObjS[166] + tmpFx[112]*tmpObjS[182] + tmpFx[122]*tmpObjS[198] + tmpFx[132]*tmpObjS[214] + tmpFx[142]*tmpObjS[230] + tmpFx[152]*tmpObjS[246];\ntmpQ2[39] = + tmpFx[2]*tmpObjS[7] + tmpFx[12]*tmpObjS[23] + tmpFx[22]*tmpObjS[39] + tmpFx[32]*tmpObjS[55] + tmpFx[42]*tmpObjS[71] + tmpFx[52]*tmpObjS[87] + tmpFx[62]*tmpObjS[103] + tmpFx[72]*tmpObjS[119] + tmpFx[82]*tmpObjS[135] + tmpFx[92]*tmpObjS[151] + tmpFx[102]*tmpObjS[167] + tmpFx[112]*tmpObjS[183] + tmpFx[122]*tmpObjS[199] + tmpFx[132]*tmpObjS[215] + tmpFx[142]*tmpObjS[231] + tmpFx[152]*tmpObjS[247];\ntmpQ2[40] = + tmpFx[2]*tmpObjS[8] + tmpFx[12]*tmpObjS[24] + tmpFx[22]*tmpObjS[40] + tmpFx[32]*tmpObjS[56] + tmpFx[42]*tmpObjS[72] + tmpFx[52]*tmpObjS[88] + tmpFx[62]*tmpObjS[104] + tmpFx[72]*tmpObjS[120] + tmpFx[82]*tmpObjS[136] + tmpFx[92]*tmpObjS[152] + tmpFx[102]*tmpObjS[168] + tmpFx[112]*tmpObjS[184] + tmpFx[122]*tmpObjS[200] + tmpFx[132]*tmpObjS[216] + tmpFx[142]*tmpObjS[232] + tmpFx[152]*tmpObjS[248];\ntmpQ2[41] = + tmpFx[2]*tmpObjS[9] + tmpFx[12]*tmpObjS[25] + tmpFx[22]*tmpObjS[41] + tmpFx[32]*tmpObjS[57] + tmpFx[42]*tmpObjS[73] + tmpFx[52]*tmpObjS[89] + tmpFx[62]*tmpObjS[105] + tmpFx[72]*tmpObjS[121] + tmpFx[82]*tmpObjS[137] + tmpFx[92]*tmpObjS[153] + tmpFx[102]*tmpObjS[169] + tmpFx[112]*tmpObjS[185] + tmpFx[122]*tmpObjS[201] + tmpFx[132]*tmpObjS[217] + tmpFx[142]*tmpObjS[233] + tmpFx[152]*tmpObjS[249];\ntmpQ2[42] = + tmpFx[2]*tmpObjS[10] + tmpFx[12]*tmpObjS[26] + tmpFx[22]*tmpObjS[42] + tmpFx[32]*tmpObjS[58] + tmpFx[42]*tmpObjS[74] + tmpFx[52]*tmpObjS[90] + tmpFx[62]*tmpObjS[106] + tmpFx[72]*tmpObjS[122] + tmpFx[82]*tmpObjS[138] + tmpFx[92]*tmpObjS[154] + tmpFx[102]*tmpObjS[170] + tmpFx[112]*tmpObjS[186] + tmpFx[122]*tmpObjS[202] + tmpFx[132]*tmpObjS[218] + tmpFx[142]*tmpObjS[234] + tmpFx[152]*tmpObjS[250];\ntmpQ2[43] = + tmpFx[2]*tmpObjS[11] + tmpFx[12]*tmpObjS[27] + tmpFx[22]*tmpObjS[43] + tmpFx[32]*tmpObjS[59] + tmpFx[42]*tmpObjS[75] + tmpFx[52]*tmpObjS[91] + tmpFx[62]*tmpObjS[107] + tmpFx[72]*tmpObjS[123] + tmpFx[82]*tmpObjS[139] + tmpFx[92]*tmpObjS[155] + tmpFx[102]*tmpObjS[171] + tmpFx[112]*tmpObjS[187] + tmpFx[122]*tmpObjS[203] + tmpFx[132]*tmpObjS[219] + tmpFx[142]*tmpObjS[235] + tmpFx[152]*tmpObjS[251];\ntmpQ2[44] = + tmpFx[2]*tmpObjS[12] + tmpFx[12]*tmpObjS[28] + tmpFx[22]*tmpObjS[44] + tmpFx[32]*tmpObjS[60] + tmpFx[42]*tmpObjS[76] + tmpFx[52]*tmpObjS[92] + tmpFx[62]*tmpObjS[108] + tmpFx[72]*tmpObjS[124] + tmpFx[82]*tmpObjS[140] + tmpFx[92]*tmpObjS[156] + tmpFx[102]*tmpObjS[172] + tmpFx[112]*tmpObjS[188] + tmpFx[122]*tmpObjS[204] + tmpFx[132]*tmpObjS[220] + tmpFx[142]*tmpObjS[236] + tmpFx[152]*tmpObjS[252];\ntmpQ2[45] = + tmpFx[2]*tmpObjS[13] + tmpFx[12]*tmpObjS[29] + tmpFx[22]*tmpObjS[45] + tmpFx[32]*tmpObjS[61] + tmpFx[42]*tmpObjS[77] + tmpFx[52]*tmpObjS[93] + tmpFx[62]*tmpObjS[109] + tmpFx[72]*tmpObjS[125] + tmpFx[82]*tmpObjS[141] + tmpFx[92]*tmpObjS[157] + tmpFx[102]*tmpObjS[173] + tmpFx[112]*tmpObjS[189] + tmpFx[122]*tmpObjS[205] + tmpFx[132]*tmpObjS[221] + tmpFx[142]*tmpObjS[237] + tmpFx[152]*tmpObjS[253];\ntmpQ2[46] = + tmpFx[2]*tmpObjS[14] + tmpFx[12]*tmpObjS[30] + tmpFx[22]*tmpObjS[46] + tmpFx[32]*tmpObjS[62] + tmpFx[42]*tmpObjS[78] + tmpFx[52]*tmpObjS[94] + tmpFx[62]*tmpObjS[110] + tmpFx[72]*tmpObjS[126] + tmpFx[82]*tmpObjS[142] + tmpFx[92]*tmpObjS[158] + tmpFx[102]*tmpObjS[174] + tmpFx[112]*tmpObjS[190] + tmpFx[122]*tmpObjS[206] + tmpFx[132]*tmpObjS[222] + tmpFx[142]*tmpObjS[238] + tmpFx[152]*tmpObjS[254];\ntmpQ2[47] = + tmpFx[2]*tmpObjS[15] + tmpFx[12]*tmpObjS[31] + tmpFx[22]*tmpObjS[47] + tmpFx[32]*tmpObjS[63] + tmpFx[42]*tmpObjS[79] + tmpFx[52]*tmpObjS[95] + tmpFx[62]*tmpObjS[111] + tmpFx[72]*tmpObjS[127] + tmpFx[82]*tmpObjS[143] + tmpFx[92]*tmpObjS[159] + tmpFx[102]*tmpObjS[175] + tmpFx[112]*tmpObjS[191] + tmpFx[122]*tmpObjS[207] + tmpFx[132]*tmpObjS[223] + tmpFx[142]*tmpObjS[239] + tmpFx[152]*tmpObjS[255];\ntmpQ2[48] = + tmpFx[3]*tmpObjS[0] + tmpFx[13]*tmpObjS[16] + tmpFx[23]*tmpObjS[32] + tmpFx[33]*tmpObjS[48] + tmpFx[43]*tmpObjS[64] + tmpFx[53]*tmpObjS[80] + tmpFx[63]*tmpObjS[96] + tmpFx[73]*tmpObjS[112] + tmpFx[83]*tmpObjS[128] + tmpFx[93]*tmpObjS[144] + tmpFx[103]*tmpObjS[160] + tmpFx[113]*tmpObjS[176] + tmpFx[123]*tmpObjS[192] + tmpFx[133]*tmpObjS[208] + tmpFx[143]*tmpObjS[224] + tmpFx[153]*tmpObjS[240];\ntmpQ2[49] = + tmpFx[3]*tmpObjS[1] + tmpFx[13]*tmpObjS[17] + tmpFx[23]*tmpObjS[33] + tmpFx[33]*tmpObjS[49] + tmpFx[43]*tmpObjS[65] + tmpFx[53]*tmpObjS[81] + tmpFx[63]*tmpObjS[97] + tmpFx[73]*tmpObjS[113] + tmpFx[83]*tmpObjS[129] + tmpFx[93]*tmpObjS[145] + tmpFx[103]*tmpObjS[161] + tmpFx[113]*tmpObjS[177] + tmpFx[123]*tmpObjS[193] + tmpFx[133]*tmpObjS[209] + tmpFx[143]*tmpObjS[225] + tmpFx[153]*tmpObjS[241];\ntmpQ2[50] = + tmpFx[3]*tmpObjS[2] + tmpFx[13]*tmpObjS[18] + tmpFx[23]*tmpObjS[34] + tmpFx[33]*tmpObjS[50] + tmpFx[43]*tmpObjS[66] + tmpFx[53]*tmpObjS[82] + tmpFx[63]*tmpObjS[98] + tmpFx[73]*tmpObjS[114] + tmpFx[83]*tmpObjS[130] + tmpFx[93]*tmpObjS[146] + tmpFx[103]*tmpObjS[162] + tmpFx[113]*tmpObjS[178] + tmpFx[123]*tmpObjS[194] + tmpFx[133]*tmpObjS[210] + tmpFx[143]*tmpObjS[226] + tmpFx[153]*tmpObjS[242];\ntmpQ2[51] = + tmpFx[3]*tmpObjS[3] + tmpFx[13]*tmpObjS[19] + tmpFx[23]*tmpObjS[35] + tmpFx[33]*tmpObjS[51] + tmpFx[43]*tmpObjS[67] + tmpFx[53]*tmpObjS[83] + tmpFx[63]*tmpObjS[99] + tmpFx[73]*tmpObjS[115] + tmpFx[83]*tmpObjS[131] + tmpFx[93]*tmpObjS[147] + tmpFx[103]*tmpObjS[163] + tmpFx[113]*tmpObjS[179] + tmpFx[123]*tmpObjS[195] + tmpFx[133]*tmpObjS[211] + tmpFx[143]*tmpObjS[227] + tmpFx[153]*tmpObjS[243];\ntmpQ2[52] = + tmpFx[3]*tmpObjS[4] + tmpFx[13]*tmpObjS[20] + tmpFx[23]*tmpObjS[36] + tmpFx[33]*tmpObjS[52] + tmpFx[43]*tmpObjS[68] + tmpFx[53]*tmpObjS[84] + tmpFx[63]*tmpObjS[100] + tmpFx[73]*tmpObjS[116] + tmpFx[83]*tmpObjS[132] + tmpFx[93]*tmpObjS[148] + tmpFx[103]*tmpObjS[164] + tmpFx[113]*tmpObjS[180] + tmpFx[123]*tmpObjS[196] + tmpFx[133]*tmpObjS[212] + tmpFx[143]*tmpObjS[228] + tmpFx[153]*tmpObjS[244];\ntmpQ2[53] = + tmpFx[3]*tmpObjS[5] + tmpFx[13]*tmpObjS[21] + tmpFx[23]*tmpObjS[37] + tmpFx[33]*tmpObjS[53] + tmpFx[43]*tmpObjS[69] + tmpFx[53]*tmpObjS[85] + tmpFx[63]*tmpObjS[101] + tmpFx[73]*tmpObjS[117] + tmpFx[83]*tmpObjS[133] + tmpFx[93]*tmpObjS[149] + tmpFx[103]*tmpObjS[165] + tmpFx[113]*tmpObjS[181] + tmpFx[123]*tmpObjS[197] + tmpFx[133]*tmpObjS[213] + tmpFx[143]*tmpObjS[229] + tmpFx[153]*tmpObjS[245];\ntmpQ2[54] = + tmpFx[3]*tmpObjS[6] + tmpFx[13]*tmpObjS[22] + tmpFx[23]*tmpObjS[38] + tmpFx[33]*tmpObjS[54] + tmpFx[43]*tmpObjS[70] + tmpFx[53]*tmpObjS[86] + tmpFx[63]*tmpObjS[102] + tmpFx[73]*tmpObjS[118] + tmpFx[83]*tmpObjS[134] + tmpFx[93]*tmpObjS[150] + tmpFx[103]*tmpObjS[166] + tmpFx[113]*tmpObjS[182] + tmpFx[123]*tmpObjS[198] + tmpFx[133]*tmpObjS[214] + tmpFx[143]*tmpObjS[230] + tmpFx[153]*tmpObjS[246];\ntmpQ2[55] = + tmpFx[3]*tmpObjS[7] + tmpFx[13]*tmpObjS[23] + tmpFx[23]*tmpObjS[39] + tmpFx[33]*tmpObjS[55] + tmpFx[43]*tmpObjS[71] + tmpFx[53]*tmpObjS[87] + tmpFx[63]*tmpObjS[103] + tmpFx[73]*tmpObjS[119] + tmpFx[83]*tmpObjS[135] + tmpFx[93]*tmpObjS[151] + tmpFx[103]*tmpObjS[167] + tmpFx[113]*tmpObjS[183] + tmpFx[123]*tmpObjS[199] + tmpFx[133]*tmpObjS[215] + tmpFx[143]*tmpObjS[231] + tmpFx[153]*tmpObjS[247];\ntmpQ2[56] = + tmpFx[3]*tmpObjS[8] + tmpFx[13]*tmpObjS[24] + tmpFx[23]*tmpObjS[40] + tmpFx[33]*tmpObjS[56] + tmpFx[43]*tmpObjS[72] + tmpFx[53]*tmpObjS[88] + tmpFx[63]*tmpObjS[104] + tmpFx[73]*tmpObjS[120] + tmpFx[83]*tmpObjS[136] + tmpFx[93]*tmpObjS[152] + tmpFx[103]*tmpObjS[168] + tmpFx[113]*tmpObjS[184] + tmpFx[123]*tmpObjS[200] + tmpFx[133]*tmpObjS[216] + tmpFx[143]*tmpObjS[232] + tmpFx[153]*tmpObjS[248];\ntmpQ2[57] = + tmpFx[3]*tmpObjS[9] + tmpFx[13]*tmpObjS[25] + tmpFx[23]*tmpObjS[41] + tmpFx[33]*tmpObjS[57] + tmpFx[43]*tmpObjS[73] + tmpFx[53]*tmpObjS[89] + tmpFx[63]*tmpObjS[105] + tmpFx[73]*tmpObjS[121] + tmpFx[83]*tmpObjS[137] + tmpFx[93]*tmpObjS[153] + tmpFx[103]*tmpObjS[169] + tmpFx[113]*tmpObjS[185] + tmpFx[123]*tmpObjS[201] + tmpFx[133]*tmpObjS[217] + tmpFx[143]*tmpObjS[233] + tmpFx[153]*tmpObjS[249];\ntmpQ2[58] = + tmpFx[3]*tmpObjS[10] + tmpFx[13]*tmpObjS[26] + tmpFx[23]*tmpObjS[42] + tmpFx[33]*tmpObjS[58] + tmpFx[43]*tmpObjS[74] + tmpFx[53]*tmpObjS[90] + tmpFx[63]*tmpObjS[106] + tmpFx[73]*tmpObjS[122] + tmpFx[83]*tmpObjS[138] + tmpFx[93]*tmpObjS[154] + tmpFx[103]*tmpObjS[170] + tmpFx[113]*tmpObjS[186] + tmpFx[123]*tmpObjS[202] + tmpFx[133]*tmpObjS[218] + tmpFx[143]*tmpObjS[234] + tmpFx[153]*tmpObjS[250];\ntmpQ2[59] = + tmpFx[3]*tmpObjS[11] + tmpFx[13]*tmpObjS[27] + tmpFx[23]*tmpObjS[43] + tmpFx[33]*tmpObjS[59] + tmpFx[43]*tmpObjS[75] + tmpFx[53]*tmpObjS[91] + tmpFx[63]*tmpObjS[107] + tmpFx[73]*tmpObjS[123] + tmpFx[83]*tmpObjS[139] + tmpFx[93]*tmpObjS[155] + tmpFx[103]*tmpObjS[171] + tmpFx[113]*tmpObjS[187] + tmpFx[123]*tmpObjS[203] + tmpFx[133]*tmpObjS[219] + tmpFx[143]*tmpObjS[235] + tmpFx[153]*tmpObjS[251];\ntmpQ2[60] = + tmpFx[3]*tmpObjS[12] + tmpFx[13]*tmpObjS[28] + tmpFx[23]*tmpObjS[44] + tmpFx[33]*tmpObjS[60] + tmpFx[43]*tmpObjS[76] + tmpFx[53]*tmpObjS[92] + tmpFx[63]*tmpObjS[108] + tmpFx[73]*tmpObjS[124] + tmpFx[83]*tmpObjS[140] + tmpFx[93]*tmpObjS[156] + tmpFx[103]*tmpObjS[172] + tmpFx[113]*tmpObjS[188] + tmpFx[123]*tmpObjS[204] + tmpFx[133]*tmpObjS[220] + tmpFx[143]*tmpObjS[236] + tmpFx[153]*tmpObjS[252];\ntmpQ2[61] = + tmpFx[3]*tmpObjS[13] + tmpFx[13]*tmpObjS[29] + tmpFx[23]*tmpObjS[45] + tmpFx[33]*tmpObjS[61] + tmpFx[43]*tmpObjS[77] + tmpFx[53]*tmpObjS[93] + tmpFx[63]*tmpObjS[109] + tmpFx[73]*tmpObjS[125] + tmpFx[83]*tmpObjS[141] + tmpFx[93]*tmpObjS[157] + tmpFx[103]*tmpObjS[173] + tmpFx[113]*tmpObjS[189] + tmpFx[123]*tmpObjS[205] + tmpFx[133]*tmpObjS[221] + tmpFx[143]*tmpObjS[237] + tmpFx[153]*tmpObjS[253];\ntmpQ2[62] = + tmpFx[3]*tmpObjS[14] + tmpFx[13]*tmpObjS[30] + tmpFx[23]*tmpObjS[46] + tmpFx[33]*tmpObjS[62] + tmpFx[43]*tmpObjS[78] + tmpFx[53]*tmpObjS[94] + tmpFx[63]*tmpObjS[110] + tmpFx[73]*tmpObjS[126] + tmpFx[83]*tmpObjS[142] + tmpFx[93]*tmpObjS[158] + tmpFx[103]*tmpObjS[174] + tmpFx[113]*tmpObjS[190] + tmpFx[123]*tmpObjS[206] + tmpFx[133]*tmpObjS[222] + tmpFx[143]*tmpObjS[238] + tmpFx[153]*tmpObjS[254];\ntmpQ2[63] = + tmpFx[3]*tmpObjS[15] + tmpFx[13]*tmpObjS[31] + tmpFx[23]*tmpObjS[47] + tmpFx[33]*tmpObjS[63] + tmpFx[43]*tmpObjS[79] + tmpFx[53]*tmpObjS[95] + tmpFx[63]*tmpObjS[111] + tmpFx[73]*tmpObjS[127] + tmpFx[83]*tmpObjS[143] + tmpFx[93]*tmpObjS[159] + tmpFx[103]*tmpObjS[175] + tmpFx[113]*tmpObjS[191] + tmpFx[123]*tmpObjS[207] + tmpFx[133]*tmpObjS[223] + tmpFx[143]*tmpObjS[239] + tmpFx[153]*tmpObjS[255];\ntmpQ2[64] = + tmpFx[4]*tmpObjS[0] + tmpFx[14]*tmpObjS[16] + tmpFx[24]*tmpObjS[32] + tmpFx[34]*tmpObjS[48] + tmpFx[44]*tmpObjS[64] + tmpFx[54]*tmpObjS[80] + tmpFx[64]*tmpObjS[96] + tmpFx[74]*tmpObjS[112] + tmpFx[84]*tmpObjS[128] + tmpFx[94]*tmpObjS[144] + tmpFx[104]*tmpObjS[160] + tmpFx[114]*tmpObjS[176] + tmpFx[124]*tmpObjS[192] + tmpFx[134]*tmpObjS[208] + tmpFx[144]*tmpObjS[224] + tmpFx[154]*tmpObjS[240];\ntmpQ2[65] = + tmpFx[4]*tmpObjS[1] + tmpFx[14]*tmpObjS[17] + tmpFx[24]*tmpObjS[33] + tmpFx[34]*tmpObjS[49] + tmpFx[44]*tmpObjS[65] + tmpFx[54]*tmpObjS[81] + tmpFx[64]*tmpObjS[97] + tmpFx[74]*tmpObjS[113] + tmpFx[84]*tmpObjS[129] + tmpFx[94]*tmpObjS[145] + tmpFx[104]*tmpObjS[161] + tmpFx[114]*tmpObjS[177] + tmpFx[124]*tmpObjS[193] + tmpFx[134]*tmpObjS[209] + tmpFx[144]*tmpObjS[225] + tmpFx[154]*tmpObjS[241];\ntmpQ2[66] = + tmpFx[4]*tmpObjS[2] + tmpFx[14]*tmpObjS[18] + tmpFx[24]*tmpObjS[34] + tmpFx[34]*tmpObjS[50] + tmpFx[44]*tmpObjS[66] + tmpFx[54]*tmpObjS[82] + tmpFx[64]*tmpObjS[98] + tmpFx[74]*tmpObjS[114] + tmpFx[84]*tmpObjS[130] + tmpFx[94]*tmpObjS[146] + tmpFx[104]*tmpObjS[162] + tmpFx[114]*tmpObjS[178] + tmpFx[124]*tmpObjS[194] + tmpFx[134]*tmpObjS[210] + tmpFx[144]*tmpObjS[226] + tmpFx[154]*tmpObjS[242];\ntmpQ2[67] = + tmpFx[4]*tmpObjS[3] + tmpFx[14]*tmpObjS[19] + tmpFx[24]*tmpObjS[35] + tmpFx[34]*tmpObjS[51] + tmpFx[44]*tmpObjS[67] + tmpFx[54]*tmpObjS[83] + tmpFx[64]*tmpObjS[99] + tmpFx[74]*tmpObjS[115] + tmpFx[84]*tmpObjS[131] + tmpFx[94]*tmpObjS[147] + tmpFx[104]*tmpObjS[163] + tmpFx[114]*tmpObjS[179] + tmpFx[124]*tmpObjS[195] + tmpFx[134]*tmpObjS[211] + tmpFx[144]*tmpObjS[227] + tmpFx[154]*tmpObjS[243];\ntmpQ2[68] = + tmpFx[4]*tmpObjS[4] + tmpFx[14]*tmpObjS[20] + tmpFx[24]*tmpObjS[36] + tmpFx[34]*tmpObjS[52] + tmpFx[44]*tmpObjS[68] + tmpFx[54]*tmpObjS[84] + tmpFx[64]*tmpObjS[100] + tmpFx[74]*tmpObjS[116] + tmpFx[84]*tmpObjS[132] + tmpFx[94]*tmpObjS[148] + tmpFx[104]*tmpObjS[164] + tmpFx[114]*tmpObjS[180] + tmpFx[124]*tmpObjS[196] + tmpFx[134]*tmpObjS[212] + tmpFx[144]*tmpObjS[228] + tmpFx[154]*tmpObjS[244];\ntmpQ2[69] = + tmpFx[4]*tmpObjS[5] + tmpFx[14]*tmpObjS[21] + tmpFx[24]*tmpObjS[37] + tmpFx[34]*tmpObjS[53] + tmpFx[44]*tmpObjS[69] + tmpFx[54]*tmpObjS[85] + tmpFx[64]*tmpObjS[101] + tmpFx[74]*tmpObjS[117] + tmpFx[84]*tmpObjS[133] + tmpFx[94]*tmpObjS[149] + tmpFx[104]*tmpObjS[165] + tmpFx[114]*tmpObjS[181] + tmpFx[124]*tmpObjS[197] + tmpFx[134]*tmpObjS[213] + tmpFx[144]*tmpObjS[229] + tmpFx[154]*tmpObjS[245];\ntmpQ2[70] = + tmpFx[4]*tmpObjS[6] + tmpFx[14]*tmpObjS[22] + tmpFx[24]*tmpObjS[38] + tmpFx[34]*tmpObjS[54] + tmpFx[44]*tmpObjS[70] + tmpFx[54]*tmpObjS[86] + tmpFx[64]*tmpObjS[102] + tmpFx[74]*tmpObjS[118] + tmpFx[84]*tmpObjS[134] + tmpFx[94]*tmpObjS[150] + tmpFx[104]*tmpObjS[166] + tmpFx[114]*tmpObjS[182] + tmpFx[124]*tmpObjS[198] + tmpFx[134]*tmpObjS[214] + tmpFx[144]*tmpObjS[230] + tmpFx[154]*tmpObjS[246];\ntmpQ2[71] = + tmpFx[4]*tmpObjS[7] + tmpFx[14]*tmpObjS[23] + tmpFx[24]*tmpObjS[39] + tmpFx[34]*tmpObjS[55] + tmpFx[44]*tmpObjS[71] + tmpFx[54]*tmpObjS[87] + tmpFx[64]*tmpObjS[103] + tmpFx[74]*tmpObjS[119] + tmpFx[84]*tmpObjS[135] + tmpFx[94]*tmpObjS[151] + tmpFx[104]*tmpObjS[167] + tmpFx[114]*tmpObjS[183] + tmpFx[124]*tmpObjS[199] + tmpFx[134]*tmpObjS[215] + tmpFx[144]*tmpObjS[231] + tmpFx[154]*tmpObjS[247];\ntmpQ2[72] = + tmpFx[4]*tmpObjS[8] + tmpFx[14]*tmpObjS[24] + tmpFx[24]*tmpObjS[40] + tmpFx[34]*tmpObjS[56] + tmpFx[44]*tmpObjS[72] + tmpFx[54]*tmpObjS[88] + tmpFx[64]*tmpObjS[104] + tmpFx[74]*tmpObjS[120] + tmpFx[84]*tmpObjS[136] + tmpFx[94]*tmpObjS[152] + tmpFx[104]*tmpObjS[168] + tmpFx[114]*tmpObjS[184] + tmpFx[124]*tmpObjS[200] + tmpFx[134]*tmpObjS[216] + tmpFx[144]*tmpObjS[232] + tmpFx[154]*tmpObjS[248];\ntmpQ2[73] = + tmpFx[4]*tmpObjS[9] + tmpFx[14]*tmpObjS[25] + tmpFx[24]*tmpObjS[41] + tmpFx[34]*tmpObjS[57] + tmpFx[44]*tmpObjS[73] + tmpFx[54]*tmpObjS[89] + tmpFx[64]*tmpObjS[105] + tmpFx[74]*tmpObjS[121] + tmpFx[84]*tmpObjS[137] + tmpFx[94]*tmpObjS[153] + tmpFx[104]*tmpObjS[169] + tmpFx[114]*tmpObjS[185] + tmpFx[124]*tmpObjS[201] + tmpFx[134]*tmpObjS[217] + tmpFx[144]*tmpObjS[233] + tmpFx[154]*tmpObjS[249];\ntmpQ2[74] = + tmpFx[4]*tmpObjS[10] + tmpFx[14]*tmpObjS[26] + tmpFx[24]*tmpObjS[42] + tmpFx[34]*tmpObjS[58] + tmpFx[44]*tmpObjS[74] + tmpFx[54]*tmpObjS[90] + tmpFx[64]*tmpObjS[106] + tmpFx[74]*tmpObjS[122] + tmpFx[84]*tmpObjS[138] + tmpFx[94]*tmpObjS[154] + tmpFx[104]*tmpObjS[170] + tmpFx[114]*tmpObjS[186] + tmpFx[124]*tmpObjS[202] + tmpFx[134]*tmpObjS[218] + tmpFx[144]*tmpObjS[234] + tmpFx[154]*tmpObjS[250];\ntmpQ2[75] = + tmpFx[4]*tmpObjS[11] + tmpFx[14]*tmpObjS[27] + tmpFx[24]*tmpObjS[43] + tmpFx[34]*tmpObjS[59] + tmpFx[44]*tmpObjS[75] + tmpFx[54]*tmpObjS[91] + tmpFx[64]*tmpObjS[107] + tmpFx[74]*tmpObjS[123] + tmpFx[84]*tmpObjS[139] + tmpFx[94]*tmpObjS[155] + tmpFx[104]*tmpObjS[171] + tmpFx[114]*tmpObjS[187] + tmpFx[124]*tmpObjS[203] + tmpFx[134]*tmpObjS[219] + tmpFx[144]*tmpObjS[235] + tmpFx[154]*tmpObjS[251];\ntmpQ2[76] = + tmpFx[4]*tmpObjS[12] + tmpFx[14]*tmpObjS[28] + tmpFx[24]*tmpObjS[44] + tmpFx[34]*tmpObjS[60] + tmpFx[44]*tmpObjS[76] + tmpFx[54]*tmpObjS[92] + tmpFx[64]*tmpObjS[108] + tmpFx[74]*tmpObjS[124] + tmpFx[84]*tmpObjS[140] + tmpFx[94]*tmpObjS[156] + tmpFx[104]*tmpObjS[172] + tmpFx[114]*tmpObjS[188] + tmpFx[124]*tmpObjS[204] + tmpFx[134]*tmpObjS[220] + tmpFx[144]*tmpObjS[236] + tmpFx[154]*tmpObjS[252];\ntmpQ2[77] = + tmpFx[4]*tmpObjS[13] + tmpFx[14]*tmpObjS[29] + tmpFx[24]*tmpObjS[45] + tmpFx[34]*tmpObjS[61] + tmpFx[44]*tmpObjS[77] + tmpFx[54]*tmpObjS[93] + tmpFx[64]*tmpObjS[109] + tmpFx[74]*tmpObjS[125] + tmpFx[84]*tmpObjS[141] + tmpFx[94]*tmpObjS[157] + tmpFx[104]*tmpObjS[173] + tmpFx[114]*tmpObjS[189] + tmpFx[124]*tmpObjS[205] + tmpFx[134]*tmpObjS[221] + tmpFx[144]*tmpObjS[237] + tmpFx[154]*tmpObjS[253];\ntmpQ2[78] = + tmpFx[4]*tmpObjS[14] + tmpFx[14]*tmpObjS[30] + tmpFx[24]*tmpObjS[46] + tmpFx[34]*tmpObjS[62] + tmpFx[44]*tmpObjS[78] + tmpFx[54]*tmpObjS[94] + tmpFx[64]*tmpObjS[110] + tmpFx[74]*tmpObjS[126] + tmpFx[84]*tmpObjS[142] + tmpFx[94]*tmpObjS[158] + tmpFx[104]*tmpObjS[174] + tmpFx[114]*tmpObjS[190] + tmpFx[124]*tmpObjS[206] + tmpFx[134]*tmpObjS[222] + tmpFx[144]*tmpObjS[238] + tmpFx[154]*tmpObjS[254];\ntmpQ2[79] = + tmpFx[4]*tmpObjS[15] + tmpFx[14]*tmpObjS[31] + tmpFx[24]*tmpObjS[47] + tmpFx[34]*tmpObjS[63] + tmpFx[44]*tmpObjS[79] + tmpFx[54]*tmpObjS[95] + tmpFx[64]*tmpObjS[111] + tmpFx[74]*tmpObjS[127] + tmpFx[84]*tmpObjS[143] + tmpFx[94]*tmpObjS[159] + tmpFx[104]*tmpObjS[175] + tmpFx[114]*tmpObjS[191] + tmpFx[124]*tmpObjS[207] + tmpFx[134]*tmpObjS[223] + tmpFx[144]*tmpObjS[239] + tmpFx[154]*tmpObjS[255];\ntmpQ2[80] = + tmpFx[5]*tmpObjS[0] + tmpFx[15]*tmpObjS[16] + tmpFx[25]*tmpObjS[32] + tmpFx[35]*tmpObjS[48] + tmpFx[45]*tmpObjS[64] + tmpFx[55]*tmpObjS[80] + tmpFx[65]*tmpObjS[96] + tmpFx[75]*tmpObjS[112] + tmpFx[85]*tmpObjS[128] + tmpFx[95]*tmpObjS[144] + tmpFx[105]*tmpObjS[160] + tmpFx[115]*tmpObjS[176] + tmpFx[125]*tmpObjS[192] + tmpFx[135]*tmpObjS[208] + tmpFx[145]*tmpObjS[224] + tmpFx[155]*tmpObjS[240];\ntmpQ2[81] = + tmpFx[5]*tmpObjS[1] + tmpFx[15]*tmpObjS[17] + tmpFx[25]*tmpObjS[33] + tmpFx[35]*tmpObjS[49] + tmpFx[45]*tmpObjS[65] + tmpFx[55]*tmpObjS[81] + tmpFx[65]*tmpObjS[97] + tmpFx[75]*tmpObjS[113] + tmpFx[85]*tmpObjS[129] + tmpFx[95]*tmpObjS[145] + tmpFx[105]*tmpObjS[161] + tmpFx[115]*tmpObjS[177] + tmpFx[125]*tmpObjS[193] + tmpFx[135]*tmpObjS[209] + tmpFx[145]*tmpObjS[225] + tmpFx[155]*tmpObjS[241];\ntmpQ2[82] = + tmpFx[5]*tmpObjS[2] + tmpFx[15]*tmpObjS[18] + tmpFx[25]*tmpObjS[34] + tmpFx[35]*tmpObjS[50] + tmpFx[45]*tmpObjS[66] + tmpFx[55]*tmpObjS[82] + tmpFx[65]*tmpObjS[98] + tmpFx[75]*tmpObjS[114] + tmpFx[85]*tmpObjS[130] + tmpFx[95]*tmpObjS[146] + tmpFx[105]*tmpObjS[162] + tmpFx[115]*tmpObjS[178] + tmpFx[125]*tmpObjS[194] + tmpFx[135]*tmpObjS[210] + tmpFx[145]*tmpObjS[226] + tmpFx[155]*tmpObjS[242];\ntmpQ2[83] = + tmpFx[5]*tmpObjS[3] + tmpFx[15]*tmpObjS[19] + tmpFx[25]*tmpObjS[35] + tmpFx[35]*tmpObjS[51] + tmpFx[45]*tmpObjS[67] + tmpFx[55]*tmpObjS[83] + tmpFx[65]*tmpObjS[99] + tmpFx[75]*tmpObjS[115] + tmpFx[85]*tmpObjS[131] + tmpFx[95]*tmpObjS[147] + tmpFx[105]*tmpObjS[163] + tmpFx[115]*tmpObjS[179] + tmpFx[125]*tmpObjS[195] + tmpFx[135]*tmpObjS[211] + tmpFx[145]*tmpObjS[227] + tmpFx[155]*tmpObjS[243];\ntmpQ2[84] = + tmpFx[5]*tmpObjS[4] + tmpFx[15]*tmpObjS[20] + tmpFx[25]*tmpObjS[36] + tmpFx[35]*tmpObjS[52] + tmpFx[45]*tmpObjS[68] + tmpFx[55]*tmpObjS[84] + tmpFx[65]*tmpObjS[100] + tmpFx[75]*tmpObjS[116] + tmpFx[85]*tmpObjS[132] + tmpFx[95]*tmpObjS[148] + tmpFx[105]*tmpObjS[164] + tmpFx[115]*tmpObjS[180] + tmpFx[125]*tmpObjS[196] + tmpFx[135]*tmpObjS[212] + tmpFx[145]*tmpObjS[228] + tmpFx[155]*tmpObjS[244];\ntmpQ2[85] = + tmpFx[5]*tmpObjS[5] + tmpFx[15]*tmpObjS[21] + tmpFx[25]*tmpObjS[37] + tmpFx[35]*tmpObjS[53] + tmpFx[45]*tmpObjS[69] + tmpFx[55]*tmpObjS[85] + tmpFx[65]*tmpObjS[101] + tmpFx[75]*tmpObjS[117] + tmpFx[85]*tmpObjS[133] + tmpFx[95]*tmpObjS[149] + tmpFx[105]*tmpObjS[165] + tmpFx[115]*tmpObjS[181] + tmpFx[125]*tmpObjS[197] + tmpFx[135]*tmpObjS[213] + tmpFx[145]*tmpObjS[229] + tmpFx[155]*tmpObjS[245];\ntmpQ2[86] = + tmpFx[5]*tmpObjS[6] + tmpFx[15]*tmpObjS[22] + tmpFx[25]*tmpObjS[38] + tmpFx[35]*tmpObjS[54] + tmpFx[45]*tmpObjS[70] + tmpFx[55]*tmpObjS[86] + tmpFx[65]*tmpObjS[102] + tmpFx[75]*tmpObjS[118] + tmpFx[85]*tmpObjS[134] + tmpFx[95]*tmpObjS[150] + tmpFx[105]*tmpObjS[166] + tmpFx[115]*tmpObjS[182] + tmpFx[125]*tmpObjS[198] + tmpFx[135]*tmpObjS[214] + tmpFx[145]*tmpObjS[230] + tmpFx[155]*tmpObjS[246];\ntmpQ2[87] = + tmpFx[5]*tmpObjS[7] + tmpFx[15]*tmpObjS[23] + tmpFx[25]*tmpObjS[39] + tmpFx[35]*tmpObjS[55] + tmpFx[45]*tmpObjS[71] + tmpFx[55]*tmpObjS[87] + tmpFx[65]*tmpObjS[103] + tmpFx[75]*tmpObjS[119] + tmpFx[85]*tmpObjS[135] + tmpFx[95]*tmpObjS[151] + tmpFx[105]*tmpObjS[167] + tmpFx[115]*tmpObjS[183] + tmpFx[125]*tmpObjS[199] + tmpFx[135]*tmpObjS[215] + tmpFx[145]*tmpObjS[231] + tmpFx[155]*tmpObjS[247];\ntmpQ2[88] = + tmpFx[5]*tmpObjS[8] + tmpFx[15]*tmpObjS[24] + tmpFx[25]*tmpObjS[40] + tmpFx[35]*tmpObjS[56] + tmpFx[45]*tmpObjS[72] + tmpFx[55]*tmpObjS[88] + tmpFx[65]*tmpObjS[104] + tmpFx[75]*tmpObjS[120] + tmpFx[85]*tmpObjS[136] + tmpFx[95]*tmpObjS[152] + tmpFx[105]*tmpObjS[168] + tmpFx[115]*tmpObjS[184] + tmpFx[125]*tmpObjS[200] + tmpFx[135]*tmpObjS[216] + tmpFx[145]*tmpObjS[232] + tmpFx[155]*tmpObjS[248];\ntmpQ2[89] = + tmpFx[5]*tmpObjS[9] + tmpFx[15]*tmpObjS[25] + tmpFx[25]*tmpObjS[41] + tmpFx[35]*tmpObjS[57] + tmpFx[45]*tmpObjS[73] + tmpFx[55]*tmpObjS[89] + tmpFx[65]*tmpObjS[105] + tmpFx[75]*tmpObjS[121] + tmpFx[85]*tmpObjS[137] + tmpFx[95]*tmpObjS[153] + tmpFx[105]*tmpObjS[169] + tmpFx[115]*tmpObjS[185] + tmpFx[125]*tmpObjS[201] + tmpFx[135]*tmpObjS[217] + tmpFx[145]*tmpObjS[233] + tmpFx[155]*tmpObjS[249];\ntmpQ2[90] = + tmpFx[5]*tmpObjS[10] + tmpFx[15]*tmpObjS[26] + tmpFx[25]*tmpObjS[42] + tmpFx[35]*tmpObjS[58] + tmpFx[45]*tmpObjS[74] + tmpFx[55]*tmpObjS[90] + tmpFx[65]*tmpObjS[106] + tmpFx[75]*tmpObjS[122] + tmpFx[85]*tmpObjS[138] + tmpFx[95]*tmpObjS[154] + tmpFx[105]*tmpObjS[170] + tmpFx[115]*tmpObjS[186] + tmpFx[125]*tmpObjS[202] + tmpFx[135]*tmpObjS[218] + tmpFx[145]*tmpObjS[234] + tmpFx[155]*tmpObjS[250];\ntmpQ2[91] = + tmpFx[5]*tmpObjS[11] + tmpFx[15]*tmpObjS[27] + tmpFx[25]*tmpObjS[43] + tmpFx[35]*tmpObjS[59] + tmpFx[45]*tmpObjS[75] + tmpFx[55]*tmpObjS[91] + tmpFx[65]*tmpObjS[107] + tmpFx[75]*tmpObjS[123] + tmpFx[85]*tmpObjS[139] + tmpFx[95]*tmpObjS[155] + tmpFx[105]*tmpObjS[171] + tmpFx[115]*tmpObjS[187] + tmpFx[125]*tmpObjS[203] + tmpFx[135]*tmpObjS[219] + tmpFx[145]*tmpObjS[235] + tmpFx[155]*tmpObjS[251];\ntmpQ2[92] = + tmpFx[5]*tmpObjS[12] + tmpFx[15]*tmpObjS[28] + tmpFx[25]*tmpObjS[44] + tmpFx[35]*tmpObjS[60] + tmpFx[45]*tmpObjS[76] + tmpFx[55]*tmpObjS[92] + tmpFx[65]*tmpObjS[108] + tmpFx[75]*tmpObjS[124] + tmpFx[85]*tmpObjS[140] + tmpFx[95]*tmpObjS[156] + tmpFx[105]*tmpObjS[172] + tmpFx[115]*tmpObjS[188] + tmpFx[125]*tmpObjS[204] + tmpFx[135]*tmpObjS[220] + tmpFx[145]*tmpObjS[236] + tmpFx[155]*tmpObjS[252];\ntmpQ2[93] = + tmpFx[5]*tmpObjS[13] + tmpFx[15]*tmpObjS[29] + tmpFx[25]*tmpObjS[45] + tmpFx[35]*tmpObjS[61] + tmpFx[45]*tmpObjS[77] + tmpFx[55]*tmpObjS[93] + tmpFx[65]*tmpObjS[109] + tmpFx[75]*tmpObjS[125] + tmpFx[85]*tmpObjS[141] + tmpFx[95]*tmpObjS[157] + tmpFx[105]*tmpObjS[173] + tmpFx[115]*tmpObjS[189] + tmpFx[125]*tmpObjS[205] + tmpFx[135]*tmpObjS[221] + tmpFx[145]*tmpObjS[237] + tmpFx[155]*tmpObjS[253];\ntmpQ2[94] = + tmpFx[5]*tmpObjS[14] + tmpFx[15]*tmpObjS[30] + tmpFx[25]*tmpObjS[46] + tmpFx[35]*tmpObjS[62] + tmpFx[45]*tmpObjS[78] + tmpFx[55]*tmpObjS[94] + tmpFx[65]*tmpObjS[110] + tmpFx[75]*tmpObjS[126] + tmpFx[85]*tmpObjS[142] + tmpFx[95]*tmpObjS[158] + tmpFx[105]*tmpObjS[174] + tmpFx[115]*tmpObjS[190] + tmpFx[125]*tmpObjS[206] + tmpFx[135]*tmpObjS[222] + tmpFx[145]*tmpObjS[238] + tmpFx[155]*tmpObjS[254];\ntmpQ2[95] = + tmpFx[5]*tmpObjS[15] + tmpFx[15]*tmpObjS[31] + tmpFx[25]*tmpObjS[47] + tmpFx[35]*tmpObjS[63] + tmpFx[45]*tmpObjS[79] + tmpFx[55]*tmpObjS[95] + tmpFx[65]*tmpObjS[111] + tmpFx[75]*tmpObjS[127] + tmpFx[85]*tmpObjS[143] + tmpFx[95]*tmpObjS[159] + tmpFx[105]*tmpObjS[175] + tmpFx[115]*tmpObjS[191] + tmpFx[125]*tmpObjS[207] + tmpFx[135]*tmpObjS[223] + tmpFx[145]*tmpObjS[239] + tmpFx[155]*tmpObjS[255];\ntmpQ2[96] = + tmpFx[6]*tmpObjS[0] + tmpFx[16]*tmpObjS[16] + tmpFx[26]*tmpObjS[32] + tmpFx[36]*tmpObjS[48] + tmpFx[46]*tmpObjS[64] + tmpFx[56]*tmpObjS[80] + tmpFx[66]*tmpObjS[96] + tmpFx[76]*tmpObjS[112] + tmpFx[86]*tmpObjS[128] + tmpFx[96]*tmpObjS[144] + tmpFx[106]*tmpObjS[160] + tmpFx[116]*tmpObjS[176] + tmpFx[126]*tmpObjS[192] + tmpFx[136]*tmpObjS[208] + tmpFx[146]*tmpObjS[224] + tmpFx[156]*tmpObjS[240];\ntmpQ2[97] = + tmpFx[6]*tmpObjS[1] + tmpFx[16]*tmpObjS[17] + tmpFx[26]*tmpObjS[33] + tmpFx[36]*tmpObjS[49] + tmpFx[46]*tmpObjS[65] + tmpFx[56]*tmpObjS[81] + tmpFx[66]*tmpObjS[97] + tmpFx[76]*tmpObjS[113] + tmpFx[86]*tmpObjS[129] + tmpFx[96]*tmpObjS[145] + tmpFx[106]*tmpObjS[161] + tmpFx[116]*tmpObjS[177] + tmpFx[126]*tmpObjS[193] + tmpFx[136]*tmpObjS[209] + tmpFx[146]*tmpObjS[225] + tmpFx[156]*tmpObjS[241];\ntmpQ2[98] = + tmpFx[6]*tmpObjS[2] + tmpFx[16]*tmpObjS[18] + tmpFx[26]*tmpObjS[34] + tmpFx[36]*tmpObjS[50] + tmpFx[46]*tmpObjS[66] + tmpFx[56]*tmpObjS[82] + tmpFx[66]*tmpObjS[98] + tmpFx[76]*tmpObjS[114] + tmpFx[86]*tmpObjS[130] + tmpFx[96]*tmpObjS[146] + tmpFx[106]*tmpObjS[162] + tmpFx[116]*tmpObjS[178] + tmpFx[126]*tmpObjS[194] + tmpFx[136]*tmpObjS[210] + tmpFx[146]*tmpObjS[226] + tmpFx[156]*tmpObjS[242];\ntmpQ2[99] = + tmpFx[6]*tmpObjS[3] + tmpFx[16]*tmpObjS[19] + tmpFx[26]*tmpObjS[35] + tmpFx[36]*tmpObjS[51] + tmpFx[46]*tmpObjS[67] + tmpFx[56]*tmpObjS[83] + tmpFx[66]*tmpObjS[99] + tmpFx[76]*tmpObjS[115] + tmpFx[86]*tmpObjS[131] + tmpFx[96]*tmpObjS[147] + tmpFx[106]*tmpObjS[163] + tmpFx[116]*tmpObjS[179] + tmpFx[126]*tmpObjS[195] + tmpFx[136]*tmpObjS[211] + tmpFx[146]*tmpObjS[227] + tmpFx[156]*tmpObjS[243];\ntmpQ2[100] = + tmpFx[6]*tmpObjS[4] + tmpFx[16]*tmpObjS[20] + tmpFx[26]*tmpObjS[36] + tmpFx[36]*tmpObjS[52] + tmpFx[46]*tmpObjS[68] + tmpFx[56]*tmpObjS[84] + tmpFx[66]*tmpObjS[100] + tmpFx[76]*tmpObjS[116] + tmpFx[86]*tmpObjS[132] + tmpFx[96]*tmpObjS[148] + tmpFx[106]*tmpObjS[164] + tmpFx[116]*tmpObjS[180] + tmpFx[126]*tmpObjS[196] + tmpFx[136]*tmpObjS[212] + tmpFx[146]*tmpObjS[228] + tmpFx[156]*tmpObjS[244];\ntmpQ2[101] = + tmpFx[6]*tmpObjS[5] + tmpFx[16]*tmpObjS[21] + tmpFx[26]*tmpObjS[37] + tmpFx[36]*tmpObjS[53] + tmpFx[46]*tmpObjS[69] + tmpFx[56]*tmpObjS[85] + tmpFx[66]*tmpObjS[101] + tmpFx[76]*tmpObjS[117] + tmpFx[86]*tmpObjS[133] + tmpFx[96]*tmpObjS[149] + tmpFx[106]*tmpObjS[165] + tmpFx[116]*tmpObjS[181] + tmpFx[126]*tmpObjS[197] + tmpFx[136]*tmpObjS[213] + tmpFx[146]*tmpObjS[229] + tmpFx[156]*tmpObjS[245];\ntmpQ2[102] = + tmpFx[6]*tmpObjS[6] + tmpFx[16]*tmpObjS[22] + tmpFx[26]*tmpObjS[38] + tmpFx[36]*tmpObjS[54] + tmpFx[46]*tmpObjS[70] + tmpFx[56]*tmpObjS[86] + tmpFx[66]*tmpObjS[102] + tmpFx[76]*tmpObjS[118] + tmpFx[86]*tmpObjS[134] + tmpFx[96]*tmpObjS[150] + tmpFx[106]*tmpObjS[166] + tmpFx[116]*tmpObjS[182] + tmpFx[126]*tmpObjS[198] + tmpFx[136]*tmpObjS[214] + tmpFx[146]*tmpObjS[230] + tmpFx[156]*tmpObjS[246];\ntmpQ2[103] = + tmpFx[6]*tmpObjS[7] + tmpFx[16]*tmpObjS[23] + tmpFx[26]*tmpObjS[39] + tmpFx[36]*tmpObjS[55] + tmpFx[46]*tmpObjS[71] + tmpFx[56]*tmpObjS[87] + tmpFx[66]*tmpObjS[103] + tmpFx[76]*tmpObjS[119] + tmpFx[86]*tmpObjS[135] + tmpFx[96]*tmpObjS[151] + tmpFx[106]*tmpObjS[167] + tmpFx[116]*tmpObjS[183] + tmpFx[126]*tmpObjS[199] + tmpFx[136]*tmpObjS[215] + tmpFx[146]*tmpObjS[231] + tmpFx[156]*tmpObjS[247];\ntmpQ2[104] = + tmpFx[6]*tmpObjS[8] + tmpFx[16]*tmpObjS[24] + tmpFx[26]*tmpObjS[40] + tmpFx[36]*tmpObjS[56] + tmpFx[46]*tmpObjS[72] + tmpFx[56]*tmpObjS[88] + tmpFx[66]*tmpObjS[104] + tmpFx[76]*tmpObjS[120] + tmpFx[86]*tmpObjS[136] + tmpFx[96]*tmpObjS[152] + tmpFx[106]*tmpObjS[168] + tmpFx[116]*tmpObjS[184] + tmpFx[126]*tmpObjS[200] + tmpFx[136]*tmpObjS[216] + tmpFx[146]*tmpObjS[232] + tmpFx[156]*tmpObjS[248];\ntmpQ2[105] = + tmpFx[6]*tmpObjS[9] + tmpFx[16]*tmpObjS[25] + tmpFx[26]*tmpObjS[41] + tmpFx[36]*tmpObjS[57] + tmpFx[46]*tmpObjS[73] + tmpFx[56]*tmpObjS[89] + tmpFx[66]*tmpObjS[105] + tmpFx[76]*tmpObjS[121] + tmpFx[86]*tmpObjS[137] + tmpFx[96]*tmpObjS[153] + tmpFx[106]*tmpObjS[169] + tmpFx[116]*tmpObjS[185] + tmpFx[126]*tmpObjS[201] + tmpFx[136]*tmpObjS[217] + tmpFx[146]*tmpObjS[233] + tmpFx[156]*tmpObjS[249];\ntmpQ2[106] = + tmpFx[6]*tmpObjS[10] + tmpFx[16]*tmpObjS[26] + tmpFx[26]*tmpObjS[42] + tmpFx[36]*tmpObjS[58] + tmpFx[46]*tmpObjS[74] + tmpFx[56]*tmpObjS[90] + tmpFx[66]*tmpObjS[106] + tmpFx[76]*tmpObjS[122] + tmpFx[86]*tmpObjS[138] + tmpFx[96]*tmpObjS[154] + tmpFx[106]*tmpObjS[170] + tmpFx[116]*tmpObjS[186] + tmpFx[126]*tmpObjS[202] + tmpFx[136]*tmpObjS[218] + tmpFx[146]*tmpObjS[234] + tmpFx[156]*tmpObjS[250];\ntmpQ2[107] = + tmpFx[6]*tmpObjS[11] + tmpFx[16]*tmpObjS[27] + tmpFx[26]*tmpObjS[43] + tmpFx[36]*tmpObjS[59] + tmpFx[46]*tmpObjS[75] + tmpFx[56]*tmpObjS[91] + tmpFx[66]*tmpObjS[107] + tmpFx[76]*tmpObjS[123] + tmpFx[86]*tmpObjS[139] + tmpFx[96]*tmpObjS[155] + tmpFx[106]*tmpObjS[171] + tmpFx[116]*tmpObjS[187] + tmpFx[126]*tmpObjS[203] + tmpFx[136]*tmpObjS[219] + tmpFx[146]*tmpObjS[235] + tmpFx[156]*tmpObjS[251];\ntmpQ2[108] = + tmpFx[6]*tmpObjS[12] + tmpFx[16]*tmpObjS[28] + tmpFx[26]*tmpObjS[44] + tmpFx[36]*tmpObjS[60] + tmpFx[46]*tmpObjS[76] + tmpFx[56]*tmpObjS[92] + tmpFx[66]*tmpObjS[108] + tmpFx[76]*tmpObjS[124] + tmpFx[86]*tmpObjS[140] + tmpFx[96]*tmpObjS[156] + tmpFx[106]*tmpObjS[172] + tmpFx[116]*tmpObjS[188] + tmpFx[126]*tmpObjS[204] + tmpFx[136]*tmpObjS[220] + tmpFx[146]*tmpObjS[236] + tmpFx[156]*tmpObjS[252];\ntmpQ2[109] = + tmpFx[6]*tmpObjS[13] + tmpFx[16]*tmpObjS[29] + tmpFx[26]*tmpObjS[45] + tmpFx[36]*tmpObjS[61] + tmpFx[46]*tmpObjS[77] + tmpFx[56]*tmpObjS[93] + tmpFx[66]*tmpObjS[109] + tmpFx[76]*tmpObjS[125] + tmpFx[86]*tmpObjS[141] + tmpFx[96]*tmpObjS[157] + tmpFx[106]*tmpObjS[173] + tmpFx[116]*tmpObjS[189] + tmpFx[126]*tmpObjS[205] + tmpFx[136]*tmpObjS[221] + tmpFx[146]*tmpObjS[237] + tmpFx[156]*tmpObjS[253];\ntmpQ2[110] = + tmpFx[6]*tmpObjS[14] + tmpFx[16]*tmpObjS[30] + tmpFx[26]*tmpObjS[46] + tmpFx[36]*tmpObjS[62] + tmpFx[46]*tmpObjS[78] + tmpFx[56]*tmpObjS[94] + tmpFx[66]*tmpObjS[110] + tmpFx[76]*tmpObjS[126] + tmpFx[86]*tmpObjS[142] + tmpFx[96]*tmpObjS[158] + tmpFx[106]*tmpObjS[174] + tmpFx[116]*tmpObjS[190] + tmpFx[126]*tmpObjS[206] + tmpFx[136]*tmpObjS[222] + tmpFx[146]*tmpObjS[238] + tmpFx[156]*tmpObjS[254];\ntmpQ2[111] = + tmpFx[6]*tmpObjS[15] + tmpFx[16]*tmpObjS[31] + tmpFx[26]*tmpObjS[47] + tmpFx[36]*tmpObjS[63] + tmpFx[46]*tmpObjS[79] + tmpFx[56]*tmpObjS[95] + tmpFx[66]*tmpObjS[111] + tmpFx[76]*tmpObjS[127] + tmpFx[86]*tmpObjS[143] + tmpFx[96]*tmpObjS[159] + tmpFx[106]*tmpObjS[175] + tmpFx[116]*tmpObjS[191] + tmpFx[126]*tmpObjS[207] + tmpFx[136]*tmpObjS[223] + tmpFx[146]*tmpObjS[239] + tmpFx[156]*tmpObjS[255];\ntmpQ2[112] = + tmpFx[7]*tmpObjS[0] + tmpFx[17]*tmpObjS[16] + tmpFx[27]*tmpObjS[32] + tmpFx[37]*tmpObjS[48] + tmpFx[47]*tmpObjS[64] + tmpFx[57]*tmpObjS[80] + tmpFx[67]*tmpObjS[96] + tmpFx[77]*tmpObjS[112] + tmpFx[87]*tmpObjS[128] + tmpFx[97]*tmpObjS[144] + tmpFx[107]*tmpObjS[160] + tmpFx[117]*tmpObjS[176] + tmpFx[127]*tmpObjS[192] + tmpFx[137]*tmpObjS[208] + tmpFx[147]*tmpObjS[224] + tmpFx[157]*tmpObjS[240];\ntmpQ2[113] = + tmpFx[7]*tmpObjS[1] + tmpFx[17]*tmpObjS[17] + tmpFx[27]*tmpObjS[33] + tmpFx[37]*tmpObjS[49] + tmpFx[47]*tmpObjS[65] + tmpFx[57]*tmpObjS[81] + tmpFx[67]*tmpObjS[97] + tmpFx[77]*tmpObjS[113] + tmpFx[87]*tmpObjS[129] + tmpFx[97]*tmpObjS[145] + tmpFx[107]*tmpObjS[161] + tmpFx[117]*tmpObjS[177] + tmpFx[127]*tmpObjS[193] + tmpFx[137]*tmpObjS[209] + tmpFx[147]*tmpObjS[225] + tmpFx[157]*tmpObjS[241];\ntmpQ2[114] = + tmpFx[7]*tmpObjS[2] + tmpFx[17]*tmpObjS[18] + tmpFx[27]*tmpObjS[34] + tmpFx[37]*tmpObjS[50] + tmpFx[47]*tmpObjS[66] + tmpFx[57]*tmpObjS[82] + tmpFx[67]*tmpObjS[98] + tmpFx[77]*tmpObjS[114] + tmpFx[87]*tmpObjS[130] + tmpFx[97]*tmpObjS[146] + tmpFx[107]*tmpObjS[162] + tmpFx[117]*tmpObjS[178] + tmpFx[127]*tmpObjS[194] + tmpFx[137]*tmpObjS[210] + tmpFx[147]*tmpObjS[226] + tmpFx[157]*tmpObjS[242];\ntmpQ2[115] = + tmpFx[7]*tmpObjS[3] + tmpFx[17]*tmpObjS[19] + tmpFx[27]*tmpObjS[35] + tmpFx[37]*tmpObjS[51] + tmpFx[47]*tmpObjS[67] + tmpFx[57]*tmpObjS[83] + tmpFx[67]*tmpObjS[99] + tmpFx[77]*tmpObjS[115] + tmpFx[87]*tmpObjS[131] + tmpFx[97]*tmpObjS[147] + tmpFx[107]*tmpObjS[163] + tmpFx[117]*tmpObjS[179] + tmpFx[127]*tmpObjS[195] + tmpFx[137]*tmpObjS[211] + tmpFx[147]*tmpObjS[227] + tmpFx[157]*tmpObjS[243];\ntmpQ2[116] = + tmpFx[7]*tmpObjS[4] + tmpFx[17]*tmpObjS[20] + tmpFx[27]*tmpObjS[36] + tmpFx[37]*tmpObjS[52] + tmpFx[47]*tmpObjS[68] + tmpFx[57]*tmpObjS[84] + tmpFx[67]*tmpObjS[100] + tmpFx[77]*tmpObjS[116] + tmpFx[87]*tmpObjS[132] + tmpFx[97]*tmpObjS[148] + tmpFx[107]*tmpObjS[164] + tmpFx[117]*tmpObjS[180] + tmpFx[127]*tmpObjS[196] + tmpFx[137]*tmpObjS[212] + tmpFx[147]*tmpObjS[228] + tmpFx[157]*tmpObjS[244];\ntmpQ2[117] = + tmpFx[7]*tmpObjS[5] + tmpFx[17]*tmpObjS[21] + tmpFx[27]*tmpObjS[37] + tmpFx[37]*tmpObjS[53] + tmpFx[47]*tmpObjS[69] + tmpFx[57]*tmpObjS[85] + tmpFx[67]*tmpObjS[101] + tmpFx[77]*tmpObjS[117] + tmpFx[87]*tmpObjS[133] + tmpFx[97]*tmpObjS[149] + tmpFx[107]*tmpObjS[165] + tmpFx[117]*tmpObjS[181] + tmpFx[127]*tmpObjS[197] + tmpFx[137]*tmpObjS[213] + tmpFx[147]*tmpObjS[229] + tmpFx[157]*tmpObjS[245];\ntmpQ2[118] = + tmpFx[7]*tmpObjS[6] + tmpFx[17]*tmpObjS[22] + tmpFx[27]*tmpObjS[38] + tmpFx[37]*tmpObjS[54] + tmpFx[47]*tmpObjS[70] + tmpFx[57]*tmpObjS[86] + tmpFx[67]*tmpObjS[102] + tmpFx[77]*tmpObjS[118] + tmpFx[87]*tmpObjS[134] + tmpFx[97]*tmpObjS[150] + tmpFx[107]*tmpObjS[166] + tmpFx[117]*tmpObjS[182] + tmpFx[127]*tmpObjS[198] + tmpFx[137]*tmpObjS[214] + tmpFx[147]*tmpObjS[230] + tmpFx[157]*tmpObjS[246];\ntmpQ2[119] = + tmpFx[7]*tmpObjS[7] + tmpFx[17]*tmpObjS[23] + tmpFx[27]*tmpObjS[39] + tmpFx[37]*tmpObjS[55] + tmpFx[47]*tmpObjS[71] + tmpFx[57]*tmpObjS[87] + tmpFx[67]*tmpObjS[103] + tmpFx[77]*tmpObjS[119] + tmpFx[87]*tmpObjS[135] + tmpFx[97]*tmpObjS[151] + tmpFx[107]*tmpObjS[167] + tmpFx[117]*tmpObjS[183] + tmpFx[127]*tmpObjS[199] + tmpFx[137]*tmpObjS[215] + tmpFx[147]*tmpObjS[231] + tmpFx[157]*tmpObjS[247];\ntmpQ2[120] = + tmpFx[7]*tmpObjS[8] + tmpFx[17]*tmpObjS[24] + tmpFx[27]*tmpObjS[40] + tmpFx[37]*tmpObjS[56] + tmpFx[47]*tmpObjS[72] + tmpFx[57]*tmpObjS[88] + tmpFx[67]*tmpObjS[104] + tmpFx[77]*tmpObjS[120] + tmpFx[87]*tmpObjS[136] + tmpFx[97]*tmpObjS[152] + tmpFx[107]*tmpObjS[168] + tmpFx[117]*tmpObjS[184] + tmpFx[127]*tmpObjS[200] + tmpFx[137]*tmpObjS[216] + tmpFx[147]*tmpObjS[232] + tmpFx[157]*tmpObjS[248];\ntmpQ2[121] = + tmpFx[7]*tmpObjS[9] + tmpFx[17]*tmpObjS[25] + tmpFx[27]*tmpObjS[41] + tmpFx[37]*tmpObjS[57] + tmpFx[47]*tmpObjS[73] + tmpFx[57]*tmpObjS[89] + tmpFx[67]*tmpObjS[105] + tmpFx[77]*tmpObjS[121] + tmpFx[87]*tmpObjS[137] + tmpFx[97]*tmpObjS[153] + tmpFx[107]*tmpObjS[169] + tmpFx[117]*tmpObjS[185] + tmpFx[127]*tmpObjS[201] + tmpFx[137]*tmpObjS[217] + tmpFx[147]*tmpObjS[233] + tmpFx[157]*tmpObjS[249];\ntmpQ2[122] = + tmpFx[7]*tmpObjS[10] + tmpFx[17]*tmpObjS[26] + tmpFx[27]*tmpObjS[42] + tmpFx[37]*tmpObjS[58] + tmpFx[47]*tmpObjS[74] + tmpFx[57]*tmpObjS[90] + tmpFx[67]*tmpObjS[106] + tmpFx[77]*tmpObjS[122] + tmpFx[87]*tmpObjS[138] + tmpFx[97]*tmpObjS[154] + tmpFx[107]*tmpObjS[170] + tmpFx[117]*tmpObjS[186] + tmpFx[127]*tmpObjS[202] + tmpFx[137]*tmpObjS[218] + tmpFx[147]*tmpObjS[234] + tmpFx[157]*tmpObjS[250];\ntmpQ2[123] = + tmpFx[7]*tmpObjS[11] + tmpFx[17]*tmpObjS[27] + tmpFx[27]*tmpObjS[43] + tmpFx[37]*tmpObjS[59] + tmpFx[47]*tmpObjS[75] + tmpFx[57]*tmpObjS[91] + tmpFx[67]*tmpObjS[107] + tmpFx[77]*tmpObjS[123] + tmpFx[87]*tmpObjS[139] + tmpFx[97]*tmpObjS[155] + tmpFx[107]*tmpObjS[171] + tmpFx[117]*tmpObjS[187] + tmpFx[127]*tmpObjS[203] + tmpFx[137]*tmpObjS[219] + tmpFx[147]*tmpObjS[235] + tmpFx[157]*tmpObjS[251];\ntmpQ2[124] = + tmpFx[7]*tmpObjS[12] + tmpFx[17]*tmpObjS[28] + tmpFx[27]*tmpObjS[44] + tmpFx[37]*tmpObjS[60] + tmpFx[47]*tmpObjS[76] + tmpFx[57]*tmpObjS[92] + tmpFx[67]*tmpObjS[108] + tmpFx[77]*tmpObjS[124] + tmpFx[87]*tmpObjS[140] + tmpFx[97]*tmpObjS[156] + tmpFx[107]*tmpObjS[172] + tmpFx[117]*tmpObjS[188] + tmpFx[127]*tmpObjS[204] + tmpFx[137]*tmpObjS[220] + tmpFx[147]*tmpObjS[236] + tmpFx[157]*tmpObjS[252];\ntmpQ2[125] = + tmpFx[7]*tmpObjS[13] + tmpFx[17]*tmpObjS[29] + tmpFx[27]*tmpObjS[45] + tmpFx[37]*tmpObjS[61] + tmpFx[47]*tmpObjS[77] + tmpFx[57]*tmpObjS[93] + tmpFx[67]*tmpObjS[109] + tmpFx[77]*tmpObjS[125] + tmpFx[87]*tmpObjS[141] + tmpFx[97]*tmpObjS[157] + tmpFx[107]*tmpObjS[173] + tmpFx[117]*tmpObjS[189] + tmpFx[127]*tmpObjS[205] + tmpFx[137]*tmpObjS[221] + tmpFx[147]*tmpObjS[237] + tmpFx[157]*tmpObjS[253];\ntmpQ2[126] = + tmpFx[7]*tmpObjS[14] + tmpFx[17]*tmpObjS[30] + tmpFx[27]*tmpObjS[46] + tmpFx[37]*tmpObjS[62] + tmpFx[47]*tmpObjS[78] + tmpFx[57]*tmpObjS[94] + tmpFx[67]*tmpObjS[110] + tmpFx[77]*tmpObjS[126] + tmpFx[87]*tmpObjS[142] + tmpFx[97]*tmpObjS[158] + tmpFx[107]*tmpObjS[174] + tmpFx[117]*tmpObjS[190] + tmpFx[127]*tmpObjS[206] + tmpFx[137]*tmpObjS[222] + tmpFx[147]*tmpObjS[238] + tmpFx[157]*tmpObjS[254];\ntmpQ2[127] = + tmpFx[7]*tmpObjS[15] + tmpFx[17]*tmpObjS[31] + tmpFx[27]*tmpObjS[47] + tmpFx[37]*tmpObjS[63] + tmpFx[47]*tmpObjS[79] + tmpFx[57]*tmpObjS[95] + tmpFx[67]*tmpObjS[111] + tmpFx[77]*tmpObjS[127] + tmpFx[87]*tmpObjS[143] + tmpFx[97]*tmpObjS[159] + tmpFx[107]*tmpObjS[175] + tmpFx[117]*tmpObjS[191] + tmpFx[127]*tmpObjS[207] + tmpFx[137]*tmpObjS[223] + tmpFx[147]*tmpObjS[239] + tmpFx[157]*tmpObjS[255];\ntmpQ2[128] = + tmpFx[8]*tmpObjS[0] + tmpFx[18]*tmpObjS[16] + tmpFx[28]*tmpObjS[32] + tmpFx[38]*tmpObjS[48] + tmpFx[48]*tmpObjS[64] + tmpFx[58]*tmpObjS[80] + tmpFx[68]*tmpObjS[96] + tmpFx[78]*tmpObjS[112] + tmpFx[88]*tmpObjS[128] + tmpFx[98]*tmpObjS[144] + tmpFx[108]*tmpObjS[160] + tmpFx[118]*tmpObjS[176] + tmpFx[128]*tmpObjS[192] + tmpFx[138]*tmpObjS[208] + tmpFx[148]*tmpObjS[224] + tmpFx[158]*tmpObjS[240];\ntmpQ2[129] = + tmpFx[8]*tmpObjS[1] + tmpFx[18]*tmpObjS[17] + tmpFx[28]*tmpObjS[33] + tmpFx[38]*tmpObjS[49] + tmpFx[48]*tmpObjS[65] + tmpFx[58]*tmpObjS[81] + tmpFx[68]*tmpObjS[97] + tmpFx[78]*tmpObjS[113] + tmpFx[88]*tmpObjS[129] + tmpFx[98]*tmpObjS[145] + tmpFx[108]*tmpObjS[161] + tmpFx[118]*tmpObjS[177] + tmpFx[128]*tmpObjS[193] + tmpFx[138]*tmpObjS[209] + tmpFx[148]*tmpObjS[225] + tmpFx[158]*tmpObjS[241];\ntmpQ2[130] = + tmpFx[8]*tmpObjS[2] + tmpFx[18]*tmpObjS[18] + tmpFx[28]*tmpObjS[34] + tmpFx[38]*tmpObjS[50] + tmpFx[48]*tmpObjS[66] + tmpFx[58]*tmpObjS[82] + tmpFx[68]*tmpObjS[98] + tmpFx[78]*tmpObjS[114] + tmpFx[88]*tmpObjS[130] + tmpFx[98]*tmpObjS[146] + tmpFx[108]*tmpObjS[162] + tmpFx[118]*tmpObjS[178] + tmpFx[128]*tmpObjS[194] + tmpFx[138]*tmpObjS[210] + tmpFx[148]*tmpObjS[226] + tmpFx[158]*tmpObjS[242];\ntmpQ2[131] = + tmpFx[8]*tmpObjS[3] + tmpFx[18]*tmpObjS[19] + tmpFx[28]*tmpObjS[35] + tmpFx[38]*tmpObjS[51] + tmpFx[48]*tmpObjS[67] + tmpFx[58]*tmpObjS[83] + tmpFx[68]*tmpObjS[99] + tmpFx[78]*tmpObjS[115] + tmpFx[88]*tmpObjS[131] + tmpFx[98]*tmpObjS[147] + tmpFx[108]*tmpObjS[163] + tmpFx[118]*tmpObjS[179] + tmpFx[128]*tmpObjS[195] + tmpFx[138]*tmpObjS[211] + tmpFx[148]*tmpObjS[227] + tmpFx[158]*tmpObjS[243];\ntmpQ2[132] = + tmpFx[8]*tmpObjS[4] + tmpFx[18]*tmpObjS[20] + tmpFx[28]*tmpObjS[36] + tmpFx[38]*tmpObjS[52] + tmpFx[48]*tmpObjS[68] + tmpFx[58]*tmpObjS[84] + tmpFx[68]*tmpObjS[100] + tmpFx[78]*tmpObjS[116] + tmpFx[88]*tmpObjS[132] + tmpFx[98]*tmpObjS[148] + tmpFx[108]*tmpObjS[164] + tmpFx[118]*tmpObjS[180] + tmpFx[128]*tmpObjS[196] + tmpFx[138]*tmpObjS[212] + tmpFx[148]*tmpObjS[228] + tmpFx[158]*tmpObjS[244];\ntmpQ2[133] = + tmpFx[8]*tmpObjS[5] + tmpFx[18]*tmpObjS[21] + tmpFx[28]*tmpObjS[37] + tmpFx[38]*tmpObjS[53] + tmpFx[48]*tmpObjS[69] + tmpFx[58]*tmpObjS[85] + tmpFx[68]*tmpObjS[101] + tmpFx[78]*tmpObjS[117] + tmpFx[88]*tmpObjS[133] + tmpFx[98]*tmpObjS[149] + tmpFx[108]*tmpObjS[165] + tmpFx[118]*tmpObjS[181] + tmpFx[128]*tmpObjS[197] + tmpFx[138]*tmpObjS[213] + tmpFx[148]*tmpObjS[229] + tmpFx[158]*tmpObjS[245];\ntmpQ2[134] = + tmpFx[8]*tmpObjS[6] + tmpFx[18]*tmpObjS[22] + tmpFx[28]*tmpObjS[38] + tmpFx[38]*tmpObjS[54] + tmpFx[48]*tmpObjS[70] + tmpFx[58]*tmpObjS[86] + tmpFx[68]*tmpObjS[102] + tmpFx[78]*tmpObjS[118] + tmpFx[88]*tmpObjS[134] + tmpFx[98]*tmpObjS[150] + tmpFx[108]*tmpObjS[166] + tmpFx[118]*tmpObjS[182] + tmpFx[128]*tmpObjS[198] + tmpFx[138]*tmpObjS[214] + tmpFx[148]*tmpObjS[230] + tmpFx[158]*tmpObjS[246];\ntmpQ2[135] = + tmpFx[8]*tmpObjS[7] + tmpFx[18]*tmpObjS[23] + tmpFx[28]*tmpObjS[39] + tmpFx[38]*tmpObjS[55] + tmpFx[48]*tmpObjS[71] + tmpFx[58]*tmpObjS[87] + tmpFx[68]*tmpObjS[103] + tmpFx[78]*tmpObjS[119] + tmpFx[88]*tmpObjS[135] + tmpFx[98]*tmpObjS[151] + tmpFx[108]*tmpObjS[167] + tmpFx[118]*tmpObjS[183] + tmpFx[128]*tmpObjS[199] + tmpFx[138]*tmpObjS[215] + tmpFx[148]*tmpObjS[231] + tmpFx[158]*tmpObjS[247];\ntmpQ2[136] = + tmpFx[8]*tmpObjS[8] + tmpFx[18]*tmpObjS[24] + tmpFx[28]*tmpObjS[40] + tmpFx[38]*tmpObjS[56] + tmpFx[48]*tmpObjS[72] + tmpFx[58]*tmpObjS[88] + tmpFx[68]*tmpObjS[104] + tmpFx[78]*tmpObjS[120] + tmpFx[88]*tmpObjS[136] + tmpFx[98]*tmpObjS[152] + tmpFx[108]*tmpObjS[168] + tmpFx[118]*tmpObjS[184] + tmpFx[128]*tmpObjS[200] + tmpFx[138]*tmpObjS[216] + tmpFx[148]*tmpObjS[232] + tmpFx[158]*tmpObjS[248];\ntmpQ2[137] = + tmpFx[8]*tmpObjS[9] + tmpFx[18]*tmpObjS[25] + tmpFx[28]*tmpObjS[41] + tmpFx[38]*tmpObjS[57] + tmpFx[48]*tmpObjS[73] + tmpFx[58]*tmpObjS[89] + tmpFx[68]*tmpObjS[105] + tmpFx[78]*tmpObjS[121] + tmpFx[88]*tmpObjS[137] + tmpFx[98]*tmpObjS[153] + tmpFx[108]*tmpObjS[169] + tmpFx[118]*tmpObjS[185] + tmpFx[128]*tmpObjS[201] + tmpFx[138]*tmpObjS[217] + tmpFx[148]*tmpObjS[233] + tmpFx[158]*tmpObjS[249];\ntmpQ2[138] = + tmpFx[8]*tmpObjS[10] + tmpFx[18]*tmpObjS[26] + tmpFx[28]*tmpObjS[42] + tmpFx[38]*tmpObjS[58] + tmpFx[48]*tmpObjS[74] + tmpFx[58]*tmpObjS[90] + tmpFx[68]*tmpObjS[106] + tmpFx[78]*tmpObjS[122] + tmpFx[88]*tmpObjS[138] + tmpFx[98]*tmpObjS[154] + tmpFx[108]*tmpObjS[170] + tmpFx[118]*tmpObjS[186] + tmpFx[128]*tmpObjS[202] + tmpFx[138]*tmpObjS[218] + tmpFx[148]*tmpObjS[234] + tmpFx[158]*tmpObjS[250];\ntmpQ2[139] = + tmpFx[8]*tmpObjS[11] + tmpFx[18]*tmpObjS[27] + tmpFx[28]*tmpObjS[43] + tmpFx[38]*tmpObjS[59] + tmpFx[48]*tmpObjS[75] + tmpFx[58]*tmpObjS[91] + tmpFx[68]*tmpObjS[107] + tmpFx[78]*tmpObjS[123] + tmpFx[88]*tmpObjS[139] + tmpFx[98]*tmpObjS[155] + tmpFx[108]*tmpObjS[171] + tmpFx[118]*tmpObjS[187] + tmpFx[128]*tmpObjS[203] + tmpFx[138]*tmpObjS[219] + tmpFx[148]*tmpObjS[235] + tmpFx[158]*tmpObjS[251];\ntmpQ2[140] = + tmpFx[8]*tmpObjS[12] + tmpFx[18]*tmpObjS[28] + tmpFx[28]*tmpObjS[44] + tmpFx[38]*tmpObjS[60] + tmpFx[48]*tmpObjS[76] + tmpFx[58]*tmpObjS[92] + tmpFx[68]*tmpObjS[108] + tmpFx[78]*tmpObjS[124] + tmpFx[88]*tmpObjS[140] + tmpFx[98]*tmpObjS[156] + tmpFx[108]*tmpObjS[172] + tmpFx[118]*tmpObjS[188] + tmpFx[128]*tmpObjS[204] + tmpFx[138]*tmpObjS[220] + tmpFx[148]*tmpObjS[236] + tmpFx[158]*tmpObjS[252];\ntmpQ2[141] = + tmpFx[8]*tmpObjS[13] + tmpFx[18]*tmpObjS[29] + tmpFx[28]*tmpObjS[45] + tmpFx[38]*tmpObjS[61] + tmpFx[48]*tmpObjS[77] + tmpFx[58]*tmpObjS[93] + tmpFx[68]*tmpObjS[109] + tmpFx[78]*tmpObjS[125] + tmpFx[88]*tmpObjS[141] + tmpFx[98]*tmpObjS[157] + tmpFx[108]*tmpObjS[173] + tmpFx[118]*tmpObjS[189] + tmpFx[128]*tmpObjS[205] + tmpFx[138]*tmpObjS[221] + tmpFx[148]*tmpObjS[237] + tmpFx[158]*tmpObjS[253];\ntmpQ2[142] = + tmpFx[8]*tmpObjS[14] + tmpFx[18]*tmpObjS[30] + tmpFx[28]*tmpObjS[46] + tmpFx[38]*tmpObjS[62] + tmpFx[48]*tmpObjS[78] + tmpFx[58]*tmpObjS[94] + tmpFx[68]*tmpObjS[110] + tmpFx[78]*tmpObjS[126] + tmpFx[88]*tmpObjS[142] + tmpFx[98]*tmpObjS[158] + tmpFx[108]*tmpObjS[174] + tmpFx[118]*tmpObjS[190] + tmpFx[128]*tmpObjS[206] + tmpFx[138]*tmpObjS[222] + tmpFx[148]*tmpObjS[238] + tmpFx[158]*tmpObjS[254];\ntmpQ2[143] = + tmpFx[8]*tmpObjS[15] + tmpFx[18]*tmpObjS[31] + tmpFx[28]*tmpObjS[47] + tmpFx[38]*tmpObjS[63] + tmpFx[48]*tmpObjS[79] + tmpFx[58]*tmpObjS[95] + tmpFx[68]*tmpObjS[111] + tmpFx[78]*tmpObjS[127] + tmpFx[88]*tmpObjS[143] + tmpFx[98]*tmpObjS[159] + tmpFx[108]*tmpObjS[175] + tmpFx[118]*tmpObjS[191] + tmpFx[128]*tmpObjS[207] + tmpFx[138]*tmpObjS[223] + tmpFx[148]*tmpObjS[239] + tmpFx[158]*tmpObjS[255];\ntmpQ2[144] = + tmpFx[9]*tmpObjS[0] + tmpFx[19]*tmpObjS[16] + tmpFx[29]*tmpObjS[32] + tmpFx[39]*tmpObjS[48] + tmpFx[49]*tmpObjS[64] + tmpFx[59]*tmpObjS[80] + tmpFx[69]*tmpObjS[96] + tmpFx[79]*tmpObjS[112] + tmpFx[89]*tmpObjS[128] + tmpFx[99]*tmpObjS[144] + tmpFx[109]*tmpObjS[160] + tmpFx[119]*tmpObjS[176] + tmpFx[129]*tmpObjS[192] + tmpFx[139]*tmpObjS[208] + tmpFx[149]*tmpObjS[224] + tmpFx[159]*tmpObjS[240];\ntmpQ2[145] = + tmpFx[9]*tmpObjS[1] + tmpFx[19]*tmpObjS[17] + tmpFx[29]*tmpObjS[33] + tmpFx[39]*tmpObjS[49] + tmpFx[49]*tmpObjS[65] + tmpFx[59]*tmpObjS[81] + tmpFx[69]*tmpObjS[97] + tmpFx[79]*tmpObjS[113] + tmpFx[89]*tmpObjS[129] + tmpFx[99]*tmpObjS[145] + tmpFx[109]*tmpObjS[161] + tmpFx[119]*tmpObjS[177] + tmpFx[129]*tmpObjS[193] + tmpFx[139]*tmpObjS[209] + tmpFx[149]*tmpObjS[225] + tmpFx[159]*tmpObjS[241];\ntmpQ2[146] = + tmpFx[9]*tmpObjS[2] + tmpFx[19]*tmpObjS[18] + tmpFx[29]*tmpObjS[34] + tmpFx[39]*tmpObjS[50] + tmpFx[49]*tmpObjS[66] + tmpFx[59]*tmpObjS[82] + tmpFx[69]*tmpObjS[98] + tmpFx[79]*tmpObjS[114] + tmpFx[89]*tmpObjS[130] + tmpFx[99]*tmpObjS[146] + tmpFx[109]*tmpObjS[162] + tmpFx[119]*tmpObjS[178] + tmpFx[129]*tmpObjS[194] + tmpFx[139]*tmpObjS[210] + tmpFx[149]*tmpObjS[226] + tmpFx[159]*tmpObjS[242];\ntmpQ2[147] = + tmpFx[9]*tmpObjS[3] + tmpFx[19]*tmpObjS[19] + tmpFx[29]*tmpObjS[35] + tmpFx[39]*tmpObjS[51] + tmpFx[49]*tmpObjS[67] + tmpFx[59]*tmpObjS[83] + tmpFx[69]*tmpObjS[99] + tmpFx[79]*tmpObjS[115] + tmpFx[89]*tmpObjS[131] + tmpFx[99]*tmpObjS[147] + tmpFx[109]*tmpObjS[163] + tmpFx[119]*tmpObjS[179] + tmpFx[129]*tmpObjS[195] + tmpFx[139]*tmpObjS[211] + tmpFx[149]*tmpObjS[227] + tmpFx[159]*tmpObjS[243];\ntmpQ2[148] = + tmpFx[9]*tmpObjS[4] + tmpFx[19]*tmpObjS[20] + tmpFx[29]*tmpObjS[36] + tmpFx[39]*tmpObjS[52] + tmpFx[49]*tmpObjS[68] + tmpFx[59]*tmpObjS[84] + tmpFx[69]*tmpObjS[100] + tmpFx[79]*tmpObjS[116] + tmpFx[89]*tmpObjS[132] + tmpFx[99]*tmpObjS[148] + tmpFx[109]*tmpObjS[164] + tmpFx[119]*tmpObjS[180] + tmpFx[129]*tmpObjS[196] + tmpFx[139]*tmpObjS[212] + tmpFx[149]*tmpObjS[228] + tmpFx[159]*tmpObjS[244];\ntmpQ2[149] = + tmpFx[9]*tmpObjS[5] + tmpFx[19]*tmpObjS[21] + tmpFx[29]*tmpObjS[37] + tmpFx[39]*tmpObjS[53] + tmpFx[49]*tmpObjS[69] + tmpFx[59]*tmpObjS[85] + tmpFx[69]*tmpObjS[101] + tmpFx[79]*tmpObjS[117] + tmpFx[89]*tmpObjS[133] + tmpFx[99]*tmpObjS[149] + tmpFx[109]*tmpObjS[165] + tmpFx[119]*tmpObjS[181] + tmpFx[129]*tmpObjS[197] + tmpFx[139]*tmpObjS[213] + tmpFx[149]*tmpObjS[229] + tmpFx[159]*tmpObjS[245];\ntmpQ2[150] = + tmpFx[9]*tmpObjS[6] + tmpFx[19]*tmpObjS[22] + tmpFx[29]*tmpObjS[38] + tmpFx[39]*tmpObjS[54] + tmpFx[49]*tmpObjS[70] + tmpFx[59]*tmpObjS[86] + tmpFx[69]*tmpObjS[102] + tmpFx[79]*tmpObjS[118] + tmpFx[89]*tmpObjS[134] + tmpFx[99]*tmpObjS[150] + tmpFx[109]*tmpObjS[166] + tmpFx[119]*tmpObjS[182] + tmpFx[129]*tmpObjS[198] + tmpFx[139]*tmpObjS[214] + tmpFx[149]*tmpObjS[230] + tmpFx[159]*tmpObjS[246];\ntmpQ2[151] = + tmpFx[9]*tmpObjS[7] + tmpFx[19]*tmpObjS[23] + tmpFx[29]*tmpObjS[39] + tmpFx[39]*tmpObjS[55] + tmpFx[49]*tmpObjS[71] + tmpFx[59]*tmpObjS[87] + tmpFx[69]*tmpObjS[103] + tmpFx[79]*tmpObjS[119] + tmpFx[89]*tmpObjS[135] + tmpFx[99]*tmpObjS[151] + tmpFx[109]*tmpObjS[167] + tmpFx[119]*tmpObjS[183] + tmpFx[129]*tmpObjS[199] + tmpFx[139]*tmpObjS[215] + tmpFx[149]*tmpObjS[231] + tmpFx[159]*tmpObjS[247];\ntmpQ2[152] = + tmpFx[9]*tmpObjS[8] + tmpFx[19]*tmpObjS[24] + tmpFx[29]*tmpObjS[40] + tmpFx[39]*tmpObjS[56] + tmpFx[49]*tmpObjS[72] + tmpFx[59]*tmpObjS[88] + tmpFx[69]*tmpObjS[104] + tmpFx[79]*tmpObjS[120] + tmpFx[89]*tmpObjS[136] + tmpFx[99]*tmpObjS[152] + tmpFx[109]*tmpObjS[168] + tmpFx[119]*tmpObjS[184] + tmpFx[129]*tmpObjS[200] + tmpFx[139]*tmpObjS[216] + tmpFx[149]*tmpObjS[232] + tmpFx[159]*tmpObjS[248];\ntmpQ2[153] = + tmpFx[9]*tmpObjS[9] + tmpFx[19]*tmpObjS[25] + tmpFx[29]*tmpObjS[41] + tmpFx[39]*tmpObjS[57] + tmpFx[49]*tmpObjS[73] + tmpFx[59]*tmpObjS[89] + tmpFx[69]*tmpObjS[105] + tmpFx[79]*tmpObjS[121] + tmpFx[89]*tmpObjS[137] + tmpFx[99]*tmpObjS[153] + tmpFx[109]*tmpObjS[169] + tmpFx[119]*tmpObjS[185] + tmpFx[129]*tmpObjS[201] + tmpFx[139]*tmpObjS[217] + tmpFx[149]*tmpObjS[233] + tmpFx[159]*tmpObjS[249];\ntmpQ2[154] = + tmpFx[9]*tmpObjS[10] + tmpFx[19]*tmpObjS[26] + tmpFx[29]*tmpObjS[42] + tmpFx[39]*tmpObjS[58] + tmpFx[49]*tmpObjS[74] + tmpFx[59]*tmpObjS[90] + tmpFx[69]*tmpObjS[106] + tmpFx[79]*tmpObjS[122] + tmpFx[89]*tmpObjS[138] + tmpFx[99]*tmpObjS[154] + tmpFx[109]*tmpObjS[170] + tmpFx[119]*tmpObjS[186] + tmpFx[129]*tmpObjS[202] + tmpFx[139]*tmpObjS[218] + tmpFx[149]*tmpObjS[234] + tmpFx[159]*tmpObjS[250];\ntmpQ2[155] = + tmpFx[9]*tmpObjS[11] + tmpFx[19]*tmpObjS[27] + tmpFx[29]*tmpObjS[43] + tmpFx[39]*tmpObjS[59] + tmpFx[49]*tmpObjS[75] + tmpFx[59]*tmpObjS[91] + tmpFx[69]*tmpObjS[107] + tmpFx[79]*tmpObjS[123] + tmpFx[89]*tmpObjS[139] + tmpFx[99]*tmpObjS[155] + tmpFx[109]*tmpObjS[171] + tmpFx[119]*tmpObjS[187] + tmpFx[129]*tmpObjS[203] + tmpFx[139]*tmpObjS[219] + tmpFx[149]*tmpObjS[235] + tmpFx[159]*tmpObjS[251];\ntmpQ2[156] = + tmpFx[9]*tmpObjS[12] + tmpFx[19]*tmpObjS[28] + tmpFx[29]*tmpObjS[44] + tmpFx[39]*tmpObjS[60] + tmpFx[49]*tmpObjS[76] + tmpFx[59]*tmpObjS[92] + tmpFx[69]*tmpObjS[108] + tmpFx[79]*tmpObjS[124] + tmpFx[89]*tmpObjS[140] + tmpFx[99]*tmpObjS[156] + tmpFx[109]*tmpObjS[172] + tmpFx[119]*tmpObjS[188] + tmpFx[129]*tmpObjS[204] + tmpFx[139]*tmpObjS[220] + tmpFx[149]*tmpObjS[236] + tmpFx[159]*tmpObjS[252];\ntmpQ2[157] = + tmpFx[9]*tmpObjS[13] + tmpFx[19]*tmpObjS[29] + tmpFx[29]*tmpObjS[45] + tmpFx[39]*tmpObjS[61] + tmpFx[49]*tmpObjS[77] + tmpFx[59]*tmpObjS[93] + tmpFx[69]*tmpObjS[109] + tmpFx[79]*tmpObjS[125] + tmpFx[89]*tmpObjS[141] + tmpFx[99]*tmpObjS[157] + tmpFx[109]*tmpObjS[173] + tmpFx[119]*tmpObjS[189] + tmpFx[129]*tmpObjS[205] + tmpFx[139]*tmpObjS[221] + tmpFx[149]*tmpObjS[237] + tmpFx[159]*tmpObjS[253];\ntmpQ2[158] = + tmpFx[9]*tmpObjS[14] + tmpFx[19]*tmpObjS[30] + tmpFx[29]*tmpObjS[46] + tmpFx[39]*tmpObjS[62] + tmpFx[49]*tmpObjS[78] + tmpFx[59]*tmpObjS[94] + tmpFx[69]*tmpObjS[110] + tmpFx[79]*tmpObjS[126] + tmpFx[89]*tmpObjS[142] + tmpFx[99]*tmpObjS[158] + tmpFx[109]*tmpObjS[174] + tmpFx[119]*tmpObjS[190] + tmpFx[129]*tmpObjS[206] + tmpFx[139]*tmpObjS[222] + tmpFx[149]*tmpObjS[238] + tmpFx[159]*tmpObjS[254];\ntmpQ2[159] = + tmpFx[9]*tmpObjS[15] + tmpFx[19]*tmpObjS[31] + tmpFx[29]*tmpObjS[47] + tmpFx[39]*tmpObjS[63] + tmpFx[49]*tmpObjS[79] + tmpFx[59]*tmpObjS[95] + tmpFx[69]*tmpObjS[111] + tmpFx[79]*tmpObjS[127] + tmpFx[89]*tmpObjS[143] + tmpFx[99]*tmpObjS[159] + tmpFx[109]*tmpObjS[175] + tmpFx[119]*tmpObjS[191] + tmpFx[129]*tmpObjS[207] + tmpFx[139]*tmpObjS[223] + tmpFx[149]*tmpObjS[239] + tmpFx[159]*tmpObjS[255];\ntmpQ1[0] = + tmpQ2[0]*tmpFx[0] + tmpQ2[1]*tmpFx[10] + tmpQ2[2]*tmpFx[20] + tmpQ2[3]*tmpFx[30] + tmpQ2[4]*tmpFx[40] + tmpQ2[5]*tmpFx[50] + tmpQ2[6]*tmpFx[60] + tmpQ2[7]*tmpFx[70] + tmpQ2[8]*tmpFx[80] + tmpQ2[9]*tmpFx[90] + tmpQ2[10]*tmpFx[100] + tmpQ2[11]*tmpFx[110] + tmpQ2[12]*tmpFx[120] + tmpQ2[13]*tmpFx[130] + tmpQ2[14]*tmpFx[140] + tmpQ2[15]*tmpFx[150];\ntmpQ1[1] = + tmpQ2[0]*tmpFx[1] + tmpQ2[1]*tmpFx[11] + tmpQ2[2]*tmpFx[21] + tmpQ2[3]*tmpFx[31] + tmpQ2[4]*tmpFx[41] + tmpQ2[5]*tmpFx[51] + tmpQ2[6]*tmpFx[61] + tmpQ2[7]*tmpFx[71] + tmpQ2[8]*tmpFx[81] + tmpQ2[9]*tmpFx[91] + tmpQ2[10]*tmpFx[101] + tmpQ2[11]*tmpFx[111] + tmpQ2[12]*tmpFx[121] + tmpQ2[13]*tmpFx[131] + tmpQ2[14]*tmpFx[141] + tmpQ2[15]*tmpFx[151];\ntmpQ1[2] = + tmpQ2[0]*tmpFx[2] + tmpQ2[1]*tmpFx[12] + tmpQ2[2]*tmpFx[22] + tmpQ2[3]*tmpFx[32] + tmpQ2[4]*tmpFx[42] + tmpQ2[5]*tmpFx[52] + tmpQ2[6]*tmpFx[62] + tmpQ2[7]*tmpFx[72] + tmpQ2[8]*tmpFx[82] + tmpQ2[9]*tmpFx[92] + tmpQ2[10]*tmpFx[102] + tmpQ2[11]*tmpFx[112] + tmpQ2[12]*tmpFx[122] + tmpQ2[13]*tmpFx[132] + tmpQ2[14]*tmpFx[142] + tmpQ2[15]*tmpFx[152];\ntmpQ1[3] = + tmpQ2[0]*tmpFx[3] + tmpQ2[1]*tmpFx[13] + tmpQ2[2]*tmpFx[23] + tmpQ2[3]*tmpFx[33] + tmpQ2[4]*tmpFx[43] + tmpQ2[5]*tmpFx[53] + tmpQ2[6]*tmpFx[63] + tmpQ2[7]*tmpFx[73] + tmpQ2[8]*tmpFx[83] + tmpQ2[9]*tmpFx[93] + tmpQ2[10]*tmpFx[103] + tmpQ2[11]*tmpFx[113] + tmpQ2[12]*tmpFx[123] + tmpQ2[13]*tmpFx[133] + tmpQ2[14]*tmpFx[143] + tmpQ2[15]*tmpFx[153];\ntmpQ1[4] = + tmpQ2[0]*tmpFx[4] + tmpQ2[1]*tmpFx[14] + tmpQ2[2]*tmpFx[24] + tmpQ2[3]*tmpFx[34] + tmpQ2[4]*tmpFx[44] + tmpQ2[5]*tmpFx[54] + tmpQ2[6]*tmpFx[64] + tmpQ2[7]*tmpFx[74] + tmpQ2[8]*tmpFx[84] + tmpQ2[9]*tmpFx[94] + tmpQ2[10]*tmpFx[104] + tmpQ2[11]*tmpFx[114] + tmpQ2[12]*tmpFx[124] + tmpQ2[13]*tmpFx[134] + tmpQ2[14]*tmpFx[144] + tmpQ2[15]*tmpFx[154];\ntmpQ1[5] = + tmpQ2[0]*tmpFx[5] + tmpQ2[1]*tmpFx[15] + tmpQ2[2]*tmpFx[25] + tmpQ2[3]*tmpFx[35] + tmpQ2[4]*tmpFx[45] + tmpQ2[5]*tmpFx[55] + tmpQ2[6]*tmpFx[65] + tmpQ2[7]*tmpFx[75] + tmpQ2[8]*tmpFx[85] + tmpQ2[9]*tmpFx[95] + tmpQ2[10]*tmpFx[105] + tmpQ2[11]*tmpFx[115] + tmpQ2[12]*tmpFx[125] + tmpQ2[13]*tmpFx[135] + tmpQ2[14]*tmpFx[145] + tmpQ2[15]*tmpFx[155];\ntmpQ1[6] = + tmpQ2[0]*tmpFx[6] + tmpQ2[1]*tmpFx[16] + tmpQ2[2]*tmpFx[26] + tmpQ2[3]*tmpFx[36] + tmpQ2[4]*tmpFx[46] + tmpQ2[5]*tmpFx[56] + tmpQ2[6]*tmpFx[66] + tmpQ2[7]*tmpFx[76] + tmpQ2[8]*tmpFx[86] + tmpQ2[9]*tmpFx[96] + tmpQ2[10]*tmpFx[106] + tmpQ2[11]*tmpFx[116] + tmpQ2[12]*tmpFx[126] + tmpQ2[13]*tmpFx[136] + tmpQ2[14]*tmpFx[146] + tmpQ2[15]*tmpFx[156];\ntmpQ1[7] = + tmpQ2[0]*tmpFx[7] + tmpQ2[1]*tmpFx[17] + tmpQ2[2]*tmpFx[27] + tmpQ2[3]*tmpFx[37] + tmpQ2[4]*tmpFx[47] + tmpQ2[5]*tmpFx[57] + tmpQ2[6]*tmpFx[67] + tmpQ2[7]*tmpFx[77] + tmpQ2[8]*tmpFx[87] + tmpQ2[9]*tmpFx[97] + tmpQ2[10]*tmpFx[107] + tmpQ2[11]*tmpFx[117] + tmpQ2[12]*tmpFx[127] + tmpQ2[13]*tmpFx[137] + tmpQ2[14]*tmpFx[147] + tmpQ2[15]*tmpFx[157];\ntmpQ1[8] = + tmpQ2[0]*tmpFx[8] + tmpQ2[1]*tmpFx[18] + tmpQ2[2]*tmpFx[28] + tmpQ2[3]*tmpFx[38] + tmpQ2[4]*tmpFx[48] + tmpQ2[5]*tmpFx[58] + tmpQ2[6]*tmpFx[68] + tmpQ2[7]*tmpFx[78] + tmpQ2[8]*tmpFx[88] + tmpQ2[9]*tmpFx[98] + tmpQ2[10]*tmpFx[108] + tmpQ2[11]*tmpFx[118] + tmpQ2[12]*tmpFx[128] + tmpQ2[13]*tmpFx[138] + tmpQ2[14]*tmpFx[148] + tmpQ2[15]*tmpFx[158];\ntmpQ1[9] = + tmpQ2[0]*tmpFx[9] + tmpQ2[1]*tmpFx[19] + tmpQ2[2]*tmpFx[29] + tmpQ2[3]*tmpFx[39] + tmpQ2[4]*tmpFx[49] + tmpQ2[5]*tmpFx[59] + tmpQ2[6]*tmpFx[69] + tmpQ2[7]*tmpFx[79] + tmpQ2[8]*tmpFx[89] + tmpQ2[9]*tmpFx[99] + tmpQ2[10]*tmpFx[109] + tmpQ2[11]*tmpFx[119] + tmpQ2[12]*tmpFx[129] + tmpQ2[13]*tmpFx[139] + tmpQ2[14]*tmpFx[149] + tmpQ2[15]*tmpFx[159];\ntmpQ1[10] = + tmpQ2[16]*tmpFx[0] + tmpQ2[17]*tmpFx[10] + tmpQ2[18]*tmpFx[20] + tmpQ2[19]*tmpFx[30] + tmpQ2[20]*tmpFx[40] + tmpQ2[21]*tmpFx[50] + tmpQ2[22]*tmpFx[60] + tmpQ2[23]*tmpFx[70] + tmpQ2[24]*tmpFx[80] + tmpQ2[25]*tmpFx[90] + tmpQ2[26]*tmpFx[100] + tmpQ2[27]*tmpFx[110] + tmpQ2[28]*tmpFx[120] + tmpQ2[29]*tmpFx[130] + tmpQ2[30]*tmpFx[140] + tmpQ2[31]*tmpFx[150];\ntmpQ1[11] = + tmpQ2[16]*tmpFx[1] + tmpQ2[17]*tmpFx[11] + tmpQ2[18]*tmpFx[21] + tmpQ2[19]*tmpFx[31] + tmpQ2[20]*tmpFx[41] + tmpQ2[21]*tmpFx[51] + tmpQ2[22]*tmpFx[61] + tmpQ2[23]*tmpFx[71] + tmpQ2[24]*tmpFx[81] + tmpQ2[25]*tmpFx[91] + tmpQ2[26]*tmpFx[101] + tmpQ2[27]*tmpFx[111] + tmpQ2[28]*tmpFx[121] + tmpQ2[29]*tmpFx[131] + tmpQ2[30]*tmpFx[141] + tmpQ2[31]*tmpFx[151];\ntmpQ1[12] = + tmpQ2[16]*tmpFx[2] + tmpQ2[17]*tmpFx[12] + tmpQ2[18]*tmpFx[22] + tmpQ2[19]*tmpFx[32] + tmpQ2[20]*tmpFx[42] + tmpQ2[21]*tmpFx[52] + tmpQ2[22]*tmpFx[62] + tmpQ2[23]*tmpFx[72] + tmpQ2[24]*tmpFx[82] + tmpQ2[25]*tmpFx[92] + tmpQ2[26]*tmpFx[102] + tmpQ2[27]*tmpFx[112] + tmpQ2[28]*tmpFx[122] + tmpQ2[29]*tmpFx[132] + tmpQ2[30]*tmpFx[142] + tmpQ2[31]*tmpFx[152];\ntmpQ1[13] = + tmpQ2[16]*tmpFx[3] + tmpQ2[17]*tmpFx[13] + tmpQ2[18]*tmpFx[23] + tmpQ2[19]*tmpFx[33] + tmpQ2[20]*tmpFx[43] + tmpQ2[21]*tmpFx[53] + tmpQ2[22]*tmpFx[63] + tmpQ2[23]*tmpFx[73] + tmpQ2[24]*tmpFx[83] + tmpQ2[25]*tmpFx[93] + tmpQ2[26]*tmpFx[103] + tmpQ2[27]*tmpFx[113] + tmpQ2[28]*tmpFx[123] + tmpQ2[29]*tmpFx[133] + tmpQ2[30]*tmpFx[143] + tmpQ2[31]*tmpFx[153];\ntmpQ1[14] = + tmpQ2[16]*tmpFx[4] + tmpQ2[17]*tmpFx[14] + tmpQ2[18]*tmpFx[24] + tmpQ2[19]*tmpFx[34] + tmpQ2[20]*tmpFx[44] + tmpQ2[21]*tmpFx[54] + tmpQ2[22]*tmpFx[64] + tmpQ2[23]*tmpFx[74] + tmpQ2[24]*tmpFx[84] + tmpQ2[25]*tmpFx[94] + tmpQ2[26]*tmpFx[104] + tmpQ2[27]*tmpFx[114] + tmpQ2[28]*tmpFx[124] + tmpQ2[29]*tmpFx[134] + tmpQ2[30]*tmpFx[144] + tmpQ2[31]*tmpFx[154];\ntmpQ1[15] = + tmpQ2[16]*tmpFx[5] + tmpQ2[17]*tmpFx[15] + tmpQ2[18]*tmpFx[25] + tmpQ2[19]*tmpFx[35] + tmpQ2[20]*tmpFx[45] + tmpQ2[21]*tmpFx[55] + tmpQ2[22]*tmpFx[65] + tmpQ2[23]*tmpFx[75] + tmpQ2[24]*tmpFx[85] + tmpQ2[25]*tmpFx[95] + tmpQ2[26]*tmpFx[105] + tmpQ2[27]*tmpFx[115] + tmpQ2[28]*tmpFx[125] + tmpQ2[29]*tmpFx[135] + tmpQ2[30]*tmpFx[145] + tmpQ2[31]*tmpFx[155];\ntmpQ1[16] = + tmpQ2[16]*tmpFx[6] + tmpQ2[17]*tmpFx[16] + tmpQ2[18]*tmpFx[26] + tmpQ2[19]*tmpFx[36] + tmpQ2[20]*tmpFx[46] + tmpQ2[21]*tmpFx[56] + tmpQ2[22]*tmpFx[66] + tmpQ2[23]*tmpFx[76] + tmpQ2[24]*tmpFx[86] + tmpQ2[25]*tmpFx[96] + tmpQ2[26]*tmpFx[106] + tmpQ2[27]*tmpFx[116] + tmpQ2[28]*tmpFx[126] + tmpQ2[29]*tmpFx[136] + tmpQ2[30]*tmpFx[146] + tmpQ2[31]*tmpFx[156];\ntmpQ1[17] = + tmpQ2[16]*tmpFx[7] + tmpQ2[17]*tmpFx[17] + tmpQ2[18]*tmpFx[27] + tmpQ2[19]*tmpFx[37] + tmpQ2[20]*tmpFx[47] + tmpQ2[21]*tmpFx[57] + tmpQ2[22]*tmpFx[67] + tmpQ2[23]*tmpFx[77] + tmpQ2[24]*tmpFx[87] + tmpQ2[25]*tmpFx[97] + tmpQ2[26]*tmpFx[107] + tmpQ2[27]*tmpFx[117] + tmpQ2[28]*tmpFx[127] + tmpQ2[29]*tmpFx[137] + tmpQ2[30]*tmpFx[147] + tmpQ2[31]*tmpFx[157];\ntmpQ1[18] = + tmpQ2[16]*tmpFx[8] + tmpQ2[17]*tmpFx[18] + tmpQ2[18]*tmpFx[28] + tmpQ2[19]*tmpFx[38] + tmpQ2[20]*tmpFx[48] + tmpQ2[21]*tmpFx[58] + tmpQ2[22]*tmpFx[68] + tmpQ2[23]*tmpFx[78] + tmpQ2[24]*tmpFx[88] + tmpQ2[25]*tmpFx[98] + tmpQ2[26]*tmpFx[108] + tmpQ2[27]*tmpFx[118] + tmpQ2[28]*tmpFx[128] + tmpQ2[29]*tmpFx[138] + tmpQ2[30]*tmpFx[148] + tmpQ2[31]*tmpFx[158];\ntmpQ1[19] = + tmpQ2[16]*tmpFx[9] + tmpQ2[17]*tmpFx[19] + tmpQ2[18]*tmpFx[29] + tmpQ2[19]*tmpFx[39] + tmpQ2[20]*tmpFx[49] + tmpQ2[21]*tmpFx[59] + tmpQ2[22]*tmpFx[69] + tmpQ2[23]*tmpFx[79] + tmpQ2[24]*tmpFx[89] + tmpQ2[25]*tmpFx[99] + tmpQ2[26]*tmpFx[109] + tmpQ2[27]*tmpFx[119] + tmpQ2[28]*tmpFx[129] + tmpQ2[29]*tmpFx[139] + tmpQ2[30]*tmpFx[149] + tmpQ2[31]*tmpFx[159];\ntmpQ1[20] = + tmpQ2[32]*tmpFx[0] + tmpQ2[33]*tmpFx[10] + tmpQ2[34]*tmpFx[20] + tmpQ2[35]*tmpFx[30] + tmpQ2[36]*tmpFx[40] + tmpQ2[37]*tmpFx[50] + tmpQ2[38]*tmpFx[60] + tmpQ2[39]*tmpFx[70] + tmpQ2[40]*tmpFx[80] + tmpQ2[41]*tmpFx[90] + tmpQ2[42]*tmpFx[100] + tmpQ2[43]*tmpFx[110] + tmpQ2[44]*tmpFx[120] + tmpQ2[45]*tmpFx[130] + tmpQ2[46]*tmpFx[140] + tmpQ2[47]*tmpFx[150];\ntmpQ1[21] = + tmpQ2[32]*tmpFx[1] + tmpQ2[33]*tmpFx[11] + tmpQ2[34]*tmpFx[21] + tmpQ2[35]*tmpFx[31] + tmpQ2[36]*tmpFx[41] + tmpQ2[37]*tmpFx[51] + tmpQ2[38]*tmpFx[61] + tmpQ2[39]*tmpFx[71] + tmpQ2[40]*tmpFx[81] + tmpQ2[41]*tmpFx[91] + tmpQ2[42]*tmpFx[101] + tmpQ2[43]*tmpFx[111] + tmpQ2[44]*tmpFx[121] + tmpQ2[45]*tmpFx[131] + tmpQ2[46]*tmpFx[141] + tmpQ2[47]*tmpFx[151];\ntmpQ1[22] = + tmpQ2[32]*tmpFx[2] + tmpQ2[33]*tmpFx[12] + tmpQ2[34]*tmpFx[22] + tmpQ2[35]*tmpFx[32] + tmpQ2[36]*tmpFx[42] + tmpQ2[37]*tmpFx[52] + tmpQ2[38]*tmpFx[62] + tmpQ2[39]*tmpFx[72] + tmpQ2[40]*tmpFx[82] + tmpQ2[41]*tmpFx[92] + tmpQ2[42]*tmpFx[102] + tmpQ2[43]*tmpFx[112] + tmpQ2[44]*tmpFx[122] + tmpQ2[45]*tmpFx[132] + tmpQ2[46]*tmpFx[142] + tmpQ2[47]*tmpFx[152];\ntmpQ1[23] = + tmpQ2[32]*tmpFx[3] + tmpQ2[33]*tmpFx[13] + tmpQ2[34]*tmpFx[23] + tmpQ2[35]*tmpFx[33] + tmpQ2[36]*tmpFx[43] + tmpQ2[37]*tmpFx[53] + tmpQ2[38]*tmpFx[63] + tmpQ2[39]*tmpFx[73] + tmpQ2[40]*tmpFx[83] + tmpQ2[41]*tmpFx[93] + tmpQ2[42]*tmpFx[103] + tmpQ2[43]*tmpFx[113] + tmpQ2[44]*tmpFx[123] + tmpQ2[45]*tmpFx[133] + tmpQ2[46]*tmpFx[143] + tmpQ2[47]*tmpFx[153];\ntmpQ1[24] = + tmpQ2[32]*tmpFx[4] + tmpQ2[33]*tmpFx[14] + tmpQ2[34]*tmpFx[24] + tmpQ2[35]*tmpFx[34] + tmpQ2[36]*tmpFx[44] + tmpQ2[37]*tmpFx[54] + tmpQ2[38]*tmpFx[64] + tmpQ2[39]*tmpFx[74] + tmpQ2[40]*tmpFx[84] + tmpQ2[41]*tmpFx[94] + tmpQ2[42]*tmpFx[104] + tmpQ2[43]*tmpFx[114] + tmpQ2[44]*tmpFx[124] + tmpQ2[45]*tmpFx[134] + tmpQ2[46]*tmpFx[144] + tmpQ2[47]*tmpFx[154];\ntmpQ1[25] = + tmpQ2[32]*tmpFx[5] + tmpQ2[33]*tmpFx[15] + tmpQ2[34]*tmpFx[25] + tmpQ2[35]*tmpFx[35] + tmpQ2[36]*tmpFx[45] + tmpQ2[37]*tmpFx[55] + tmpQ2[38]*tmpFx[65] + tmpQ2[39]*tmpFx[75] + tmpQ2[40]*tmpFx[85] + tmpQ2[41]*tmpFx[95] + tmpQ2[42]*tmpFx[105] + tmpQ2[43]*tmpFx[115] + tmpQ2[44]*tmpFx[125] + tmpQ2[45]*tmpFx[135] + tmpQ2[46]*tmpFx[145] + tmpQ2[47]*tmpFx[155];\ntmpQ1[26] = + tmpQ2[32]*tmpFx[6] + tmpQ2[33]*tmpFx[16] + tmpQ2[34]*tmpFx[26] + tmpQ2[35]*tmpFx[36] + tmpQ2[36]*tmpFx[46] + tmpQ2[37]*tmpFx[56] + tmpQ2[38]*tmpFx[66] + tmpQ2[39]*tmpFx[76] + tmpQ2[40]*tmpFx[86] + tmpQ2[41]*tmpFx[96] + tmpQ2[42]*tmpFx[106] + tmpQ2[43]*tmpFx[116] + tmpQ2[44]*tmpFx[126] + tmpQ2[45]*tmpFx[136] + tmpQ2[46]*tmpFx[146] + tmpQ2[47]*tmpFx[156];\ntmpQ1[27] = + tmpQ2[32]*tmpFx[7] + tmpQ2[33]*tmpFx[17] + tmpQ2[34]*tmpFx[27] + tmpQ2[35]*tmpFx[37] + tmpQ2[36]*tmpFx[47] + tmpQ2[37]*tmpFx[57] + tmpQ2[38]*tmpFx[67] + tmpQ2[39]*tmpFx[77] + tmpQ2[40]*tmpFx[87] + tmpQ2[41]*tmpFx[97] + tmpQ2[42]*tmpFx[107] + tmpQ2[43]*tmpFx[117] + tmpQ2[44]*tmpFx[127] + tmpQ2[45]*tmpFx[137] + tmpQ2[46]*tmpFx[147] + tmpQ2[47]*tmpFx[157];\ntmpQ1[28] = + tmpQ2[32]*tmpFx[8] + tmpQ2[33]*tmpFx[18] + tmpQ2[34]*tmpFx[28] + tmpQ2[35]*tmpFx[38] + tmpQ2[36]*tmpFx[48] + tmpQ2[37]*tmpFx[58] + tmpQ2[38]*tmpFx[68] + tmpQ2[39]*tmpFx[78] + tmpQ2[40]*tmpFx[88] + tmpQ2[41]*tmpFx[98] + tmpQ2[42]*tmpFx[108] + tmpQ2[43]*tmpFx[118] + tmpQ2[44]*tmpFx[128] + tmpQ2[45]*tmpFx[138] + tmpQ2[46]*tmpFx[148] + tmpQ2[47]*tmpFx[158];\ntmpQ1[29] = + tmpQ2[32]*tmpFx[9] + tmpQ2[33]*tmpFx[19] + tmpQ2[34]*tmpFx[29] + tmpQ2[35]*tmpFx[39] + tmpQ2[36]*tmpFx[49] + tmpQ2[37]*tmpFx[59] + tmpQ2[38]*tmpFx[69] + tmpQ2[39]*tmpFx[79] + tmpQ2[40]*tmpFx[89] + tmpQ2[41]*tmpFx[99] + tmpQ2[42]*tmpFx[109] + tmpQ2[43]*tmpFx[119] + tmpQ2[44]*tmpFx[129] + tmpQ2[45]*tmpFx[139] + tmpQ2[46]*tmpFx[149] + tmpQ2[47]*tmpFx[159];\ntmpQ1[30] = + tmpQ2[48]*tmpFx[0] + tmpQ2[49]*tmpFx[10] + tmpQ2[50]*tmpFx[20] + tmpQ2[51]*tmpFx[30] + tmpQ2[52]*tmpFx[40] + tmpQ2[53]*tmpFx[50] + tmpQ2[54]*tmpFx[60] + tmpQ2[55]*tmpFx[70] + tmpQ2[56]*tmpFx[80] + tmpQ2[57]*tmpFx[90] + tmpQ2[58]*tmpFx[100] + tmpQ2[59]*tmpFx[110] + tmpQ2[60]*tmpFx[120] + tmpQ2[61]*tmpFx[130] + tmpQ2[62]*tmpFx[140] + tmpQ2[63]*tmpFx[150];\ntmpQ1[31] = + tmpQ2[48]*tmpFx[1] + tmpQ2[49]*tmpFx[11] + tmpQ2[50]*tmpFx[21] + tmpQ2[51]*tmpFx[31] + tmpQ2[52]*tmpFx[41] + tmpQ2[53]*tmpFx[51] + tmpQ2[54]*tmpFx[61] + tmpQ2[55]*tmpFx[71] + tmpQ2[56]*tmpFx[81] + tmpQ2[57]*tmpFx[91] + tmpQ2[58]*tmpFx[101] + tmpQ2[59]*tmpFx[111] + tmpQ2[60]*tmpFx[121] + tmpQ2[61]*tmpFx[131] + tmpQ2[62]*tmpFx[141] + tmpQ2[63]*tmpFx[151];\ntmpQ1[32] = + tmpQ2[48]*tmpFx[2] + tmpQ2[49]*tmpFx[12] + tmpQ2[50]*tmpFx[22] + tmpQ2[51]*tmpFx[32] + tmpQ2[52]*tmpFx[42] + tmpQ2[53]*tmpFx[52] + tmpQ2[54]*tmpFx[62] + tmpQ2[55]*tmpFx[72] + tmpQ2[56]*tmpFx[82] + tmpQ2[57]*tmpFx[92] + tmpQ2[58]*tmpFx[102] + tmpQ2[59]*tmpFx[112] + tmpQ2[60]*tmpFx[122] + tmpQ2[61]*tmpFx[132] + tmpQ2[62]*tmpFx[142] + tmpQ2[63]*tmpFx[152];\ntmpQ1[33] = + tmpQ2[48]*tmpFx[3] + tmpQ2[49]*tmpFx[13] + tmpQ2[50]*tmpFx[23] + tmpQ2[51]*tmpFx[33] + tmpQ2[52]*tmpFx[43] + tmpQ2[53]*tmpFx[53] + tmpQ2[54]*tmpFx[63] + tmpQ2[55]*tmpFx[73] + tmpQ2[56]*tmpFx[83] + tmpQ2[57]*tmpFx[93] + tmpQ2[58]*tmpFx[103] + tmpQ2[59]*tmpFx[113] + tmpQ2[60]*tmpFx[123] + tmpQ2[61]*tmpFx[133] + tmpQ2[62]*tmpFx[143] + tmpQ2[63]*tmpFx[153];\ntmpQ1[34] = + tmpQ2[48]*tmpFx[4] + tmpQ2[49]*tmpFx[14] + tmpQ2[50]*tmpFx[24] + tmpQ2[51]*tmpFx[34] + tmpQ2[52]*tmpFx[44] + tmpQ2[53]*tmpFx[54] + tmpQ2[54]*tmpFx[64] + tmpQ2[55]*tmpFx[74] + tmpQ2[56]*tmpFx[84] + tmpQ2[57]*tmpFx[94] + tmpQ2[58]*tmpFx[104] + tmpQ2[59]*tmpFx[114] + tmpQ2[60]*tmpFx[124] + tmpQ2[61]*tmpFx[134] + tmpQ2[62]*tmpFx[144] + tmpQ2[63]*tmpFx[154];\ntmpQ1[35] = + tmpQ2[48]*tmpFx[5] + tmpQ2[49]*tmpFx[15] + tmpQ2[50]*tmpFx[25] + tmpQ2[51]*tmpFx[35] + tmpQ2[52]*tmpFx[45] + tmpQ2[53]*tmpFx[55] + tmpQ2[54]*tmpFx[65] + tmpQ2[55]*tmpFx[75] + tmpQ2[56]*tmpFx[85] + tmpQ2[57]*tmpFx[95] + tmpQ2[58]*tmpFx[105] + tmpQ2[59]*tmpFx[115] + tmpQ2[60]*tmpFx[125] + tmpQ2[61]*tmpFx[135] + tmpQ2[62]*tmpFx[145] + tmpQ2[63]*tmpFx[155];\ntmpQ1[36] = + tmpQ2[48]*tmpFx[6] + tmpQ2[49]*tmpFx[16] + tmpQ2[50]*tmpFx[26] + tmpQ2[51]*tmpFx[36] + tmpQ2[52]*tmpFx[46] + tmpQ2[53]*tmpFx[56] + tmpQ2[54]*tmpFx[66] + tmpQ2[55]*tmpFx[76] + tmpQ2[56]*tmpFx[86] + tmpQ2[57]*tmpFx[96] + tmpQ2[58]*tmpFx[106] + tmpQ2[59]*tmpFx[116] + tmpQ2[60]*tmpFx[126] + tmpQ2[61]*tmpFx[136] + tmpQ2[62]*tmpFx[146] + tmpQ2[63]*tmpFx[156];\ntmpQ1[37] = + tmpQ2[48]*tmpFx[7] + tmpQ2[49]*tmpFx[17] + tmpQ2[50]*tmpFx[27] + tmpQ2[51]*tmpFx[37] + tmpQ2[52]*tmpFx[47] + tmpQ2[53]*tmpFx[57] + tmpQ2[54]*tmpFx[67] + tmpQ2[55]*tmpFx[77] + tmpQ2[56]*tmpFx[87] + tmpQ2[57]*tmpFx[97] + tmpQ2[58]*tmpFx[107] + tmpQ2[59]*tmpFx[117] + tmpQ2[60]*tmpFx[127] + tmpQ2[61]*tmpFx[137] + tmpQ2[62]*tmpFx[147] + tmpQ2[63]*tmpFx[157];\ntmpQ1[38] = + tmpQ2[48]*tmpFx[8] + tmpQ2[49]*tmpFx[18] + tmpQ2[50]*tmpFx[28] + tmpQ2[51]*tmpFx[38] + tmpQ2[52]*tmpFx[48] + tmpQ2[53]*tmpFx[58] + tmpQ2[54]*tmpFx[68] + tmpQ2[55]*tmpFx[78] + tmpQ2[56]*tmpFx[88] + tmpQ2[57]*tmpFx[98] + tmpQ2[58]*tmpFx[108] + tmpQ2[59]*tmpFx[118] + tmpQ2[60]*tmpFx[128] + tmpQ2[61]*tmpFx[138] + tmpQ2[62]*tmpFx[148] + tmpQ2[63]*tmpFx[158];\ntmpQ1[39] = + tmpQ2[48]*tmpFx[9] + tmpQ2[49]*tmpFx[19] + tmpQ2[50]*tmpFx[29] + tmpQ2[51]*tmpFx[39] + tmpQ2[52]*tmpFx[49] + tmpQ2[53]*tmpFx[59] + tmpQ2[54]*tmpFx[69] + tmpQ2[55]*tmpFx[79] + tmpQ2[56]*tmpFx[89] + tmpQ2[57]*tmpFx[99] + tmpQ2[58]*tmpFx[109] + tmpQ2[59]*tmpFx[119] + tmpQ2[60]*tmpFx[129] + tmpQ2[61]*tmpFx[139] + tmpQ2[62]*tmpFx[149] + tmpQ2[63]*tmpFx[159];\ntmpQ1[40] = + tmpQ2[64]*tmpFx[0] + tmpQ2[65]*tmpFx[10] + tmpQ2[66]*tmpFx[20] + tmpQ2[67]*tmpFx[30] + tmpQ2[68]*tmpFx[40] + tmpQ2[69]*tmpFx[50] + tmpQ2[70]*tmpFx[60] + tmpQ2[71]*tmpFx[70] + tmpQ2[72]*tmpFx[80] + tmpQ2[73]*tmpFx[90] + tmpQ2[74]*tmpFx[100] + tmpQ2[75]*tmpFx[110] + tmpQ2[76]*tmpFx[120] + tmpQ2[77]*tmpFx[130] + tmpQ2[78]*tmpFx[140] + tmpQ2[79]*tmpFx[150];\ntmpQ1[41] = + tmpQ2[64]*tmpFx[1] + tmpQ2[65]*tmpFx[11] + tmpQ2[66]*tmpFx[21] + tmpQ2[67]*tmpFx[31] + tmpQ2[68]*tmpFx[41] + tmpQ2[69]*tmpFx[51] + tmpQ2[70]*tmpFx[61] + tmpQ2[71]*tmpFx[71] + tmpQ2[72]*tmpFx[81] + tmpQ2[73]*tmpFx[91] + tmpQ2[74]*tmpFx[101] + tmpQ2[75]*tmpFx[111] + tmpQ2[76]*tmpFx[121] + tmpQ2[77]*tmpFx[131] + tmpQ2[78]*tmpFx[141] + tmpQ2[79]*tmpFx[151];\ntmpQ1[42] = + tmpQ2[64]*tmpFx[2] + tmpQ2[65]*tmpFx[12] + tmpQ2[66]*tmpFx[22] + tmpQ2[67]*tmpFx[32] + tmpQ2[68]*tmpFx[42] + tmpQ2[69]*tmpFx[52] + tmpQ2[70]*tmpFx[62] + tmpQ2[71]*tmpFx[72] + tmpQ2[72]*tmpFx[82] + tmpQ2[73]*tmpFx[92] + tmpQ2[74]*tmpFx[102] + tmpQ2[75]*tmpFx[112] + tmpQ2[76]*tmpFx[122] + tmpQ2[77]*tmpFx[132] + tmpQ2[78]*tmpFx[142] + tmpQ2[79]*tmpFx[152];\ntmpQ1[43] = + tmpQ2[64]*tmpFx[3] + tmpQ2[65]*tmpFx[13] + tmpQ2[66]*tmpFx[23] + tmpQ2[67]*tmpFx[33] + tmpQ2[68]*tmpFx[43] + tmpQ2[69]*tmpFx[53] + tmpQ2[70]*tmpFx[63] + tmpQ2[71]*tmpFx[73] + tmpQ2[72]*tmpFx[83] + tmpQ2[73]*tmpFx[93] + tmpQ2[74]*tmpFx[103] + tmpQ2[75]*tmpFx[113] + tmpQ2[76]*tmpFx[123] + tmpQ2[77]*tmpFx[133] + tmpQ2[78]*tmpFx[143] + tmpQ2[79]*tmpFx[153];\ntmpQ1[44] = + tmpQ2[64]*tmpFx[4] + tmpQ2[65]*tmpFx[14] + tmpQ2[66]*tmpFx[24] + tmpQ2[67]*tmpFx[34] + tmpQ2[68]*tmpFx[44] + tmpQ2[69]*tmpFx[54] + tmpQ2[70]*tmpFx[64] + tmpQ2[71]*tmpFx[74] + tmpQ2[72]*tmpFx[84] + tmpQ2[73]*tmpFx[94] + tmpQ2[74]*tmpFx[104] + tmpQ2[75]*tmpFx[114] + tmpQ2[76]*tmpFx[124] + tmpQ2[77]*tmpFx[134] + tmpQ2[78]*tmpFx[144] + tmpQ2[79]*tmpFx[154];\ntmpQ1[45] = + tmpQ2[64]*tmpFx[5] + tmpQ2[65]*tmpFx[15] + tmpQ2[66]*tmpFx[25] + tmpQ2[67]*tmpFx[35] + tmpQ2[68]*tmpFx[45] + tmpQ2[69]*tmpFx[55] + tmpQ2[70]*tmpFx[65] + tmpQ2[71]*tmpFx[75] + tmpQ2[72]*tmpFx[85] + tmpQ2[73]*tmpFx[95] + tmpQ2[74]*tmpFx[105] + tmpQ2[75]*tmpFx[115] + tmpQ2[76]*tmpFx[125] + tmpQ2[77]*tmpFx[135] + tmpQ2[78]*tmpFx[145] + tmpQ2[79]*tmpFx[155];\ntmpQ1[46] = + tmpQ2[64]*tmpFx[6] + tmpQ2[65]*tmpFx[16] + tmpQ2[66]*tmpFx[26] + tmpQ2[67]*tmpFx[36] + tmpQ2[68]*tmpFx[46] + tmpQ2[69]*tmpFx[56] + tmpQ2[70]*tmpFx[66] + tmpQ2[71]*tmpFx[76] + tmpQ2[72]*tmpFx[86] + tmpQ2[73]*tmpFx[96] + tmpQ2[74]*tmpFx[106] + tmpQ2[75]*tmpFx[116] + tmpQ2[76]*tmpFx[126] + tmpQ2[77]*tmpFx[136] + tmpQ2[78]*tmpFx[146] + tmpQ2[79]*tmpFx[156];\ntmpQ1[47] = + tmpQ2[64]*tmpFx[7] + tmpQ2[65]*tmpFx[17] + tmpQ2[66]*tmpFx[27] + tmpQ2[67]*tmpFx[37] + tmpQ2[68]*tmpFx[47] + tmpQ2[69]*tmpFx[57] + tmpQ2[70]*tmpFx[67] + tmpQ2[71]*tmpFx[77] + tmpQ2[72]*tmpFx[87] + tmpQ2[73]*tmpFx[97] + tmpQ2[74]*tmpFx[107] + tmpQ2[75]*tmpFx[117] + tmpQ2[76]*tmpFx[127] + tmpQ2[77]*tmpFx[137] + tmpQ2[78]*tmpFx[147] + tmpQ2[79]*tmpFx[157];\ntmpQ1[48] = + tmpQ2[64]*tmpFx[8] + tmpQ2[65]*tmpFx[18] + tmpQ2[66]*tmpFx[28] + tmpQ2[67]*tmpFx[38] + tmpQ2[68]*tmpFx[48] + tmpQ2[69]*tmpFx[58] + tmpQ2[70]*tmpFx[68] + tmpQ2[71]*tmpFx[78] + tmpQ2[72]*tmpFx[88] + tmpQ2[73]*tmpFx[98] + tmpQ2[74]*tmpFx[108] + tmpQ2[75]*tmpFx[118] + tmpQ2[76]*tmpFx[128] + tmpQ2[77]*tmpFx[138] + tmpQ2[78]*tmpFx[148] + tmpQ2[79]*tmpFx[158];\ntmpQ1[49] = + tmpQ2[64]*tmpFx[9] + tmpQ2[65]*tmpFx[19] + tmpQ2[66]*tmpFx[29] + tmpQ2[67]*tmpFx[39] + tmpQ2[68]*tmpFx[49] + tmpQ2[69]*tmpFx[59] + tmpQ2[70]*tmpFx[69] + tmpQ2[71]*tmpFx[79] + tmpQ2[72]*tmpFx[89] + tmpQ2[73]*tmpFx[99] + tmpQ2[74]*tmpFx[109] + tmpQ2[75]*tmpFx[119] + tmpQ2[76]*tmpFx[129] + tmpQ2[77]*tmpFx[139] + tmpQ2[78]*tmpFx[149] + tmpQ2[79]*tmpFx[159];\ntmpQ1[50] = + tmpQ2[80]*tmpFx[0] + tmpQ2[81]*tmpFx[10] + tmpQ2[82]*tmpFx[20] + tmpQ2[83]*tmpFx[30] + tmpQ2[84]*tmpFx[40] + tmpQ2[85]*tmpFx[50] + tmpQ2[86]*tmpFx[60] + tmpQ2[87]*tmpFx[70] + tmpQ2[88]*tmpFx[80] + tmpQ2[89]*tmpFx[90] + tmpQ2[90]*tmpFx[100] + tmpQ2[91]*tmpFx[110] + tmpQ2[92]*tmpFx[120] + tmpQ2[93]*tmpFx[130] + tmpQ2[94]*tmpFx[140] + tmpQ2[95]*tmpFx[150];\ntmpQ1[51] = + tmpQ2[80]*tmpFx[1] + tmpQ2[81]*tmpFx[11] + tmpQ2[82]*tmpFx[21] + tmpQ2[83]*tmpFx[31] + tmpQ2[84]*tmpFx[41] + tmpQ2[85]*tmpFx[51] + tmpQ2[86]*tmpFx[61] + tmpQ2[87]*tmpFx[71] + tmpQ2[88]*tmpFx[81] + tmpQ2[89]*tmpFx[91] + tmpQ2[90]*tmpFx[101] + tmpQ2[91]*tmpFx[111] + tmpQ2[92]*tmpFx[121] + tmpQ2[93]*tmpFx[131] + tmpQ2[94]*tmpFx[141] + tmpQ2[95]*tmpFx[151];\ntmpQ1[52] = + tmpQ2[80]*tmpFx[2] + tmpQ2[81]*tmpFx[12] + tmpQ2[82]*tmpFx[22] + tmpQ2[83]*tmpFx[32] + tmpQ2[84]*tmpFx[42] + tmpQ2[85]*tmpFx[52] + tmpQ2[86]*tmpFx[62] + tmpQ2[87]*tmpFx[72] + tmpQ2[88]*tmpFx[82] + tmpQ2[89]*tmpFx[92] + tmpQ2[90]*tmpFx[102] + tmpQ2[91]*tmpFx[112] + tmpQ2[92]*tmpFx[122] + tmpQ2[93]*tmpFx[132] + tmpQ2[94]*tmpFx[142] + tmpQ2[95]*tmpFx[152];\ntmpQ1[53] = + tmpQ2[80]*tmpFx[3] + tmpQ2[81]*tmpFx[13] + tmpQ2[82]*tmpFx[23] + tmpQ2[83]*tmpFx[33] + tmpQ2[84]*tmpFx[43] + tmpQ2[85]*tmpFx[53] + tmpQ2[86]*tmpFx[63] + tmpQ2[87]*tmpFx[73] + tmpQ2[88]*tmpFx[83] + tmpQ2[89]*tmpFx[93] + tmpQ2[90]*tmpFx[103] + tmpQ2[91]*tmpFx[113] + tmpQ2[92]*tmpFx[123] + tmpQ2[93]*tmpFx[133] + tmpQ2[94]*tmpFx[143] + tmpQ2[95]*tmpFx[153];\ntmpQ1[54] = + tmpQ2[80]*tmpFx[4] + tmpQ2[81]*tmpFx[14] + tmpQ2[82]*tmpFx[24] + tmpQ2[83]*tmpFx[34] + tmpQ2[84]*tmpFx[44] + tmpQ2[85]*tmpFx[54] + tmpQ2[86]*tmpFx[64] + tmpQ2[87]*tmpFx[74] + tmpQ2[88]*tmpFx[84] + tmpQ2[89]*tmpFx[94] + tmpQ2[90]*tmpFx[104] + tmpQ2[91]*tmpFx[114] + tmpQ2[92]*tmpFx[124] + tmpQ2[93]*tmpFx[134] + tmpQ2[94]*tmpFx[144] + tmpQ2[95]*tmpFx[154];\ntmpQ1[55] = + tmpQ2[80]*tmpFx[5] + tmpQ2[81]*tmpFx[15] + tmpQ2[82]*tmpFx[25] + tmpQ2[83]*tmpFx[35] + tmpQ2[84]*tmpFx[45] + tmpQ2[85]*tmpFx[55] + tmpQ2[86]*tmpFx[65] + tmpQ2[87]*tmpFx[75] + tmpQ2[88]*tmpFx[85] + tmpQ2[89]*tmpFx[95] + tmpQ2[90]*tmpFx[105] + tmpQ2[91]*tmpFx[115] + tmpQ2[92]*tmpFx[125] + tmpQ2[93]*tmpFx[135] + tmpQ2[94]*tmpFx[145] + tmpQ2[95]*tmpFx[155];\ntmpQ1[56] = + tmpQ2[80]*tmpFx[6] + tmpQ2[81]*tmpFx[16] + tmpQ2[82]*tmpFx[26] + tmpQ2[83]*tmpFx[36] + tmpQ2[84]*tmpFx[46] + tmpQ2[85]*tmpFx[56] + tmpQ2[86]*tmpFx[66] + tmpQ2[87]*tmpFx[76] + tmpQ2[88]*tmpFx[86] + tmpQ2[89]*tmpFx[96] + tmpQ2[90]*tmpFx[106] + tmpQ2[91]*tmpFx[116] + tmpQ2[92]*tmpFx[126] + tmpQ2[93]*tmpFx[136] + tmpQ2[94]*tmpFx[146] + tmpQ2[95]*tmpFx[156];\ntmpQ1[57] = + tmpQ2[80]*tmpFx[7] + tmpQ2[81]*tmpFx[17] + tmpQ2[82]*tmpFx[27] + tmpQ2[83]*tmpFx[37] + tmpQ2[84]*tmpFx[47] + tmpQ2[85]*tmpFx[57] + tmpQ2[86]*tmpFx[67] + tmpQ2[87]*tmpFx[77] + tmpQ2[88]*tmpFx[87] + tmpQ2[89]*tmpFx[97] + tmpQ2[90]*tmpFx[107] + tmpQ2[91]*tmpFx[117] + tmpQ2[92]*tmpFx[127] + tmpQ2[93]*tmpFx[137] + tmpQ2[94]*tmpFx[147] + tmpQ2[95]*tmpFx[157];\ntmpQ1[58] = + tmpQ2[80]*tmpFx[8] + tmpQ2[81]*tmpFx[18] + tmpQ2[82]*tmpFx[28] + tmpQ2[83]*tmpFx[38] + tmpQ2[84]*tmpFx[48] + tmpQ2[85]*tmpFx[58] + tmpQ2[86]*tmpFx[68] + tmpQ2[87]*tmpFx[78] + tmpQ2[88]*tmpFx[88] + tmpQ2[89]*tmpFx[98] + tmpQ2[90]*tmpFx[108] + tmpQ2[91]*tmpFx[118] + tmpQ2[92]*tmpFx[128] + tmpQ2[93]*tmpFx[138] + tmpQ2[94]*tmpFx[148] + tmpQ2[95]*tmpFx[158];\ntmpQ1[59] = + tmpQ2[80]*tmpFx[9] + tmpQ2[81]*tmpFx[19] + tmpQ2[82]*tmpFx[29] + tmpQ2[83]*tmpFx[39] + tmpQ2[84]*tmpFx[49] + tmpQ2[85]*tmpFx[59] + tmpQ2[86]*tmpFx[69] + tmpQ2[87]*tmpFx[79] + tmpQ2[88]*tmpFx[89] + tmpQ2[89]*tmpFx[99] + tmpQ2[90]*tmpFx[109] + tmpQ2[91]*tmpFx[119] + tmpQ2[92]*tmpFx[129] + tmpQ2[93]*tmpFx[139] + tmpQ2[94]*tmpFx[149] + tmpQ2[95]*tmpFx[159];\ntmpQ1[60] = + tmpQ2[96]*tmpFx[0] + tmpQ2[97]*tmpFx[10] + tmpQ2[98]*tmpFx[20] + tmpQ2[99]*tmpFx[30] + tmpQ2[100]*tmpFx[40] + tmpQ2[101]*tmpFx[50] + tmpQ2[102]*tmpFx[60] + tmpQ2[103]*tmpFx[70] + tmpQ2[104]*tmpFx[80] + tmpQ2[105]*tmpFx[90] + tmpQ2[106]*tmpFx[100] + tmpQ2[107]*tmpFx[110] + tmpQ2[108]*tmpFx[120] + tmpQ2[109]*tmpFx[130] + tmpQ2[110]*tmpFx[140] + tmpQ2[111]*tmpFx[150];\ntmpQ1[61] = + tmpQ2[96]*tmpFx[1] + tmpQ2[97]*tmpFx[11] + tmpQ2[98]*tmpFx[21] + tmpQ2[99]*tmpFx[31] + tmpQ2[100]*tmpFx[41] + tmpQ2[101]*tmpFx[51] + tmpQ2[102]*tmpFx[61] + tmpQ2[103]*tmpFx[71] + tmpQ2[104]*tmpFx[81] + tmpQ2[105]*tmpFx[91] + tmpQ2[106]*tmpFx[101] + tmpQ2[107]*tmpFx[111] + tmpQ2[108]*tmpFx[121] + tmpQ2[109]*tmpFx[131] + tmpQ2[110]*tmpFx[141] + tmpQ2[111]*tmpFx[151];\ntmpQ1[62] = + tmpQ2[96]*tmpFx[2] + tmpQ2[97]*tmpFx[12] + tmpQ2[98]*tmpFx[22] + tmpQ2[99]*tmpFx[32] + tmpQ2[100]*tmpFx[42] + tmpQ2[101]*tmpFx[52] + tmpQ2[102]*tmpFx[62] + tmpQ2[103]*tmpFx[72] + tmpQ2[104]*tmpFx[82] + tmpQ2[105]*tmpFx[92] + tmpQ2[106]*tmpFx[102] + tmpQ2[107]*tmpFx[112] + tmpQ2[108]*tmpFx[122] + tmpQ2[109]*tmpFx[132] + tmpQ2[110]*tmpFx[142] + tmpQ2[111]*tmpFx[152];\ntmpQ1[63] = + tmpQ2[96]*tmpFx[3] + tmpQ2[97]*tmpFx[13] + tmpQ2[98]*tmpFx[23] + tmpQ2[99]*tmpFx[33] + tmpQ2[100]*tmpFx[43] + tmpQ2[101]*tmpFx[53] + tmpQ2[102]*tmpFx[63] + tmpQ2[103]*tmpFx[73] + tmpQ2[104]*tmpFx[83] + tmpQ2[105]*tmpFx[93] + tmpQ2[106]*tmpFx[103] + tmpQ2[107]*tmpFx[113] + tmpQ2[108]*tmpFx[123] + tmpQ2[109]*tmpFx[133] + tmpQ2[110]*tmpFx[143] + tmpQ2[111]*tmpFx[153];\ntmpQ1[64] = + tmpQ2[96]*tmpFx[4] + tmpQ2[97]*tmpFx[14] + tmpQ2[98]*tmpFx[24] + tmpQ2[99]*tmpFx[34] + tmpQ2[100]*tmpFx[44] + tmpQ2[101]*tmpFx[54] + tmpQ2[102]*tmpFx[64] + tmpQ2[103]*tmpFx[74] + tmpQ2[104]*tmpFx[84] + tmpQ2[105]*tmpFx[94] + tmpQ2[106]*tmpFx[104] + tmpQ2[107]*tmpFx[114] + tmpQ2[108]*tmpFx[124] + tmpQ2[109]*tmpFx[134] + tmpQ2[110]*tmpFx[144] + tmpQ2[111]*tmpFx[154];\ntmpQ1[65] = + tmpQ2[96]*tmpFx[5] + tmpQ2[97]*tmpFx[15] + tmpQ2[98]*tmpFx[25] + tmpQ2[99]*tmpFx[35] + tmpQ2[100]*tmpFx[45] + tmpQ2[101]*tmpFx[55] + tmpQ2[102]*tmpFx[65] + tmpQ2[103]*tmpFx[75] + tmpQ2[104]*tmpFx[85] + tmpQ2[105]*tmpFx[95] + tmpQ2[106]*tmpFx[105] + tmpQ2[107]*tmpFx[115] + tmpQ2[108]*tmpFx[125] + tmpQ2[109]*tmpFx[135] + tmpQ2[110]*tmpFx[145] + tmpQ2[111]*tmpFx[155];\ntmpQ1[66] = + tmpQ2[96]*tmpFx[6] + tmpQ2[97]*tmpFx[16] + tmpQ2[98]*tmpFx[26] + tmpQ2[99]*tmpFx[36] + tmpQ2[100]*tmpFx[46] + tmpQ2[101]*tmpFx[56] + tmpQ2[102]*tmpFx[66] + tmpQ2[103]*tmpFx[76] + tmpQ2[104]*tmpFx[86] + tmpQ2[105]*tmpFx[96] + tmpQ2[106]*tmpFx[106] + tmpQ2[107]*tmpFx[116] + tmpQ2[108]*tmpFx[126] + tmpQ2[109]*tmpFx[136] + tmpQ2[110]*tmpFx[146] + tmpQ2[111]*tmpFx[156];\ntmpQ1[67] = + tmpQ2[96]*tmpFx[7] + tmpQ2[97]*tmpFx[17] + tmpQ2[98]*tmpFx[27] + tmpQ2[99]*tmpFx[37] + tmpQ2[100]*tmpFx[47] + tmpQ2[101]*tmpFx[57] + tmpQ2[102]*tmpFx[67] + tmpQ2[103]*tmpFx[77] + tmpQ2[104]*tmpFx[87] + tmpQ2[105]*tmpFx[97] + tmpQ2[106]*tmpFx[107] + tmpQ2[107]*tmpFx[117] + tmpQ2[108]*tmpFx[127] + tmpQ2[109]*tmpFx[137] + tmpQ2[110]*tmpFx[147] + tmpQ2[111]*tmpFx[157];\ntmpQ1[68] = + tmpQ2[96]*tmpFx[8] + tmpQ2[97]*tmpFx[18] + tmpQ2[98]*tmpFx[28] + tmpQ2[99]*tmpFx[38] + tmpQ2[100]*tmpFx[48] + tmpQ2[101]*tmpFx[58] + tmpQ2[102]*tmpFx[68] + tmpQ2[103]*tmpFx[78] + tmpQ2[104]*tmpFx[88] + tmpQ2[105]*tmpFx[98] + tmpQ2[106]*tmpFx[108] + tmpQ2[107]*tmpFx[118] + tmpQ2[108]*tmpFx[128] + tmpQ2[109]*tmpFx[138] + tmpQ2[110]*tmpFx[148] + tmpQ2[111]*tmpFx[158];\ntmpQ1[69] = + tmpQ2[96]*tmpFx[9] + tmpQ2[97]*tmpFx[19] + tmpQ2[98]*tmpFx[29] + tmpQ2[99]*tmpFx[39] + tmpQ2[100]*tmpFx[49] + tmpQ2[101]*tmpFx[59] + tmpQ2[102]*tmpFx[69] + tmpQ2[103]*tmpFx[79] + tmpQ2[104]*tmpFx[89] + tmpQ2[105]*tmpFx[99] + tmpQ2[106]*tmpFx[109] + tmpQ2[107]*tmpFx[119] + tmpQ2[108]*tmpFx[129] + tmpQ2[109]*tmpFx[139] + tmpQ2[110]*tmpFx[149] + tmpQ2[111]*tmpFx[159];\ntmpQ1[70] = + tmpQ2[112]*tmpFx[0] + tmpQ2[113]*tmpFx[10] + tmpQ2[114]*tmpFx[20] + tmpQ2[115]*tmpFx[30] + tmpQ2[116]*tmpFx[40] + tmpQ2[117]*tmpFx[50] + tmpQ2[118]*tmpFx[60] + tmpQ2[119]*tmpFx[70] + tmpQ2[120]*tmpFx[80] + tmpQ2[121]*tmpFx[90] + tmpQ2[122]*tmpFx[100] + tmpQ2[123]*tmpFx[110] + tmpQ2[124]*tmpFx[120] + tmpQ2[125]*tmpFx[130] + tmpQ2[126]*tmpFx[140] + tmpQ2[127]*tmpFx[150];\ntmpQ1[71] = + tmpQ2[112]*tmpFx[1] + tmpQ2[113]*tmpFx[11] + tmpQ2[114]*tmpFx[21] + tmpQ2[115]*tmpFx[31] + tmpQ2[116]*tmpFx[41] + tmpQ2[117]*tmpFx[51] + tmpQ2[118]*tmpFx[61] + tmpQ2[119]*tmpFx[71] + tmpQ2[120]*tmpFx[81] + tmpQ2[121]*tmpFx[91] + tmpQ2[122]*tmpFx[101] + tmpQ2[123]*tmpFx[111] + tmpQ2[124]*tmpFx[121] + tmpQ2[125]*tmpFx[131] + tmpQ2[126]*tmpFx[141] + tmpQ2[127]*tmpFx[151];\ntmpQ1[72] = + tmpQ2[112]*tmpFx[2] + tmpQ2[113]*tmpFx[12] + tmpQ2[114]*tmpFx[22] + tmpQ2[115]*tmpFx[32] + tmpQ2[116]*tmpFx[42] + tmpQ2[117]*tmpFx[52] + tmpQ2[118]*tmpFx[62] + tmpQ2[119]*tmpFx[72] + tmpQ2[120]*tmpFx[82] + tmpQ2[121]*tmpFx[92] + tmpQ2[122]*tmpFx[102] + tmpQ2[123]*tmpFx[112] + tmpQ2[124]*tmpFx[122] + tmpQ2[125]*tmpFx[132] + tmpQ2[126]*tmpFx[142] + tmpQ2[127]*tmpFx[152];\ntmpQ1[73] = + tmpQ2[112]*tmpFx[3] + tmpQ2[113]*tmpFx[13] + tmpQ2[114]*tmpFx[23] + tmpQ2[115]*tmpFx[33] + tmpQ2[116]*tmpFx[43] + tmpQ2[117]*tmpFx[53] + tmpQ2[118]*tmpFx[63] + tmpQ2[119]*tmpFx[73] + tmpQ2[120]*tmpFx[83] + tmpQ2[121]*tmpFx[93] + tmpQ2[122]*tmpFx[103] + tmpQ2[123]*tmpFx[113] + tmpQ2[124]*tmpFx[123] + tmpQ2[125]*tmpFx[133] + tmpQ2[126]*tmpFx[143] + tmpQ2[127]*tmpFx[153];\ntmpQ1[74] = + tmpQ2[112]*tmpFx[4] + tmpQ2[113]*tmpFx[14] + tmpQ2[114]*tmpFx[24] + tmpQ2[115]*tmpFx[34] + tmpQ2[116]*tmpFx[44] + tmpQ2[117]*tmpFx[54] + tmpQ2[118]*tmpFx[64] + tmpQ2[119]*tmpFx[74] + tmpQ2[120]*tmpFx[84] + tmpQ2[121]*tmpFx[94] + tmpQ2[122]*tmpFx[104] + tmpQ2[123]*tmpFx[114] + tmpQ2[124]*tmpFx[124] + tmpQ2[125]*tmpFx[134] + tmpQ2[126]*tmpFx[144] + tmpQ2[127]*tmpFx[154];\ntmpQ1[75] = + tmpQ2[112]*tmpFx[5] + tmpQ2[113]*tmpFx[15] + tmpQ2[114]*tmpFx[25] + tmpQ2[115]*tmpFx[35] + tmpQ2[116]*tmpFx[45] + tmpQ2[117]*tmpFx[55] + tmpQ2[118]*tmpFx[65] + tmpQ2[119]*tmpFx[75] + tmpQ2[120]*tmpFx[85] + tmpQ2[121]*tmpFx[95] + tmpQ2[122]*tmpFx[105] + tmpQ2[123]*tmpFx[115] + tmpQ2[124]*tmpFx[125] + tmpQ2[125]*tmpFx[135] + tmpQ2[126]*tmpFx[145] + tmpQ2[127]*tmpFx[155];\ntmpQ1[76] = + tmpQ2[112]*tmpFx[6] + tmpQ2[113]*tmpFx[16] + tmpQ2[114]*tmpFx[26] + tmpQ2[115]*tmpFx[36] + tmpQ2[116]*tmpFx[46] + tmpQ2[117]*tmpFx[56] + tmpQ2[118]*tmpFx[66] + tmpQ2[119]*tmpFx[76] + tmpQ2[120]*tmpFx[86] + tmpQ2[121]*tmpFx[96] + tmpQ2[122]*tmpFx[106] + tmpQ2[123]*tmpFx[116] + tmpQ2[124]*tmpFx[126] + tmpQ2[125]*tmpFx[136] + tmpQ2[126]*tmpFx[146] + tmpQ2[127]*tmpFx[156];\ntmpQ1[77] = + tmpQ2[112]*tmpFx[7] + tmpQ2[113]*tmpFx[17] + tmpQ2[114]*tmpFx[27] + tmpQ2[115]*tmpFx[37] + tmpQ2[116]*tmpFx[47] + tmpQ2[117]*tmpFx[57] + tmpQ2[118]*tmpFx[67] + tmpQ2[119]*tmpFx[77] + tmpQ2[120]*tmpFx[87] + tmpQ2[121]*tmpFx[97] + tmpQ2[122]*tmpFx[107] + tmpQ2[123]*tmpFx[117] + tmpQ2[124]*tmpFx[127] + tmpQ2[125]*tmpFx[137] + tmpQ2[126]*tmpFx[147] + tmpQ2[127]*tmpFx[157];\ntmpQ1[78] = + tmpQ2[112]*tmpFx[8] + tmpQ2[113]*tmpFx[18] + tmpQ2[114]*tmpFx[28] + tmpQ2[115]*tmpFx[38] + tmpQ2[116]*tmpFx[48] + tmpQ2[117]*tmpFx[58] + tmpQ2[118]*tmpFx[68] + tmpQ2[119]*tmpFx[78] + tmpQ2[120]*tmpFx[88] + tmpQ2[121]*tmpFx[98] + tmpQ2[122]*tmpFx[108] + tmpQ2[123]*tmpFx[118] + tmpQ2[124]*tmpFx[128] + tmpQ2[125]*tmpFx[138] + tmpQ2[126]*tmpFx[148] + tmpQ2[127]*tmpFx[158];\ntmpQ1[79] = + tmpQ2[112]*tmpFx[9] + tmpQ2[113]*tmpFx[19] + tmpQ2[114]*tmpFx[29] + tmpQ2[115]*tmpFx[39] + tmpQ2[116]*tmpFx[49] + tmpQ2[117]*tmpFx[59] + tmpQ2[118]*tmpFx[69] + tmpQ2[119]*tmpFx[79] + tmpQ2[120]*tmpFx[89] + tmpQ2[121]*tmpFx[99] + tmpQ2[122]*tmpFx[109] + tmpQ2[123]*tmpFx[119] + tmpQ2[124]*tmpFx[129] + tmpQ2[125]*tmpFx[139] + tmpQ2[126]*tmpFx[149] + tmpQ2[127]*tmpFx[159];\ntmpQ1[80] = + tmpQ2[128]*tmpFx[0] + tmpQ2[129]*tmpFx[10] + tmpQ2[130]*tmpFx[20] + tmpQ2[131]*tmpFx[30] + tmpQ2[132]*tmpFx[40] + tmpQ2[133]*tmpFx[50] + tmpQ2[134]*tmpFx[60] + tmpQ2[135]*tmpFx[70] + tmpQ2[136]*tmpFx[80] + tmpQ2[137]*tmpFx[90] + tmpQ2[138]*tmpFx[100] + tmpQ2[139]*tmpFx[110] + tmpQ2[140]*tmpFx[120] + tmpQ2[141]*tmpFx[130] + tmpQ2[142]*tmpFx[140] + tmpQ2[143]*tmpFx[150];\ntmpQ1[81] = + tmpQ2[128]*tmpFx[1] + tmpQ2[129]*tmpFx[11] + tmpQ2[130]*tmpFx[21] + tmpQ2[131]*tmpFx[31] + tmpQ2[132]*tmpFx[41] + tmpQ2[133]*tmpFx[51] + tmpQ2[134]*tmpFx[61] + tmpQ2[135]*tmpFx[71] + tmpQ2[136]*tmpFx[81] + tmpQ2[137]*tmpFx[91] + tmpQ2[138]*tmpFx[101] + tmpQ2[139]*tmpFx[111] + tmpQ2[140]*tmpFx[121] + tmpQ2[141]*tmpFx[131] + tmpQ2[142]*tmpFx[141] + tmpQ2[143]*tmpFx[151];\ntmpQ1[82] = + tmpQ2[128]*tmpFx[2] + tmpQ2[129]*tmpFx[12] + tmpQ2[130]*tmpFx[22] + tmpQ2[131]*tmpFx[32] + tmpQ2[132]*tmpFx[42] + tmpQ2[133]*tmpFx[52] + tmpQ2[134]*tmpFx[62] + tmpQ2[135]*tmpFx[72] + tmpQ2[136]*tmpFx[82] + tmpQ2[137]*tmpFx[92] + tmpQ2[138]*tmpFx[102] + tmpQ2[139]*tmpFx[112] + tmpQ2[140]*tmpFx[122] + tmpQ2[141]*tmpFx[132] + tmpQ2[142]*tmpFx[142] + tmpQ2[143]*tmpFx[152];\ntmpQ1[83] = + tmpQ2[128]*tmpFx[3] + tmpQ2[129]*tmpFx[13] + tmpQ2[130]*tmpFx[23] + tmpQ2[131]*tmpFx[33] + tmpQ2[132]*tmpFx[43] + tmpQ2[133]*tmpFx[53] + tmpQ2[134]*tmpFx[63] + tmpQ2[135]*tmpFx[73] + tmpQ2[136]*tmpFx[83] + tmpQ2[137]*tmpFx[93] + tmpQ2[138]*tmpFx[103] + tmpQ2[139]*tmpFx[113] + tmpQ2[140]*tmpFx[123] + tmpQ2[141]*tmpFx[133] + tmpQ2[142]*tmpFx[143] + tmpQ2[143]*tmpFx[153];\ntmpQ1[84] = + tmpQ2[128]*tmpFx[4] + tmpQ2[129]*tmpFx[14] + tmpQ2[130]*tmpFx[24] + tmpQ2[131]*tmpFx[34] + tmpQ2[132]*tmpFx[44] + tmpQ2[133]*tmpFx[54] + tmpQ2[134]*tmpFx[64] + tmpQ2[135]*tmpFx[74] + tmpQ2[136]*tmpFx[84] + tmpQ2[137]*tmpFx[94] + tmpQ2[138]*tmpFx[104] + tmpQ2[139]*tmpFx[114] + tmpQ2[140]*tmpFx[124] + tmpQ2[141]*tmpFx[134] + tmpQ2[142]*tmpFx[144] + tmpQ2[143]*tmpFx[154];\ntmpQ1[85] = + tmpQ2[128]*tmpFx[5] + tmpQ2[129]*tmpFx[15] + tmpQ2[130]*tmpFx[25] + tmpQ2[131]*tmpFx[35] + tmpQ2[132]*tmpFx[45] + tmpQ2[133]*tmpFx[55] + tmpQ2[134]*tmpFx[65] + tmpQ2[135]*tmpFx[75] + tmpQ2[136]*tmpFx[85] + tmpQ2[137]*tmpFx[95] + tmpQ2[138]*tmpFx[105] + tmpQ2[139]*tmpFx[115] + tmpQ2[140]*tmpFx[125] + tmpQ2[141]*tmpFx[135] + tmpQ2[142]*tmpFx[145] + tmpQ2[143]*tmpFx[155];\ntmpQ1[86] = + tmpQ2[128]*tmpFx[6] + tmpQ2[129]*tmpFx[16] + tmpQ2[130]*tmpFx[26] + tmpQ2[131]*tmpFx[36] + tmpQ2[132]*tmpFx[46] + tmpQ2[133]*tmpFx[56] + tmpQ2[134]*tmpFx[66] + tmpQ2[135]*tmpFx[76] + tmpQ2[136]*tmpFx[86] + tmpQ2[137]*tmpFx[96] + tmpQ2[138]*tmpFx[106] + tmpQ2[139]*tmpFx[116] + tmpQ2[140]*tmpFx[126] + tmpQ2[141]*tmpFx[136] + tmpQ2[142]*tmpFx[146] + tmpQ2[143]*tmpFx[156];\ntmpQ1[87] = + tmpQ2[128]*tmpFx[7] + tmpQ2[129]*tmpFx[17] + tmpQ2[130]*tmpFx[27] + tmpQ2[131]*tmpFx[37] + tmpQ2[132]*tmpFx[47] + tmpQ2[133]*tmpFx[57] + tmpQ2[134]*tmpFx[67] + tmpQ2[135]*tmpFx[77] + tmpQ2[136]*tmpFx[87] + tmpQ2[137]*tmpFx[97] + tmpQ2[138]*tmpFx[107] + tmpQ2[139]*tmpFx[117] + tmpQ2[140]*tmpFx[127] + tmpQ2[141]*tmpFx[137] + tmpQ2[142]*tmpFx[147] + tmpQ2[143]*tmpFx[157];\ntmpQ1[88] = + tmpQ2[128]*tmpFx[8] + tmpQ2[129]*tmpFx[18] + tmpQ2[130]*tmpFx[28] + tmpQ2[131]*tmpFx[38] + tmpQ2[132]*tmpFx[48] + tmpQ2[133]*tmpFx[58] + tmpQ2[134]*tmpFx[68] + tmpQ2[135]*tmpFx[78] + tmpQ2[136]*tmpFx[88] + tmpQ2[137]*tmpFx[98] + tmpQ2[138]*tmpFx[108] + tmpQ2[139]*tmpFx[118] + tmpQ2[140]*tmpFx[128] + tmpQ2[141]*tmpFx[138] + tmpQ2[142]*tmpFx[148] + tmpQ2[143]*tmpFx[158];\ntmpQ1[89] = + tmpQ2[128]*tmpFx[9] + tmpQ2[129]*tmpFx[19] + tmpQ2[130]*tmpFx[29] + tmpQ2[131]*tmpFx[39] + tmpQ2[132]*tmpFx[49] + tmpQ2[133]*tmpFx[59] + tmpQ2[134]*tmpFx[69] + tmpQ2[135]*tmpFx[79] + tmpQ2[136]*tmpFx[89] + tmpQ2[137]*tmpFx[99] + tmpQ2[138]*tmpFx[109] + tmpQ2[139]*tmpFx[119] + tmpQ2[140]*tmpFx[129] + tmpQ2[141]*tmpFx[139] + tmpQ2[142]*tmpFx[149] + tmpQ2[143]*tmpFx[159];\ntmpQ1[90] = + tmpQ2[144]*tmpFx[0] + tmpQ2[145]*tmpFx[10] + tmpQ2[146]*tmpFx[20] + tmpQ2[147]*tmpFx[30] + tmpQ2[148]*tmpFx[40] + tmpQ2[149]*tmpFx[50] + tmpQ2[150]*tmpFx[60] + tmpQ2[151]*tmpFx[70] + tmpQ2[152]*tmpFx[80] + tmpQ2[153]*tmpFx[90] + tmpQ2[154]*tmpFx[100] + tmpQ2[155]*tmpFx[110] + tmpQ2[156]*tmpFx[120] + tmpQ2[157]*tmpFx[130] + tmpQ2[158]*tmpFx[140] + tmpQ2[159]*tmpFx[150];\ntmpQ1[91] = + tmpQ2[144]*tmpFx[1] + tmpQ2[145]*tmpFx[11] + tmpQ2[146]*tmpFx[21] + tmpQ2[147]*tmpFx[31] + tmpQ2[148]*tmpFx[41] + tmpQ2[149]*tmpFx[51] + tmpQ2[150]*tmpFx[61] + tmpQ2[151]*tmpFx[71] + tmpQ2[152]*tmpFx[81] + tmpQ2[153]*tmpFx[91] + tmpQ2[154]*tmpFx[101] + tmpQ2[155]*tmpFx[111] + tmpQ2[156]*tmpFx[121] + tmpQ2[157]*tmpFx[131] + tmpQ2[158]*tmpFx[141] + tmpQ2[159]*tmpFx[151];\ntmpQ1[92] = + tmpQ2[144]*tmpFx[2] + tmpQ2[145]*tmpFx[12] + tmpQ2[146]*tmpFx[22] + tmpQ2[147]*tmpFx[32] + tmpQ2[148]*tmpFx[42] + tmpQ2[149]*tmpFx[52] + tmpQ2[150]*tmpFx[62] + tmpQ2[151]*tmpFx[72] + tmpQ2[152]*tmpFx[82] + tmpQ2[153]*tmpFx[92] + tmpQ2[154]*tmpFx[102] + tmpQ2[155]*tmpFx[112] + tmpQ2[156]*tmpFx[122] + tmpQ2[157]*tmpFx[132] + tmpQ2[158]*tmpFx[142] + tmpQ2[159]*tmpFx[152];\ntmpQ1[93] = + tmpQ2[144]*tmpFx[3] + tmpQ2[145]*tmpFx[13] + tmpQ2[146]*tmpFx[23] + tmpQ2[147]*tmpFx[33] + tmpQ2[148]*tmpFx[43] + tmpQ2[149]*tmpFx[53] + tmpQ2[150]*tmpFx[63] + tmpQ2[151]*tmpFx[73] + tmpQ2[152]*tmpFx[83] + tmpQ2[153]*tmpFx[93] + tmpQ2[154]*tmpFx[103] + tmpQ2[155]*tmpFx[113] + tmpQ2[156]*tmpFx[123] + tmpQ2[157]*tmpFx[133] + tmpQ2[158]*tmpFx[143] + tmpQ2[159]*tmpFx[153];\ntmpQ1[94] = + tmpQ2[144]*tmpFx[4] + tmpQ2[145]*tmpFx[14] + tmpQ2[146]*tmpFx[24] + tmpQ2[147]*tmpFx[34] + tmpQ2[148]*tmpFx[44] + tmpQ2[149]*tmpFx[54] + tmpQ2[150]*tmpFx[64] + tmpQ2[151]*tmpFx[74] + tmpQ2[152]*tmpFx[84] + tmpQ2[153]*tmpFx[94] + tmpQ2[154]*tmpFx[104] + tmpQ2[155]*tmpFx[114] + tmpQ2[156]*tmpFx[124] + tmpQ2[157]*tmpFx[134] + tmpQ2[158]*tmpFx[144] + tmpQ2[159]*tmpFx[154];\ntmpQ1[95] = + tmpQ2[144]*tmpFx[5] + tmpQ2[145]*tmpFx[15] + tmpQ2[146]*tmpFx[25] + tmpQ2[147]*tmpFx[35] + tmpQ2[148]*tmpFx[45] + tmpQ2[149]*tmpFx[55] + tmpQ2[150]*tmpFx[65] + tmpQ2[151]*tmpFx[75] + tmpQ2[152]*tmpFx[85] + tmpQ2[153]*tmpFx[95] + tmpQ2[154]*tmpFx[105] + tmpQ2[155]*tmpFx[115] + tmpQ2[156]*tmpFx[125] + tmpQ2[157]*tmpFx[135] + tmpQ2[158]*tmpFx[145] + tmpQ2[159]*tmpFx[155];\ntmpQ1[96] = + tmpQ2[144]*tmpFx[6] + tmpQ2[145]*tmpFx[16] + tmpQ2[146]*tmpFx[26] + tmpQ2[147]*tmpFx[36] + tmpQ2[148]*tmpFx[46] + tmpQ2[149]*tmpFx[56] + tmpQ2[150]*tmpFx[66] + tmpQ2[151]*tmpFx[76] + tmpQ2[152]*tmpFx[86] + tmpQ2[153]*tmpFx[96] + tmpQ2[154]*tmpFx[106] + tmpQ2[155]*tmpFx[116] + tmpQ2[156]*tmpFx[126] + tmpQ2[157]*tmpFx[136] + tmpQ2[158]*tmpFx[146] + tmpQ2[159]*tmpFx[156];\ntmpQ1[97] = + tmpQ2[144]*tmpFx[7] + tmpQ2[145]*tmpFx[17] + tmpQ2[146]*tmpFx[27] + tmpQ2[147]*tmpFx[37] + tmpQ2[148]*tmpFx[47] + tmpQ2[149]*tmpFx[57] + tmpQ2[150]*tmpFx[67] + tmpQ2[151]*tmpFx[77] + tmpQ2[152]*tmpFx[87] + tmpQ2[153]*tmpFx[97] + tmpQ2[154]*tmpFx[107] + tmpQ2[155]*tmpFx[117] + tmpQ2[156]*tmpFx[127] + tmpQ2[157]*tmpFx[137] + tmpQ2[158]*tmpFx[147] + tmpQ2[159]*tmpFx[157];\ntmpQ1[98] = + tmpQ2[144]*tmpFx[8] + tmpQ2[145]*tmpFx[18] + tmpQ2[146]*tmpFx[28] + tmpQ2[147]*tmpFx[38] + tmpQ2[148]*tmpFx[48] + tmpQ2[149]*tmpFx[58] + tmpQ2[150]*tmpFx[68] + tmpQ2[151]*tmpFx[78] + tmpQ2[152]*tmpFx[88] + tmpQ2[153]*tmpFx[98] + tmpQ2[154]*tmpFx[108] + tmpQ2[155]*tmpFx[118] + tmpQ2[156]*tmpFx[128] + tmpQ2[157]*tmpFx[138] + tmpQ2[158]*tmpFx[148] + tmpQ2[159]*tmpFx[158];\ntmpQ1[99] = + tmpQ2[144]*tmpFx[9] + tmpQ2[145]*tmpFx[19] + tmpQ2[146]*tmpFx[29] + tmpQ2[147]*tmpFx[39] + tmpQ2[148]*tmpFx[49] + tmpQ2[149]*tmpFx[59] + tmpQ2[150]*tmpFx[69] + tmpQ2[151]*tmpFx[79] + tmpQ2[152]*tmpFx[89] + tmpQ2[153]*tmpFx[99] + tmpQ2[154]*tmpFx[109] + tmpQ2[155]*tmpFx[119] + tmpQ2[156]*tmpFx[129] + tmpQ2[157]*tmpFx[139] + tmpQ2[158]*tmpFx[149] + tmpQ2[159]*tmpFx[159];\n}\n\nvoid acado_setObjR1R2( real_t* const tmpObjS, real_t* const tmpR1, real_t* const tmpR2 )\n{\ntmpR2[0] = +tmpObjS[192];\ntmpR2[1] = +tmpObjS[193];\ntmpR2[2] = +tmpObjS[194];\ntmpR2[3] = +tmpObjS[195];\ntmpR2[4] = +tmpObjS[196];\ntmpR2[5] = +tmpObjS[197];\ntmpR2[6] = +tmpObjS[198];\ntmpR2[7] = +tmpObjS[199];\ntmpR2[8] = +tmpObjS[200];\ntmpR2[9] = +tmpObjS[201];\ntmpR2[10] = +tmpObjS[202];\ntmpR2[11] = +tmpObjS[203];\ntmpR2[12] = +tmpObjS[204];\ntmpR2[13] = +tmpObjS[205];\ntmpR2[14] = +tmpObjS[206];\ntmpR2[15] = +tmpObjS[207];\ntmpR2[16] = +tmpObjS[208];\ntmpR2[17] = +tmpObjS[209];\ntmpR2[18] = +tmpObjS[210];\ntmpR2[19] = +tmpObjS[211];\ntmpR2[20] = +tmpObjS[212];\ntmpR2[21] = +tmpObjS[213];\ntmpR2[22] = +tmpObjS[214];\ntmpR2[23] = +tmpObjS[215];\ntmpR2[24] = +tmpObjS[216];\ntmpR2[25] = +tmpObjS[217];\ntmpR2[26] = +tmpObjS[218];\ntmpR2[27] = +tmpObjS[219];\ntmpR2[28] = +tmpObjS[220];\ntmpR2[29] = +tmpObjS[221];\ntmpR2[30] = +tmpObjS[222];\ntmpR2[31] = +tmpObjS[223];\ntmpR2[32] = +tmpObjS[224];\ntmpR2[33] = +tmpObjS[225];\ntmpR2[34] = +tmpObjS[226];\ntmpR2[35] = +tmpObjS[227];\ntmpR2[36] = +tmpObjS[228];\ntmpR2[37] = +tmpObjS[229];\ntmpR2[38] = +tmpObjS[230];\ntmpR2[39] = +tmpObjS[231];\ntmpR2[40] = +tmpObjS[232];\ntmpR2[41] = +tmpObjS[233];\ntmpR2[42] = +tmpObjS[234];\ntmpR2[43] = +tmpObjS[235];\ntmpR2[44] = +tmpObjS[236];\ntmpR2[45] = +tmpObjS[237];\ntmpR2[46] = +tmpObjS[238];\ntmpR2[47] = +tmpObjS[239];\ntmpR2[48] = +tmpObjS[240];\ntmpR2[49] = +tmpObjS[241];\ntmpR2[50] = +tmpObjS[242];\ntmpR2[51] = +tmpObjS[243];\ntmpR2[52] = +tmpObjS[244];\ntmpR2[53] = +tmpObjS[245];\ntmpR2[54] = +tmpObjS[246];\ntmpR2[55] = +tmpObjS[247];\ntmpR2[56] = +tmpObjS[248];\ntmpR2[57] = +tmpObjS[249];\ntmpR2[58] = +tmpObjS[250];\ntmpR2[59] = +tmpObjS[251];\ntmpR2[60] = +tmpObjS[252];\ntmpR2[61] = +tmpObjS[253];\ntmpR2[62] = +tmpObjS[254];\ntmpR2[63] = +tmpObjS[255];\ntmpR1[0] = + tmpR2[12];\ntmpR1[1] = + tmpR2[13];\ntmpR1[2] = + tmpR2[14];\ntmpR1[3] = + tmpR2[15];\ntmpR1[4] = + tmpR2[28];\ntmpR1[5] = + tmpR2[29];\ntmpR1[6] = + tmpR2[30];\ntmpR1[7] = + tmpR2[31];\ntmpR1[8] = + tmpR2[44];\ntmpR1[9] = + tmpR2[45];\ntmpR1[10] = + tmpR2[46];\ntmpR1[11] = + tmpR2[47];\ntmpR1[12] = + tmpR2[60];\ntmpR1[13] = + tmpR2[61];\ntmpR1[14] = + tmpR2[62];\ntmpR1[15] = + tmpR2[63];\n}\n\nvoid acado_setObjQN1QN2( real_t* const tmpFx, real_t* const tmpObjSEndTerm, real_t* const tmpQN1, real_t* const tmpQN2 )\n{\ntmpQN2[0] = + tmpFx[0]*tmpObjSEndTerm[0] + tmpFx[10]*tmpObjSEndTerm[12] + tmpFx[20]*tmpObjSEndTerm[24] + tmpFx[30]*tmpObjSEndTerm[36] + tmpFx[40]*tmpObjSEndTerm[48] + tmpFx[50]*tmpObjSEndTerm[60] + tmpFx[60]*tmpObjSEndTerm[72] + tmpFx[70]*tmpObjSEndTerm[84] + tmpFx[80]*tmpObjSEndTerm[96] + tmpFx[90]*tmpObjSEndTerm[108] + tmpFx[100]*tmpObjSEndTerm[120] + tmpFx[110]*tmpObjSEndTerm[132];\ntmpQN2[1] = + tmpFx[0]*tmpObjSEndTerm[1] + tmpFx[10]*tmpObjSEndTerm[13] + tmpFx[20]*tmpObjSEndTerm[25] + tmpFx[30]*tmpObjSEndTerm[37] + tmpFx[40]*tmpObjSEndTerm[49] + tmpFx[50]*tmpObjSEndTerm[61] + tmpFx[60]*tmpObjSEndTerm[73] + tmpFx[70]*tmpObjSEndTerm[85] + tmpFx[80]*tmpObjSEndTerm[97] + tmpFx[90]*tmpObjSEndTerm[109] + tmpFx[100]*tmpObjSEndTerm[121] + tmpFx[110]*tmpObjSEndTerm[133];\ntmpQN2[2] = + tmpFx[0]*tmpObjSEndTerm[2] + tmpFx[10]*tmpObjSEndTerm[14] + tmpFx[20]*tmpObjSEndTerm[26] + tmpFx[30]*tmpObjSEndTerm[38] + tmpFx[40]*tmpObjSEndTerm[50] + tmpFx[50]*tmpObjSEndTerm[62] + tmpFx[60]*tmpObjSEndTerm[74] + tmpFx[70]*tmpObjSEndTerm[86] + tmpFx[80]*tmpObjSEndTerm[98] + tmpFx[90]*tmpObjSEndTerm[110] + tmpFx[100]*tmpObjSEndTerm[122] + tmpFx[110]*tmpObjSEndTerm[134];\ntmpQN2[3] = + tmpFx[0]*tmpObjSEndTerm[3] + tmpFx[10]*tmpObjSEndTerm[15] + tmpFx[20]*tmpObjSEndTerm[27] + tmpFx[30]*tmpObjSEndTerm[39] + tmpFx[40]*tmpObjSEndTerm[51] + tmpFx[50]*tmpObjSEndTerm[63] + tmpFx[60]*tmpObjSEndTerm[75] + tmpFx[70]*tmpObjSEndTerm[87] + tmpFx[80]*tmpObjSEndTerm[99] + tmpFx[90]*tmpObjSEndTerm[111] + tmpFx[100]*tmpObjSEndTerm[123] + tmpFx[110]*tmpObjSEndTerm[135];\ntmpQN2[4] = + tmpFx[0]*tmpObjSEndTerm[4] + tmpFx[10]*tmpObjSEndTerm[16] + tmpFx[20]*tmpObjSEndTerm[28] + tmpFx[30]*tmpObjSEndTerm[40] + tmpFx[40]*tmpObjSEndTerm[52] + tmpFx[50]*tmpObjSEndTerm[64] + tmpFx[60]*tmpObjSEndTerm[76] + tmpFx[70]*tmpObjSEndTerm[88] + tmpFx[80]*tmpObjSEndTerm[100] + tmpFx[90]*tmpObjSEndTerm[112] + tmpFx[100]*tmpObjSEndTerm[124] + tmpFx[110]*tmpObjSEndTerm[136];\ntmpQN2[5] = + tmpFx[0]*tmpObjSEndTerm[5] + tmpFx[10]*tmpObjSEndTerm[17] + tmpFx[20]*tmpObjSEndTerm[29] + tmpFx[30]*tmpObjSEndTerm[41] + tmpFx[40]*tmpObjSEndTerm[53] + tmpFx[50]*tmpObjSEndTerm[65] + tmpFx[60]*tmpObjSEndTerm[77] + tmpFx[70]*tmpObjSEndTerm[89] + tmpFx[80]*tmpObjSEndTerm[101] + tmpFx[90]*tmpObjSEndTerm[113] + tmpFx[100]*tmpObjSEndTerm[125] + tmpFx[110]*tmpObjSEndTerm[137];\ntmpQN2[6] = + tmpFx[0]*tmpObjSEndTerm[6] + tmpFx[10]*tmpObjSEndTerm[18] + tmpFx[20]*tmpObjSEndTerm[30] + tmpFx[30]*tmpObjSEndTerm[42] + tmpFx[40]*tmpObjSEndTerm[54] + tmpFx[50]*tmpObjSEndTerm[66] + tmpFx[60]*tmpObjSEndTerm[78] + tmpFx[70]*tmpObjSEndTerm[90] + tmpFx[80]*tmpObjSEndTerm[102] + tmpFx[90]*tmpObjSEndTerm[114] + tmpFx[100]*tmpObjSEndTerm[126] + tmpFx[110]*tmpObjSEndTerm[138];\ntmpQN2[7] = + tmpFx[0]*tmpObjSEndTerm[7] + tmpFx[10]*tmpObjSEndTerm[19] + tmpFx[20]*tmpObjSEndTerm[31] + tmpFx[30]*tmpObjSEndTerm[43] + tmpFx[40]*tmpObjSEndTerm[55] + tmpFx[50]*tmpObjSEndTerm[67] + tmpFx[60]*tmpObjSEndTerm[79] + tmpFx[70]*tmpObjSEndTerm[91] + tmpFx[80]*tmpObjSEndTerm[103] + tmpFx[90]*tmpObjSEndTerm[115] + tmpFx[100]*tmpObjSEndTerm[127] + tmpFx[110]*tmpObjSEndTerm[139];\ntmpQN2[8] = + tmpFx[0]*tmpObjSEndTerm[8] + tmpFx[10]*tmpObjSEndTerm[20] + tmpFx[20]*tmpObjSEndTerm[32] + tmpFx[30]*tmpObjSEndTerm[44] + tmpFx[40]*tmpObjSEndTerm[56] + tmpFx[50]*tmpObjSEndTerm[68] + tmpFx[60]*tmpObjSEndTerm[80] + tmpFx[70]*tmpObjSEndTerm[92] + tmpFx[80]*tmpObjSEndTerm[104] + tmpFx[90]*tmpObjSEndTerm[116] + tmpFx[100]*tmpObjSEndTerm[128] + tmpFx[110]*tmpObjSEndTerm[140];\ntmpQN2[9] = + tmpFx[0]*tmpObjSEndTerm[9] + tmpFx[10]*tmpObjSEndTerm[21] + tmpFx[20]*tmpObjSEndTerm[33] + tmpFx[30]*tmpObjSEndTerm[45] + tmpFx[40]*tmpObjSEndTerm[57] + tmpFx[50]*tmpObjSEndTerm[69] + tmpFx[60]*tmpObjSEndTerm[81] + tmpFx[70]*tmpObjSEndTerm[93] + tmpFx[80]*tmpObjSEndTerm[105] + tmpFx[90]*tmpObjSEndTerm[117] + tmpFx[100]*tmpObjSEndTerm[129] + tmpFx[110]*tmpObjSEndTerm[141];\ntmpQN2[10] = + tmpFx[0]*tmpObjSEndTerm[10] + tmpFx[10]*tmpObjSEndTerm[22] + tmpFx[20]*tmpObjSEndTerm[34] + tmpFx[30]*tmpObjSEndTerm[46] + tmpFx[40]*tmpObjSEndTerm[58] + tmpFx[50]*tmpObjSEndTerm[70] + tmpFx[60]*tmpObjSEndTerm[82] + tmpFx[70]*tmpObjSEndTerm[94] + tmpFx[80]*tmpObjSEndTerm[106] + tmpFx[90]*tmpObjSEndTerm[118] + tmpFx[100]*tmpObjSEndTerm[130] + tmpFx[110]*tmpObjSEndTerm[142];\ntmpQN2[11] = + tmpFx[0]*tmpObjSEndTerm[11] + tmpFx[10]*tmpObjSEndTerm[23] + tmpFx[20]*tmpObjSEndTerm[35] + tmpFx[30]*tmpObjSEndTerm[47] + tmpFx[40]*tmpObjSEndTerm[59] + tmpFx[50]*tmpObjSEndTerm[71] + tmpFx[60]*tmpObjSEndTerm[83] + tmpFx[70]*tmpObjSEndTerm[95] + tmpFx[80]*tmpObjSEndTerm[107] + tmpFx[90]*tmpObjSEndTerm[119] + tmpFx[100]*tmpObjSEndTerm[131] + tmpFx[110]*tmpObjSEndTerm[143];\ntmpQN2[12] = + tmpFx[1]*tmpObjSEndTerm[0] + tmpFx[11]*tmpObjSEndTerm[12] + tmpFx[21]*tmpObjSEndTerm[24] + tmpFx[31]*tmpObjSEndTerm[36] + tmpFx[41]*tmpObjSEndTerm[48] + tmpFx[51]*tmpObjSEndTerm[60] + tmpFx[61]*tmpObjSEndTerm[72] + tmpFx[71]*tmpObjSEndTerm[84] + tmpFx[81]*tmpObjSEndTerm[96] + tmpFx[91]*tmpObjSEndTerm[108] + tmpFx[101]*tmpObjSEndTerm[120] + tmpFx[111]*tmpObjSEndTerm[132];\ntmpQN2[13] = + tmpFx[1]*tmpObjSEndTerm[1] + tmpFx[11]*tmpObjSEndTerm[13] + tmpFx[21]*tmpObjSEndTerm[25] + tmpFx[31]*tmpObjSEndTerm[37] + tmpFx[41]*tmpObjSEndTerm[49] + tmpFx[51]*tmpObjSEndTerm[61] + tmpFx[61]*tmpObjSEndTerm[73] + tmpFx[71]*tmpObjSEndTerm[85] + tmpFx[81]*tmpObjSEndTerm[97] + tmpFx[91]*tmpObjSEndTerm[109] + tmpFx[101]*tmpObjSEndTerm[121] + tmpFx[111]*tmpObjSEndTerm[133];\ntmpQN2[14] = + tmpFx[1]*tmpObjSEndTerm[2] + tmpFx[11]*tmpObjSEndTerm[14] + tmpFx[21]*tmpObjSEndTerm[26] + tmpFx[31]*tmpObjSEndTerm[38] + tmpFx[41]*tmpObjSEndTerm[50] + tmpFx[51]*tmpObjSEndTerm[62] + tmpFx[61]*tmpObjSEndTerm[74] + tmpFx[71]*tmpObjSEndTerm[86] + tmpFx[81]*tmpObjSEndTerm[98] + tmpFx[91]*tmpObjSEndTerm[110] + tmpFx[101]*tmpObjSEndTerm[122] + tmpFx[111]*tmpObjSEndTerm[134];\ntmpQN2[15] = + tmpFx[1]*tmpObjSEndTerm[3] + tmpFx[11]*tmpObjSEndTerm[15] + tmpFx[21]*tmpObjSEndTerm[27] + tmpFx[31]*tmpObjSEndTerm[39] + tmpFx[41]*tmpObjSEndTerm[51] + tmpFx[51]*tmpObjSEndTerm[63] + tmpFx[61]*tmpObjSEndTerm[75] + tmpFx[71]*tmpObjSEndTerm[87] + tmpFx[81]*tmpObjSEndTerm[99] + tmpFx[91]*tmpObjSEndTerm[111] + tmpFx[101]*tmpObjSEndTerm[123] + tmpFx[111]*tmpObjSEndTerm[135];\ntmpQN2[16] = + tmpFx[1]*tmpObjSEndTerm[4] + tmpFx[11]*tmpObjSEndTerm[16] + tmpFx[21]*tmpObjSEndTerm[28] + tmpFx[31]*tmpObjSEndTerm[40] + tmpFx[41]*tmpObjSEndTerm[52] + tmpFx[51]*tmpObjSEndTerm[64] + tmpFx[61]*tmpObjSEndTerm[76] + tmpFx[71]*tmpObjSEndTerm[88] + tmpFx[81]*tmpObjSEndTerm[100] + tmpFx[91]*tmpObjSEndTerm[112] + tmpFx[101]*tmpObjSEndTerm[124] + tmpFx[111]*tmpObjSEndTerm[136];\ntmpQN2[17] = + tmpFx[1]*tmpObjSEndTerm[5] + tmpFx[11]*tmpObjSEndTerm[17] + tmpFx[21]*tmpObjSEndTerm[29] + tmpFx[31]*tmpObjSEndTerm[41] + tmpFx[41]*tmpObjSEndTerm[53] + tmpFx[51]*tmpObjSEndTerm[65] + tmpFx[61]*tmpObjSEndTerm[77] + tmpFx[71]*tmpObjSEndTerm[89] + tmpFx[81]*tmpObjSEndTerm[101] + tmpFx[91]*tmpObjSEndTerm[113] + tmpFx[101]*tmpObjSEndTerm[125] + tmpFx[111]*tmpObjSEndTerm[137];\ntmpQN2[18] = + tmpFx[1]*tmpObjSEndTerm[6] + tmpFx[11]*tmpObjSEndTerm[18] + tmpFx[21]*tmpObjSEndTerm[30] + tmpFx[31]*tmpObjSEndTerm[42] + tmpFx[41]*tmpObjSEndTerm[54] + tmpFx[51]*tmpObjSEndTerm[66] + tmpFx[61]*tmpObjSEndTerm[78] + tmpFx[71]*tmpObjSEndTerm[90] + tmpFx[81]*tmpObjSEndTerm[102] + tmpFx[91]*tmpObjSEndTerm[114] + tmpFx[101]*tmpObjSEndTerm[126] + tmpFx[111]*tmpObjSEndTerm[138];\ntmpQN2[19] = + tmpFx[1]*tmpObjSEndTerm[7] + tmpFx[11]*tmpObjSEndTerm[19] + tmpFx[21]*tmpObjSEndTerm[31] + tmpFx[31]*tmpObjSEndTerm[43] + tmpFx[41]*tmpObjSEndTerm[55] + tmpFx[51]*tmpObjSEndTerm[67] + tmpFx[61]*tmpObjSEndTerm[79] + tmpFx[71]*tmpObjSEndTerm[91] + tmpFx[81]*tmpObjSEndTerm[103] + tmpFx[91]*tmpObjSEndTerm[115] + tmpFx[101]*tmpObjSEndTerm[127] + tmpFx[111]*tmpObjSEndTerm[139];\ntmpQN2[20] = + tmpFx[1]*tmpObjSEndTerm[8] + tmpFx[11]*tmpObjSEndTerm[20] + tmpFx[21]*tmpObjSEndTerm[32] + tmpFx[31]*tmpObjSEndTerm[44] + tmpFx[41]*tmpObjSEndTerm[56] + tmpFx[51]*tmpObjSEndTerm[68] + tmpFx[61]*tmpObjSEndTerm[80] + tmpFx[71]*tmpObjSEndTerm[92] + tmpFx[81]*tmpObjSEndTerm[104] + tmpFx[91]*tmpObjSEndTerm[116] + tmpFx[101]*tmpObjSEndTerm[128] + tmpFx[111]*tmpObjSEndTerm[140];\ntmpQN2[21] = + tmpFx[1]*tmpObjSEndTerm[9] + tmpFx[11]*tmpObjSEndTerm[21] + tmpFx[21]*tmpObjSEndTerm[33] + tmpFx[31]*tmpObjSEndTerm[45] + tmpFx[41]*tmpObjSEndTerm[57] + tmpFx[51]*tmpObjSEndTerm[69] + tmpFx[61]*tmpObjSEndTerm[81] + tmpFx[71]*tmpObjSEndTerm[93] + tmpFx[81]*tmpObjSEndTerm[105] + tmpFx[91]*tmpObjSEndTerm[117] + tmpFx[101]*tmpObjSEndTerm[129] + tmpFx[111]*tmpObjSEndTerm[141];\ntmpQN2[22] = + tmpFx[1]*tmpObjSEndTerm[10] + tmpFx[11]*tmpObjSEndTerm[22] + tmpFx[21]*tmpObjSEndTerm[34] + tmpFx[31]*tmpObjSEndTerm[46] + tmpFx[41]*tmpObjSEndTerm[58] + tmpFx[51]*tmpObjSEndTerm[70] + tmpFx[61]*tmpObjSEndTerm[82] + tmpFx[71]*tmpObjSEndTerm[94] + tmpFx[81]*tmpObjSEndTerm[106] + tmpFx[91]*tmpObjSEndTerm[118] + tmpFx[101]*tmpObjSEndTerm[130] + tmpFx[111]*tmpObjSEndTerm[142];\ntmpQN2[23] = + tmpFx[1]*tmpObjSEndTerm[11] + tmpFx[11]*tmpObjSEndTerm[23] + tmpFx[21]*tmpObjSEndTerm[35] + tmpFx[31]*tmpObjSEndTerm[47] + tmpFx[41]*tmpObjSEndTerm[59] + tmpFx[51]*tmpObjSEndTerm[71] + tmpFx[61]*tmpObjSEndTerm[83] + tmpFx[71]*tmpObjSEndTerm[95] + tmpFx[81]*tmpObjSEndTerm[107] + tmpFx[91]*tmpObjSEndTerm[119] + tmpFx[101]*tmpObjSEndTerm[131] + tmpFx[111]*tmpObjSEndTerm[143];\ntmpQN2[24] = + tmpFx[2]*tmpObjSEndTerm[0] + tmpFx[12]*tmpObjSEndTerm[12] + tmpFx[22]*tmpObjSEndTerm[24] + tmpFx[32]*tmpObjSEndTerm[36] + tmpFx[42]*tmpObjSEndTerm[48] + tmpFx[52]*tmpObjSEndTerm[60] + tmpFx[62]*tmpObjSEndTerm[72] + tmpFx[72]*tmpObjSEndTerm[84] + tmpFx[82]*tmpObjSEndTerm[96] + tmpFx[92]*tmpObjSEndTerm[108] + tmpFx[102]*tmpObjSEndTerm[120] + tmpFx[112]*tmpObjSEndTerm[132];\ntmpQN2[25] = + tmpFx[2]*tmpObjSEndTerm[1] + tmpFx[12]*tmpObjSEndTerm[13] + tmpFx[22]*tmpObjSEndTerm[25] + tmpFx[32]*tmpObjSEndTerm[37] + tmpFx[42]*tmpObjSEndTerm[49] + tmpFx[52]*tmpObjSEndTerm[61] + tmpFx[62]*tmpObjSEndTerm[73] + tmpFx[72]*tmpObjSEndTerm[85] + tmpFx[82]*tmpObjSEndTerm[97] + tmpFx[92]*tmpObjSEndTerm[109] + tmpFx[102]*tmpObjSEndTerm[121] + tmpFx[112]*tmpObjSEndTerm[133];\ntmpQN2[26] = + tmpFx[2]*tmpObjSEndTerm[2] + tmpFx[12]*tmpObjSEndTerm[14] + tmpFx[22]*tmpObjSEndTerm[26] + tmpFx[32]*tmpObjSEndTerm[38] + tmpFx[42]*tmpObjSEndTerm[50] + tmpFx[52]*tmpObjSEndTerm[62] + tmpFx[62]*tmpObjSEndTerm[74] + tmpFx[72]*tmpObjSEndTerm[86] + tmpFx[82]*tmpObjSEndTerm[98] + tmpFx[92]*tmpObjSEndTerm[110] + tmpFx[102]*tmpObjSEndTerm[122] + tmpFx[112]*tmpObjSEndTerm[134];\ntmpQN2[27] = + tmpFx[2]*tmpObjSEndTerm[3] + tmpFx[12]*tmpObjSEndTerm[15] + tmpFx[22]*tmpObjSEndTerm[27] + tmpFx[32]*tmpObjSEndTerm[39] + tmpFx[42]*tmpObjSEndTerm[51] + tmpFx[52]*tmpObjSEndTerm[63] + tmpFx[62]*tmpObjSEndTerm[75] + tmpFx[72]*tmpObjSEndTerm[87] + tmpFx[82]*tmpObjSEndTerm[99] + tmpFx[92]*tmpObjSEndTerm[111] + tmpFx[102]*tmpObjSEndTerm[123] + tmpFx[112]*tmpObjSEndTerm[135];\ntmpQN2[28] = + tmpFx[2]*tmpObjSEndTerm[4] + tmpFx[12]*tmpObjSEndTerm[16] + tmpFx[22]*tmpObjSEndTerm[28] + tmpFx[32]*tmpObjSEndTerm[40] + tmpFx[42]*tmpObjSEndTerm[52] + tmpFx[52]*tmpObjSEndTerm[64] + tmpFx[62]*tmpObjSEndTerm[76] + tmpFx[72]*tmpObjSEndTerm[88] + tmpFx[82]*tmpObjSEndTerm[100] + tmpFx[92]*tmpObjSEndTerm[112] + tmpFx[102]*tmpObjSEndTerm[124] + tmpFx[112]*tmpObjSEndTerm[136];\ntmpQN2[29] = + tmpFx[2]*tmpObjSEndTerm[5] + tmpFx[12]*tmpObjSEndTerm[17] + tmpFx[22]*tmpObjSEndTerm[29] + tmpFx[32]*tmpObjSEndTerm[41] + tmpFx[42]*tmpObjSEndTerm[53] + tmpFx[52]*tmpObjSEndTerm[65] + tmpFx[62]*tmpObjSEndTerm[77] + tmpFx[72]*tmpObjSEndTerm[89] + tmpFx[82]*tmpObjSEndTerm[101] + tmpFx[92]*tmpObjSEndTerm[113] + tmpFx[102]*tmpObjSEndTerm[125] + tmpFx[112]*tmpObjSEndTerm[137];\ntmpQN2[30] = + tmpFx[2]*tmpObjSEndTerm[6] + tmpFx[12]*tmpObjSEndTerm[18] + tmpFx[22]*tmpObjSEndTerm[30] + tmpFx[32]*tmpObjSEndTerm[42] + tmpFx[42]*tmpObjSEndTerm[54] + tmpFx[52]*tmpObjSEndTerm[66] + tmpFx[62]*tmpObjSEndTerm[78] + tmpFx[72]*tmpObjSEndTerm[90] + tmpFx[82]*tmpObjSEndTerm[102] + tmpFx[92]*tmpObjSEndTerm[114] + tmpFx[102]*tmpObjSEndTerm[126] + tmpFx[112]*tmpObjSEndTerm[138];\ntmpQN2[31] = + tmpFx[2]*tmpObjSEndTerm[7] + tmpFx[12]*tmpObjSEndTerm[19] + tmpFx[22]*tmpObjSEndTerm[31] + tmpFx[32]*tmpObjSEndTerm[43] + tmpFx[42]*tmpObjSEndTerm[55] + tmpFx[52]*tmpObjSEndTerm[67] + tmpFx[62]*tmpObjSEndTerm[79] + tmpFx[72]*tmpObjSEndTerm[91] + tmpFx[82]*tmpObjSEndTerm[103] + tmpFx[92]*tmpObjSEndTerm[115] + tmpFx[102]*tmpObjSEndTerm[127] + tmpFx[112]*tmpObjSEndTerm[139];\ntmpQN2[32] = + tmpFx[2]*tmpObjSEndTerm[8] + tmpFx[12]*tmpObjSEndTerm[20] + tmpFx[22]*tmpObjSEndTerm[32] + tmpFx[32]*tmpObjSEndTerm[44] + tmpFx[42]*tmpObjSEndTerm[56] + tmpFx[52]*tmpObjSEndTerm[68] + tmpFx[62]*tmpObjSEndTerm[80] + tmpFx[72]*tmpObjSEndTerm[92] + tmpFx[82]*tmpObjSEndTerm[104] + tmpFx[92]*tmpObjSEndTerm[116] + tmpFx[102]*tmpObjSEndTerm[128] + tmpFx[112]*tmpObjSEndTerm[140];\ntmpQN2[33] = + tmpFx[2]*tmpObjSEndTerm[9] + tmpFx[12]*tmpObjSEndTerm[21] + tmpFx[22]*tmpObjSEndTerm[33] + tmpFx[32]*tmpObjSEndTerm[45] + tmpFx[42]*tmpObjSEndTerm[57] + tmpFx[52]*tmpObjSEndTerm[69] + tmpFx[62]*tmpObjSEndTerm[81] + tmpFx[72]*tmpObjSEndTerm[93] + tmpFx[82]*tmpObjSEndTerm[105] + tmpFx[92]*tmpObjSEndTerm[117] + tmpFx[102]*tmpObjSEndTerm[129] + tmpFx[112]*tmpObjSEndTerm[141];\ntmpQN2[34] = + tmpFx[2]*tmpObjSEndTerm[10] + tmpFx[12]*tmpObjSEndTerm[22] + tmpFx[22]*tmpObjSEndTerm[34] + tmpFx[32]*tmpObjSEndTerm[46] + tmpFx[42]*tmpObjSEndTerm[58] + tmpFx[52]*tmpObjSEndTerm[70] + tmpFx[62]*tmpObjSEndTerm[82] + tmpFx[72]*tmpObjSEndTerm[94] + tmpFx[82]*tmpObjSEndTerm[106] + tmpFx[92]*tmpObjSEndTerm[118] + tmpFx[102]*tmpObjSEndTerm[130] + tmpFx[112]*tmpObjSEndTerm[142];\ntmpQN2[35] = + tmpFx[2]*tmpObjSEndTerm[11] + tmpFx[12]*tmpObjSEndTerm[23] + tmpFx[22]*tmpObjSEndTerm[35] + tmpFx[32]*tmpObjSEndTerm[47] + tmpFx[42]*tmpObjSEndTerm[59] + tmpFx[52]*tmpObjSEndTerm[71] + tmpFx[62]*tmpObjSEndTerm[83] + tmpFx[72]*tmpObjSEndTerm[95] + tmpFx[82]*tmpObjSEndTerm[107] + tmpFx[92]*tmpObjSEndTerm[119] + tmpFx[102]*tmpObjSEndTerm[131] + tmpFx[112]*tmpObjSEndTerm[143];\ntmpQN2[36] = + tmpFx[3]*tmpObjSEndTerm[0] + tmpFx[13]*tmpObjSEndTerm[12] + tmpFx[23]*tmpObjSEndTerm[24] + tmpFx[33]*tmpObjSEndTerm[36] + tmpFx[43]*tmpObjSEndTerm[48] + tmpFx[53]*tmpObjSEndTerm[60] + tmpFx[63]*tmpObjSEndTerm[72] + tmpFx[73]*tmpObjSEndTerm[84] + tmpFx[83]*tmpObjSEndTerm[96] + tmpFx[93]*tmpObjSEndTerm[108] + tmpFx[103]*tmpObjSEndTerm[120] + tmpFx[113]*tmpObjSEndTerm[132];\ntmpQN2[37] = + tmpFx[3]*tmpObjSEndTerm[1] + tmpFx[13]*tmpObjSEndTerm[13] + tmpFx[23]*tmpObjSEndTerm[25] + tmpFx[33]*tmpObjSEndTerm[37] + tmpFx[43]*tmpObjSEndTerm[49] + tmpFx[53]*tmpObjSEndTerm[61] + tmpFx[63]*tmpObjSEndTerm[73] + tmpFx[73]*tmpObjSEndTerm[85] + tmpFx[83]*tmpObjSEndTerm[97] + tmpFx[93]*tmpObjSEndTerm[109] + tmpFx[103]*tmpObjSEndTerm[121] + tmpFx[113]*tmpObjSEndTerm[133];\ntmpQN2[38] = + tmpFx[3]*tmpObjSEndTerm[2] + tmpFx[13]*tmpObjSEndTerm[14] + tmpFx[23]*tmpObjSEndTerm[26] + tmpFx[33]*tmpObjSEndTerm[38] + tmpFx[43]*tmpObjSEndTerm[50] + tmpFx[53]*tmpObjSEndTerm[62] + tmpFx[63]*tmpObjSEndTerm[74] + tmpFx[73]*tmpObjSEndTerm[86] + tmpFx[83]*tmpObjSEndTerm[98] + tmpFx[93]*tmpObjSEndTerm[110] + tmpFx[103]*tmpObjSEndTerm[122] + tmpFx[113]*tmpObjSEndTerm[134];\ntmpQN2[39] = + tmpFx[3]*tmpObjSEndTerm[3] + tmpFx[13]*tmpObjSEndTerm[15] + tmpFx[23]*tmpObjSEndTerm[27] + tmpFx[33]*tmpObjSEndTerm[39] + tmpFx[43]*tmpObjSEndTerm[51] + tmpFx[53]*tmpObjSEndTerm[63] + tmpFx[63]*tmpObjSEndTerm[75] + tmpFx[73]*tmpObjSEndTerm[87] + tmpFx[83]*tmpObjSEndTerm[99] + tmpFx[93]*tmpObjSEndTerm[111] + tmpFx[103]*tmpObjSEndTerm[123] + tmpFx[113]*tmpObjSEndTerm[135];\ntmpQN2[40] = + tmpFx[3]*tmpObjSEndTerm[4] + tmpFx[13]*tmpObjSEndTerm[16] + tmpFx[23]*tmpObjSEndTerm[28] + tmpFx[33]*tmpObjSEndTerm[40] + tmpFx[43]*tmpObjSEndTerm[52] + tmpFx[53]*tmpObjSEndTerm[64] + tmpFx[63]*tmpObjSEndTerm[76] + tmpFx[73]*tmpObjSEndTerm[88] + tmpFx[83]*tmpObjSEndTerm[100] + tmpFx[93]*tmpObjSEndTerm[112] + tmpFx[103]*tmpObjSEndTerm[124] + tmpFx[113]*tmpObjSEndTerm[136];\ntmpQN2[41] = + tmpFx[3]*tmpObjSEndTerm[5] + tmpFx[13]*tmpObjSEndTerm[17] + tmpFx[23]*tmpObjSEndTerm[29] + tmpFx[33]*tmpObjSEndTerm[41] + tmpFx[43]*tmpObjSEndTerm[53] + tmpFx[53]*tmpObjSEndTerm[65] + tmpFx[63]*tmpObjSEndTerm[77] + tmpFx[73]*tmpObjSEndTerm[89] + tmpFx[83]*tmpObjSEndTerm[101] + tmpFx[93]*tmpObjSEndTerm[113] + tmpFx[103]*tmpObjSEndTerm[125] + tmpFx[113]*tmpObjSEndTerm[137];\ntmpQN2[42] = + tmpFx[3]*tmpObjSEndTerm[6] + tmpFx[13]*tmpObjSEndTerm[18] + tmpFx[23]*tmpObjSEndTerm[30] + tmpFx[33]*tmpObjSEndTerm[42] + tmpFx[43]*tmpObjSEndTerm[54] + tmpFx[53]*tmpObjSEndTerm[66] + tmpFx[63]*tmpObjSEndTerm[78] + tmpFx[73]*tmpObjSEndTerm[90] + tmpFx[83]*tmpObjSEndTerm[102] + tmpFx[93]*tmpObjSEndTerm[114] + tmpFx[103]*tmpObjSEndTerm[126] + tmpFx[113]*tmpObjSEndTerm[138];\ntmpQN2[43] = + tmpFx[3]*tmpObjSEndTerm[7] + tmpFx[13]*tmpObjSEndTerm[19] + tmpFx[23]*tmpObjSEndTerm[31] + tmpFx[33]*tmpObjSEndTerm[43] + tmpFx[43]*tmpObjSEndTerm[55] + tmpFx[53]*tmpObjSEndTerm[67] + tmpFx[63]*tmpObjSEndTerm[79] + tmpFx[73]*tmpObjSEndTerm[91] + tmpFx[83]*tmpObjSEndTerm[103] + tmpFx[93]*tmpObjSEndTerm[115] + tmpFx[103]*tmpObjSEndTerm[127] + tmpFx[113]*tmpObjSEndTerm[139];\ntmpQN2[44] = + tmpFx[3]*tmpObjSEndTerm[8] + tmpFx[13]*tmpObjSEndTerm[20] + tmpFx[23]*tmpObjSEndTerm[32] + tmpFx[33]*tmpObjSEndTerm[44] + tmpFx[43]*tmpObjSEndTerm[56] + tmpFx[53]*tmpObjSEndTerm[68] + tmpFx[63]*tmpObjSEndTerm[80] + tmpFx[73]*tmpObjSEndTerm[92] + tmpFx[83]*tmpObjSEndTerm[104] + tmpFx[93]*tmpObjSEndTerm[116] + tmpFx[103]*tmpObjSEndTerm[128] + tmpFx[113]*tmpObjSEndTerm[140];\ntmpQN2[45] = + tmpFx[3]*tmpObjSEndTerm[9] + tmpFx[13]*tmpObjSEndTerm[21] + tmpFx[23]*tmpObjSEndTerm[33] + tmpFx[33]*tmpObjSEndTerm[45] + tmpFx[43]*tmpObjSEndTerm[57] + tmpFx[53]*tmpObjSEndTerm[69] + tmpFx[63]*tmpObjSEndTerm[81] + tmpFx[73]*tmpObjSEndTerm[93] + tmpFx[83]*tmpObjSEndTerm[105] + tmpFx[93]*tmpObjSEndTerm[117] + tmpFx[103]*tmpObjSEndTerm[129] + tmpFx[113]*tmpObjSEndTerm[141];\ntmpQN2[46] = + tmpFx[3]*tmpObjSEndTerm[10] + tmpFx[13]*tmpObjSEndTerm[22] + tmpFx[23]*tmpObjSEndTerm[34] + tmpFx[33]*tmpObjSEndTerm[46] + tmpFx[43]*tmpObjSEndTerm[58] + tmpFx[53]*tmpObjSEndTerm[70] + tmpFx[63]*tmpObjSEndTerm[82] + tmpFx[73]*tmpObjSEndTerm[94] + tmpFx[83]*tmpObjSEndTerm[106] + tmpFx[93]*tmpObjSEndTerm[118] + tmpFx[103]*tmpObjSEndTerm[130] + tmpFx[113]*tmpObjSEndTerm[142];\ntmpQN2[47] = + tmpFx[3]*tmpObjSEndTerm[11] + tmpFx[13]*tmpObjSEndTerm[23] + tmpFx[23]*tmpObjSEndTerm[35] + tmpFx[33]*tmpObjSEndTerm[47] + tmpFx[43]*tmpObjSEndTerm[59] + tmpFx[53]*tmpObjSEndTerm[71] + tmpFx[63]*tmpObjSEndTerm[83] + tmpFx[73]*tmpObjSEndTerm[95] + tmpFx[83]*tmpObjSEndTerm[107] + tmpFx[93]*tmpObjSEndTerm[119] + tmpFx[103]*tmpObjSEndTerm[131] + tmpFx[113]*tmpObjSEndTerm[143];\ntmpQN2[48] = + tmpFx[4]*tmpObjSEndTerm[0] + tmpFx[14]*tmpObjSEndTerm[12] + tmpFx[24]*tmpObjSEndTerm[24] + tmpFx[34]*tmpObjSEndTerm[36] + tmpFx[44]*tmpObjSEndTerm[48] + tmpFx[54]*tmpObjSEndTerm[60] + tmpFx[64]*tmpObjSEndTerm[72] + tmpFx[74]*tmpObjSEndTerm[84] + tmpFx[84]*tmpObjSEndTerm[96] + tmpFx[94]*tmpObjSEndTerm[108] + tmpFx[104]*tmpObjSEndTerm[120] + tmpFx[114]*tmpObjSEndTerm[132];\ntmpQN2[49] = + tmpFx[4]*tmpObjSEndTerm[1] + tmpFx[14]*tmpObjSEndTerm[13] + tmpFx[24]*tmpObjSEndTerm[25] + tmpFx[34]*tmpObjSEndTerm[37] + tmpFx[44]*tmpObjSEndTerm[49] + tmpFx[54]*tmpObjSEndTerm[61] + tmpFx[64]*tmpObjSEndTerm[73] + tmpFx[74]*tmpObjSEndTerm[85] + tmpFx[84]*tmpObjSEndTerm[97] + tmpFx[94]*tmpObjSEndTerm[109] + tmpFx[104]*tmpObjSEndTerm[121] + tmpFx[114]*tmpObjSEndTerm[133];\ntmpQN2[50] = + tmpFx[4]*tmpObjSEndTerm[2] + tmpFx[14]*tmpObjSEndTerm[14] + tmpFx[24]*tmpObjSEndTerm[26] + tmpFx[34]*tmpObjSEndTerm[38] + tmpFx[44]*tmpObjSEndTerm[50] + tmpFx[54]*tmpObjSEndTerm[62] + tmpFx[64]*tmpObjSEndTerm[74] + tmpFx[74]*tmpObjSEndTerm[86] + tmpFx[84]*tmpObjSEndTerm[98] + tmpFx[94]*tmpObjSEndTerm[110] + tmpFx[104]*tmpObjSEndTerm[122] + tmpFx[114]*tmpObjSEndTerm[134];\ntmpQN2[51] = + tmpFx[4]*tmpObjSEndTerm[3] + tmpFx[14]*tmpObjSEndTerm[15] + tmpFx[24]*tmpObjSEndTerm[27] + tmpFx[34]*tmpObjSEndTerm[39] + tmpFx[44]*tmpObjSEndTerm[51] + tmpFx[54]*tmpObjSEndTerm[63] + tmpFx[64]*tmpObjSEndTerm[75] + tmpFx[74]*tmpObjSEndTerm[87] + tmpFx[84]*tmpObjSEndTerm[99] + tmpFx[94]*tmpObjSEndTerm[111] + tmpFx[104]*tmpObjSEndTerm[123] + tmpFx[114]*tmpObjSEndTerm[135];\ntmpQN2[52] = + tmpFx[4]*tmpObjSEndTerm[4] + tmpFx[14]*tmpObjSEndTerm[16] + tmpFx[24]*tmpObjSEndTerm[28] + tmpFx[34]*tmpObjSEndTerm[40] + tmpFx[44]*tmpObjSEndTerm[52] + tmpFx[54]*tmpObjSEndTerm[64] + tmpFx[64]*tmpObjSEndTerm[76] + tmpFx[74]*tmpObjSEndTerm[88] + tmpFx[84]*tmpObjSEndTerm[100] + tmpFx[94]*tmpObjSEndTerm[112] + tmpFx[104]*tmpObjSEndTerm[124] + tmpFx[114]*tmpObjSEndTerm[136];\ntmpQN2[53] = + tmpFx[4]*tmpObjSEndTerm[5] + tmpFx[14]*tmpObjSEndTerm[17] + tmpFx[24]*tmpObjSEndTerm[29] + tmpFx[34]*tmpObjSEndTerm[41] + tmpFx[44]*tmpObjSEndTerm[53] + tmpFx[54]*tmpObjSEndTerm[65] + tmpFx[64]*tmpObjSEndTerm[77] + tmpFx[74]*tmpObjSEndTerm[89] + tmpFx[84]*tmpObjSEndTerm[101] + tmpFx[94]*tmpObjSEndTerm[113] + tmpFx[104]*tmpObjSEndTerm[125] + tmpFx[114]*tmpObjSEndTerm[137];\ntmpQN2[54] = + tmpFx[4]*tmpObjSEndTerm[6] + tmpFx[14]*tmpObjSEndTerm[18] + tmpFx[24]*tmpObjSEndTerm[30] + tmpFx[34]*tmpObjSEndTerm[42] + tmpFx[44]*tmpObjSEndTerm[54] + tmpFx[54]*tmpObjSEndTerm[66] + tmpFx[64]*tmpObjSEndTerm[78] + tmpFx[74]*tmpObjSEndTerm[90] + tmpFx[84]*tmpObjSEndTerm[102] + tmpFx[94]*tmpObjSEndTerm[114] + tmpFx[104]*tmpObjSEndTerm[126] + tmpFx[114]*tmpObjSEndTerm[138];\ntmpQN2[55] = + tmpFx[4]*tmpObjSEndTerm[7] + tmpFx[14]*tmpObjSEndTerm[19] + tmpFx[24]*tmpObjSEndTerm[31] + tmpFx[34]*tmpObjSEndTerm[43] + tmpFx[44]*tmpObjSEndTerm[55] + tmpFx[54]*tmpObjSEndTerm[67] + tmpFx[64]*tmpObjSEndTerm[79] + tmpFx[74]*tmpObjSEndTerm[91] + tmpFx[84]*tmpObjSEndTerm[103] + tmpFx[94]*tmpObjSEndTerm[115] + tmpFx[104]*tmpObjSEndTerm[127] + tmpFx[114]*tmpObjSEndTerm[139];\ntmpQN2[56] = + tmpFx[4]*tmpObjSEndTerm[8] + tmpFx[14]*tmpObjSEndTerm[20] + tmpFx[24]*tmpObjSEndTerm[32] + tmpFx[34]*tmpObjSEndTerm[44] + tmpFx[44]*tmpObjSEndTerm[56] + tmpFx[54]*tmpObjSEndTerm[68] + tmpFx[64]*tmpObjSEndTerm[80] + tmpFx[74]*tmpObjSEndTerm[92] + tmpFx[84]*tmpObjSEndTerm[104] + tmpFx[94]*tmpObjSEndTerm[116] + tmpFx[104]*tmpObjSEndTerm[128] + tmpFx[114]*tmpObjSEndTerm[140];\ntmpQN2[57] = + tmpFx[4]*tmpObjSEndTerm[9] + tmpFx[14]*tmpObjSEndTerm[21] + tmpFx[24]*tmpObjSEndTerm[33] + tmpFx[34]*tmpObjSEndTerm[45] + tmpFx[44]*tmpObjSEndTerm[57] + tmpFx[54]*tmpObjSEndTerm[69] + tmpFx[64]*tmpObjSEndTerm[81] + tmpFx[74]*tmpObjSEndTerm[93] + tmpFx[84]*tmpObjSEndTerm[105] + tmpFx[94]*tmpObjSEndTerm[117] + tmpFx[104]*tmpObjSEndTerm[129] + tmpFx[114]*tmpObjSEndTerm[141];\ntmpQN2[58] = + tmpFx[4]*tmpObjSEndTerm[10] + tmpFx[14]*tmpObjSEndTerm[22] + tmpFx[24]*tmpObjSEndTerm[34] + tmpFx[34]*tmpObjSEndTerm[46] + tmpFx[44]*tmpObjSEndTerm[58] + tmpFx[54]*tmpObjSEndTerm[70] + tmpFx[64]*tmpObjSEndTerm[82] + tmpFx[74]*tmpObjSEndTerm[94] + tmpFx[84]*tmpObjSEndTerm[106] + tmpFx[94]*tmpObjSEndTerm[118] + tmpFx[104]*tmpObjSEndTerm[130] + tmpFx[114]*tmpObjSEndTerm[142];\ntmpQN2[59] = + tmpFx[4]*tmpObjSEndTerm[11] + tmpFx[14]*tmpObjSEndTerm[23] + tmpFx[24]*tmpObjSEndTerm[35] + tmpFx[34]*tmpObjSEndTerm[47] + tmpFx[44]*tmpObjSEndTerm[59] + tmpFx[54]*tmpObjSEndTerm[71] + tmpFx[64]*tmpObjSEndTerm[83] + tmpFx[74]*tmpObjSEndTerm[95] + tmpFx[84]*tmpObjSEndTerm[107] + tmpFx[94]*tmpObjSEndTerm[119] + tmpFx[104]*tmpObjSEndTerm[131] + tmpFx[114]*tmpObjSEndTerm[143];\ntmpQN2[60] = + tmpFx[5]*tmpObjSEndTerm[0] + tmpFx[15]*tmpObjSEndTerm[12] + tmpFx[25]*tmpObjSEndTerm[24] + tmpFx[35]*tmpObjSEndTerm[36] + tmpFx[45]*tmpObjSEndTerm[48] + tmpFx[55]*tmpObjSEndTerm[60] + tmpFx[65]*tmpObjSEndTerm[72] + tmpFx[75]*tmpObjSEndTerm[84] + tmpFx[85]*tmpObjSEndTerm[96] + tmpFx[95]*tmpObjSEndTerm[108] + tmpFx[105]*tmpObjSEndTerm[120] + tmpFx[115]*tmpObjSEndTerm[132];\ntmpQN2[61] = + tmpFx[5]*tmpObjSEndTerm[1] + tmpFx[15]*tmpObjSEndTerm[13] + tmpFx[25]*tmpObjSEndTerm[25] + tmpFx[35]*tmpObjSEndTerm[37] + tmpFx[45]*tmpObjSEndTerm[49] + tmpFx[55]*tmpObjSEndTerm[61] + tmpFx[65]*tmpObjSEndTerm[73] + tmpFx[75]*tmpObjSEndTerm[85] + tmpFx[85]*tmpObjSEndTerm[97] + tmpFx[95]*tmpObjSEndTerm[109] + tmpFx[105]*tmpObjSEndTerm[121] + tmpFx[115]*tmpObjSEndTerm[133];\ntmpQN2[62] = + tmpFx[5]*tmpObjSEndTerm[2] + tmpFx[15]*tmpObjSEndTerm[14] + tmpFx[25]*tmpObjSEndTerm[26] + tmpFx[35]*tmpObjSEndTerm[38] + tmpFx[45]*tmpObjSEndTerm[50] + tmpFx[55]*tmpObjSEndTerm[62] + tmpFx[65]*tmpObjSEndTerm[74] + tmpFx[75]*tmpObjSEndTerm[86] + tmpFx[85]*tmpObjSEndTerm[98] + tmpFx[95]*tmpObjSEndTerm[110] + tmpFx[105]*tmpObjSEndTerm[122] + tmpFx[115]*tmpObjSEndTerm[134];\ntmpQN2[63] = + tmpFx[5]*tmpObjSEndTerm[3] + tmpFx[15]*tmpObjSEndTerm[15] + tmpFx[25]*tmpObjSEndTerm[27] + tmpFx[35]*tmpObjSEndTerm[39] + tmpFx[45]*tmpObjSEndTerm[51] + tmpFx[55]*tmpObjSEndTerm[63] + tmpFx[65]*tmpObjSEndTerm[75] + tmpFx[75]*tmpObjSEndTerm[87] + tmpFx[85]*tmpObjSEndTerm[99] + tmpFx[95]*tmpObjSEndTerm[111] + tmpFx[105]*tmpObjSEndTerm[123] + tmpFx[115]*tmpObjSEndTerm[135];\ntmpQN2[64] = + tmpFx[5]*tmpObjSEndTerm[4] + tmpFx[15]*tmpObjSEndTerm[16] + tmpFx[25]*tmpObjSEndTerm[28] + tmpFx[35]*tmpObjSEndTerm[40] + tmpFx[45]*tmpObjSEndTerm[52] + tmpFx[55]*tmpObjSEndTerm[64] + tmpFx[65]*tmpObjSEndTerm[76] + tmpFx[75]*tmpObjSEndTerm[88] + tmpFx[85]*tmpObjSEndTerm[100] + tmpFx[95]*tmpObjSEndTerm[112] + tmpFx[105]*tmpObjSEndTerm[124] + tmpFx[115]*tmpObjSEndTerm[136];\ntmpQN2[65] = + tmpFx[5]*tmpObjSEndTerm[5] + tmpFx[15]*tmpObjSEndTerm[17] + tmpFx[25]*tmpObjSEndTerm[29] + tmpFx[35]*tmpObjSEndTerm[41] + tmpFx[45]*tmpObjSEndTerm[53] + tmpFx[55]*tmpObjSEndTerm[65] + tmpFx[65]*tmpObjSEndTerm[77] + tmpFx[75]*tmpObjSEndTerm[89] + tmpFx[85]*tmpObjSEndTerm[101] + tmpFx[95]*tmpObjSEndTerm[113] + tmpFx[105]*tmpObjSEndTerm[125] + tmpFx[115]*tmpObjSEndTerm[137];\ntmpQN2[66] = + tmpFx[5]*tmpObjSEndTerm[6] + tmpFx[15]*tmpObjSEndTerm[18] + tmpFx[25]*tmpObjSEndTerm[30] + tmpFx[35]*tmpObjSEndTerm[42] + tmpFx[45]*tmpObjSEndTerm[54] + tmpFx[55]*tmpObjSEndTerm[66] + tmpFx[65]*tmpObjSEndTerm[78] + tmpFx[75]*tmpObjSEndTerm[90] + tmpFx[85]*tmpObjSEndTerm[102] + tmpFx[95]*tmpObjSEndTerm[114] + tmpFx[105]*tmpObjSEndTerm[126] + tmpFx[115]*tmpObjSEndTerm[138];\ntmpQN2[67] = + tmpFx[5]*tmpObjSEndTerm[7] + tmpFx[15]*tmpObjSEndTerm[19] + tmpFx[25]*tmpObjSEndTerm[31] + tmpFx[35]*tmpObjSEndTerm[43] + tmpFx[45]*tmpObjSEndTerm[55] + tmpFx[55]*tmpObjSEndTerm[67] + tmpFx[65]*tmpObjSEndTerm[79] + tmpFx[75]*tmpObjSEndTerm[91] + tmpFx[85]*tmpObjSEndTerm[103] + tmpFx[95]*tmpObjSEndTerm[115] + tmpFx[105]*tmpObjSEndTerm[127] + tmpFx[115]*tmpObjSEndTerm[139];\ntmpQN2[68] = + tmpFx[5]*tmpObjSEndTerm[8] + tmpFx[15]*tmpObjSEndTerm[20] + tmpFx[25]*tmpObjSEndTerm[32] + tmpFx[35]*tmpObjSEndTerm[44] + tmpFx[45]*tmpObjSEndTerm[56] + tmpFx[55]*tmpObjSEndTerm[68] + tmpFx[65]*tmpObjSEndTerm[80] + tmpFx[75]*tmpObjSEndTerm[92] + tmpFx[85]*tmpObjSEndTerm[104] + tmpFx[95]*tmpObjSEndTerm[116] + tmpFx[105]*tmpObjSEndTerm[128] + tmpFx[115]*tmpObjSEndTerm[140];\ntmpQN2[69] = + tmpFx[5]*tmpObjSEndTerm[9] + tmpFx[15]*tmpObjSEndTerm[21] + tmpFx[25]*tmpObjSEndTerm[33] + tmpFx[35]*tmpObjSEndTerm[45] + tmpFx[45]*tmpObjSEndTerm[57] + tmpFx[55]*tmpObjSEndTerm[69] + tmpFx[65]*tmpObjSEndTerm[81] + tmpFx[75]*tmpObjSEndTerm[93] + tmpFx[85]*tmpObjSEndTerm[105] + tmpFx[95]*tmpObjSEndTerm[117] + tmpFx[105]*tmpObjSEndTerm[129] + tmpFx[115]*tmpObjSEndTerm[141];\ntmpQN2[70] = + tmpFx[5]*tmpObjSEndTerm[10] + tmpFx[15]*tmpObjSEndTerm[22] + tmpFx[25]*tmpObjSEndTerm[34] + tmpFx[35]*tmpObjSEndTerm[46] + tmpFx[45]*tmpObjSEndTerm[58] + tmpFx[55]*tmpObjSEndTerm[70] + tmpFx[65]*tmpObjSEndTerm[82] + tmpFx[75]*tmpObjSEndTerm[94] + tmpFx[85]*tmpObjSEndTerm[106] + tmpFx[95]*tmpObjSEndTerm[118] + tmpFx[105]*tmpObjSEndTerm[130] + tmpFx[115]*tmpObjSEndTerm[142];\ntmpQN2[71] = + tmpFx[5]*tmpObjSEndTerm[11] + tmpFx[15]*tmpObjSEndTerm[23] + tmpFx[25]*tmpObjSEndTerm[35] + tmpFx[35]*tmpObjSEndTerm[47] + tmpFx[45]*tmpObjSEndTerm[59] + tmpFx[55]*tmpObjSEndTerm[71] + tmpFx[65]*tmpObjSEndTerm[83] + tmpFx[75]*tmpObjSEndTerm[95] + tmpFx[85]*tmpObjSEndTerm[107] + tmpFx[95]*tmpObjSEndTerm[119] + tmpFx[105]*tmpObjSEndTerm[131] + tmpFx[115]*tmpObjSEndTerm[143];\ntmpQN2[72] = + tmpFx[6]*tmpObjSEndTerm[0] + tmpFx[16]*tmpObjSEndTerm[12] + tmpFx[26]*tmpObjSEndTerm[24] + tmpFx[36]*tmpObjSEndTerm[36] + tmpFx[46]*tmpObjSEndTerm[48] + tmpFx[56]*tmpObjSEndTerm[60] + tmpFx[66]*tmpObjSEndTerm[72] + tmpFx[76]*tmpObjSEndTerm[84] + tmpFx[86]*tmpObjSEndTerm[96] + tmpFx[96]*tmpObjSEndTerm[108] + tmpFx[106]*tmpObjSEndTerm[120] + tmpFx[116]*tmpObjSEndTerm[132];\ntmpQN2[73] = + tmpFx[6]*tmpObjSEndTerm[1] + tmpFx[16]*tmpObjSEndTerm[13] + tmpFx[26]*tmpObjSEndTerm[25] + tmpFx[36]*tmpObjSEndTerm[37] + tmpFx[46]*tmpObjSEndTerm[49] + tmpFx[56]*tmpObjSEndTerm[61] + tmpFx[66]*tmpObjSEndTerm[73] + tmpFx[76]*tmpObjSEndTerm[85] + tmpFx[86]*tmpObjSEndTerm[97] + tmpFx[96]*tmpObjSEndTerm[109] + tmpFx[106]*tmpObjSEndTerm[121] + tmpFx[116]*tmpObjSEndTerm[133];\ntmpQN2[74] = + tmpFx[6]*tmpObjSEndTerm[2] + tmpFx[16]*tmpObjSEndTerm[14] + tmpFx[26]*tmpObjSEndTerm[26] + tmpFx[36]*tmpObjSEndTerm[38] + tmpFx[46]*tmpObjSEndTerm[50] + tmpFx[56]*tmpObjSEndTerm[62] + tmpFx[66]*tmpObjSEndTerm[74] + tmpFx[76]*tmpObjSEndTerm[86] + tmpFx[86]*tmpObjSEndTerm[98] + tmpFx[96]*tmpObjSEndTerm[110] + tmpFx[106]*tmpObjSEndTerm[122] + tmpFx[116]*tmpObjSEndTerm[134];\ntmpQN2[75] = + tmpFx[6]*tmpObjSEndTerm[3] + tmpFx[16]*tmpObjSEndTerm[15] + tmpFx[26]*tmpObjSEndTerm[27] + tmpFx[36]*tmpObjSEndTerm[39] + tmpFx[46]*tmpObjSEndTerm[51] + tmpFx[56]*tmpObjSEndTerm[63] + tmpFx[66]*tmpObjSEndTerm[75] + tmpFx[76]*tmpObjSEndTerm[87] + tmpFx[86]*tmpObjSEndTerm[99] + tmpFx[96]*tmpObjSEndTerm[111] + tmpFx[106]*tmpObjSEndTerm[123] + tmpFx[116]*tmpObjSEndTerm[135];\ntmpQN2[76] = + tmpFx[6]*tmpObjSEndTerm[4] + tmpFx[16]*tmpObjSEndTerm[16] + tmpFx[26]*tmpObjSEndTerm[28] + tmpFx[36]*tmpObjSEndTerm[40] + tmpFx[46]*tmpObjSEndTerm[52] + tmpFx[56]*tmpObjSEndTerm[64] + tmpFx[66]*tmpObjSEndTerm[76] + tmpFx[76]*tmpObjSEndTerm[88] + tmpFx[86]*tmpObjSEndTerm[100] + tmpFx[96]*tmpObjSEndTerm[112] + tmpFx[106]*tmpObjSEndTerm[124] + tmpFx[116]*tmpObjSEndTerm[136];\ntmpQN2[77] = + tmpFx[6]*tmpObjSEndTerm[5] + tmpFx[16]*tmpObjSEndTerm[17] + tmpFx[26]*tmpObjSEndTerm[29] + tmpFx[36]*tmpObjSEndTerm[41] + tmpFx[46]*tmpObjSEndTerm[53] + tmpFx[56]*tmpObjSEndTerm[65] + tmpFx[66]*tmpObjSEndTerm[77] + tmpFx[76]*tmpObjSEndTerm[89] + tmpFx[86]*tmpObjSEndTerm[101] + tmpFx[96]*tmpObjSEndTerm[113] + tmpFx[106]*tmpObjSEndTerm[125] + tmpFx[116]*tmpObjSEndTerm[137];\ntmpQN2[78] = + tmpFx[6]*tmpObjSEndTerm[6] + tmpFx[16]*tmpObjSEndTerm[18] + tmpFx[26]*tmpObjSEndTerm[30] + tmpFx[36]*tmpObjSEndTerm[42] + tmpFx[46]*tmpObjSEndTerm[54] + tmpFx[56]*tmpObjSEndTerm[66] + tmpFx[66]*tmpObjSEndTerm[78] + tmpFx[76]*tmpObjSEndTerm[90] + tmpFx[86]*tmpObjSEndTerm[102] + tmpFx[96]*tmpObjSEndTerm[114] + tmpFx[106]*tmpObjSEndTerm[126] + tmpFx[116]*tmpObjSEndTerm[138];\ntmpQN2[79] = + tmpFx[6]*tmpObjSEndTerm[7] + tmpFx[16]*tmpObjSEndTerm[19] + tmpFx[26]*tmpObjSEndTerm[31] + tmpFx[36]*tmpObjSEndTerm[43] + tmpFx[46]*tmpObjSEndTerm[55] + tmpFx[56]*tmpObjSEndTerm[67] + tmpFx[66]*tmpObjSEndTerm[79] + tmpFx[76]*tmpObjSEndTerm[91] + tmpFx[86]*tmpObjSEndTerm[103] + tmpFx[96]*tmpObjSEndTerm[115] + tmpFx[106]*tmpObjSEndTerm[127] + tmpFx[116]*tmpObjSEndTerm[139];\ntmpQN2[80] = + tmpFx[6]*tmpObjSEndTerm[8] + tmpFx[16]*tmpObjSEndTerm[20] + tmpFx[26]*tmpObjSEndTerm[32] + tmpFx[36]*tmpObjSEndTerm[44] + tmpFx[46]*tmpObjSEndTerm[56] + tmpFx[56]*tmpObjSEndTerm[68] + tmpFx[66]*tmpObjSEndTerm[80] + tmpFx[76]*tmpObjSEndTerm[92] + tmpFx[86]*tmpObjSEndTerm[104] + tmpFx[96]*tmpObjSEndTerm[116] + tmpFx[106]*tmpObjSEndTerm[128] + tmpFx[116]*tmpObjSEndTerm[140];\ntmpQN2[81] = + tmpFx[6]*tmpObjSEndTerm[9] + tmpFx[16]*tmpObjSEndTerm[21] + tmpFx[26]*tmpObjSEndTerm[33] + tmpFx[36]*tmpObjSEndTerm[45] + tmpFx[46]*tmpObjSEndTerm[57] + tmpFx[56]*tmpObjSEndTerm[69] + tmpFx[66]*tmpObjSEndTerm[81] + tmpFx[76]*tmpObjSEndTerm[93] + tmpFx[86]*tmpObjSEndTerm[105] + tmpFx[96]*tmpObjSEndTerm[117] + tmpFx[106]*tmpObjSEndTerm[129] + tmpFx[116]*tmpObjSEndTerm[141];\ntmpQN2[82] = + tmpFx[6]*tmpObjSEndTerm[10] + tmpFx[16]*tmpObjSEndTerm[22] + tmpFx[26]*tmpObjSEndTerm[34] + tmpFx[36]*tmpObjSEndTerm[46] + tmpFx[46]*tmpObjSEndTerm[58] + tmpFx[56]*tmpObjSEndTerm[70] + tmpFx[66]*tmpObjSEndTerm[82] + tmpFx[76]*tmpObjSEndTerm[94] + tmpFx[86]*tmpObjSEndTerm[106] + tmpFx[96]*tmpObjSEndTerm[118] + tmpFx[106]*tmpObjSEndTerm[130] + tmpFx[116]*tmpObjSEndTerm[142];\ntmpQN2[83] = + tmpFx[6]*tmpObjSEndTerm[11] + tmpFx[16]*tmpObjSEndTerm[23] + tmpFx[26]*tmpObjSEndTerm[35] + tmpFx[36]*tmpObjSEndTerm[47] + tmpFx[46]*tmpObjSEndTerm[59] + tmpFx[56]*tmpObjSEndTerm[71] + tmpFx[66]*tmpObjSEndTerm[83] + tmpFx[76]*tmpObjSEndTerm[95] + tmpFx[86]*tmpObjSEndTerm[107] + tmpFx[96]*tmpObjSEndTerm[119] + tmpFx[106]*tmpObjSEndTerm[131] + tmpFx[116]*tmpObjSEndTerm[143];\ntmpQN2[84] = + tmpFx[7]*tmpObjSEndTerm[0] + tmpFx[17]*tmpObjSEndTerm[12] + tmpFx[27]*tmpObjSEndTerm[24] + tmpFx[37]*tmpObjSEndTerm[36] + tmpFx[47]*tmpObjSEndTerm[48] + tmpFx[57]*tmpObjSEndTerm[60] + tmpFx[67]*tmpObjSEndTerm[72] + tmpFx[77]*tmpObjSEndTerm[84] + tmpFx[87]*tmpObjSEndTerm[96] + tmpFx[97]*tmpObjSEndTerm[108] + tmpFx[107]*tmpObjSEndTerm[120] + tmpFx[117]*tmpObjSEndTerm[132];\ntmpQN2[85] = + tmpFx[7]*tmpObjSEndTerm[1] + tmpFx[17]*tmpObjSEndTerm[13] + tmpFx[27]*tmpObjSEndTerm[25] + tmpFx[37]*tmpObjSEndTerm[37] + tmpFx[47]*tmpObjSEndTerm[49] + tmpFx[57]*tmpObjSEndTerm[61] + tmpFx[67]*tmpObjSEndTerm[73] + tmpFx[77]*tmpObjSEndTerm[85] + tmpFx[87]*tmpObjSEndTerm[97] + tmpFx[97]*tmpObjSEndTerm[109] + tmpFx[107]*tmpObjSEndTerm[121] + tmpFx[117]*tmpObjSEndTerm[133];\ntmpQN2[86] = + tmpFx[7]*tmpObjSEndTerm[2] + tmpFx[17]*tmpObjSEndTerm[14] + tmpFx[27]*tmpObjSEndTerm[26] + tmpFx[37]*tmpObjSEndTerm[38] + tmpFx[47]*tmpObjSEndTerm[50] + tmpFx[57]*tmpObjSEndTerm[62] + tmpFx[67]*tmpObjSEndTerm[74] + tmpFx[77]*tmpObjSEndTerm[86] + tmpFx[87]*tmpObjSEndTerm[98] + tmpFx[97]*tmpObjSEndTerm[110] + tmpFx[107]*tmpObjSEndTerm[122] + tmpFx[117]*tmpObjSEndTerm[134];\ntmpQN2[87] = + tmpFx[7]*tmpObjSEndTerm[3] + tmpFx[17]*tmpObjSEndTerm[15] + tmpFx[27]*tmpObjSEndTerm[27] + tmpFx[37]*tmpObjSEndTerm[39] + tmpFx[47]*tmpObjSEndTerm[51] + tmpFx[57]*tmpObjSEndTerm[63] + tmpFx[67]*tmpObjSEndTerm[75] + tmpFx[77]*tmpObjSEndTerm[87] + tmpFx[87]*tmpObjSEndTerm[99] + tmpFx[97]*tmpObjSEndTerm[111] + tmpFx[107]*tmpObjSEndTerm[123] + tmpFx[117]*tmpObjSEndTerm[135];\ntmpQN2[88] = + tmpFx[7]*tmpObjSEndTerm[4] + tmpFx[17]*tmpObjSEndTerm[16] + tmpFx[27]*tmpObjSEndTerm[28] + tmpFx[37]*tmpObjSEndTerm[40] + tmpFx[47]*tmpObjSEndTerm[52] + tmpFx[57]*tmpObjSEndTerm[64] + tmpFx[67]*tmpObjSEndTerm[76] + tmpFx[77]*tmpObjSEndTerm[88] + tmpFx[87]*tmpObjSEndTerm[100] + tmpFx[97]*tmpObjSEndTerm[112] + tmpFx[107]*tmpObjSEndTerm[124] + tmpFx[117]*tmpObjSEndTerm[136];\ntmpQN2[89] = + tmpFx[7]*tmpObjSEndTerm[5] + tmpFx[17]*tmpObjSEndTerm[17] + tmpFx[27]*tmpObjSEndTerm[29] + tmpFx[37]*tmpObjSEndTerm[41] + tmpFx[47]*tmpObjSEndTerm[53] + tmpFx[57]*tmpObjSEndTerm[65] + tmpFx[67]*tmpObjSEndTerm[77] + tmpFx[77]*tmpObjSEndTerm[89] + tmpFx[87]*tmpObjSEndTerm[101] + tmpFx[97]*tmpObjSEndTerm[113] + tmpFx[107]*tmpObjSEndTerm[125] + tmpFx[117]*tmpObjSEndTerm[137];\ntmpQN2[90] = + tmpFx[7]*tmpObjSEndTerm[6] + tmpFx[17]*tmpObjSEndTerm[18] + tmpFx[27]*tmpObjSEndTerm[30] + tmpFx[37]*tmpObjSEndTerm[42] + tmpFx[47]*tmpObjSEndTerm[54] + tmpFx[57]*tmpObjSEndTerm[66] + tmpFx[67]*tmpObjSEndTerm[78] + tmpFx[77]*tmpObjSEndTerm[90] + tmpFx[87]*tmpObjSEndTerm[102] + tmpFx[97]*tmpObjSEndTerm[114] + tmpFx[107]*tmpObjSEndTerm[126] + tmpFx[117]*tmpObjSEndTerm[138];\ntmpQN2[91] = + tmpFx[7]*tmpObjSEndTerm[7] + tmpFx[17]*tmpObjSEndTerm[19] + tmpFx[27]*tmpObjSEndTerm[31] + tmpFx[37]*tmpObjSEndTerm[43] + tmpFx[47]*tmpObjSEndTerm[55] + tmpFx[57]*tmpObjSEndTerm[67] + tmpFx[67]*tmpObjSEndTerm[79] + tmpFx[77]*tmpObjSEndTerm[91] + tmpFx[87]*tmpObjSEndTerm[103] + tmpFx[97]*tmpObjSEndTerm[115] + tmpFx[107]*tmpObjSEndTerm[127] + tmpFx[117]*tmpObjSEndTerm[139];\ntmpQN2[92] = + tmpFx[7]*tmpObjSEndTerm[8] + tmpFx[17]*tmpObjSEndTerm[20] + tmpFx[27]*tmpObjSEndTerm[32] + tmpFx[37]*tmpObjSEndTerm[44] + tmpFx[47]*tmpObjSEndTerm[56] + tmpFx[57]*tmpObjSEndTerm[68] + tmpFx[67]*tmpObjSEndTerm[80] + tmpFx[77]*tmpObjSEndTerm[92] + tmpFx[87]*tmpObjSEndTerm[104] + tmpFx[97]*tmpObjSEndTerm[116] + tmpFx[107]*tmpObjSEndTerm[128] + tmpFx[117]*tmpObjSEndTerm[140];\ntmpQN2[93] = + tmpFx[7]*tmpObjSEndTerm[9] + tmpFx[17]*tmpObjSEndTerm[21] + tmpFx[27]*tmpObjSEndTerm[33] + tmpFx[37]*tmpObjSEndTerm[45] + tmpFx[47]*tmpObjSEndTerm[57] + tmpFx[57]*tmpObjSEndTerm[69] + tmpFx[67]*tmpObjSEndTerm[81] + tmpFx[77]*tmpObjSEndTerm[93] + tmpFx[87]*tmpObjSEndTerm[105] + tmpFx[97]*tmpObjSEndTerm[117] + tmpFx[107]*tmpObjSEndTerm[129] + tmpFx[117]*tmpObjSEndTerm[141];\ntmpQN2[94] = + tmpFx[7]*tmpObjSEndTerm[10] + tmpFx[17]*tmpObjSEndTerm[22] + tmpFx[27]*tmpObjSEndTerm[34] + tmpFx[37]*tmpObjSEndTerm[46] + tmpFx[47]*tmpObjSEndTerm[58] + tmpFx[57]*tmpObjSEndTerm[70] + tmpFx[67]*tmpObjSEndTerm[82] + tmpFx[77]*tmpObjSEndTerm[94] + tmpFx[87]*tmpObjSEndTerm[106] + tmpFx[97]*tmpObjSEndTerm[118] + tmpFx[107]*tmpObjSEndTerm[130] + tmpFx[117]*tmpObjSEndTerm[142];\ntmpQN2[95] = + tmpFx[7]*tmpObjSEndTerm[11] + tmpFx[17]*tmpObjSEndTerm[23] + tmpFx[27]*tmpObjSEndTerm[35] + tmpFx[37]*tmpObjSEndTerm[47] + tmpFx[47]*tmpObjSEndTerm[59] + tmpFx[57]*tmpObjSEndTerm[71] + tmpFx[67]*tmpObjSEndTerm[83] + tmpFx[77]*tmpObjSEndTerm[95] + tmpFx[87]*tmpObjSEndTerm[107] + tmpFx[97]*tmpObjSEndTerm[119] + tmpFx[107]*tmpObjSEndTerm[131] + tmpFx[117]*tmpObjSEndTerm[143];\ntmpQN2[96] = + tmpFx[8]*tmpObjSEndTerm[0] + tmpFx[18]*tmpObjSEndTerm[12] + tmpFx[28]*tmpObjSEndTerm[24] + tmpFx[38]*tmpObjSEndTerm[36] + tmpFx[48]*tmpObjSEndTerm[48] + tmpFx[58]*tmpObjSEndTerm[60] + tmpFx[68]*tmpObjSEndTerm[72] + tmpFx[78]*tmpObjSEndTerm[84] + tmpFx[88]*tmpObjSEndTerm[96] + tmpFx[98]*tmpObjSEndTerm[108] + tmpFx[108]*tmpObjSEndTerm[120] + tmpFx[118]*tmpObjSEndTerm[132];\ntmpQN2[97] = + tmpFx[8]*tmpObjSEndTerm[1] + tmpFx[18]*tmpObjSEndTerm[13] + tmpFx[28]*tmpObjSEndTerm[25] + tmpFx[38]*tmpObjSEndTerm[37] + tmpFx[48]*tmpObjSEndTerm[49] + tmpFx[58]*tmpObjSEndTerm[61] + tmpFx[68]*tmpObjSEndTerm[73] + tmpFx[78]*tmpObjSEndTerm[85] + tmpFx[88]*tmpObjSEndTerm[97] + tmpFx[98]*tmpObjSEndTerm[109] + tmpFx[108]*tmpObjSEndTerm[121] + tmpFx[118]*tmpObjSEndTerm[133];\ntmpQN2[98] = + tmpFx[8]*tmpObjSEndTerm[2] + tmpFx[18]*tmpObjSEndTerm[14] + tmpFx[28]*tmpObjSEndTerm[26] + tmpFx[38]*tmpObjSEndTerm[38] + tmpFx[48]*tmpObjSEndTerm[50] + tmpFx[58]*tmpObjSEndTerm[62] + tmpFx[68]*tmpObjSEndTerm[74] + tmpFx[78]*tmpObjSEndTerm[86] + tmpFx[88]*tmpObjSEndTerm[98] + tmpFx[98]*tmpObjSEndTerm[110] + tmpFx[108]*tmpObjSEndTerm[122] + tmpFx[118]*tmpObjSEndTerm[134];\ntmpQN2[99] = + tmpFx[8]*tmpObjSEndTerm[3] + tmpFx[18]*tmpObjSEndTerm[15] + tmpFx[28]*tmpObjSEndTerm[27] + tmpFx[38]*tmpObjSEndTerm[39] + tmpFx[48]*tmpObjSEndTerm[51] + tmpFx[58]*tmpObjSEndTerm[63] + tmpFx[68]*tmpObjSEndTerm[75] + tmpFx[78]*tmpObjSEndTerm[87] + tmpFx[88]*tmpObjSEndTerm[99] + tmpFx[98]*tmpObjSEndTerm[111] + tmpFx[108]*tmpObjSEndTerm[123] + tmpFx[118]*tmpObjSEndTerm[135];\ntmpQN2[100] = + tmpFx[8]*tmpObjSEndTerm[4] + tmpFx[18]*tmpObjSEndTerm[16] + tmpFx[28]*tmpObjSEndTerm[28] + tmpFx[38]*tmpObjSEndTerm[40] + tmpFx[48]*tmpObjSEndTerm[52] + tmpFx[58]*tmpObjSEndTerm[64] + tmpFx[68]*tmpObjSEndTerm[76] + tmpFx[78]*tmpObjSEndTerm[88] + tmpFx[88]*tmpObjSEndTerm[100] + tmpFx[98]*tmpObjSEndTerm[112] + tmpFx[108]*tmpObjSEndTerm[124] + tmpFx[118]*tmpObjSEndTerm[136];\ntmpQN2[101] = + tmpFx[8]*tmpObjSEndTerm[5] + tmpFx[18]*tmpObjSEndTerm[17] + tmpFx[28]*tmpObjSEndTerm[29] + tmpFx[38]*tmpObjSEndTerm[41] + tmpFx[48]*tmpObjSEndTerm[53] + tmpFx[58]*tmpObjSEndTerm[65] + tmpFx[68]*tmpObjSEndTerm[77] + tmpFx[78]*tmpObjSEndTerm[89] + tmpFx[88]*tmpObjSEndTerm[101] + tmpFx[98]*tmpObjSEndTerm[113] + tmpFx[108]*tmpObjSEndTerm[125] + tmpFx[118]*tmpObjSEndTerm[137];\ntmpQN2[102] = + tmpFx[8]*tmpObjSEndTerm[6] + tmpFx[18]*tmpObjSEndTerm[18] + tmpFx[28]*tmpObjSEndTerm[30] + tmpFx[38]*tmpObjSEndTerm[42] + tmpFx[48]*tmpObjSEndTerm[54] + tmpFx[58]*tmpObjSEndTerm[66] + tmpFx[68]*tmpObjSEndTerm[78] + tmpFx[78]*tmpObjSEndTerm[90] + tmpFx[88]*tmpObjSEndTerm[102] + tmpFx[98]*tmpObjSEndTerm[114] + tmpFx[108]*tmpObjSEndTerm[126] + tmpFx[118]*tmpObjSEndTerm[138];\ntmpQN2[103] = + tmpFx[8]*tmpObjSEndTerm[7] + tmpFx[18]*tmpObjSEndTerm[19] + tmpFx[28]*tmpObjSEndTerm[31] + tmpFx[38]*tmpObjSEndTerm[43] + tmpFx[48]*tmpObjSEndTerm[55] + tmpFx[58]*tmpObjSEndTerm[67] + tmpFx[68]*tmpObjSEndTerm[79] + tmpFx[78]*tmpObjSEndTerm[91] + tmpFx[88]*tmpObjSEndTerm[103] + tmpFx[98]*tmpObjSEndTerm[115] + tmpFx[108]*tmpObjSEndTerm[127] + tmpFx[118]*tmpObjSEndTerm[139];\ntmpQN2[104] = + tmpFx[8]*tmpObjSEndTerm[8] + tmpFx[18]*tmpObjSEndTerm[20] + tmpFx[28]*tmpObjSEndTerm[32] + tmpFx[38]*tmpObjSEndTerm[44] + tmpFx[48]*tmpObjSEndTerm[56] + tmpFx[58]*tmpObjSEndTerm[68] + tmpFx[68]*tmpObjSEndTerm[80] + tmpFx[78]*tmpObjSEndTerm[92] + tmpFx[88]*tmpObjSEndTerm[104] + tmpFx[98]*tmpObjSEndTerm[116] + tmpFx[108]*tmpObjSEndTerm[128] + tmpFx[118]*tmpObjSEndTerm[140];\ntmpQN2[105] = + tmpFx[8]*tmpObjSEndTerm[9] + tmpFx[18]*tmpObjSEndTerm[21] + tmpFx[28]*tmpObjSEndTerm[33] + tmpFx[38]*tmpObjSEndTerm[45] + tmpFx[48]*tmpObjSEndTerm[57] + tmpFx[58]*tmpObjSEndTerm[69] + tmpFx[68]*tmpObjSEndTerm[81] + tmpFx[78]*tmpObjSEndTerm[93] + tmpFx[88]*tmpObjSEndTerm[105] + tmpFx[98]*tmpObjSEndTerm[117] + tmpFx[108]*tmpObjSEndTerm[129] + tmpFx[118]*tmpObjSEndTerm[141];\ntmpQN2[106] = + tmpFx[8]*tmpObjSEndTerm[10] + tmpFx[18]*tmpObjSEndTerm[22] + tmpFx[28]*tmpObjSEndTerm[34] + tmpFx[38]*tmpObjSEndTerm[46] + tmpFx[48]*tmpObjSEndTerm[58] + tmpFx[58]*tmpObjSEndTerm[70] + tmpFx[68]*tmpObjSEndTerm[82] + tmpFx[78]*tmpObjSEndTerm[94] + tmpFx[88]*tmpObjSEndTerm[106] + tmpFx[98]*tmpObjSEndTerm[118] + tmpFx[108]*tmpObjSEndTerm[130] + tmpFx[118]*tmpObjSEndTerm[142];\ntmpQN2[107] = + tmpFx[8]*tmpObjSEndTerm[11] + tmpFx[18]*tmpObjSEndTerm[23] + tmpFx[28]*tmpObjSEndTerm[35] + tmpFx[38]*tmpObjSEndTerm[47] + tmpFx[48]*tmpObjSEndTerm[59] + tmpFx[58]*tmpObjSEndTerm[71] + tmpFx[68]*tmpObjSEndTerm[83] + tmpFx[78]*tmpObjSEndTerm[95] + tmpFx[88]*tmpObjSEndTerm[107] + tmpFx[98]*tmpObjSEndTerm[119] + tmpFx[108]*tmpObjSEndTerm[131] + tmpFx[118]*tmpObjSEndTerm[143];\ntmpQN2[108] = + tmpFx[9]*tmpObjSEndTerm[0] + tmpFx[19]*tmpObjSEndTerm[12] + tmpFx[29]*tmpObjSEndTerm[24] + tmpFx[39]*tmpObjSEndTerm[36] + tmpFx[49]*tmpObjSEndTerm[48] + tmpFx[59]*tmpObjSEndTerm[60] + tmpFx[69]*tmpObjSEndTerm[72] + tmpFx[79]*tmpObjSEndTerm[84] + tmpFx[89]*tmpObjSEndTerm[96] + tmpFx[99]*tmpObjSEndTerm[108] + tmpFx[109]*tmpObjSEndTerm[120] + tmpFx[119]*tmpObjSEndTerm[132];\ntmpQN2[109] = + tmpFx[9]*tmpObjSEndTerm[1] + tmpFx[19]*tmpObjSEndTerm[13] + tmpFx[29]*tmpObjSEndTerm[25] + tmpFx[39]*tmpObjSEndTerm[37] + tmpFx[49]*tmpObjSEndTerm[49] + tmpFx[59]*tmpObjSEndTerm[61] + tmpFx[69]*tmpObjSEndTerm[73] + tmpFx[79]*tmpObjSEndTerm[85] + tmpFx[89]*tmpObjSEndTerm[97] + tmpFx[99]*tmpObjSEndTerm[109] + tmpFx[109]*tmpObjSEndTerm[121] + tmpFx[119]*tmpObjSEndTerm[133];\ntmpQN2[110] = + tmpFx[9]*tmpObjSEndTerm[2] + tmpFx[19]*tmpObjSEndTerm[14] + tmpFx[29]*tmpObjSEndTerm[26] + tmpFx[39]*tmpObjSEndTerm[38] + tmpFx[49]*tmpObjSEndTerm[50] + tmpFx[59]*tmpObjSEndTerm[62] + tmpFx[69]*tmpObjSEndTerm[74] + tmpFx[79]*tmpObjSEndTerm[86] + tmpFx[89]*tmpObjSEndTerm[98] + tmpFx[99]*tmpObjSEndTerm[110] + tmpFx[109]*tmpObjSEndTerm[122] + tmpFx[119]*tmpObjSEndTerm[134];\ntmpQN2[111] = + tmpFx[9]*tmpObjSEndTerm[3] + tmpFx[19]*tmpObjSEndTerm[15] + tmpFx[29]*tmpObjSEndTerm[27] + tmpFx[39]*tmpObjSEndTerm[39] + tmpFx[49]*tmpObjSEndTerm[51] + tmpFx[59]*tmpObjSEndTerm[63] + tmpFx[69]*tmpObjSEndTerm[75] + tmpFx[79]*tmpObjSEndTerm[87] + tmpFx[89]*tmpObjSEndTerm[99] + tmpFx[99]*tmpObjSEndTerm[111] + tmpFx[109]*tmpObjSEndTerm[123] + tmpFx[119]*tmpObjSEndTerm[135];\ntmpQN2[112] = + tmpFx[9]*tmpObjSEndTerm[4] + tmpFx[19]*tmpObjSEndTerm[16] + tmpFx[29]*tmpObjSEndTerm[28] + tmpFx[39]*tmpObjSEndTerm[40] + tmpFx[49]*tmpObjSEndTerm[52] + tmpFx[59]*tmpObjSEndTerm[64] + tmpFx[69]*tmpObjSEndTerm[76] + tmpFx[79]*tmpObjSEndTerm[88] + tmpFx[89]*tmpObjSEndTerm[100] + tmpFx[99]*tmpObjSEndTerm[112] + tmpFx[109]*tmpObjSEndTerm[124] + tmpFx[119]*tmpObjSEndTerm[136];\ntmpQN2[113] = + tmpFx[9]*tmpObjSEndTerm[5] + tmpFx[19]*tmpObjSEndTerm[17] + tmpFx[29]*tmpObjSEndTerm[29] + tmpFx[39]*tmpObjSEndTerm[41] + tmpFx[49]*tmpObjSEndTerm[53] + tmpFx[59]*tmpObjSEndTerm[65] + tmpFx[69]*tmpObjSEndTerm[77] + tmpFx[79]*tmpObjSEndTerm[89] + tmpFx[89]*tmpObjSEndTerm[101] + tmpFx[99]*tmpObjSEndTerm[113] + tmpFx[109]*tmpObjSEndTerm[125] + tmpFx[119]*tmpObjSEndTerm[137];\ntmpQN2[114] = + tmpFx[9]*tmpObjSEndTerm[6] + tmpFx[19]*tmpObjSEndTerm[18] + tmpFx[29]*tmpObjSEndTerm[30] + tmpFx[39]*tmpObjSEndTerm[42] + tmpFx[49]*tmpObjSEndTerm[54] + tmpFx[59]*tmpObjSEndTerm[66] + tmpFx[69]*tmpObjSEndTerm[78] + tmpFx[79]*tmpObjSEndTerm[90] + tmpFx[89]*tmpObjSEndTerm[102] + tmpFx[99]*tmpObjSEndTerm[114] + tmpFx[109]*tmpObjSEndTerm[126] + tmpFx[119]*tmpObjSEndTerm[138];\ntmpQN2[115] = + tmpFx[9]*tmpObjSEndTerm[7] + tmpFx[19]*tmpObjSEndTerm[19] + tmpFx[29]*tmpObjSEndTerm[31] + tmpFx[39]*tmpObjSEndTerm[43] + tmpFx[49]*tmpObjSEndTerm[55] + tmpFx[59]*tmpObjSEndTerm[67] + tmpFx[69]*tmpObjSEndTerm[79] + tmpFx[79]*tmpObjSEndTerm[91] + tmpFx[89]*tmpObjSEndTerm[103] + tmpFx[99]*tmpObjSEndTerm[115] + tmpFx[109]*tmpObjSEndTerm[127] + tmpFx[119]*tmpObjSEndTerm[139];\ntmpQN2[116] = + tmpFx[9]*tmpObjSEndTerm[8] + tmpFx[19]*tmpObjSEndTerm[20] + tmpFx[29]*tmpObjSEndTerm[32] + tmpFx[39]*tmpObjSEndTerm[44] + tmpFx[49]*tmpObjSEndTerm[56] + tmpFx[59]*tmpObjSEndTerm[68] + tmpFx[69]*tmpObjSEndTerm[80] + tmpFx[79]*tmpObjSEndTerm[92] + tmpFx[89]*tmpObjSEndTerm[104] + tmpFx[99]*tmpObjSEndTerm[116] + tmpFx[109]*tmpObjSEndTerm[128] + tmpFx[119]*tmpObjSEndTerm[140];\ntmpQN2[117] = + tmpFx[9]*tmpObjSEndTerm[9] + tmpFx[19]*tmpObjSEndTerm[21] + tmpFx[29]*tmpObjSEndTerm[33] + tmpFx[39]*tmpObjSEndTerm[45] + tmpFx[49]*tmpObjSEndTerm[57] + tmpFx[59]*tmpObjSEndTerm[69] + tmpFx[69]*tmpObjSEndTerm[81] + tmpFx[79]*tmpObjSEndTerm[93] + tmpFx[89]*tmpObjSEndTerm[105] + tmpFx[99]*tmpObjSEndTerm[117] + tmpFx[109]*tmpObjSEndTerm[129] + tmpFx[119]*tmpObjSEndTerm[141];\ntmpQN2[118] = + tmpFx[9]*tmpObjSEndTerm[10] + tmpFx[19]*tmpObjSEndTerm[22] + tmpFx[29]*tmpObjSEndTerm[34] + tmpFx[39]*tmpObjSEndTerm[46] + tmpFx[49]*tmpObjSEndTerm[58] + tmpFx[59]*tmpObjSEndTerm[70] + tmpFx[69]*tmpObjSEndTerm[82] + tmpFx[79]*tmpObjSEndTerm[94] + tmpFx[89]*tmpObjSEndTerm[106] + tmpFx[99]*tmpObjSEndTerm[118] + tmpFx[109]*tmpObjSEndTerm[130] + tmpFx[119]*tmpObjSEndTerm[142];\ntmpQN2[119] = + tmpFx[9]*tmpObjSEndTerm[11] + tmpFx[19]*tmpObjSEndTerm[23] + tmpFx[29]*tmpObjSEndTerm[35] + tmpFx[39]*tmpObjSEndTerm[47] + tmpFx[49]*tmpObjSEndTerm[59] + tmpFx[59]*tmpObjSEndTerm[71] + tmpFx[69]*tmpObjSEndTerm[83] + tmpFx[79]*tmpObjSEndTerm[95] + tmpFx[89]*tmpObjSEndTerm[107] + tmpFx[99]*tmpObjSEndTerm[119] + tmpFx[109]*tmpObjSEndTerm[131] + tmpFx[119]*tmpObjSEndTerm[143];\ntmpQN1[0] = + tmpQN2[0]*tmpFx[0] + tmpQN2[1]*tmpFx[10] + tmpQN2[2]*tmpFx[20] + tmpQN2[3]*tmpFx[30] + tmpQN2[4]*tmpFx[40] + tmpQN2[5]*tmpFx[50] + tmpQN2[6]*tmpFx[60] + tmpQN2[7]*tmpFx[70] + tmpQN2[8]*tmpFx[80] + tmpQN2[9]*tmpFx[90] + tmpQN2[10]*tmpFx[100] + tmpQN2[11]*tmpFx[110];\ntmpQN1[1] = + tmpQN2[0]*tmpFx[1] + tmpQN2[1]*tmpFx[11] + tmpQN2[2]*tmpFx[21] + tmpQN2[3]*tmpFx[31] + tmpQN2[4]*tmpFx[41] + tmpQN2[5]*tmpFx[51] + tmpQN2[6]*tmpFx[61] + tmpQN2[7]*tmpFx[71] + tmpQN2[8]*tmpFx[81] + tmpQN2[9]*tmpFx[91] + tmpQN2[10]*tmpFx[101] + tmpQN2[11]*tmpFx[111];\ntmpQN1[2] = + tmpQN2[0]*tmpFx[2] + tmpQN2[1]*tmpFx[12] + tmpQN2[2]*tmpFx[22] + tmpQN2[3]*tmpFx[32] + tmpQN2[4]*tmpFx[42] + tmpQN2[5]*tmpFx[52] + tmpQN2[6]*tmpFx[62] + tmpQN2[7]*tmpFx[72] + tmpQN2[8]*tmpFx[82] + tmpQN2[9]*tmpFx[92] + tmpQN2[10]*tmpFx[102] + tmpQN2[11]*tmpFx[112];\ntmpQN1[3] = + tmpQN2[0]*tmpFx[3] + tmpQN2[1]*tmpFx[13] + tmpQN2[2]*tmpFx[23] + tmpQN2[3]*tmpFx[33] + tmpQN2[4]*tmpFx[43] + tmpQN2[5]*tmpFx[53] + tmpQN2[6]*tmpFx[63] + tmpQN2[7]*tmpFx[73] + tmpQN2[8]*tmpFx[83] + tmpQN2[9]*tmpFx[93] + tmpQN2[10]*tmpFx[103] + tmpQN2[11]*tmpFx[113];\ntmpQN1[4] = + tmpQN2[0]*tmpFx[4] + tmpQN2[1]*tmpFx[14] + tmpQN2[2]*tmpFx[24] + tmpQN2[3]*tmpFx[34] + tmpQN2[4]*tmpFx[44] + tmpQN2[5]*tmpFx[54] + tmpQN2[6]*tmpFx[64] + tmpQN2[7]*tmpFx[74] + tmpQN2[8]*tmpFx[84] + tmpQN2[9]*tmpFx[94] + tmpQN2[10]*tmpFx[104] + tmpQN2[11]*tmpFx[114];\ntmpQN1[5] = + tmpQN2[0]*tmpFx[5] + tmpQN2[1]*tmpFx[15] + tmpQN2[2]*tmpFx[25] + tmpQN2[3]*tmpFx[35] + tmpQN2[4]*tmpFx[45] + tmpQN2[5]*tmpFx[55] + tmpQN2[6]*tmpFx[65] + tmpQN2[7]*tmpFx[75] + tmpQN2[8]*tmpFx[85] + tmpQN2[9]*tmpFx[95] + tmpQN2[10]*tmpFx[105] + tmpQN2[11]*tmpFx[115];\ntmpQN1[6] = + tmpQN2[0]*tmpFx[6] + tmpQN2[1]*tmpFx[16] + tmpQN2[2]*tmpFx[26] + tmpQN2[3]*tmpFx[36] + tmpQN2[4]*tmpFx[46] + tmpQN2[5]*tmpFx[56] + tmpQN2[6]*tmpFx[66] + tmpQN2[7]*tmpFx[76] + tmpQN2[8]*tmpFx[86] + tmpQN2[9]*tmpFx[96] + tmpQN2[10]*tmpFx[106] + tmpQN2[11]*tmpFx[116];\ntmpQN1[7] = + tmpQN2[0]*tmpFx[7] + tmpQN2[1]*tmpFx[17] + tmpQN2[2]*tmpFx[27] + tmpQN2[3]*tmpFx[37] + tmpQN2[4]*tmpFx[47] + tmpQN2[5]*tmpFx[57] + tmpQN2[6]*tmpFx[67] + tmpQN2[7]*tmpFx[77] + tmpQN2[8]*tmpFx[87] + tmpQN2[9]*tmpFx[97] + tmpQN2[10]*tmpFx[107] + tmpQN2[11]*tmpFx[117];\ntmpQN1[8] = + tmpQN2[0]*tmpFx[8] + tmpQN2[1]*tmpFx[18] + tmpQN2[2]*tmpFx[28] + tmpQN2[3]*tmpFx[38] + tmpQN2[4]*tmpFx[48] + tmpQN2[5]*tmpFx[58] + tmpQN2[6]*tmpFx[68] + tmpQN2[7]*tmpFx[78] + tmpQN2[8]*tmpFx[88] + tmpQN2[9]*tmpFx[98] + tmpQN2[10]*tmpFx[108] + tmpQN2[11]*tmpFx[118];\ntmpQN1[9] = + tmpQN2[0]*tmpFx[9] + tmpQN2[1]*tmpFx[19] + tmpQN2[2]*tmpFx[29] + tmpQN2[3]*tmpFx[39] + tmpQN2[4]*tmpFx[49] + tmpQN2[5]*tmpFx[59] + tmpQN2[6]*tmpFx[69] + tmpQN2[7]*tmpFx[79] + tmpQN2[8]*tmpFx[89] + tmpQN2[9]*tmpFx[99] + tmpQN2[10]*tmpFx[109] + tmpQN2[11]*tmpFx[119];\ntmpQN1[10] = + tmpQN2[12]*tmpFx[0] + tmpQN2[13]*tmpFx[10] + tmpQN2[14]*tmpFx[20] + tmpQN2[15]*tmpFx[30] + tmpQN2[16]*tmpFx[40] + tmpQN2[17]*tmpFx[50] + tmpQN2[18]*tmpFx[60] + tmpQN2[19]*tmpFx[70] + tmpQN2[20]*tmpFx[80] + tmpQN2[21]*tmpFx[90] + tmpQN2[22]*tmpFx[100] + tmpQN2[23]*tmpFx[110];\ntmpQN1[11] = + tmpQN2[12]*tmpFx[1] + tmpQN2[13]*tmpFx[11] + tmpQN2[14]*tmpFx[21] + tmpQN2[15]*tmpFx[31] + tmpQN2[16]*tmpFx[41] + tmpQN2[17]*tmpFx[51] + tmpQN2[18]*tmpFx[61] + tmpQN2[19]*tmpFx[71] + tmpQN2[20]*tmpFx[81] + tmpQN2[21]*tmpFx[91] + tmpQN2[22]*tmpFx[101] + tmpQN2[23]*tmpFx[111];\ntmpQN1[12] = + tmpQN2[12]*tmpFx[2] + tmpQN2[13]*tmpFx[12] + tmpQN2[14]*tmpFx[22] + tmpQN2[15]*tmpFx[32] + tmpQN2[16]*tmpFx[42] + tmpQN2[17]*tmpFx[52] + tmpQN2[18]*tmpFx[62] + tmpQN2[19]*tmpFx[72] + tmpQN2[20]*tmpFx[82] + tmpQN2[21]*tmpFx[92] + tmpQN2[22]*tmpFx[102] + tmpQN2[23]*tmpFx[112];\ntmpQN1[13] = + tmpQN2[12]*tmpFx[3] + tmpQN2[13]*tmpFx[13] + tmpQN2[14]*tmpFx[23] + tmpQN2[15]*tmpFx[33] + tmpQN2[16]*tmpFx[43] + tmpQN2[17]*tmpFx[53] + tmpQN2[18]*tmpFx[63] + tmpQN2[19]*tmpFx[73] + tmpQN2[20]*tmpFx[83] + tmpQN2[21]*tmpFx[93] + tmpQN2[22]*tmpFx[103] + tmpQN2[23]*tmpFx[113];\ntmpQN1[14] = + tmpQN2[12]*tmpFx[4] + tmpQN2[13]*tmpFx[14] + tmpQN2[14]*tmpFx[24] + tmpQN2[15]*tmpFx[34] + tmpQN2[16]*tmpFx[44] + tmpQN2[17]*tmpFx[54] + tmpQN2[18]*tmpFx[64] + tmpQN2[19]*tmpFx[74] + tmpQN2[20]*tmpFx[84] + tmpQN2[21]*tmpFx[94] + tmpQN2[22]*tmpFx[104] + tmpQN2[23]*tmpFx[114];\ntmpQN1[15] = + tmpQN2[12]*tmpFx[5] + tmpQN2[13]*tmpFx[15] + tmpQN2[14]*tmpFx[25] + tmpQN2[15]*tmpFx[35] + tmpQN2[16]*tmpFx[45] + tmpQN2[17]*tmpFx[55] + tmpQN2[18]*tmpFx[65] + tmpQN2[19]*tmpFx[75] + tmpQN2[20]*tmpFx[85] + tmpQN2[21]*tmpFx[95] + tmpQN2[22]*tmpFx[105] + tmpQN2[23]*tmpFx[115];\ntmpQN1[16] = + tmpQN2[12]*tmpFx[6] + tmpQN2[13]*tmpFx[16] + tmpQN2[14]*tmpFx[26] + tmpQN2[15]*tmpFx[36] + tmpQN2[16]*tmpFx[46] + tmpQN2[17]*tmpFx[56] + tmpQN2[18]*tmpFx[66] + tmpQN2[19]*tmpFx[76] + tmpQN2[20]*tmpFx[86] + tmpQN2[21]*tmpFx[96] + tmpQN2[22]*tmpFx[106] + tmpQN2[23]*tmpFx[116];\ntmpQN1[17] = + tmpQN2[12]*tmpFx[7] + tmpQN2[13]*tmpFx[17] + tmpQN2[14]*tmpFx[27] + tmpQN2[15]*tmpFx[37] + tmpQN2[16]*tmpFx[47] + tmpQN2[17]*tmpFx[57] + tmpQN2[18]*tmpFx[67] + tmpQN2[19]*tmpFx[77] + tmpQN2[20]*tmpFx[87] + tmpQN2[21]*tmpFx[97] + tmpQN2[22]*tmpFx[107] + tmpQN2[23]*tmpFx[117];\ntmpQN1[18] = + tmpQN2[12]*tmpFx[8] + tmpQN2[13]*tmpFx[18] + tmpQN2[14]*tmpFx[28] + tmpQN2[15]*tmpFx[38] + tmpQN2[16]*tmpFx[48] + tmpQN2[17]*tmpFx[58] + tmpQN2[18]*tmpFx[68] + tmpQN2[19]*tmpFx[78] + tmpQN2[20]*tmpFx[88] + tmpQN2[21]*tmpFx[98] + tmpQN2[22]*tmpFx[108] + tmpQN2[23]*tmpFx[118];\ntmpQN1[19] = + tmpQN2[12]*tmpFx[9] + tmpQN2[13]*tmpFx[19] + tmpQN2[14]*tmpFx[29] + tmpQN2[15]*tmpFx[39] + tmpQN2[16]*tmpFx[49] + tmpQN2[17]*tmpFx[59] + tmpQN2[18]*tmpFx[69] + tmpQN2[19]*tmpFx[79] + tmpQN2[20]*tmpFx[89] + tmpQN2[21]*tmpFx[99] + tmpQN2[22]*tmpFx[109] + tmpQN2[23]*tmpFx[119];\ntmpQN1[20] = + tmpQN2[24]*tmpFx[0] + tmpQN2[25]*tmpFx[10] + tmpQN2[26]*tmpFx[20] + tmpQN2[27]*tmpFx[30] + tmpQN2[28]*tmpFx[40] + tmpQN2[29]*tmpFx[50] + tmpQN2[30]*tmpFx[60] + tmpQN2[31]*tmpFx[70] + tmpQN2[32]*tmpFx[80] + tmpQN2[33]*tmpFx[90] + tmpQN2[34]*tmpFx[100] + tmpQN2[35]*tmpFx[110];\ntmpQN1[21] = + tmpQN2[24]*tmpFx[1] + tmpQN2[25]*tmpFx[11] + tmpQN2[26]*tmpFx[21] + tmpQN2[27]*tmpFx[31] + tmpQN2[28]*tmpFx[41] + tmpQN2[29]*tmpFx[51] + tmpQN2[30]*tmpFx[61] + tmpQN2[31]*tmpFx[71] + tmpQN2[32]*tmpFx[81] + tmpQN2[33]*tmpFx[91] + tmpQN2[34]*tmpFx[101] + tmpQN2[35]*tmpFx[111];\ntmpQN1[22] = + tmpQN2[24]*tmpFx[2] + tmpQN2[25]*tmpFx[12] + tmpQN2[26]*tmpFx[22] + tmpQN2[27]*tmpFx[32] + tmpQN2[28]*tmpFx[42] + tmpQN2[29]*tmpFx[52] + tmpQN2[30]*tmpFx[62] + tmpQN2[31]*tmpFx[72] + tmpQN2[32]*tmpFx[82] + tmpQN2[33]*tmpFx[92] + tmpQN2[34]*tmpFx[102] + tmpQN2[35]*tmpFx[112];\ntmpQN1[23] = + tmpQN2[24]*tmpFx[3] + tmpQN2[25]*tmpFx[13] + tmpQN2[26]*tmpFx[23] + tmpQN2[27]*tmpFx[33] + tmpQN2[28]*tmpFx[43] + tmpQN2[29]*tmpFx[53] + tmpQN2[30]*tmpFx[63] + tmpQN2[31]*tmpFx[73] + tmpQN2[32]*tmpFx[83] + tmpQN2[33]*tmpFx[93] + tmpQN2[34]*tmpFx[103] + tmpQN2[35]*tmpFx[113];\ntmpQN1[24] = + tmpQN2[24]*tmpFx[4] + tmpQN2[25]*tmpFx[14] + tmpQN2[26]*tmpFx[24] + tmpQN2[27]*tmpFx[34] + tmpQN2[28]*tmpFx[44] + tmpQN2[29]*tmpFx[54] + tmpQN2[30]*tmpFx[64] + tmpQN2[31]*tmpFx[74] + tmpQN2[32]*tmpFx[84] + tmpQN2[33]*tmpFx[94] + tmpQN2[34]*tmpFx[104] + tmpQN2[35]*tmpFx[114];\ntmpQN1[25] = + tmpQN2[24]*tmpFx[5] + tmpQN2[25]*tmpFx[15] + tmpQN2[26]*tmpFx[25] + tmpQN2[27]*tmpFx[35] + tmpQN2[28]*tmpFx[45] + tmpQN2[29]*tmpFx[55] + tmpQN2[30]*tmpFx[65] + tmpQN2[31]*tmpFx[75] + tmpQN2[32]*tmpFx[85] + tmpQN2[33]*tmpFx[95] + tmpQN2[34]*tmpFx[105] + tmpQN2[35]*tmpFx[115];\ntmpQN1[26] = + tmpQN2[24]*tmpFx[6] + tmpQN2[25]*tmpFx[16] + tmpQN2[26]*tmpFx[26] + tmpQN2[27]*tmpFx[36] + tmpQN2[28]*tmpFx[46] + tmpQN2[29]*tmpFx[56] + tmpQN2[30]*tmpFx[66] + tmpQN2[31]*tmpFx[76] + tmpQN2[32]*tmpFx[86] + tmpQN2[33]*tmpFx[96] + tmpQN2[34]*tmpFx[106] + tmpQN2[35]*tmpFx[116];\ntmpQN1[27] = + tmpQN2[24]*tmpFx[7] + tmpQN2[25]*tmpFx[17] + tmpQN2[26]*tmpFx[27] + tmpQN2[27]*tmpFx[37] + tmpQN2[28]*tmpFx[47] + tmpQN2[29]*tmpFx[57] + tmpQN2[30]*tmpFx[67] + tmpQN2[31]*tmpFx[77] + tmpQN2[32]*tmpFx[87] + tmpQN2[33]*tmpFx[97] + tmpQN2[34]*tmpFx[107] + tmpQN2[35]*tmpFx[117];\ntmpQN1[28] = + tmpQN2[24]*tmpFx[8] + tmpQN2[25]*tmpFx[18] + tmpQN2[26]*tmpFx[28] + tmpQN2[27]*tmpFx[38] + tmpQN2[28]*tmpFx[48] + tmpQN2[29]*tmpFx[58] + tmpQN2[30]*tmpFx[68] + tmpQN2[31]*tmpFx[78] + tmpQN2[32]*tmpFx[88] + tmpQN2[33]*tmpFx[98] + tmpQN2[34]*tmpFx[108] + tmpQN2[35]*tmpFx[118];\ntmpQN1[29] = + tmpQN2[24]*tmpFx[9] + tmpQN2[25]*tmpFx[19] + tmpQN2[26]*tmpFx[29] + tmpQN2[27]*tmpFx[39] + tmpQN2[28]*tmpFx[49] + tmpQN2[29]*tmpFx[59] + tmpQN2[30]*tmpFx[69] + tmpQN2[31]*tmpFx[79] + tmpQN2[32]*tmpFx[89] + tmpQN2[33]*tmpFx[99] + tmpQN2[34]*tmpFx[109] + tmpQN2[35]*tmpFx[119];\ntmpQN1[30] = + tmpQN2[36]*tmpFx[0] + tmpQN2[37]*tmpFx[10] + tmpQN2[38]*tmpFx[20] + tmpQN2[39]*tmpFx[30] + tmpQN2[40]*tmpFx[40] + tmpQN2[41]*tmpFx[50] + tmpQN2[42]*tmpFx[60] + tmpQN2[43]*tmpFx[70] + tmpQN2[44]*tmpFx[80] + tmpQN2[45]*tmpFx[90] + tmpQN2[46]*tmpFx[100] + tmpQN2[47]*tmpFx[110];\ntmpQN1[31] = + tmpQN2[36]*tmpFx[1] + tmpQN2[37]*tmpFx[11] + tmpQN2[38]*tmpFx[21] + tmpQN2[39]*tmpFx[31] + tmpQN2[40]*tmpFx[41] + tmpQN2[41]*tmpFx[51] + tmpQN2[42]*tmpFx[61] + tmpQN2[43]*tmpFx[71] + tmpQN2[44]*tmpFx[81] + tmpQN2[45]*tmpFx[91] + tmpQN2[46]*tmpFx[101] + tmpQN2[47]*tmpFx[111];\ntmpQN1[32] = + tmpQN2[36]*tmpFx[2] + tmpQN2[37]*tmpFx[12] + tmpQN2[38]*tmpFx[22] + tmpQN2[39]*tmpFx[32] + tmpQN2[40]*tmpFx[42] + tmpQN2[41]*tmpFx[52] + tmpQN2[42]*tmpFx[62] + tmpQN2[43]*tmpFx[72] + tmpQN2[44]*tmpFx[82] + tmpQN2[45]*tmpFx[92] + tmpQN2[46]*tmpFx[102] + tmpQN2[47]*tmpFx[112];\ntmpQN1[33] = + tmpQN2[36]*tmpFx[3] + tmpQN2[37]*tmpFx[13] + tmpQN2[38]*tmpFx[23] + tmpQN2[39]*tmpFx[33] + tmpQN2[40]*tmpFx[43] + tmpQN2[41]*tmpFx[53] + tmpQN2[42]*tmpFx[63] + tmpQN2[43]*tmpFx[73] + tmpQN2[44]*tmpFx[83] + tmpQN2[45]*tmpFx[93] + tmpQN2[46]*tmpFx[103] + tmpQN2[47]*tmpFx[113];\ntmpQN1[34] = + tmpQN2[36]*tmpFx[4] + tmpQN2[37]*tmpFx[14] + tmpQN2[38]*tmpFx[24] + tmpQN2[39]*tmpFx[34] + tmpQN2[40]*tmpFx[44] + tmpQN2[41]*tmpFx[54] + tmpQN2[42]*tmpFx[64] + tmpQN2[43]*tmpFx[74] + tmpQN2[44]*tmpFx[84] + tmpQN2[45]*tmpFx[94] + tmpQN2[46]*tmpFx[104] + tmpQN2[47]*tmpFx[114];\ntmpQN1[35] = + tmpQN2[36]*tmpFx[5] + tmpQN2[37]*tmpFx[15] + tmpQN2[38]*tmpFx[25] + tmpQN2[39]*tmpFx[35] + tmpQN2[40]*tmpFx[45] + tmpQN2[41]*tmpFx[55] + tmpQN2[42]*tmpFx[65] + tmpQN2[43]*tmpFx[75] + tmpQN2[44]*tmpFx[85] + tmpQN2[45]*tmpFx[95] + tmpQN2[46]*tmpFx[105] + tmpQN2[47]*tmpFx[115];\ntmpQN1[36] = + tmpQN2[36]*tmpFx[6] + tmpQN2[37]*tmpFx[16] + tmpQN2[38]*tmpFx[26] + tmpQN2[39]*tmpFx[36] + tmpQN2[40]*tmpFx[46] + tmpQN2[41]*tmpFx[56] + tmpQN2[42]*tmpFx[66] + tmpQN2[43]*tmpFx[76] + tmpQN2[44]*tmpFx[86] + tmpQN2[45]*tmpFx[96] + tmpQN2[46]*tmpFx[106] + tmpQN2[47]*tmpFx[116];\ntmpQN1[37] = + tmpQN2[36]*tmpFx[7] + tmpQN2[37]*tmpFx[17] + tmpQN2[38]*tmpFx[27] + tmpQN2[39]*tmpFx[37] + tmpQN2[40]*tmpFx[47] + tmpQN2[41]*tmpFx[57] + tmpQN2[42]*tmpFx[67] + tmpQN2[43]*tmpFx[77] + tmpQN2[44]*tmpFx[87] + tmpQN2[45]*tmpFx[97] + tmpQN2[46]*tmpFx[107] + tmpQN2[47]*tmpFx[117];\ntmpQN1[38] = + tmpQN2[36]*tmpFx[8] + tmpQN2[37]*tmpFx[18] + tmpQN2[38]*tmpFx[28] + tmpQN2[39]*tmpFx[38] + tmpQN2[40]*tmpFx[48] + tmpQN2[41]*tmpFx[58] + tmpQN2[42]*tmpFx[68] + tmpQN2[43]*tmpFx[78] + tmpQN2[44]*tmpFx[88] + tmpQN2[45]*tmpFx[98] + tmpQN2[46]*tmpFx[108] + tmpQN2[47]*tmpFx[118];\ntmpQN1[39] = + tmpQN2[36]*tmpFx[9] + tmpQN2[37]*tmpFx[19] + tmpQN2[38]*tmpFx[29] + tmpQN2[39]*tmpFx[39] + tmpQN2[40]*tmpFx[49] + tmpQN2[41]*tmpFx[59] + tmpQN2[42]*tmpFx[69] + tmpQN2[43]*tmpFx[79] + tmpQN2[44]*tmpFx[89] + tmpQN2[45]*tmpFx[99] + tmpQN2[46]*tmpFx[109] + tmpQN2[47]*tmpFx[119];\ntmpQN1[40] = + tmpQN2[48]*tmpFx[0] + tmpQN2[49]*tmpFx[10] + tmpQN2[50]*tmpFx[20] + tmpQN2[51]*tmpFx[30] + tmpQN2[52]*tmpFx[40] + tmpQN2[53]*tmpFx[50] + tmpQN2[54]*tmpFx[60] + tmpQN2[55]*tmpFx[70] + tmpQN2[56]*tmpFx[80] + tmpQN2[57]*tmpFx[90] + tmpQN2[58]*tmpFx[100] + tmpQN2[59]*tmpFx[110];\ntmpQN1[41] = + tmpQN2[48]*tmpFx[1] + tmpQN2[49]*tmpFx[11] + tmpQN2[50]*tmpFx[21] + tmpQN2[51]*tmpFx[31] + tmpQN2[52]*tmpFx[41] + tmpQN2[53]*tmpFx[51] + tmpQN2[54]*tmpFx[61] + tmpQN2[55]*tmpFx[71] + tmpQN2[56]*tmpFx[81] + tmpQN2[57]*tmpFx[91] + tmpQN2[58]*tmpFx[101] + tmpQN2[59]*tmpFx[111];\ntmpQN1[42] = + tmpQN2[48]*tmpFx[2] + tmpQN2[49]*tmpFx[12] + tmpQN2[50]*tmpFx[22] + tmpQN2[51]*tmpFx[32] + tmpQN2[52]*tmpFx[42] + tmpQN2[53]*tmpFx[52] + tmpQN2[54]*tmpFx[62] + tmpQN2[55]*tmpFx[72] + tmpQN2[56]*tmpFx[82] + tmpQN2[57]*tmpFx[92] + tmpQN2[58]*tmpFx[102] + tmpQN2[59]*tmpFx[112];\ntmpQN1[43] = + tmpQN2[48]*tmpFx[3] + tmpQN2[49]*tmpFx[13] + tmpQN2[50]*tmpFx[23] + tmpQN2[51]*tmpFx[33] + tmpQN2[52]*tmpFx[43] + tmpQN2[53]*tmpFx[53] + tmpQN2[54]*tmpFx[63] + tmpQN2[55]*tmpFx[73] + tmpQN2[56]*tmpFx[83] + tmpQN2[57]*tmpFx[93] + tmpQN2[58]*tmpFx[103] + tmpQN2[59]*tmpFx[113];\ntmpQN1[44] = + tmpQN2[48]*tmpFx[4] + tmpQN2[49]*tmpFx[14] + tmpQN2[50]*tmpFx[24] + tmpQN2[51]*tmpFx[34] + tmpQN2[52]*tmpFx[44] + tmpQN2[53]*tmpFx[54] + tmpQN2[54]*tmpFx[64] + tmpQN2[55]*tmpFx[74] + tmpQN2[56]*tmpFx[84] + tmpQN2[57]*tmpFx[94] + tmpQN2[58]*tmpFx[104] + tmpQN2[59]*tmpFx[114];\ntmpQN1[45] = + tmpQN2[48]*tmpFx[5] + tmpQN2[49]*tmpFx[15] + tmpQN2[50]*tmpFx[25] + tmpQN2[51]*tmpFx[35] + tmpQN2[52]*tmpFx[45] + tmpQN2[53]*tmpFx[55] + tmpQN2[54]*tmpFx[65] + tmpQN2[55]*tmpFx[75] + tmpQN2[56]*tmpFx[85] + tmpQN2[57]*tmpFx[95] + tmpQN2[58]*tmpFx[105] + tmpQN2[59]*tmpFx[115];\ntmpQN1[46] = + tmpQN2[48]*tmpFx[6] + tmpQN2[49]*tmpFx[16] + tmpQN2[50]*tmpFx[26] + tmpQN2[51]*tmpFx[36] + tmpQN2[52]*tmpFx[46] + tmpQN2[53]*tmpFx[56] + tmpQN2[54]*tmpFx[66] + tmpQN2[55]*tmpFx[76] + tmpQN2[56]*tmpFx[86] + tmpQN2[57]*tmpFx[96] + tmpQN2[58]*tmpFx[106] + tmpQN2[59]*tmpFx[116];\ntmpQN1[47] = + tmpQN2[48]*tmpFx[7] + tmpQN2[49]*tmpFx[17] + tmpQN2[50]*tmpFx[27] + tmpQN2[51]*tmpFx[37] + tmpQN2[52]*tmpFx[47] + tmpQN2[53]*tmpFx[57] + tmpQN2[54]*tmpFx[67] + tmpQN2[55]*tmpFx[77] + tmpQN2[56]*tmpFx[87] + tmpQN2[57]*tmpFx[97] + tmpQN2[58]*tmpFx[107] + tmpQN2[59]*tmpFx[117];\ntmpQN1[48] = + tmpQN2[48]*tmpFx[8] + tmpQN2[49]*tmpFx[18] + tmpQN2[50]*tmpFx[28] + tmpQN2[51]*tmpFx[38] + tmpQN2[52]*tmpFx[48] + tmpQN2[53]*tmpFx[58] + tmpQN2[54]*tmpFx[68] + tmpQN2[55]*tmpFx[78] + tmpQN2[56]*tmpFx[88] + tmpQN2[57]*tmpFx[98] + tmpQN2[58]*tmpFx[108] + tmpQN2[59]*tmpFx[118];\ntmpQN1[49] = + tmpQN2[48]*tmpFx[9] + tmpQN2[49]*tmpFx[19] + tmpQN2[50]*tmpFx[29] + tmpQN2[51]*tmpFx[39] + tmpQN2[52]*tmpFx[49] + tmpQN2[53]*tmpFx[59] + tmpQN2[54]*tmpFx[69] + tmpQN2[55]*tmpFx[79] + tmpQN2[56]*tmpFx[89] + tmpQN2[57]*tmpFx[99] + tmpQN2[58]*tmpFx[109] + tmpQN2[59]*tmpFx[119];\ntmpQN1[50] = + tmpQN2[60]*tmpFx[0] + tmpQN2[61]*tmpFx[10] + tmpQN2[62]*tmpFx[20] + tmpQN2[63]*tmpFx[30] + tmpQN2[64]*tmpFx[40] + tmpQN2[65]*tmpFx[50] + tmpQN2[66]*tmpFx[60] + tmpQN2[67]*tmpFx[70] + tmpQN2[68]*tmpFx[80] + tmpQN2[69]*tmpFx[90] + tmpQN2[70]*tmpFx[100] + tmpQN2[71]*tmpFx[110];\ntmpQN1[51] = + tmpQN2[60]*tmpFx[1] + tmpQN2[61]*tmpFx[11] + tmpQN2[62]*tmpFx[21] + tmpQN2[63]*tmpFx[31] + tmpQN2[64]*tmpFx[41] + tmpQN2[65]*tmpFx[51] + tmpQN2[66]*tmpFx[61] + tmpQN2[67]*tmpFx[71] + tmpQN2[68]*tmpFx[81] + tmpQN2[69]*tmpFx[91] + tmpQN2[70]*tmpFx[101] + tmpQN2[71]*tmpFx[111];\ntmpQN1[52] = + tmpQN2[60]*tmpFx[2] + tmpQN2[61]*tmpFx[12] + tmpQN2[62]*tmpFx[22] + tmpQN2[63]*tmpFx[32] + tmpQN2[64]*tmpFx[42] + tmpQN2[65]*tmpFx[52] + tmpQN2[66]*tmpFx[62] + tmpQN2[67]*tmpFx[72] + tmpQN2[68]*tmpFx[82] + tmpQN2[69]*tmpFx[92] + tmpQN2[70]*tmpFx[102] + tmpQN2[71]*tmpFx[112];\ntmpQN1[53] = + tmpQN2[60]*tmpFx[3] + tmpQN2[61]*tmpFx[13] + tmpQN2[62]*tmpFx[23] + tmpQN2[63]*tmpFx[33] + tmpQN2[64]*tmpFx[43] + tmpQN2[65]*tmpFx[53] + tmpQN2[66]*tmpFx[63] + tmpQN2[67]*tmpFx[73] + tmpQN2[68]*tmpFx[83] + tmpQN2[69]*tmpFx[93] + tmpQN2[70]*tmpFx[103] + tmpQN2[71]*tmpFx[113];\ntmpQN1[54] = + tmpQN2[60]*tmpFx[4] + tmpQN2[61]*tmpFx[14] + tmpQN2[62]*tmpFx[24] + tmpQN2[63]*tmpFx[34] + tmpQN2[64]*tmpFx[44] + tmpQN2[65]*tmpFx[54] + tmpQN2[66]*tmpFx[64] + tmpQN2[67]*tmpFx[74] + tmpQN2[68]*tmpFx[84] + tmpQN2[69]*tmpFx[94] + tmpQN2[70]*tmpFx[104] + tmpQN2[71]*tmpFx[114];\ntmpQN1[55] = + tmpQN2[60]*tmpFx[5] + tmpQN2[61]*tmpFx[15] + tmpQN2[62]*tmpFx[25] + tmpQN2[63]*tmpFx[35] + tmpQN2[64]*tmpFx[45] + tmpQN2[65]*tmpFx[55] + tmpQN2[66]*tmpFx[65] + tmpQN2[67]*tmpFx[75] + tmpQN2[68]*tmpFx[85] + tmpQN2[69]*tmpFx[95] + tmpQN2[70]*tmpFx[105] + tmpQN2[71]*tmpFx[115];\ntmpQN1[56] = + tmpQN2[60]*tmpFx[6] + tmpQN2[61]*tmpFx[16] + tmpQN2[62]*tmpFx[26] + tmpQN2[63]*tmpFx[36] + tmpQN2[64]*tmpFx[46] + tmpQN2[65]*tmpFx[56] + tmpQN2[66]*tmpFx[66] + tmpQN2[67]*tmpFx[76] + tmpQN2[68]*tmpFx[86] + tmpQN2[69]*tmpFx[96] + tmpQN2[70]*tmpFx[106] + tmpQN2[71]*tmpFx[116];\ntmpQN1[57] = + tmpQN2[60]*tmpFx[7] + tmpQN2[61]*tmpFx[17] + tmpQN2[62]*tmpFx[27] + tmpQN2[63]*tmpFx[37] + tmpQN2[64]*tmpFx[47] + tmpQN2[65]*tmpFx[57] + tmpQN2[66]*tmpFx[67] + tmpQN2[67]*tmpFx[77] + tmpQN2[68]*tmpFx[87] + tmpQN2[69]*tmpFx[97] + tmpQN2[70]*tmpFx[107] + tmpQN2[71]*tmpFx[117];\ntmpQN1[58] = + tmpQN2[60]*tmpFx[8] + tmpQN2[61]*tmpFx[18] + tmpQN2[62]*tmpFx[28] + tmpQN2[63]*tmpFx[38] + tmpQN2[64]*tmpFx[48] + tmpQN2[65]*tmpFx[58] + tmpQN2[66]*tmpFx[68] + tmpQN2[67]*tmpFx[78] + tmpQN2[68]*tmpFx[88] + tmpQN2[69]*tmpFx[98] + tmpQN2[70]*tmpFx[108] + tmpQN2[71]*tmpFx[118];\ntmpQN1[59] = + tmpQN2[60]*tmpFx[9] + tmpQN2[61]*tmpFx[19] + tmpQN2[62]*tmpFx[29] + tmpQN2[63]*tmpFx[39] + tmpQN2[64]*tmpFx[49] + tmpQN2[65]*tmpFx[59] + tmpQN2[66]*tmpFx[69] + tmpQN2[67]*tmpFx[79] + tmpQN2[68]*tmpFx[89] + tmpQN2[69]*tmpFx[99] + tmpQN2[70]*tmpFx[109] + tmpQN2[71]*tmpFx[119];\ntmpQN1[60] = + tmpQN2[72]*tmpFx[0] + tmpQN2[73]*tmpFx[10] + tmpQN2[74]*tmpFx[20] + tmpQN2[75]*tmpFx[30] + tmpQN2[76]*tmpFx[40] + tmpQN2[77]*tmpFx[50] + tmpQN2[78]*tmpFx[60] + tmpQN2[79]*tmpFx[70] + tmpQN2[80]*tmpFx[80] + tmpQN2[81]*tmpFx[90] + tmpQN2[82]*tmpFx[100] + tmpQN2[83]*tmpFx[110];\ntmpQN1[61] = + tmpQN2[72]*tmpFx[1] + tmpQN2[73]*tmpFx[11] + tmpQN2[74]*tmpFx[21] + tmpQN2[75]*tmpFx[31] + tmpQN2[76]*tmpFx[41] + tmpQN2[77]*tmpFx[51] + tmpQN2[78]*tmpFx[61] + tmpQN2[79]*tmpFx[71] + tmpQN2[80]*tmpFx[81] + tmpQN2[81]*tmpFx[91] + tmpQN2[82]*tmpFx[101] + tmpQN2[83]*tmpFx[111];\ntmpQN1[62] = + tmpQN2[72]*tmpFx[2] + tmpQN2[73]*tmpFx[12] + tmpQN2[74]*tmpFx[22] + tmpQN2[75]*tmpFx[32] + tmpQN2[76]*tmpFx[42] + tmpQN2[77]*tmpFx[52] + tmpQN2[78]*tmpFx[62] + tmpQN2[79]*tmpFx[72] + tmpQN2[80]*tmpFx[82] + tmpQN2[81]*tmpFx[92] + tmpQN2[82]*tmpFx[102] + tmpQN2[83]*tmpFx[112];\ntmpQN1[63] = + tmpQN2[72]*tmpFx[3] + tmpQN2[73]*tmpFx[13] + tmpQN2[74]*tmpFx[23] + tmpQN2[75]*tmpFx[33] + tmpQN2[76]*tmpFx[43] + tmpQN2[77]*tmpFx[53] + tmpQN2[78]*tmpFx[63] + tmpQN2[79]*tmpFx[73] + tmpQN2[80]*tmpFx[83] + tmpQN2[81]*tmpFx[93] + tmpQN2[82]*tmpFx[103] + tmpQN2[83]*tmpFx[113];\ntmpQN1[64] = + tmpQN2[72]*tmpFx[4] + tmpQN2[73]*tmpFx[14] + tmpQN2[74]*tmpFx[24] + tmpQN2[75]*tmpFx[34] + tmpQN2[76]*tmpFx[44] + tmpQN2[77]*tmpFx[54] + tmpQN2[78]*tmpFx[64] + tmpQN2[79]*tmpFx[74] + tmpQN2[80]*tmpFx[84] + tmpQN2[81]*tmpFx[94] + tmpQN2[82]*tmpFx[104] + tmpQN2[83]*tmpFx[114];\ntmpQN1[65] = + tmpQN2[72]*tmpFx[5] + tmpQN2[73]*tmpFx[15] + tmpQN2[74]*tmpFx[25] + tmpQN2[75]*tmpFx[35] + tmpQN2[76]*tmpFx[45] + tmpQN2[77]*tmpFx[55] + tmpQN2[78]*tmpFx[65] + tmpQN2[79]*tmpFx[75] + tmpQN2[80]*tmpFx[85] + tmpQN2[81]*tmpFx[95] + tmpQN2[82]*tmpFx[105] + tmpQN2[83]*tmpFx[115];\ntmpQN1[66] = + tmpQN2[72]*tmpFx[6] + tmpQN2[73]*tmpFx[16] + tmpQN2[74]*tmpFx[26] + tmpQN2[75]*tmpFx[36] + tmpQN2[76]*tmpFx[46] + tmpQN2[77]*tmpFx[56] + tmpQN2[78]*tmpFx[66] + tmpQN2[79]*tmpFx[76] + tmpQN2[80]*tmpFx[86] + tmpQN2[81]*tmpFx[96] + tmpQN2[82]*tmpFx[106] + tmpQN2[83]*tmpFx[116];\ntmpQN1[67] = + tmpQN2[72]*tmpFx[7] + tmpQN2[73]*tmpFx[17] + tmpQN2[74]*tmpFx[27] + tmpQN2[75]*tmpFx[37] + tmpQN2[76]*tmpFx[47] + tmpQN2[77]*tmpFx[57] + tmpQN2[78]*tmpFx[67] + tmpQN2[79]*tmpFx[77] + tmpQN2[80]*tmpFx[87] + tmpQN2[81]*tmpFx[97] + tmpQN2[82]*tmpFx[107] + tmpQN2[83]*tmpFx[117];\ntmpQN1[68] = + tmpQN2[72]*tmpFx[8] + tmpQN2[73]*tmpFx[18] + tmpQN2[74]*tmpFx[28] + tmpQN2[75]*tmpFx[38] + tmpQN2[76]*tmpFx[48] + tmpQN2[77]*tmpFx[58] + tmpQN2[78]*tmpFx[68] + tmpQN2[79]*tmpFx[78] + tmpQN2[80]*tmpFx[88] + tmpQN2[81]*tmpFx[98] + tmpQN2[82]*tmpFx[108] + tmpQN2[83]*tmpFx[118];\ntmpQN1[69] = + tmpQN2[72]*tmpFx[9] + tmpQN2[73]*tmpFx[19] + tmpQN2[74]*tmpFx[29] + tmpQN2[75]*tmpFx[39] + tmpQN2[76]*tmpFx[49] + tmpQN2[77]*tmpFx[59] + tmpQN2[78]*tmpFx[69] + tmpQN2[79]*tmpFx[79] + tmpQN2[80]*tmpFx[89] + tmpQN2[81]*tmpFx[99] + tmpQN2[82]*tmpFx[109] + tmpQN2[83]*tmpFx[119];\ntmpQN1[70] = + tmpQN2[84]*tmpFx[0] + tmpQN2[85]*tmpFx[10] + tmpQN2[86]*tmpFx[20] + tmpQN2[87]*tmpFx[30] + tmpQN2[88]*tmpFx[40] + tmpQN2[89]*tmpFx[50] + tmpQN2[90]*tmpFx[60] + tmpQN2[91]*tmpFx[70] + tmpQN2[92]*tmpFx[80] + tmpQN2[93]*tmpFx[90] + tmpQN2[94]*tmpFx[100] + tmpQN2[95]*tmpFx[110];\ntmpQN1[71] = + tmpQN2[84]*tmpFx[1] + tmpQN2[85]*tmpFx[11] + tmpQN2[86]*tmpFx[21] + tmpQN2[87]*tmpFx[31] + tmpQN2[88]*tmpFx[41] + tmpQN2[89]*tmpFx[51] + tmpQN2[90]*tmpFx[61] + tmpQN2[91]*tmpFx[71] + tmpQN2[92]*tmpFx[81] + tmpQN2[93]*tmpFx[91] + tmpQN2[94]*tmpFx[101] + tmpQN2[95]*tmpFx[111];\ntmpQN1[72] = + tmpQN2[84]*tmpFx[2] + tmpQN2[85]*tmpFx[12] + tmpQN2[86]*tmpFx[22] + tmpQN2[87]*tmpFx[32] + tmpQN2[88]*tmpFx[42] + tmpQN2[89]*tmpFx[52] + tmpQN2[90]*tmpFx[62] + tmpQN2[91]*tmpFx[72] + tmpQN2[92]*tmpFx[82] + tmpQN2[93]*tmpFx[92] + tmpQN2[94]*tmpFx[102] + tmpQN2[95]*tmpFx[112];\ntmpQN1[73] = + tmpQN2[84]*tmpFx[3] + tmpQN2[85]*tmpFx[13] + tmpQN2[86]*tmpFx[23] + tmpQN2[87]*tmpFx[33] + tmpQN2[88]*tmpFx[43] + tmpQN2[89]*tmpFx[53] + tmpQN2[90]*tmpFx[63] + tmpQN2[91]*tmpFx[73] + tmpQN2[92]*tmpFx[83] + tmpQN2[93]*tmpFx[93] + tmpQN2[94]*tmpFx[103] + tmpQN2[95]*tmpFx[113];\ntmpQN1[74] = + tmpQN2[84]*tmpFx[4] + tmpQN2[85]*tmpFx[14] + tmpQN2[86]*tmpFx[24] + tmpQN2[87]*tmpFx[34] + tmpQN2[88]*tmpFx[44] + tmpQN2[89]*tmpFx[54] + tmpQN2[90]*tmpFx[64] + tmpQN2[91]*tmpFx[74] + tmpQN2[92]*tmpFx[84] + tmpQN2[93]*tmpFx[94] + tmpQN2[94]*tmpFx[104] + tmpQN2[95]*tmpFx[114];\ntmpQN1[75] = + tmpQN2[84]*tmpFx[5] + tmpQN2[85]*tmpFx[15] + tmpQN2[86]*tmpFx[25] + tmpQN2[87]*tmpFx[35] + tmpQN2[88]*tmpFx[45] + tmpQN2[89]*tmpFx[55] + tmpQN2[90]*tmpFx[65] + tmpQN2[91]*tmpFx[75] + tmpQN2[92]*tmpFx[85] + tmpQN2[93]*tmpFx[95] + tmpQN2[94]*tmpFx[105] + tmpQN2[95]*tmpFx[115];\ntmpQN1[76] = + tmpQN2[84]*tmpFx[6] + tmpQN2[85]*tmpFx[16] + tmpQN2[86]*tmpFx[26] + tmpQN2[87]*tmpFx[36] + tmpQN2[88]*tmpFx[46] + tmpQN2[89]*tmpFx[56] + tmpQN2[90]*tmpFx[66] + tmpQN2[91]*tmpFx[76] + tmpQN2[92]*tmpFx[86] + tmpQN2[93]*tmpFx[96] + tmpQN2[94]*tmpFx[106] + tmpQN2[95]*tmpFx[116];\ntmpQN1[77] = + tmpQN2[84]*tmpFx[7] + tmpQN2[85]*tmpFx[17] + tmpQN2[86]*tmpFx[27] + tmpQN2[87]*tmpFx[37] + tmpQN2[88]*tmpFx[47] + tmpQN2[89]*tmpFx[57] + tmpQN2[90]*tmpFx[67] + tmpQN2[91]*tmpFx[77] + tmpQN2[92]*tmpFx[87] + tmpQN2[93]*tmpFx[97] + tmpQN2[94]*tmpFx[107] + tmpQN2[95]*tmpFx[117];\ntmpQN1[78] = + tmpQN2[84]*tmpFx[8] + tmpQN2[85]*tmpFx[18] + tmpQN2[86]*tmpFx[28] + tmpQN2[87]*tmpFx[38] + tmpQN2[88]*tmpFx[48] + tmpQN2[89]*tmpFx[58] + tmpQN2[90]*tmpFx[68] + tmpQN2[91]*tmpFx[78] + tmpQN2[92]*tmpFx[88] + tmpQN2[93]*tmpFx[98] + tmpQN2[94]*tmpFx[108] + tmpQN2[95]*tmpFx[118];\ntmpQN1[79] = + tmpQN2[84]*tmpFx[9] + tmpQN2[85]*tmpFx[19] + tmpQN2[86]*tmpFx[29] + tmpQN2[87]*tmpFx[39] + tmpQN2[88]*tmpFx[49] + tmpQN2[89]*tmpFx[59] + tmpQN2[90]*tmpFx[69] + tmpQN2[91]*tmpFx[79] + tmpQN2[92]*tmpFx[89] + tmpQN2[93]*tmpFx[99] + tmpQN2[94]*tmpFx[109] + tmpQN2[95]*tmpFx[119];\ntmpQN1[80] = + tmpQN2[96]*tmpFx[0] + tmpQN2[97]*tmpFx[10] + tmpQN2[98]*tmpFx[20] + tmpQN2[99]*tmpFx[30] + tmpQN2[100]*tmpFx[40] + tmpQN2[101]*tmpFx[50] + tmpQN2[102]*tmpFx[60] + tmpQN2[103]*tmpFx[70] + tmpQN2[104]*tmpFx[80] + tmpQN2[105]*tmpFx[90] + tmpQN2[106]*tmpFx[100] + tmpQN2[107]*tmpFx[110];\ntmpQN1[81] = + tmpQN2[96]*tmpFx[1] + tmpQN2[97]*tmpFx[11] + tmpQN2[98]*tmpFx[21] + tmpQN2[99]*tmpFx[31] + tmpQN2[100]*tmpFx[41] + tmpQN2[101]*tmpFx[51] + tmpQN2[102]*tmpFx[61] + tmpQN2[103]*tmpFx[71] + tmpQN2[104]*tmpFx[81] + tmpQN2[105]*tmpFx[91] + tmpQN2[106]*tmpFx[101] + tmpQN2[107]*tmpFx[111];\ntmpQN1[82] = + tmpQN2[96]*tmpFx[2] + tmpQN2[97]*tmpFx[12] + tmpQN2[98]*tmpFx[22] + tmpQN2[99]*tmpFx[32] + tmpQN2[100]*tmpFx[42] + tmpQN2[101]*tmpFx[52] + tmpQN2[102]*tmpFx[62] + tmpQN2[103]*tmpFx[72] + tmpQN2[104]*tmpFx[82] + tmpQN2[105]*tmpFx[92] + tmpQN2[106]*tmpFx[102] + tmpQN2[107]*tmpFx[112];\ntmpQN1[83] = + tmpQN2[96]*tmpFx[3] + tmpQN2[97]*tmpFx[13] + tmpQN2[98]*tmpFx[23] + tmpQN2[99]*tmpFx[33] + tmpQN2[100]*tmpFx[43] + tmpQN2[101]*tmpFx[53] + tmpQN2[102]*tmpFx[63] + tmpQN2[103]*tmpFx[73] + tmpQN2[104]*tmpFx[83] + tmpQN2[105]*tmpFx[93] + tmpQN2[106]*tmpFx[103] + tmpQN2[107]*tmpFx[113];\ntmpQN1[84] = + tmpQN2[96]*tmpFx[4] + tmpQN2[97]*tmpFx[14] + tmpQN2[98]*tmpFx[24] + tmpQN2[99]*tmpFx[34] + tmpQN2[100]*tmpFx[44] + tmpQN2[101]*tmpFx[54] + tmpQN2[102]*tmpFx[64] + tmpQN2[103]*tmpFx[74] + tmpQN2[104]*tmpFx[84] + tmpQN2[105]*tmpFx[94] + tmpQN2[106]*tmpFx[104] + tmpQN2[107]*tmpFx[114];\ntmpQN1[85] = + tmpQN2[96]*tmpFx[5] + tmpQN2[97]*tmpFx[15] + tmpQN2[98]*tmpFx[25] + tmpQN2[99]*tmpFx[35] + tmpQN2[100]*tmpFx[45] + tmpQN2[101]*tmpFx[55] + tmpQN2[102]*tmpFx[65] + tmpQN2[103]*tmpFx[75] + tmpQN2[104]*tmpFx[85] + tmpQN2[105]*tmpFx[95] + tmpQN2[106]*tmpFx[105] + tmpQN2[107]*tmpFx[115];\ntmpQN1[86] = + tmpQN2[96]*tmpFx[6] + tmpQN2[97]*tmpFx[16] + tmpQN2[98]*tmpFx[26] + tmpQN2[99]*tmpFx[36] + tmpQN2[100]*tmpFx[46] + tmpQN2[101]*tmpFx[56] + tmpQN2[102]*tmpFx[66] + tmpQN2[103]*tmpFx[76] + tmpQN2[104]*tmpFx[86] + tmpQN2[105]*tmpFx[96] + tmpQN2[106]*tmpFx[106] + tmpQN2[107]*tmpFx[116];\ntmpQN1[87] = + tmpQN2[96]*tmpFx[7] + tmpQN2[97]*tmpFx[17] + tmpQN2[98]*tmpFx[27] + tmpQN2[99]*tmpFx[37] + tmpQN2[100]*tmpFx[47] + tmpQN2[101]*tmpFx[57] + tmpQN2[102]*tmpFx[67] + tmpQN2[103]*tmpFx[77] + tmpQN2[104]*tmpFx[87] + tmpQN2[105]*tmpFx[97] + tmpQN2[106]*tmpFx[107] + tmpQN2[107]*tmpFx[117];\ntmpQN1[88] = + tmpQN2[96]*tmpFx[8] + tmpQN2[97]*tmpFx[18] + tmpQN2[98]*tmpFx[28] + tmpQN2[99]*tmpFx[38] + tmpQN2[100]*tmpFx[48] + tmpQN2[101]*tmpFx[58] + tmpQN2[102]*tmpFx[68] + tmpQN2[103]*tmpFx[78] + tmpQN2[104]*tmpFx[88] + tmpQN2[105]*tmpFx[98] + tmpQN2[106]*tmpFx[108] + tmpQN2[107]*tmpFx[118];\ntmpQN1[89] = + tmpQN2[96]*tmpFx[9] + tmpQN2[97]*tmpFx[19] + tmpQN2[98]*tmpFx[29] + tmpQN2[99]*tmpFx[39] + tmpQN2[100]*tmpFx[49] + tmpQN2[101]*tmpFx[59] + tmpQN2[102]*tmpFx[69] + tmpQN2[103]*tmpFx[79] + tmpQN2[104]*tmpFx[89] + tmpQN2[105]*tmpFx[99] + tmpQN2[106]*tmpFx[109] + tmpQN2[107]*tmpFx[119];\ntmpQN1[90] = + tmpQN2[108]*tmpFx[0] + tmpQN2[109]*tmpFx[10] + tmpQN2[110]*tmpFx[20] + tmpQN2[111]*tmpFx[30] + tmpQN2[112]*tmpFx[40] + tmpQN2[113]*tmpFx[50] + tmpQN2[114]*tmpFx[60] + tmpQN2[115]*tmpFx[70] + tmpQN2[116]*tmpFx[80] + tmpQN2[117]*tmpFx[90] + tmpQN2[118]*tmpFx[100] + tmpQN2[119]*tmpFx[110];\ntmpQN1[91] = + tmpQN2[108]*tmpFx[1] + tmpQN2[109]*tmpFx[11] + tmpQN2[110]*tmpFx[21] + tmpQN2[111]*tmpFx[31] + tmpQN2[112]*tmpFx[41] + tmpQN2[113]*tmpFx[51] + tmpQN2[114]*tmpFx[61] + tmpQN2[115]*tmpFx[71] + tmpQN2[116]*tmpFx[81] + tmpQN2[117]*tmpFx[91] + tmpQN2[118]*tmpFx[101] + tmpQN2[119]*tmpFx[111];\ntmpQN1[92] = + tmpQN2[108]*tmpFx[2] + tmpQN2[109]*tmpFx[12] + tmpQN2[110]*tmpFx[22] + tmpQN2[111]*tmpFx[32] + tmpQN2[112]*tmpFx[42] + tmpQN2[113]*tmpFx[52] + tmpQN2[114]*tmpFx[62] + tmpQN2[115]*tmpFx[72] + tmpQN2[116]*tmpFx[82] + tmpQN2[117]*tmpFx[92] + tmpQN2[118]*tmpFx[102] + tmpQN2[119]*tmpFx[112];\ntmpQN1[93] = + tmpQN2[108]*tmpFx[3] + tmpQN2[109]*tmpFx[13] + tmpQN2[110]*tmpFx[23] + tmpQN2[111]*tmpFx[33] + tmpQN2[112]*tmpFx[43] + tmpQN2[113]*tmpFx[53] + tmpQN2[114]*tmpFx[63] + tmpQN2[115]*tmpFx[73] + tmpQN2[116]*tmpFx[83] + tmpQN2[117]*tmpFx[93] + tmpQN2[118]*tmpFx[103] + tmpQN2[119]*tmpFx[113];\ntmpQN1[94] = + tmpQN2[108]*tmpFx[4] + tmpQN2[109]*tmpFx[14] + tmpQN2[110]*tmpFx[24] + tmpQN2[111]*tmpFx[34] + tmpQN2[112]*tmpFx[44] + tmpQN2[113]*tmpFx[54] + tmpQN2[114]*tmpFx[64] + tmpQN2[115]*tmpFx[74] + tmpQN2[116]*tmpFx[84] + tmpQN2[117]*tmpFx[94] + tmpQN2[118]*tmpFx[104] + tmpQN2[119]*tmpFx[114];\ntmpQN1[95] = + tmpQN2[108]*tmpFx[5] + tmpQN2[109]*tmpFx[15] + tmpQN2[110]*tmpFx[25] + tmpQN2[111]*tmpFx[35] + tmpQN2[112]*tmpFx[45] + tmpQN2[113]*tmpFx[55] + tmpQN2[114]*tmpFx[65] + tmpQN2[115]*tmpFx[75] + tmpQN2[116]*tmpFx[85] + tmpQN2[117]*tmpFx[95] + tmpQN2[118]*tmpFx[105] + tmpQN2[119]*tmpFx[115];\ntmpQN1[96] = + tmpQN2[108]*tmpFx[6] + tmpQN2[109]*tmpFx[16] + tmpQN2[110]*tmpFx[26] + tmpQN2[111]*tmpFx[36] + tmpQN2[112]*tmpFx[46] + tmpQN2[113]*tmpFx[56] + tmpQN2[114]*tmpFx[66] + tmpQN2[115]*tmpFx[76] + tmpQN2[116]*tmpFx[86] + tmpQN2[117]*tmpFx[96] + tmpQN2[118]*tmpFx[106] + tmpQN2[119]*tmpFx[116];\ntmpQN1[97] = + tmpQN2[108]*tmpFx[7] + tmpQN2[109]*tmpFx[17] + tmpQN2[110]*tmpFx[27] + tmpQN2[111]*tmpFx[37] + tmpQN2[112]*tmpFx[47] + tmpQN2[113]*tmpFx[57] + tmpQN2[114]*tmpFx[67] + tmpQN2[115]*tmpFx[77] + tmpQN2[116]*tmpFx[87] + tmpQN2[117]*tmpFx[97] + tmpQN2[118]*tmpFx[107] + tmpQN2[119]*tmpFx[117];\ntmpQN1[98] = + tmpQN2[108]*tmpFx[8] + tmpQN2[109]*tmpFx[18] + tmpQN2[110]*tmpFx[28] + tmpQN2[111]*tmpFx[38] + tmpQN2[112]*tmpFx[48] + tmpQN2[113]*tmpFx[58] + tmpQN2[114]*tmpFx[68] + tmpQN2[115]*tmpFx[78] + tmpQN2[116]*tmpFx[88] + tmpQN2[117]*tmpFx[98] + tmpQN2[118]*tmpFx[108] + tmpQN2[119]*tmpFx[118];\ntmpQN1[99] = + tmpQN2[108]*tmpFx[9] + tmpQN2[109]*tmpFx[19] + tmpQN2[110]*tmpFx[29] + tmpQN2[111]*tmpFx[39] + tmpQN2[112]*tmpFx[49] + tmpQN2[113]*tmpFx[59] + tmpQN2[114]*tmpFx[69] + tmpQN2[115]*tmpFx[79] + tmpQN2[116]*tmpFx[89] + tmpQN2[117]*tmpFx[99] + tmpQN2[118]*tmpFx[109] + tmpQN2[119]*tmpFx[119];\n}\n\nvoid acado_evaluateObjective(  )\n{\nint runObj;\nfor (runObj = 0; runObj < 20; ++runObj)\n{\nacadoWorkspace.objValueIn[0] = acadoVariables.x[runObj * 10];\nacadoWorkspace.objValueIn[1] = acadoVariables.x[runObj * 10 + 1];\nacadoWorkspace.objValueIn[2] = acadoVariables.x[runObj * 10 + 2];\nacadoWorkspace.objValueIn[3] = acadoVariables.x[runObj * 10 + 3];\nacadoWorkspace.objValueIn[4] = acadoVariables.x[runObj * 10 + 4];\nacadoWorkspace.objValueIn[5] = acadoVariables.x[runObj * 10 + 5];\nacadoWorkspace.objValueIn[6] = acadoVariables.x[runObj * 10 + 6];\nacadoWorkspace.objValueIn[7] = acadoVariables.x[runObj * 10 + 7];\nacadoWorkspace.objValueIn[8] = acadoVariables.x[runObj * 10 + 8];\nacadoWorkspace.objValueIn[9] = acadoVariables.x[runObj * 10 + 9];\nacadoWorkspace.objValueIn[10] = acadoVariables.u[runObj * 4];\nacadoWorkspace.objValueIn[11] = acadoVariables.u[runObj * 4 + 1];\nacadoWorkspace.objValueIn[12] = acadoVariables.u[runObj * 4 + 2];\nacadoWorkspace.objValueIn[13] = acadoVariables.u[runObj * 4 + 3];\nacadoWorkspace.objValueIn[14] = acadoVariables.od[runObj * 10];\nacadoWorkspace.objValueIn[15] = acadoVariables.od[runObj * 10 + 1];\nacadoWorkspace.objValueIn[16] = acadoVariables.od[runObj * 10 + 2];\nacadoWorkspace.objValueIn[17] = acadoVariables.od[runObj * 10 + 3];\nacadoWorkspace.objValueIn[18] = acadoVariables.od[runObj * 10 + 4];\nacadoWorkspace.objValueIn[19] = acadoVariables.od[runObj * 10 + 5];\nacadoWorkspace.objValueIn[20] = acadoVariables.od[runObj * 10 + 6];\nacadoWorkspace.objValueIn[21] = acadoVariables.od[runObj * 10 + 7];\nacadoWorkspace.objValueIn[22] = acadoVariables.od[runObj * 10 + 8];\nacadoWorkspace.objValueIn[23] = acadoVariables.od[runObj * 10 + 9];\n\nacado_evaluateLSQ( acadoWorkspace.objValueIn, acadoWorkspace.objValueOut );\nacadoWorkspace.Dy[runObj * 16] = acadoWorkspace.objValueOut[0];\nacadoWorkspace.Dy[runObj * 16 + 1] = acadoWorkspace.objValueOut[1];\nacadoWorkspace.Dy[runObj * 16 + 2] = acadoWorkspace.objValueOut[2];\nacadoWorkspace.Dy[runObj * 16 + 3] = acadoWorkspace.objValueOut[3];\nacadoWorkspace.Dy[runObj * 16 + 4] = acadoWorkspace.objValueOut[4];\nacadoWorkspace.Dy[runObj * 16 + 5] = acadoWorkspace.objValueOut[5];\nacadoWorkspace.Dy[runObj * 16 + 6] = acadoWorkspace.objValueOut[6];\nacadoWorkspace.Dy[runObj * 16 + 7] = acadoWorkspace.objValueOut[7];\nacadoWorkspace.Dy[runObj * 16 + 8] = acadoWorkspace.objValueOut[8];\nacadoWorkspace.Dy[runObj * 16 + 9] = acadoWorkspace.objValueOut[9];\nacadoWorkspace.Dy[runObj * 16 + 10] = acadoWorkspace.objValueOut[10];\nacadoWorkspace.Dy[runObj * 16 + 11] = acadoWorkspace.objValueOut[11];\nacadoWorkspace.Dy[runObj * 16 + 12] = acadoWorkspace.objValueOut[12];\nacadoWorkspace.Dy[runObj * 16 + 13] = acadoWorkspace.objValueOut[13];\nacadoWorkspace.Dy[runObj * 16 + 14] = acadoWorkspace.objValueOut[14];\nacadoWorkspace.Dy[runObj * 16 + 15] = acadoWorkspace.objValueOut[15];\n\nacado_setObjQ1Q2( &(acadoWorkspace.objValueOut[ 16 ]), &(acadoVariables.W[ runObj * 256 ]), &(acadoWorkspace.Q1[ runObj * 100 ]), &(acadoWorkspace.Q2[ runObj * 160 ]) );\n\nacado_setObjR1R2( &(acadoVariables.W[ runObj * 256 ]), &(acadoWorkspace.R1[ runObj * 16 ]), &(acadoWorkspace.R2[ runObj * 64 ]) );\n\n}\nacadoWorkspace.objValueIn[0] = acadoVariables.x[200];\nacadoWorkspace.objValueIn[1] = acadoVariables.x[201];\nacadoWorkspace.objValueIn[2] = acadoVariables.x[202];\nacadoWorkspace.objValueIn[3] = acadoVariables.x[203];\nacadoWorkspace.objValueIn[4] = acadoVariables.x[204];\nacadoWorkspace.objValueIn[5] = acadoVariables.x[205];\nacadoWorkspace.objValueIn[6] = acadoVariables.x[206];\nacadoWorkspace.objValueIn[7] = acadoVariables.x[207];\nacadoWorkspace.objValueIn[8] = acadoVariables.x[208];\nacadoWorkspace.objValueIn[9] = acadoVariables.x[209];\nacadoWorkspace.objValueIn[10] = acadoVariables.od[200];\nacadoWorkspace.objValueIn[11] = acadoVariables.od[201];\nacadoWorkspace.objValueIn[12] = acadoVariables.od[202];\nacadoWorkspace.objValueIn[13] = acadoVariables.od[203];\nacadoWorkspace.objValueIn[14] = acadoVariables.od[204];\nacadoWorkspace.objValueIn[15] = acadoVariables.od[205];\nacadoWorkspace.objValueIn[16] = acadoVariables.od[206];\nacadoWorkspace.objValueIn[17] = acadoVariables.od[207];\nacadoWorkspace.objValueIn[18] = acadoVariables.od[208];\nacadoWorkspace.objValueIn[19] = acadoVariables.od[209];\nacado_evaluateLSQEndTerm( acadoWorkspace.objValueIn, acadoWorkspace.objValueOut );\n\nacadoWorkspace.DyN[0] = acadoWorkspace.objValueOut[0];\nacadoWorkspace.DyN[1] = acadoWorkspace.objValueOut[1];\nacadoWorkspace.DyN[2] = acadoWorkspace.objValueOut[2];\nacadoWorkspace.DyN[3] = acadoWorkspace.objValueOut[3];\nacadoWorkspace.DyN[4] = acadoWorkspace.objValueOut[4];\nacadoWorkspace.DyN[5] = acadoWorkspace.objValueOut[5];\nacadoWorkspace.DyN[6] = acadoWorkspace.objValueOut[6];\nacadoWorkspace.DyN[7] = acadoWorkspace.objValueOut[7];\nacadoWorkspace.DyN[8] = acadoWorkspace.objValueOut[8];\nacadoWorkspace.DyN[9] = acadoWorkspace.objValueOut[9];\nacadoWorkspace.DyN[10] = acadoWorkspace.objValueOut[10];\nacadoWorkspace.DyN[11] = acadoWorkspace.objValueOut[11];\n\nacado_setObjQN1QN2( &(acadoWorkspace.objValueOut[ 12 ]), acadoVariables.WN, acadoWorkspace.QN1, acadoWorkspace.QN2 );\n\n}\n\nvoid acado_multGxGu( real_t* const Gx1, real_t* const Gu1, real_t* const Gu2 )\n{\nGu2[0] = + Gx1[0]*Gu1[0] + Gx1[1]*Gu1[4] + Gx1[2]*Gu1[8] + Gx1[3]*Gu1[12] + Gx1[4]*Gu1[16] + Gx1[5]*Gu1[20] + Gx1[6]*Gu1[24] + Gx1[7]*Gu1[28] + Gx1[8]*Gu1[32] + Gx1[9]*Gu1[36];\nGu2[1] = + Gx1[0]*Gu1[1] + Gx1[1]*Gu1[5] + Gx1[2]*Gu1[9] + Gx1[3]*Gu1[13] + Gx1[4]*Gu1[17] + Gx1[5]*Gu1[21] + Gx1[6]*Gu1[25] + Gx1[7]*Gu1[29] + Gx1[8]*Gu1[33] + Gx1[9]*Gu1[37];\nGu2[2] = + Gx1[0]*Gu1[2] + Gx1[1]*Gu1[6] + Gx1[2]*Gu1[10] + Gx1[3]*Gu1[14] + Gx1[4]*Gu1[18] + Gx1[5]*Gu1[22] + Gx1[6]*Gu1[26] + Gx1[7]*Gu1[30] + Gx1[8]*Gu1[34] + Gx1[9]*Gu1[38];\nGu2[3] = + Gx1[0]*Gu1[3] + Gx1[1]*Gu1[7] + Gx1[2]*Gu1[11] + Gx1[3]*Gu1[15] + Gx1[4]*Gu1[19] + Gx1[5]*Gu1[23] + Gx1[6]*Gu1[27] + Gx1[7]*Gu1[31] + Gx1[8]*Gu1[35] + Gx1[9]*Gu1[39];\nGu2[4] = + Gx1[10]*Gu1[0] + Gx1[11]*Gu1[4] + Gx1[12]*Gu1[8] + Gx1[13]*Gu1[12] + Gx1[14]*Gu1[16] + Gx1[15]*Gu1[20] + Gx1[16]*Gu1[24] + Gx1[17]*Gu1[28] + Gx1[18]*Gu1[32] + Gx1[19]*Gu1[36];\nGu2[5] = + Gx1[10]*Gu1[1] + Gx1[11]*Gu1[5] + Gx1[12]*Gu1[9] + Gx1[13]*Gu1[13] + Gx1[14]*Gu1[17] + Gx1[15]*Gu1[21] + Gx1[16]*Gu1[25] + Gx1[17]*Gu1[29] + Gx1[18]*Gu1[33] + Gx1[19]*Gu1[37];\nGu2[6] = + Gx1[10]*Gu1[2] + Gx1[11]*Gu1[6] + Gx1[12]*Gu1[10] + Gx1[13]*Gu1[14] + Gx1[14]*Gu1[18] + Gx1[15]*Gu1[22] + Gx1[16]*Gu1[26] + Gx1[17]*Gu1[30] + Gx1[18]*Gu1[34] + Gx1[19]*Gu1[38];\nGu2[7] = + Gx1[10]*Gu1[3] + Gx1[11]*Gu1[7] + Gx1[12]*Gu1[11] + Gx1[13]*Gu1[15] + Gx1[14]*Gu1[19] + Gx1[15]*Gu1[23] + Gx1[16]*Gu1[27] + Gx1[17]*Gu1[31] + Gx1[18]*Gu1[35] + Gx1[19]*Gu1[39];\nGu2[8] = + Gx1[20]*Gu1[0] + Gx1[21]*Gu1[4] + Gx1[22]*Gu1[8] + Gx1[23]*Gu1[12] + Gx1[24]*Gu1[16] + Gx1[25]*Gu1[20] + Gx1[26]*Gu1[24] + Gx1[27]*Gu1[28] + Gx1[28]*Gu1[32] + Gx1[29]*Gu1[36];\nGu2[9] = + Gx1[20]*Gu1[1] + Gx1[21]*Gu1[5] + Gx1[22]*Gu1[9] + Gx1[23]*Gu1[13] + Gx1[24]*Gu1[17] + Gx1[25]*Gu1[21] + Gx1[26]*Gu1[25] + Gx1[27]*Gu1[29] + Gx1[28]*Gu1[33] + Gx1[29]*Gu1[37];\nGu2[10] = + Gx1[20]*Gu1[2] + Gx1[21]*Gu1[6] + Gx1[22]*Gu1[10] + Gx1[23]*Gu1[14] + Gx1[24]*Gu1[18] + Gx1[25]*Gu1[22] + Gx1[26]*Gu1[26] + Gx1[27]*Gu1[30] + Gx1[28]*Gu1[34] + Gx1[29]*Gu1[38];\nGu2[11] = + Gx1[20]*Gu1[3] + Gx1[21]*Gu1[7] + Gx1[22]*Gu1[11] + Gx1[23]*Gu1[15] + Gx1[24]*Gu1[19] + Gx1[25]*Gu1[23] + Gx1[26]*Gu1[27] + Gx1[27]*Gu1[31] + Gx1[28]*Gu1[35] + Gx1[29]*Gu1[39];\nGu2[12] = + Gx1[30]*Gu1[0] + Gx1[31]*Gu1[4] + Gx1[32]*Gu1[8] + Gx1[33]*Gu1[12] + Gx1[34]*Gu1[16] + Gx1[35]*Gu1[20] + Gx1[36]*Gu1[24] + Gx1[37]*Gu1[28] + Gx1[38]*Gu1[32] + Gx1[39]*Gu1[36];\nGu2[13] = + Gx1[30]*Gu1[1] + Gx1[31]*Gu1[5] + Gx1[32]*Gu1[9] + Gx1[33]*Gu1[13] + Gx1[34]*Gu1[17] + Gx1[35]*Gu1[21] + Gx1[36]*Gu1[25] + Gx1[37]*Gu1[29] + Gx1[38]*Gu1[33] + Gx1[39]*Gu1[37];\nGu2[14] = + Gx1[30]*Gu1[2] + Gx1[31]*Gu1[6] + Gx1[32]*Gu1[10] + Gx1[33]*Gu1[14] + Gx1[34]*Gu1[18] + Gx1[35]*Gu1[22] + Gx1[36]*Gu1[26] + Gx1[37]*Gu1[30] + Gx1[38]*Gu1[34] + Gx1[39]*Gu1[38];\nGu2[15] = + Gx1[30]*Gu1[3] + Gx1[31]*Gu1[7] + Gx1[32]*Gu1[11] + Gx1[33]*Gu1[15] + Gx1[34]*Gu1[19] + Gx1[35]*Gu1[23] + Gx1[36]*Gu1[27] + Gx1[37]*Gu1[31] + Gx1[38]*Gu1[35] + Gx1[39]*Gu1[39];\nGu2[16] = + Gx1[40]*Gu1[0] + Gx1[41]*Gu1[4] + Gx1[42]*Gu1[8] + Gx1[43]*Gu1[12] + Gx1[44]*Gu1[16] + Gx1[45]*Gu1[20] + Gx1[46]*Gu1[24] + Gx1[47]*Gu1[28] + Gx1[48]*Gu1[32] + Gx1[49]*Gu1[36];\nGu2[17] = + Gx1[40]*Gu1[1] + Gx1[41]*Gu1[5] + Gx1[42]*Gu1[9] + Gx1[43]*Gu1[13] + Gx1[44]*Gu1[17] + Gx1[45]*Gu1[21] + Gx1[46]*Gu1[25] + Gx1[47]*Gu1[29] + Gx1[48]*Gu1[33] + Gx1[49]*Gu1[37];\nGu2[18] = + Gx1[40]*Gu1[2] + Gx1[41]*Gu1[6] + Gx1[42]*Gu1[10] + Gx1[43]*Gu1[14] + Gx1[44]*Gu1[18] + Gx1[45]*Gu1[22] + Gx1[46]*Gu1[26] + Gx1[47]*Gu1[30] + Gx1[48]*Gu1[34] + Gx1[49]*Gu1[38];\nGu2[19] = + Gx1[40]*Gu1[3] + Gx1[41]*Gu1[7] + Gx1[42]*Gu1[11] + Gx1[43]*Gu1[15] + Gx1[44]*Gu1[19] + Gx1[45]*Gu1[23] + Gx1[46]*Gu1[27] + Gx1[47]*Gu1[31] + Gx1[48]*Gu1[35] + Gx1[49]*Gu1[39];\nGu2[20] = + Gx1[50]*Gu1[0] + Gx1[51]*Gu1[4] + Gx1[52]*Gu1[8] + Gx1[53]*Gu1[12] + Gx1[54]*Gu1[16] + Gx1[55]*Gu1[20] + Gx1[56]*Gu1[24] + Gx1[57]*Gu1[28] + Gx1[58]*Gu1[32] + Gx1[59]*Gu1[36];\nGu2[21] = + Gx1[50]*Gu1[1] + Gx1[51]*Gu1[5] + Gx1[52]*Gu1[9] + Gx1[53]*Gu1[13] + Gx1[54]*Gu1[17] + Gx1[55]*Gu1[21] + Gx1[56]*Gu1[25] + Gx1[57]*Gu1[29] + Gx1[58]*Gu1[33] + Gx1[59]*Gu1[37];\nGu2[22] = + Gx1[50]*Gu1[2] + Gx1[51]*Gu1[6] + Gx1[52]*Gu1[10] + Gx1[53]*Gu1[14] + Gx1[54]*Gu1[18] + Gx1[55]*Gu1[22] + Gx1[56]*Gu1[26] + Gx1[57]*Gu1[30] + Gx1[58]*Gu1[34] + Gx1[59]*Gu1[38];\nGu2[23] = + Gx1[50]*Gu1[3] + Gx1[51]*Gu1[7] + Gx1[52]*Gu1[11] + Gx1[53]*Gu1[15] + Gx1[54]*Gu1[19] + Gx1[55]*Gu1[23] + Gx1[56]*Gu1[27] + Gx1[57]*Gu1[31] + Gx1[58]*Gu1[35] + Gx1[59]*Gu1[39];\nGu2[24] = + Gx1[60]*Gu1[0] + Gx1[61]*Gu1[4] + Gx1[62]*Gu1[8] + Gx1[63]*Gu1[12] + Gx1[64]*Gu1[16] + Gx1[65]*Gu1[20] + Gx1[66]*Gu1[24] + Gx1[67]*Gu1[28] + Gx1[68]*Gu1[32] + Gx1[69]*Gu1[36];\nGu2[25] = + Gx1[60]*Gu1[1] + Gx1[61]*Gu1[5] + Gx1[62]*Gu1[9] + Gx1[63]*Gu1[13] + Gx1[64]*Gu1[17] + Gx1[65]*Gu1[21] + Gx1[66]*Gu1[25] + Gx1[67]*Gu1[29] + Gx1[68]*Gu1[33] + Gx1[69]*Gu1[37];\nGu2[26] = + Gx1[60]*Gu1[2] + Gx1[61]*Gu1[6] + Gx1[62]*Gu1[10] + Gx1[63]*Gu1[14] + Gx1[64]*Gu1[18] + Gx1[65]*Gu1[22] + Gx1[66]*Gu1[26] + Gx1[67]*Gu1[30] + Gx1[68]*Gu1[34] + Gx1[69]*Gu1[38];\nGu2[27] = + Gx1[60]*Gu1[3] + Gx1[61]*Gu1[7] + Gx1[62]*Gu1[11] + Gx1[63]*Gu1[15] + Gx1[64]*Gu1[19] + Gx1[65]*Gu1[23] + Gx1[66]*Gu1[27] + Gx1[67]*Gu1[31] + Gx1[68]*Gu1[35] + Gx1[69]*Gu1[39];\nGu2[28] = + Gx1[70]*Gu1[0] + Gx1[71]*Gu1[4] + Gx1[72]*Gu1[8] + Gx1[73]*Gu1[12] + Gx1[74]*Gu1[16] + Gx1[75]*Gu1[20] + Gx1[76]*Gu1[24] + Gx1[77]*Gu1[28] + Gx1[78]*Gu1[32] + Gx1[79]*Gu1[36];\nGu2[29] = + Gx1[70]*Gu1[1] + Gx1[71]*Gu1[5] + Gx1[72]*Gu1[9] + Gx1[73]*Gu1[13] + Gx1[74]*Gu1[17] + Gx1[75]*Gu1[21] + Gx1[76]*Gu1[25] + Gx1[77]*Gu1[29] + Gx1[78]*Gu1[33] + Gx1[79]*Gu1[37];\nGu2[30] = + Gx1[70]*Gu1[2] + Gx1[71]*Gu1[6] + Gx1[72]*Gu1[10] + Gx1[73]*Gu1[14] + Gx1[74]*Gu1[18] + Gx1[75]*Gu1[22] + Gx1[76]*Gu1[26] + Gx1[77]*Gu1[30] + Gx1[78]*Gu1[34] + Gx1[79]*Gu1[38];\nGu2[31] = + Gx1[70]*Gu1[3] + Gx1[71]*Gu1[7] + Gx1[72]*Gu1[11] + Gx1[73]*Gu1[15] + Gx1[74]*Gu1[19] + Gx1[75]*Gu1[23] + Gx1[76]*Gu1[27] + Gx1[77]*Gu1[31] + Gx1[78]*Gu1[35] + Gx1[79]*Gu1[39];\nGu2[32] = + Gx1[80]*Gu1[0] + Gx1[81]*Gu1[4] + Gx1[82]*Gu1[8] + Gx1[83]*Gu1[12] + Gx1[84]*Gu1[16] + Gx1[85]*Gu1[20] + Gx1[86]*Gu1[24] + Gx1[87]*Gu1[28] + Gx1[88]*Gu1[32] + Gx1[89]*Gu1[36];\nGu2[33] = + Gx1[80]*Gu1[1] + Gx1[81]*Gu1[5] + Gx1[82]*Gu1[9] + Gx1[83]*Gu1[13] + Gx1[84]*Gu1[17] + Gx1[85]*Gu1[21] + Gx1[86]*Gu1[25] + Gx1[87]*Gu1[29] + Gx1[88]*Gu1[33] + Gx1[89]*Gu1[37];\nGu2[34] = + Gx1[80]*Gu1[2] + Gx1[81]*Gu1[6] + Gx1[82]*Gu1[10] + Gx1[83]*Gu1[14] + Gx1[84]*Gu1[18] + Gx1[85]*Gu1[22] + Gx1[86]*Gu1[26] + Gx1[87]*Gu1[30] + Gx1[88]*Gu1[34] + Gx1[89]*Gu1[38];\nGu2[35] = + Gx1[80]*Gu1[3] + Gx1[81]*Gu1[7] + Gx1[82]*Gu1[11] + Gx1[83]*Gu1[15] + Gx1[84]*Gu1[19] + Gx1[85]*Gu1[23] + Gx1[86]*Gu1[27] + Gx1[87]*Gu1[31] + Gx1[88]*Gu1[35] + Gx1[89]*Gu1[39];\nGu2[36] = + Gx1[90]*Gu1[0] + Gx1[91]*Gu1[4] + Gx1[92]*Gu1[8] + Gx1[93]*Gu1[12] + Gx1[94]*Gu1[16] + Gx1[95]*Gu1[20] + Gx1[96]*Gu1[24] + Gx1[97]*Gu1[28] + Gx1[98]*Gu1[32] + Gx1[99]*Gu1[36];\nGu2[37] = + Gx1[90]*Gu1[1] + Gx1[91]*Gu1[5] + Gx1[92]*Gu1[9] + Gx1[93]*Gu1[13] + Gx1[94]*Gu1[17] + Gx1[95]*Gu1[21] + Gx1[96]*Gu1[25] + Gx1[97]*Gu1[29] + Gx1[98]*Gu1[33] + Gx1[99]*Gu1[37];\nGu2[38] = + Gx1[90]*Gu1[2] + Gx1[91]*Gu1[6] + Gx1[92]*Gu1[10] + Gx1[93]*Gu1[14] + Gx1[94]*Gu1[18] + Gx1[95]*Gu1[22] + Gx1[96]*Gu1[26] + Gx1[97]*Gu1[30] + Gx1[98]*Gu1[34] + Gx1[99]*Gu1[38];\nGu2[39] = + Gx1[90]*Gu1[3] + Gx1[91]*Gu1[7] + Gx1[92]*Gu1[11] + Gx1[93]*Gu1[15] + Gx1[94]*Gu1[19] + Gx1[95]*Gu1[23] + Gx1[96]*Gu1[27] + Gx1[97]*Gu1[31] + Gx1[98]*Gu1[35] + Gx1[99]*Gu1[39];\n}\n\nvoid acado_moveGuE( real_t* const Gu1, real_t* const Gu2 )\n{\nGu2[0] = Gu1[0];\nGu2[1] = Gu1[1];\nGu2[2] = Gu1[2];\nGu2[3] = Gu1[3];\nGu2[4] = Gu1[4];\nGu2[5] = Gu1[5];\nGu2[6] = Gu1[6];\nGu2[7] = Gu1[7];\nGu2[8] = Gu1[8];\nGu2[9] = Gu1[9];\nGu2[10] = Gu1[10];\nGu2[11] = Gu1[11];\nGu2[12] = Gu1[12];\nGu2[13] = Gu1[13];\nGu2[14] = Gu1[14];\nGu2[15] = Gu1[15];\nGu2[16] = Gu1[16];\nGu2[17] = Gu1[17];\nGu2[18] = Gu1[18];\nGu2[19] = Gu1[19];\nGu2[20] = Gu1[20];\nGu2[21] = Gu1[21];\nGu2[22] = Gu1[22];\nGu2[23] = Gu1[23];\nGu2[24] = Gu1[24];\nGu2[25] = Gu1[25];\nGu2[26] = Gu1[26];\nGu2[27] = Gu1[27];\nGu2[28] = Gu1[28];\nGu2[29] = Gu1[29];\nGu2[30] = Gu1[30];\nGu2[31] = Gu1[31];\nGu2[32] = Gu1[32];\nGu2[33] = Gu1[33];\nGu2[34] = Gu1[34];\nGu2[35] = Gu1[35];\nGu2[36] = Gu1[36];\nGu2[37] = Gu1[37];\nGu2[38] = Gu1[38];\nGu2[39] = Gu1[39];\n}\n\nvoid acado_multBTW1( real_t* const Gu1, real_t* const Gu2, int iRow, int iCol )\n{\nacadoWorkspace.H[(iRow * 320) + (iCol * 4)] = + Gu1[0]*Gu2[0] + Gu1[4]*Gu2[4] + Gu1[8]*Gu2[8] + Gu1[12]*Gu2[12] + Gu1[16]*Gu2[16] + Gu1[20]*Gu2[20] + Gu1[24]*Gu2[24] + Gu1[28]*Gu2[28] + Gu1[32]*Gu2[32] + Gu1[36]*Gu2[36];\nacadoWorkspace.H[(iRow * 320) + (iCol * 4 + 1)] = + Gu1[0]*Gu2[1] + Gu1[4]*Gu2[5] + Gu1[8]*Gu2[9] + Gu1[12]*Gu2[13] + Gu1[16]*Gu2[17] + Gu1[20]*Gu2[21] + Gu1[24]*Gu2[25] + Gu1[28]*Gu2[29] + Gu1[32]*Gu2[33] + Gu1[36]*Gu2[37];\nacadoWorkspace.H[(iRow * 320) + (iCol * 4 + 2)] = + Gu1[0]*Gu2[2] + Gu1[4]*Gu2[6] + Gu1[8]*Gu2[10] + Gu1[12]*Gu2[14] + Gu1[16]*Gu2[18] + Gu1[20]*Gu2[22] + Gu1[24]*Gu2[26] + Gu1[28]*Gu2[30] + Gu1[32]*Gu2[34] + Gu1[36]*Gu2[38];\nacadoWorkspace.H[(iRow * 320) + (iCol * 4 + 3)] = + Gu1[0]*Gu2[3] + Gu1[4]*Gu2[7] + Gu1[8]*Gu2[11] + Gu1[12]*Gu2[15] + Gu1[16]*Gu2[19] + Gu1[20]*Gu2[23] + Gu1[24]*Gu2[27] + Gu1[28]*Gu2[31] + Gu1[32]*Gu2[35] + Gu1[36]*Gu2[39];\nacadoWorkspace.H[(iRow * 320 + 80) + (iCol * 4)] = + Gu1[1]*Gu2[0] + Gu1[5]*Gu2[4] + Gu1[9]*Gu2[8] + Gu1[13]*Gu2[12] + Gu1[17]*Gu2[16] + Gu1[21]*Gu2[20] + Gu1[25]*Gu2[24] + Gu1[29]*Gu2[28] + Gu1[33]*Gu2[32] + Gu1[37]*Gu2[36];\nacadoWorkspace.H[(iRow * 320 + 80) + (iCol * 4 + 1)] = + Gu1[1]*Gu2[1] + Gu1[5]*Gu2[5] + Gu1[9]*Gu2[9] + Gu1[13]*Gu2[13] + Gu1[17]*Gu2[17] + Gu1[21]*Gu2[21] + Gu1[25]*Gu2[25] + Gu1[29]*Gu2[29] + Gu1[33]*Gu2[33] + Gu1[37]*Gu2[37];\nacadoWorkspace.H[(iRow * 320 + 80) + (iCol * 4 + 2)] = + Gu1[1]*Gu2[2] + Gu1[5]*Gu2[6] + Gu1[9]*Gu2[10] + Gu1[13]*Gu2[14] + Gu1[17]*Gu2[18] + Gu1[21]*Gu2[22] + Gu1[25]*Gu2[26] + Gu1[29]*Gu2[30] + Gu1[33]*Gu2[34] + Gu1[37]*Gu2[38];\nacadoWorkspace.H[(iRow * 320 + 80) + (iCol * 4 + 3)] = + Gu1[1]*Gu2[3] + Gu1[5]*Gu2[7] + Gu1[9]*Gu2[11] + Gu1[13]*Gu2[15] + Gu1[17]*Gu2[19] + Gu1[21]*Gu2[23] + Gu1[25]*Gu2[27] + Gu1[29]*Gu2[31] + Gu1[33]*Gu2[35] + Gu1[37]*Gu2[39];\nacadoWorkspace.H[(iRow * 320 + 160) + (iCol * 4)] = + Gu1[2]*Gu2[0] + Gu1[6]*Gu2[4] + Gu1[10]*Gu2[8] + Gu1[14]*Gu2[12] + Gu1[18]*Gu2[16] + Gu1[22]*Gu2[20] + Gu1[26]*Gu2[24] + Gu1[30]*Gu2[28] + Gu1[34]*Gu2[32] + Gu1[38]*Gu2[36];\nacadoWorkspace.H[(iRow * 320 + 160) + (iCol * 4 + 1)] = + Gu1[2]*Gu2[1] + Gu1[6]*Gu2[5] + Gu1[10]*Gu2[9] + Gu1[14]*Gu2[13] + Gu1[18]*Gu2[17] + Gu1[22]*Gu2[21] + Gu1[26]*Gu2[25] + Gu1[30]*Gu2[29] + Gu1[34]*Gu2[33] + Gu1[38]*Gu2[37];\nacadoWorkspace.H[(iRow * 320 + 160) + (iCol * 4 + 2)] = + Gu1[2]*Gu2[2] + Gu1[6]*Gu2[6] + Gu1[10]*Gu2[10] + Gu1[14]*Gu2[14] + Gu1[18]*Gu2[18] + Gu1[22]*Gu2[22] + Gu1[26]*Gu2[26] + Gu1[30]*Gu2[30] + Gu1[34]*Gu2[34] + Gu1[38]*Gu2[38];\nacadoWorkspace.H[(iRow * 320 + 160) + (iCol * 4 + 3)] = + Gu1[2]*Gu2[3] + Gu1[6]*Gu2[7] + Gu1[10]*Gu2[11] + Gu1[14]*Gu2[15] + Gu1[18]*Gu2[19] + Gu1[22]*Gu2[23] + Gu1[26]*Gu2[27] + Gu1[30]*Gu2[31] + Gu1[34]*Gu2[35] + Gu1[38]*Gu2[39];\nacadoWorkspace.H[(iRow * 320 + 240) + (iCol * 4)] = + Gu1[3]*Gu2[0] + Gu1[7]*Gu2[4] + Gu1[11]*Gu2[8] + Gu1[15]*Gu2[12] + Gu1[19]*Gu2[16] + Gu1[23]*Gu2[20] + Gu1[27]*Gu2[24] + Gu1[31]*Gu2[28] + Gu1[35]*Gu2[32] + Gu1[39]*Gu2[36];\nacadoWorkspace.H[(iRow * 320 + 240) + (iCol * 4 + 1)] = + Gu1[3]*Gu2[1] + Gu1[7]*Gu2[5] + Gu1[11]*Gu2[9] + Gu1[15]*Gu2[13] + Gu1[19]*Gu2[17] + Gu1[23]*Gu2[21] + Gu1[27]*Gu2[25] + Gu1[31]*Gu2[29] + Gu1[35]*Gu2[33] + Gu1[39]*Gu2[37];\nacadoWorkspace.H[(iRow * 320 + 240) + (iCol * 4 + 2)] = + Gu1[3]*Gu2[2] + Gu1[7]*Gu2[6] + Gu1[11]*Gu2[10] + Gu1[15]*Gu2[14] + Gu1[19]*Gu2[18] + Gu1[23]*Gu2[22] + Gu1[27]*Gu2[26] + Gu1[31]*Gu2[30] + Gu1[35]*Gu2[34] + Gu1[39]*Gu2[38];\nacadoWorkspace.H[(iRow * 320 + 240) + (iCol * 4 + 3)] = + Gu1[3]*Gu2[3] + Gu1[7]*Gu2[7] + Gu1[11]*Gu2[11] + Gu1[15]*Gu2[15] + Gu1[19]*Gu2[19] + Gu1[23]*Gu2[23] + Gu1[27]*Gu2[27] + Gu1[31]*Gu2[31] + Gu1[35]*Gu2[35] + Gu1[39]*Gu2[39];\n}\n\nvoid acado_multBTW1_R1( real_t* const R11, real_t* const Gu1, real_t* const Gu2, int iRow )\n{\nacadoWorkspace.H[iRow * 324] = + Gu1[0]*Gu2[0] + Gu1[4]*Gu2[4] + Gu1[8]*Gu2[8] + Gu1[12]*Gu2[12] + Gu1[16]*Gu2[16] + Gu1[20]*Gu2[20] + Gu1[24]*Gu2[24] + Gu1[28]*Gu2[28] + Gu1[32]*Gu2[32] + Gu1[36]*Gu2[36] + R11[0];\nacadoWorkspace.H[iRow * 324 + 1] = + Gu1[0]*Gu2[1] + Gu1[4]*Gu2[5] + Gu1[8]*Gu2[9] + Gu1[12]*Gu2[13] + Gu1[16]*Gu2[17] + Gu1[20]*Gu2[21] + Gu1[24]*Gu2[25] + Gu1[28]*Gu2[29] + Gu1[32]*Gu2[33] + Gu1[36]*Gu2[37] + R11[1];\nacadoWorkspace.H[iRow * 324 + 2] = + Gu1[0]*Gu2[2] + Gu1[4]*Gu2[6] + Gu1[8]*Gu2[10] + Gu1[12]*Gu2[14] + Gu1[16]*Gu2[18] + Gu1[20]*Gu2[22] + Gu1[24]*Gu2[26] + Gu1[28]*Gu2[30] + Gu1[32]*Gu2[34] + Gu1[36]*Gu2[38] + R11[2];\nacadoWorkspace.H[iRow * 324 + 3] = + Gu1[0]*Gu2[3] + Gu1[4]*Gu2[7] + Gu1[8]*Gu2[11] + Gu1[12]*Gu2[15] + Gu1[16]*Gu2[19] + Gu1[20]*Gu2[23] + Gu1[24]*Gu2[27] + Gu1[28]*Gu2[31] + Gu1[32]*Gu2[35] + Gu1[36]*Gu2[39] + R11[3];\nacadoWorkspace.H[iRow * 324 + 80] = + Gu1[1]*Gu2[0] + Gu1[5]*Gu2[4] + Gu1[9]*Gu2[8] + Gu1[13]*Gu2[12] + Gu1[17]*Gu2[16] + Gu1[21]*Gu2[20] + Gu1[25]*Gu2[24] + Gu1[29]*Gu2[28] + Gu1[33]*Gu2[32] + Gu1[37]*Gu2[36] + R11[4];\nacadoWorkspace.H[iRow * 324 + 81] = + Gu1[1]*Gu2[1] + Gu1[5]*Gu2[5] + Gu1[9]*Gu2[9] + Gu1[13]*Gu2[13] + Gu1[17]*Gu2[17] + Gu1[21]*Gu2[21] + Gu1[25]*Gu2[25] + Gu1[29]*Gu2[29] + Gu1[33]*Gu2[33] + Gu1[37]*Gu2[37] + R11[5];\nacadoWorkspace.H[iRow * 324 + 82] = + Gu1[1]*Gu2[2] + Gu1[5]*Gu2[6] + Gu1[9]*Gu2[10] + Gu1[13]*Gu2[14] + Gu1[17]*Gu2[18] + Gu1[21]*Gu2[22] + Gu1[25]*Gu2[26] + Gu1[29]*Gu2[30] + Gu1[33]*Gu2[34] + Gu1[37]*Gu2[38] + R11[6];\nacadoWorkspace.H[iRow * 324 + 83] = + Gu1[1]*Gu2[3] + Gu1[5]*Gu2[7] + Gu1[9]*Gu2[11] + Gu1[13]*Gu2[15] + Gu1[17]*Gu2[19] + Gu1[21]*Gu2[23] + Gu1[25]*Gu2[27] + Gu1[29]*Gu2[31] + Gu1[33]*Gu2[35] + Gu1[37]*Gu2[39] + R11[7];\nacadoWorkspace.H[iRow * 324 + 160] = + Gu1[2]*Gu2[0] + Gu1[6]*Gu2[4] + Gu1[10]*Gu2[8] + Gu1[14]*Gu2[12] + Gu1[18]*Gu2[16] + Gu1[22]*Gu2[20] + Gu1[26]*Gu2[24] + Gu1[30]*Gu2[28] + Gu1[34]*Gu2[32] + Gu1[38]*Gu2[36] + R11[8];\nacadoWorkspace.H[iRow * 324 + 161] = + Gu1[2]*Gu2[1] + Gu1[6]*Gu2[5] + Gu1[10]*Gu2[9] + Gu1[14]*Gu2[13] + Gu1[18]*Gu2[17] + Gu1[22]*Gu2[21] + Gu1[26]*Gu2[25] + Gu1[30]*Gu2[29] + Gu1[34]*Gu2[33] + Gu1[38]*Gu2[37] + R11[9];\nacadoWorkspace.H[iRow * 324 + 162] = + Gu1[2]*Gu2[2] + Gu1[6]*Gu2[6] + Gu1[10]*Gu2[10] + Gu1[14]*Gu2[14] + Gu1[18]*Gu2[18] + Gu1[22]*Gu2[22] + Gu1[26]*Gu2[26] + Gu1[30]*Gu2[30] + Gu1[34]*Gu2[34] + Gu1[38]*Gu2[38] + R11[10];\nacadoWorkspace.H[iRow * 324 + 163] = + Gu1[2]*Gu2[3] + Gu1[6]*Gu2[7] + Gu1[10]*Gu2[11] + Gu1[14]*Gu2[15] + Gu1[18]*Gu2[19] + Gu1[22]*Gu2[23] + Gu1[26]*Gu2[27] + Gu1[30]*Gu2[31] + Gu1[34]*Gu2[35] + Gu1[38]*Gu2[39] + R11[11];\nacadoWorkspace.H[iRow * 324 + 240] = + Gu1[3]*Gu2[0] + Gu1[7]*Gu2[4] + Gu1[11]*Gu2[8] + Gu1[15]*Gu2[12] + Gu1[19]*Gu2[16] + Gu1[23]*Gu2[20] + Gu1[27]*Gu2[24] + Gu1[31]*Gu2[28] + Gu1[35]*Gu2[32] + Gu1[39]*Gu2[36] + R11[12];\nacadoWorkspace.H[iRow * 324 + 241] = + Gu1[3]*Gu2[1] + Gu1[7]*Gu2[5] + Gu1[11]*Gu2[9] + Gu1[15]*Gu2[13] + Gu1[19]*Gu2[17] + Gu1[23]*Gu2[21] + Gu1[27]*Gu2[25] + Gu1[31]*Gu2[29] + Gu1[35]*Gu2[33] + Gu1[39]*Gu2[37] + R11[13];\nacadoWorkspace.H[iRow * 324 + 242] = + Gu1[3]*Gu2[2] + Gu1[7]*Gu2[6] + Gu1[11]*Gu2[10] + Gu1[15]*Gu2[14] + Gu1[19]*Gu2[18] + Gu1[23]*Gu2[22] + Gu1[27]*Gu2[26] + Gu1[31]*Gu2[30] + Gu1[35]*Gu2[34] + Gu1[39]*Gu2[38] + R11[14];\nacadoWorkspace.H[iRow * 324 + 243] = + Gu1[3]*Gu2[3] + Gu1[7]*Gu2[7] + Gu1[11]*Gu2[11] + Gu1[15]*Gu2[15] + Gu1[19]*Gu2[19] + Gu1[23]*Gu2[23] + Gu1[27]*Gu2[27] + Gu1[31]*Gu2[31] + Gu1[35]*Gu2[35] + Gu1[39]*Gu2[39] + R11[15];\n}\n\nvoid acado_multGxTGu( real_t* const Gx1, real_t* const Gu1, real_t* const Gu2 )\n{\nGu2[0] = + Gx1[0]*Gu1[0] + Gx1[10]*Gu1[4] + Gx1[20]*Gu1[8] + Gx1[30]*Gu1[12] + Gx1[40]*Gu1[16] + Gx1[50]*Gu1[20] + Gx1[60]*Gu1[24] + Gx1[70]*Gu1[28] + Gx1[80]*Gu1[32] + Gx1[90]*Gu1[36];\nGu2[1] = + Gx1[0]*Gu1[1] + Gx1[10]*Gu1[5] + Gx1[20]*Gu1[9] + Gx1[30]*Gu1[13] + Gx1[40]*Gu1[17] + Gx1[50]*Gu1[21] + Gx1[60]*Gu1[25] + Gx1[70]*Gu1[29] + Gx1[80]*Gu1[33] + Gx1[90]*Gu1[37];\nGu2[2] = + Gx1[0]*Gu1[2] + Gx1[10]*Gu1[6] + Gx1[20]*Gu1[10] + Gx1[30]*Gu1[14] + Gx1[40]*Gu1[18] + Gx1[50]*Gu1[22] + Gx1[60]*Gu1[26] + Gx1[70]*Gu1[30] + Gx1[80]*Gu1[34] + Gx1[90]*Gu1[38];\nGu2[3] = + Gx1[0]*Gu1[3] + Gx1[10]*Gu1[7] + Gx1[20]*Gu1[11] + Gx1[30]*Gu1[15] + Gx1[40]*Gu1[19] + Gx1[50]*Gu1[23] + Gx1[60]*Gu1[27] + Gx1[70]*Gu1[31] + Gx1[80]*Gu1[35] + Gx1[90]*Gu1[39];\nGu2[4] = + Gx1[1]*Gu1[0] + Gx1[11]*Gu1[4] + Gx1[21]*Gu1[8] + Gx1[31]*Gu1[12] + Gx1[41]*Gu1[16] + Gx1[51]*Gu1[20] + Gx1[61]*Gu1[24] + Gx1[71]*Gu1[28] + Gx1[81]*Gu1[32] + Gx1[91]*Gu1[36];\nGu2[5] = + Gx1[1]*Gu1[1] + Gx1[11]*Gu1[5] + Gx1[21]*Gu1[9] + Gx1[31]*Gu1[13] + Gx1[41]*Gu1[17] + Gx1[51]*Gu1[21] + Gx1[61]*Gu1[25] + Gx1[71]*Gu1[29] + Gx1[81]*Gu1[33] + Gx1[91]*Gu1[37];\nGu2[6] = + Gx1[1]*Gu1[2] + Gx1[11]*Gu1[6] + Gx1[21]*Gu1[10] + Gx1[31]*Gu1[14] + Gx1[41]*Gu1[18] + Gx1[51]*Gu1[22] + Gx1[61]*Gu1[26] + Gx1[71]*Gu1[30] + Gx1[81]*Gu1[34] + Gx1[91]*Gu1[38];\nGu2[7] = + Gx1[1]*Gu1[3] + Gx1[11]*Gu1[7] + Gx1[21]*Gu1[11] + Gx1[31]*Gu1[15] + Gx1[41]*Gu1[19] + Gx1[51]*Gu1[23] + Gx1[61]*Gu1[27] + Gx1[71]*Gu1[31] + Gx1[81]*Gu1[35] + Gx1[91]*Gu1[39];\nGu2[8] = + Gx1[2]*Gu1[0] + Gx1[12]*Gu1[4] + Gx1[22]*Gu1[8] + Gx1[32]*Gu1[12] + Gx1[42]*Gu1[16] + Gx1[52]*Gu1[20] + Gx1[62]*Gu1[24] + Gx1[72]*Gu1[28] + Gx1[82]*Gu1[32] + Gx1[92]*Gu1[36];\nGu2[9] = + Gx1[2]*Gu1[1] + Gx1[12]*Gu1[5] + Gx1[22]*Gu1[9] + Gx1[32]*Gu1[13] + Gx1[42]*Gu1[17] + Gx1[52]*Gu1[21] + Gx1[62]*Gu1[25] + Gx1[72]*Gu1[29] + Gx1[82]*Gu1[33] + Gx1[92]*Gu1[37];\nGu2[10] = + Gx1[2]*Gu1[2] + Gx1[12]*Gu1[6] + Gx1[22]*Gu1[10] + Gx1[32]*Gu1[14] + Gx1[42]*Gu1[18] + Gx1[52]*Gu1[22] + Gx1[62]*Gu1[26] + Gx1[72]*Gu1[30] + Gx1[82]*Gu1[34] + Gx1[92]*Gu1[38];\nGu2[11] = + Gx1[2]*Gu1[3] + Gx1[12]*Gu1[7] + Gx1[22]*Gu1[11] + Gx1[32]*Gu1[15] + Gx1[42]*Gu1[19] + Gx1[52]*Gu1[23] + Gx1[62]*Gu1[27] + Gx1[72]*Gu1[31] + Gx1[82]*Gu1[35] + Gx1[92]*Gu1[39];\nGu2[12] = + Gx1[3]*Gu1[0] + Gx1[13]*Gu1[4] + Gx1[23]*Gu1[8] + Gx1[33]*Gu1[12] + Gx1[43]*Gu1[16] + Gx1[53]*Gu1[20] + Gx1[63]*Gu1[24] + Gx1[73]*Gu1[28] + Gx1[83]*Gu1[32] + Gx1[93]*Gu1[36];\nGu2[13] = + Gx1[3]*Gu1[1] + Gx1[13]*Gu1[5] + Gx1[23]*Gu1[9] + Gx1[33]*Gu1[13] + Gx1[43]*Gu1[17] + Gx1[53]*Gu1[21] + Gx1[63]*Gu1[25] + Gx1[73]*Gu1[29] + Gx1[83]*Gu1[33] + Gx1[93]*Gu1[37];\nGu2[14] = + Gx1[3]*Gu1[2] + Gx1[13]*Gu1[6] + Gx1[23]*Gu1[10] + Gx1[33]*Gu1[14] + Gx1[43]*Gu1[18] + Gx1[53]*Gu1[22] + Gx1[63]*Gu1[26] + Gx1[73]*Gu1[30] + Gx1[83]*Gu1[34] + Gx1[93]*Gu1[38];\nGu2[15] = + Gx1[3]*Gu1[3] + Gx1[13]*Gu1[7] + Gx1[23]*Gu1[11] + Gx1[33]*Gu1[15] + Gx1[43]*Gu1[19] + Gx1[53]*Gu1[23] + Gx1[63]*Gu1[27] + Gx1[73]*Gu1[31] + Gx1[83]*Gu1[35] + Gx1[93]*Gu1[39];\nGu2[16] = + Gx1[4]*Gu1[0] + Gx1[14]*Gu1[4] + Gx1[24]*Gu1[8] + Gx1[34]*Gu1[12] + Gx1[44]*Gu1[16] + Gx1[54]*Gu1[20] + Gx1[64]*Gu1[24] + Gx1[74]*Gu1[28] + Gx1[84]*Gu1[32] + Gx1[94]*Gu1[36];\nGu2[17] = + Gx1[4]*Gu1[1] + Gx1[14]*Gu1[5] + Gx1[24]*Gu1[9] + Gx1[34]*Gu1[13] + Gx1[44]*Gu1[17] + Gx1[54]*Gu1[21] + Gx1[64]*Gu1[25] + Gx1[74]*Gu1[29] + Gx1[84]*Gu1[33] + Gx1[94]*Gu1[37];\nGu2[18] = + Gx1[4]*Gu1[2] + Gx1[14]*Gu1[6] + Gx1[24]*Gu1[10] + Gx1[34]*Gu1[14] + Gx1[44]*Gu1[18] + Gx1[54]*Gu1[22] + Gx1[64]*Gu1[26] + Gx1[74]*Gu1[30] + Gx1[84]*Gu1[34] + Gx1[94]*Gu1[38];\nGu2[19] = + Gx1[4]*Gu1[3] + Gx1[14]*Gu1[7] + Gx1[24]*Gu1[11] + Gx1[34]*Gu1[15] + Gx1[44]*Gu1[19] + Gx1[54]*Gu1[23] + Gx1[64]*Gu1[27] + Gx1[74]*Gu1[31] + Gx1[84]*Gu1[35] + Gx1[94]*Gu1[39];\nGu2[20] = + Gx1[5]*Gu1[0] + Gx1[15]*Gu1[4] + Gx1[25]*Gu1[8] + Gx1[35]*Gu1[12] + Gx1[45]*Gu1[16] + Gx1[55]*Gu1[20] + Gx1[65]*Gu1[24] + Gx1[75]*Gu1[28] + Gx1[85]*Gu1[32] + Gx1[95]*Gu1[36];\nGu2[21] = + Gx1[5]*Gu1[1] + Gx1[15]*Gu1[5] + Gx1[25]*Gu1[9] + Gx1[35]*Gu1[13] + Gx1[45]*Gu1[17] + Gx1[55]*Gu1[21] + Gx1[65]*Gu1[25] + Gx1[75]*Gu1[29] + Gx1[85]*Gu1[33] + Gx1[95]*Gu1[37];\nGu2[22] = + Gx1[5]*Gu1[2] + Gx1[15]*Gu1[6] + Gx1[25]*Gu1[10] + Gx1[35]*Gu1[14] + Gx1[45]*Gu1[18] + Gx1[55]*Gu1[22] + Gx1[65]*Gu1[26] + Gx1[75]*Gu1[30] + Gx1[85]*Gu1[34] + Gx1[95]*Gu1[38];\nGu2[23] = + Gx1[5]*Gu1[3] + Gx1[15]*Gu1[7] + Gx1[25]*Gu1[11] + Gx1[35]*Gu1[15] + Gx1[45]*Gu1[19] + Gx1[55]*Gu1[23] + Gx1[65]*Gu1[27] + Gx1[75]*Gu1[31] + Gx1[85]*Gu1[35] + Gx1[95]*Gu1[39];\nGu2[24] = + Gx1[6]*Gu1[0] + Gx1[16]*Gu1[4] + Gx1[26]*Gu1[8] + Gx1[36]*Gu1[12] + Gx1[46]*Gu1[16] + Gx1[56]*Gu1[20] + Gx1[66]*Gu1[24] + Gx1[76]*Gu1[28] + Gx1[86]*Gu1[32] + Gx1[96]*Gu1[36];\nGu2[25] = + Gx1[6]*Gu1[1] + Gx1[16]*Gu1[5] + Gx1[26]*Gu1[9] + Gx1[36]*Gu1[13] + Gx1[46]*Gu1[17] + Gx1[56]*Gu1[21] + Gx1[66]*Gu1[25] + Gx1[76]*Gu1[29] + Gx1[86]*Gu1[33] + Gx1[96]*Gu1[37];\nGu2[26] = + Gx1[6]*Gu1[2] + Gx1[16]*Gu1[6] + Gx1[26]*Gu1[10] + Gx1[36]*Gu1[14] + Gx1[46]*Gu1[18] + Gx1[56]*Gu1[22] + Gx1[66]*Gu1[26] + Gx1[76]*Gu1[30] + Gx1[86]*Gu1[34] + Gx1[96]*Gu1[38];\nGu2[27] = + Gx1[6]*Gu1[3] + Gx1[16]*Gu1[7] + Gx1[26]*Gu1[11] + Gx1[36]*Gu1[15] + Gx1[46]*Gu1[19] + Gx1[56]*Gu1[23] + Gx1[66]*Gu1[27] + Gx1[76]*Gu1[31] + Gx1[86]*Gu1[35] + Gx1[96]*Gu1[39];\nGu2[28] = + Gx1[7]*Gu1[0] + Gx1[17]*Gu1[4] + Gx1[27]*Gu1[8] + Gx1[37]*Gu1[12] + Gx1[47]*Gu1[16] + Gx1[57]*Gu1[20] + Gx1[67]*Gu1[24] + Gx1[77]*Gu1[28] + Gx1[87]*Gu1[32] + Gx1[97]*Gu1[36];\nGu2[29] = + Gx1[7]*Gu1[1] + Gx1[17]*Gu1[5] + Gx1[27]*Gu1[9] + Gx1[37]*Gu1[13] + Gx1[47]*Gu1[17] + Gx1[57]*Gu1[21] + Gx1[67]*Gu1[25] + Gx1[77]*Gu1[29] + Gx1[87]*Gu1[33] + Gx1[97]*Gu1[37];\nGu2[30] = + Gx1[7]*Gu1[2] + Gx1[17]*Gu1[6] + Gx1[27]*Gu1[10] + Gx1[37]*Gu1[14] + Gx1[47]*Gu1[18] + Gx1[57]*Gu1[22] + Gx1[67]*Gu1[26] + Gx1[77]*Gu1[30] + Gx1[87]*Gu1[34] + Gx1[97]*Gu1[38];\nGu2[31] = + Gx1[7]*Gu1[3] + Gx1[17]*Gu1[7] + Gx1[27]*Gu1[11] + Gx1[37]*Gu1[15] + Gx1[47]*Gu1[19] + Gx1[57]*Gu1[23] + Gx1[67]*Gu1[27] + Gx1[77]*Gu1[31] + Gx1[87]*Gu1[35] + Gx1[97]*Gu1[39];\nGu2[32] = + Gx1[8]*Gu1[0] + Gx1[18]*Gu1[4] + Gx1[28]*Gu1[8] + Gx1[38]*Gu1[12] + Gx1[48]*Gu1[16] + Gx1[58]*Gu1[20] + Gx1[68]*Gu1[24] + Gx1[78]*Gu1[28] + Gx1[88]*Gu1[32] + Gx1[98]*Gu1[36];\nGu2[33] = + Gx1[8]*Gu1[1] + Gx1[18]*Gu1[5] + Gx1[28]*Gu1[9] + Gx1[38]*Gu1[13] + Gx1[48]*Gu1[17] + Gx1[58]*Gu1[21] + Gx1[68]*Gu1[25] + Gx1[78]*Gu1[29] + Gx1[88]*Gu1[33] + Gx1[98]*Gu1[37];\nGu2[34] = + Gx1[8]*Gu1[2] + Gx1[18]*Gu1[6] + Gx1[28]*Gu1[10] + Gx1[38]*Gu1[14] + Gx1[48]*Gu1[18] + Gx1[58]*Gu1[22] + Gx1[68]*Gu1[26] + Gx1[78]*Gu1[30] + Gx1[88]*Gu1[34] + Gx1[98]*Gu1[38];\nGu2[35] = + Gx1[8]*Gu1[3] + Gx1[18]*Gu1[7] + Gx1[28]*Gu1[11] + Gx1[38]*Gu1[15] + Gx1[48]*Gu1[19] + Gx1[58]*Gu1[23] + Gx1[68]*Gu1[27] + Gx1[78]*Gu1[31] + Gx1[88]*Gu1[35] + Gx1[98]*Gu1[39];\nGu2[36] = + Gx1[9]*Gu1[0] + Gx1[19]*Gu1[4] + Gx1[29]*Gu1[8] + Gx1[39]*Gu1[12] + Gx1[49]*Gu1[16] + Gx1[59]*Gu1[20] + Gx1[69]*Gu1[24] + Gx1[79]*Gu1[28] + Gx1[89]*Gu1[32] + Gx1[99]*Gu1[36];\nGu2[37] = + Gx1[9]*Gu1[1] + Gx1[19]*Gu1[5] + Gx1[29]*Gu1[9] + Gx1[39]*Gu1[13] + Gx1[49]*Gu1[17] + Gx1[59]*Gu1[21] + Gx1[69]*Gu1[25] + Gx1[79]*Gu1[29] + Gx1[89]*Gu1[33] + Gx1[99]*Gu1[37];\nGu2[38] = + Gx1[9]*Gu1[2] + Gx1[19]*Gu1[6] + Gx1[29]*Gu1[10] + Gx1[39]*Gu1[14] + Gx1[49]*Gu1[18] + Gx1[59]*Gu1[22] + Gx1[69]*Gu1[26] + Gx1[79]*Gu1[30] + Gx1[89]*Gu1[34] + Gx1[99]*Gu1[38];\nGu2[39] = + Gx1[9]*Gu1[3] + Gx1[19]*Gu1[7] + Gx1[29]*Gu1[11] + Gx1[39]*Gu1[15] + Gx1[49]*Gu1[19] + Gx1[59]*Gu1[23] + Gx1[69]*Gu1[27] + Gx1[79]*Gu1[31] + Gx1[89]*Gu1[35] + Gx1[99]*Gu1[39];\n}\n\nvoid acado_multQEW2( real_t* const Q11, real_t* const Gu1, real_t* const Gu2, real_t* const Gu3 )\n{\nGu3[0] = + Q11[0]*Gu1[0] + Q11[1]*Gu1[4] + Q11[2]*Gu1[8] + Q11[3]*Gu1[12] + Q11[4]*Gu1[16] + Q11[5]*Gu1[20] + Q11[6]*Gu1[24] + Q11[7]*Gu1[28] + Q11[8]*Gu1[32] + Q11[9]*Gu1[36] + Gu2[0];\nGu3[1] = + Q11[0]*Gu1[1] + Q11[1]*Gu1[5] + Q11[2]*Gu1[9] + Q11[3]*Gu1[13] + Q11[4]*Gu1[17] + Q11[5]*Gu1[21] + Q11[6]*Gu1[25] + Q11[7]*Gu1[29] + Q11[8]*Gu1[33] + Q11[9]*Gu1[37] + Gu2[1];\nGu3[2] = + Q11[0]*Gu1[2] + Q11[1]*Gu1[6] + Q11[2]*Gu1[10] + Q11[3]*Gu1[14] + Q11[4]*Gu1[18] + Q11[5]*Gu1[22] + Q11[6]*Gu1[26] + Q11[7]*Gu1[30] + Q11[8]*Gu1[34] + Q11[9]*Gu1[38] + Gu2[2];\nGu3[3] = + Q11[0]*Gu1[3] + Q11[1]*Gu1[7] + Q11[2]*Gu1[11] + Q11[3]*Gu1[15] + Q11[4]*Gu1[19] + Q11[5]*Gu1[23] + Q11[6]*Gu1[27] + Q11[7]*Gu1[31] + Q11[8]*Gu1[35] + Q11[9]*Gu1[39] + Gu2[3];\nGu3[4] = + Q11[10]*Gu1[0] + Q11[11]*Gu1[4] + Q11[12]*Gu1[8] + Q11[13]*Gu1[12] + Q11[14]*Gu1[16] + Q11[15]*Gu1[20] + Q11[16]*Gu1[24] + Q11[17]*Gu1[28] + Q11[18]*Gu1[32] + Q11[19]*Gu1[36] + Gu2[4];\nGu3[5] = + Q11[10]*Gu1[1] + Q11[11]*Gu1[5] + Q11[12]*Gu1[9] + Q11[13]*Gu1[13] + Q11[14]*Gu1[17] + Q11[15]*Gu1[21] + Q11[16]*Gu1[25] + Q11[17]*Gu1[29] + Q11[18]*Gu1[33] + Q11[19]*Gu1[37] + Gu2[5];\nGu3[6] = + Q11[10]*Gu1[2] + Q11[11]*Gu1[6] + Q11[12]*Gu1[10] + Q11[13]*Gu1[14] + Q11[14]*Gu1[18] + Q11[15]*Gu1[22] + Q11[16]*Gu1[26] + Q11[17]*Gu1[30] + Q11[18]*Gu1[34] + Q11[19]*Gu1[38] + Gu2[6];\nGu3[7] = + Q11[10]*Gu1[3] + Q11[11]*Gu1[7] + Q11[12]*Gu1[11] + Q11[13]*Gu1[15] + Q11[14]*Gu1[19] + Q11[15]*Gu1[23] + Q11[16]*Gu1[27] + Q11[17]*Gu1[31] + Q11[18]*Gu1[35] + Q11[19]*Gu1[39] + Gu2[7];\nGu3[8] = + Q11[20]*Gu1[0] + Q11[21]*Gu1[4] + Q11[22]*Gu1[8] + Q11[23]*Gu1[12] + Q11[24]*Gu1[16] + Q11[25]*Gu1[20] + Q11[26]*Gu1[24] + Q11[27]*Gu1[28] + Q11[28]*Gu1[32] + Q11[29]*Gu1[36] + Gu2[8];\nGu3[9] = + Q11[20]*Gu1[1] + Q11[21]*Gu1[5] + Q11[22]*Gu1[9] + Q11[23]*Gu1[13] + Q11[24]*Gu1[17] + Q11[25]*Gu1[21] + Q11[26]*Gu1[25] + Q11[27]*Gu1[29] + Q11[28]*Gu1[33] + Q11[29]*Gu1[37] + Gu2[9];\nGu3[10] = + Q11[20]*Gu1[2] + Q11[21]*Gu1[6] + Q11[22]*Gu1[10] + Q11[23]*Gu1[14] + Q11[24]*Gu1[18] + Q11[25]*Gu1[22] + Q11[26]*Gu1[26] + Q11[27]*Gu1[30] + Q11[28]*Gu1[34] + Q11[29]*Gu1[38] + Gu2[10];\nGu3[11] = + Q11[20]*Gu1[3] + Q11[21]*Gu1[7] + Q11[22]*Gu1[11] + Q11[23]*Gu1[15] + Q11[24]*Gu1[19] + Q11[25]*Gu1[23] + Q11[26]*Gu1[27] + Q11[27]*Gu1[31] + Q11[28]*Gu1[35] + Q11[29]*Gu1[39] + Gu2[11];\nGu3[12] = + Q11[30]*Gu1[0] + Q11[31]*Gu1[4] + Q11[32]*Gu1[8] + Q11[33]*Gu1[12] + Q11[34]*Gu1[16] + Q11[35]*Gu1[20] + Q11[36]*Gu1[24] + Q11[37]*Gu1[28] + Q11[38]*Gu1[32] + Q11[39]*Gu1[36] + Gu2[12];\nGu3[13] = + Q11[30]*Gu1[1] + Q11[31]*Gu1[5] + Q11[32]*Gu1[9] + Q11[33]*Gu1[13] + Q11[34]*Gu1[17] + Q11[35]*Gu1[21] + Q11[36]*Gu1[25] + Q11[37]*Gu1[29] + Q11[38]*Gu1[33] + Q11[39]*Gu1[37] + Gu2[13];\nGu3[14] = + Q11[30]*Gu1[2] + Q11[31]*Gu1[6] + Q11[32]*Gu1[10] + Q11[33]*Gu1[14] + Q11[34]*Gu1[18] + Q11[35]*Gu1[22] + Q11[36]*Gu1[26] + Q11[37]*Gu1[30] + Q11[38]*Gu1[34] + Q11[39]*Gu1[38] + Gu2[14];\nGu3[15] = + Q11[30]*Gu1[3] + Q11[31]*Gu1[7] + Q11[32]*Gu1[11] + Q11[33]*Gu1[15] + Q11[34]*Gu1[19] + Q11[35]*Gu1[23] + Q11[36]*Gu1[27] + Q11[37]*Gu1[31] + Q11[38]*Gu1[35] + Q11[39]*Gu1[39] + Gu2[15];\nGu3[16] = + Q11[40]*Gu1[0] + Q11[41]*Gu1[4] + Q11[42]*Gu1[8] + Q11[43]*Gu1[12] + Q11[44]*Gu1[16] + Q11[45]*Gu1[20] + Q11[46]*Gu1[24] + Q11[47]*Gu1[28] + Q11[48]*Gu1[32] + Q11[49]*Gu1[36] + Gu2[16];\nGu3[17] = + Q11[40]*Gu1[1] + Q11[41]*Gu1[5] + Q11[42]*Gu1[9] + Q11[43]*Gu1[13] + Q11[44]*Gu1[17] + Q11[45]*Gu1[21] + Q11[46]*Gu1[25] + Q11[47]*Gu1[29] + Q11[48]*Gu1[33] + Q11[49]*Gu1[37] + Gu2[17];\nGu3[18] = + Q11[40]*Gu1[2] + Q11[41]*Gu1[6] + Q11[42]*Gu1[10] + Q11[43]*Gu1[14] + Q11[44]*Gu1[18] + Q11[45]*Gu1[22] + Q11[46]*Gu1[26] + Q11[47]*Gu1[30] + Q11[48]*Gu1[34] + Q11[49]*Gu1[38] + Gu2[18];\nGu3[19] = + Q11[40]*Gu1[3] + Q11[41]*Gu1[7] + Q11[42]*Gu1[11] + Q11[43]*Gu1[15] + Q11[44]*Gu1[19] + Q11[45]*Gu1[23] + Q11[46]*Gu1[27] + Q11[47]*Gu1[31] + Q11[48]*Gu1[35] + Q11[49]*Gu1[39] + Gu2[19];\nGu3[20] = + Q11[50]*Gu1[0] + Q11[51]*Gu1[4] + Q11[52]*Gu1[8] + Q11[53]*Gu1[12] + Q11[54]*Gu1[16] + Q11[55]*Gu1[20] + Q11[56]*Gu1[24] + Q11[57]*Gu1[28] + Q11[58]*Gu1[32] + Q11[59]*Gu1[36] + Gu2[20];\nGu3[21] = + Q11[50]*Gu1[1] + Q11[51]*Gu1[5] + Q11[52]*Gu1[9] + Q11[53]*Gu1[13] + Q11[54]*Gu1[17] + Q11[55]*Gu1[21] + Q11[56]*Gu1[25] + Q11[57]*Gu1[29] + Q11[58]*Gu1[33] + Q11[59]*Gu1[37] + Gu2[21];\nGu3[22] = + Q11[50]*Gu1[2] + Q11[51]*Gu1[6] + Q11[52]*Gu1[10] + Q11[53]*Gu1[14] + Q11[54]*Gu1[18] + Q11[55]*Gu1[22] + Q11[56]*Gu1[26] + Q11[57]*Gu1[30] + Q11[58]*Gu1[34] + Q11[59]*Gu1[38] + Gu2[22];\nGu3[23] = + Q11[50]*Gu1[3] + Q11[51]*Gu1[7] + Q11[52]*Gu1[11] + Q11[53]*Gu1[15] + Q11[54]*Gu1[19] + Q11[55]*Gu1[23] + Q11[56]*Gu1[27] + Q11[57]*Gu1[31] + Q11[58]*Gu1[35] + Q11[59]*Gu1[39] + Gu2[23];\nGu3[24] = + Q11[60]*Gu1[0] + Q11[61]*Gu1[4] + Q11[62]*Gu1[8] + Q11[63]*Gu1[12] + Q11[64]*Gu1[16] + Q11[65]*Gu1[20] + Q11[66]*Gu1[24] + Q11[67]*Gu1[28] + Q11[68]*Gu1[32] + Q11[69]*Gu1[36] + Gu2[24];\nGu3[25] = + Q11[60]*Gu1[1] + Q11[61]*Gu1[5] + Q11[62]*Gu1[9] + Q11[63]*Gu1[13] + Q11[64]*Gu1[17] + Q11[65]*Gu1[21] + Q11[66]*Gu1[25] + Q11[67]*Gu1[29] + Q11[68]*Gu1[33] + Q11[69]*Gu1[37] + Gu2[25];\nGu3[26] = + Q11[60]*Gu1[2] + Q11[61]*Gu1[6] + Q11[62]*Gu1[10] + Q11[63]*Gu1[14] + Q11[64]*Gu1[18] + Q11[65]*Gu1[22] + Q11[66]*Gu1[26] + Q11[67]*Gu1[30] + Q11[68]*Gu1[34] + Q11[69]*Gu1[38] + Gu2[26];\nGu3[27] = + Q11[60]*Gu1[3] + Q11[61]*Gu1[7] + Q11[62]*Gu1[11] + Q11[63]*Gu1[15] + Q11[64]*Gu1[19] + Q11[65]*Gu1[23] + Q11[66]*Gu1[27] + Q11[67]*Gu1[31] + Q11[68]*Gu1[35] + Q11[69]*Gu1[39] + Gu2[27];\nGu3[28] = + Q11[70]*Gu1[0] + Q11[71]*Gu1[4] + Q11[72]*Gu1[8] + Q11[73]*Gu1[12] + Q11[74]*Gu1[16] + Q11[75]*Gu1[20] + Q11[76]*Gu1[24] + Q11[77]*Gu1[28] + Q11[78]*Gu1[32] + Q11[79]*Gu1[36] + Gu2[28];\nGu3[29] = + Q11[70]*Gu1[1] + Q11[71]*Gu1[5] + Q11[72]*Gu1[9] + Q11[73]*Gu1[13] + Q11[74]*Gu1[17] + Q11[75]*Gu1[21] + Q11[76]*Gu1[25] + Q11[77]*Gu1[29] + Q11[78]*Gu1[33] + Q11[79]*Gu1[37] + Gu2[29];\nGu3[30] = + Q11[70]*Gu1[2] + Q11[71]*Gu1[6] + Q11[72]*Gu1[10] + Q11[73]*Gu1[14] + Q11[74]*Gu1[18] + Q11[75]*Gu1[22] + Q11[76]*Gu1[26] + Q11[77]*Gu1[30] + Q11[78]*Gu1[34] + Q11[79]*Gu1[38] + Gu2[30];\nGu3[31] = + Q11[70]*Gu1[3] + Q11[71]*Gu1[7] + Q11[72]*Gu1[11] + Q11[73]*Gu1[15] + Q11[74]*Gu1[19] + Q11[75]*Gu1[23] + Q11[76]*Gu1[27] + Q11[77]*Gu1[31] + Q11[78]*Gu1[35] + Q11[79]*Gu1[39] + Gu2[31];\nGu3[32] = + Q11[80]*Gu1[0] + Q11[81]*Gu1[4] + Q11[82]*Gu1[8] + Q11[83]*Gu1[12] + Q11[84]*Gu1[16] + Q11[85]*Gu1[20] + Q11[86]*Gu1[24] + Q11[87]*Gu1[28] + Q11[88]*Gu1[32] + Q11[89]*Gu1[36] + Gu2[32];\nGu3[33] = + Q11[80]*Gu1[1] + Q11[81]*Gu1[5] + Q11[82]*Gu1[9] + Q11[83]*Gu1[13] + Q11[84]*Gu1[17] + Q11[85]*Gu1[21] + Q11[86]*Gu1[25] + Q11[87]*Gu1[29] + Q11[88]*Gu1[33] + Q11[89]*Gu1[37] + Gu2[33];\nGu3[34] = + Q11[80]*Gu1[2] + Q11[81]*Gu1[6] + Q11[82]*Gu1[10] + Q11[83]*Gu1[14] + Q11[84]*Gu1[18] + Q11[85]*Gu1[22] + Q11[86]*Gu1[26] + Q11[87]*Gu1[30] + Q11[88]*Gu1[34] + Q11[89]*Gu1[38] + Gu2[34];\nGu3[35] = + Q11[80]*Gu1[3] + Q11[81]*Gu1[7] + Q11[82]*Gu1[11] + Q11[83]*Gu1[15] + Q11[84]*Gu1[19] + Q11[85]*Gu1[23] + Q11[86]*Gu1[27] + Q11[87]*Gu1[31] + Q11[88]*Gu1[35] + Q11[89]*Gu1[39] + Gu2[35];\nGu3[36] = + Q11[90]*Gu1[0] + Q11[91]*Gu1[4] + Q11[92]*Gu1[8] + Q11[93]*Gu1[12] + Q11[94]*Gu1[16] + Q11[95]*Gu1[20] + Q11[96]*Gu1[24] + Q11[97]*Gu1[28] + Q11[98]*Gu1[32] + Q11[99]*Gu1[36] + Gu2[36];\nGu3[37] = + Q11[90]*Gu1[1] + Q11[91]*Gu1[5] + Q11[92]*Gu1[9] + Q11[93]*Gu1[13] + Q11[94]*Gu1[17] + Q11[95]*Gu1[21] + Q11[96]*Gu1[25] + Q11[97]*Gu1[29] + Q11[98]*Gu1[33] + Q11[99]*Gu1[37] + Gu2[37];\nGu3[38] = + Q11[90]*Gu1[2] + Q11[91]*Gu1[6] + Q11[92]*Gu1[10] + Q11[93]*Gu1[14] + Q11[94]*Gu1[18] + Q11[95]*Gu1[22] + Q11[96]*Gu1[26] + Q11[97]*Gu1[30] + Q11[98]*Gu1[34] + Q11[99]*Gu1[38] + Gu2[38];\nGu3[39] = + Q11[90]*Gu1[3] + Q11[91]*Gu1[7] + Q11[92]*Gu1[11] + Q11[93]*Gu1[15] + Q11[94]*Gu1[19] + Q11[95]*Gu1[23] + Q11[96]*Gu1[27] + Q11[97]*Gu1[31] + Q11[98]*Gu1[35] + Q11[99]*Gu1[39] + Gu2[39];\n}\n\nvoid acado_macATw1QDy( real_t* const Gx1, real_t* const w11, real_t* const w12, real_t* const w13 )\n{\nw13[0] = + Gx1[0]*w11[0] + Gx1[10]*w11[1] + Gx1[20]*w11[2] + Gx1[30]*w11[3] + Gx1[40]*w11[4] + Gx1[50]*w11[5] + Gx1[60]*w11[6] + Gx1[70]*w11[7] + Gx1[80]*w11[8] + Gx1[90]*w11[9] + w12[0];\nw13[1] = + Gx1[1]*w11[0] + Gx1[11]*w11[1] + Gx1[21]*w11[2] + Gx1[31]*w11[3] + Gx1[41]*w11[4] + Gx1[51]*w11[5] + Gx1[61]*w11[6] + Gx1[71]*w11[7] + Gx1[81]*w11[8] + Gx1[91]*w11[9] + w12[1];\nw13[2] = + Gx1[2]*w11[0] + Gx1[12]*w11[1] + Gx1[22]*w11[2] + Gx1[32]*w11[3] + Gx1[42]*w11[4] + Gx1[52]*w11[5] + Gx1[62]*w11[6] + Gx1[72]*w11[7] + Gx1[82]*w11[8] + Gx1[92]*w11[9] + w12[2];\nw13[3] = + Gx1[3]*w11[0] + Gx1[13]*w11[1] + Gx1[23]*w11[2] + Gx1[33]*w11[3] + Gx1[43]*w11[4] + Gx1[53]*w11[5] + Gx1[63]*w11[6] + Gx1[73]*w11[7] + Gx1[83]*w11[8] + Gx1[93]*w11[9] + w12[3];\nw13[4] = + Gx1[4]*w11[0] + Gx1[14]*w11[1] + Gx1[24]*w11[2] + Gx1[34]*w11[3] + Gx1[44]*w11[4] + Gx1[54]*w11[5] + Gx1[64]*w11[6] + Gx1[74]*w11[7] + Gx1[84]*w11[8] + Gx1[94]*w11[9] + w12[4];\nw13[5] = + Gx1[5]*w11[0] + Gx1[15]*w11[1] + Gx1[25]*w11[2] + Gx1[35]*w11[3] + Gx1[45]*w11[4] + Gx1[55]*w11[5] + Gx1[65]*w11[6] + Gx1[75]*w11[7] + Gx1[85]*w11[8] + Gx1[95]*w11[9] + w12[5];\nw13[6] = + Gx1[6]*w11[0] + Gx1[16]*w11[1] + Gx1[26]*w11[2] + Gx1[36]*w11[3] + Gx1[46]*w11[4] + Gx1[56]*w11[5] + Gx1[66]*w11[6] + Gx1[76]*w11[7] + Gx1[86]*w11[8] + Gx1[96]*w11[9] + w12[6];\nw13[7] = + Gx1[7]*w11[0] + Gx1[17]*w11[1] + Gx1[27]*w11[2] + Gx1[37]*w11[3] + Gx1[47]*w11[4] + Gx1[57]*w11[5] + Gx1[67]*w11[6] + Gx1[77]*w11[7] + Gx1[87]*w11[8] + Gx1[97]*w11[9] + w12[7];\nw13[8] = + Gx1[8]*w11[0] + Gx1[18]*w11[1] + Gx1[28]*w11[2] + Gx1[38]*w11[3] + Gx1[48]*w11[4] + Gx1[58]*w11[5] + Gx1[68]*w11[6] + Gx1[78]*w11[7] + Gx1[88]*w11[8] + Gx1[98]*w11[9] + w12[8];\nw13[9] = + Gx1[9]*w11[0] + Gx1[19]*w11[1] + Gx1[29]*w11[2] + Gx1[39]*w11[3] + Gx1[49]*w11[4] + Gx1[59]*w11[5] + Gx1[69]*w11[6] + Gx1[79]*w11[7] + Gx1[89]*w11[8] + Gx1[99]*w11[9] + w12[9];\n}\n\nvoid acado_macBTw1( real_t* const Gu1, real_t* const w11, real_t* const U1 )\n{\nU1[0] += + Gu1[0]*w11[0] + Gu1[4]*w11[1] + Gu1[8]*w11[2] + Gu1[12]*w11[3] + Gu1[16]*w11[4] + Gu1[20]*w11[5] + Gu1[24]*w11[6] + Gu1[28]*w11[7] + Gu1[32]*w11[8] + Gu1[36]*w11[9];\nU1[1] += + Gu1[1]*w11[0] + Gu1[5]*w11[1] + Gu1[9]*w11[2] + Gu1[13]*w11[3] + Gu1[17]*w11[4] + Gu1[21]*w11[5] + Gu1[25]*w11[6] + Gu1[29]*w11[7] + Gu1[33]*w11[8] + Gu1[37]*w11[9];\nU1[2] += + Gu1[2]*w11[0] + Gu1[6]*w11[1] + Gu1[10]*w11[2] + Gu1[14]*w11[3] + Gu1[18]*w11[4] + Gu1[22]*w11[5] + Gu1[26]*w11[6] + Gu1[30]*w11[7] + Gu1[34]*w11[8] + Gu1[38]*w11[9];\nU1[3] += + Gu1[3]*w11[0] + Gu1[7]*w11[1] + Gu1[11]*w11[2] + Gu1[15]*w11[3] + Gu1[19]*w11[4] + Gu1[23]*w11[5] + Gu1[27]*w11[6] + Gu1[31]*w11[7] + Gu1[35]*w11[8] + Gu1[39]*w11[9];\n}\n\nvoid acado_macQSbarW2( real_t* const Q11, real_t* const w11, real_t* const w12, real_t* const w13 )\n{\nw13[0] = + Q11[0]*w11[0] + Q11[1]*w11[1] + Q11[2]*w11[2] + Q11[3]*w11[3] + Q11[4]*w11[4] + Q11[5]*w11[5] + Q11[6]*w11[6] + Q11[7]*w11[7] + Q11[8]*w11[8] + Q11[9]*w11[9] + w12[0];\nw13[1] = + Q11[10]*w11[0] + Q11[11]*w11[1] + Q11[12]*w11[2] + Q11[13]*w11[3] + Q11[14]*w11[4] + Q11[15]*w11[5] + Q11[16]*w11[6] + Q11[17]*w11[7] + Q11[18]*w11[8] + Q11[19]*w11[9] + w12[1];\nw13[2] = + Q11[20]*w11[0] + Q11[21]*w11[1] + Q11[22]*w11[2] + Q11[23]*w11[3] + Q11[24]*w11[4] + Q11[25]*w11[5] + Q11[26]*w11[6] + Q11[27]*w11[7] + Q11[28]*w11[8] + Q11[29]*w11[9] + w12[2];\nw13[3] = + Q11[30]*w11[0] + Q11[31]*w11[1] + Q11[32]*w11[2] + Q11[33]*w11[3] + Q11[34]*w11[4] + Q11[35]*w11[5] + Q11[36]*w11[6] + Q11[37]*w11[7] + Q11[38]*w11[8] + Q11[39]*w11[9] + w12[3];\nw13[4] = + Q11[40]*w11[0] + Q11[41]*w11[1] + Q11[42]*w11[2] + Q11[43]*w11[3] + Q11[44]*w11[4] + Q11[45]*w11[5] + Q11[46]*w11[6] + Q11[47]*w11[7] + Q11[48]*w11[8] + Q11[49]*w11[9] + w12[4];\nw13[5] = + Q11[50]*w11[0] + Q11[51]*w11[1] + Q11[52]*w11[2] + Q11[53]*w11[3] + Q11[54]*w11[4] + Q11[55]*w11[5] + Q11[56]*w11[6] + Q11[57]*w11[7] + Q11[58]*w11[8] + Q11[59]*w11[9] + w12[5];\nw13[6] = + Q11[60]*w11[0] + Q11[61]*w11[1] + Q11[62]*w11[2] + Q11[63]*w11[3] + Q11[64]*w11[4] + Q11[65]*w11[5] + Q11[66]*w11[6] + Q11[67]*w11[7] + Q11[68]*w11[8] + Q11[69]*w11[9] + w12[6];\nw13[7] = + Q11[70]*w11[0] + Q11[71]*w11[1] + Q11[72]*w11[2] + Q11[73]*w11[3] + Q11[74]*w11[4] + Q11[75]*w11[5] + Q11[76]*w11[6] + Q11[77]*w11[7] + Q11[78]*w11[8] + Q11[79]*w11[9] + w12[7];\nw13[8] = + Q11[80]*w11[0] + Q11[81]*w11[1] + Q11[82]*w11[2] + Q11[83]*w11[3] + Q11[84]*w11[4] + Q11[85]*w11[5] + Q11[86]*w11[6] + Q11[87]*w11[7] + Q11[88]*w11[8] + Q11[89]*w11[9] + w12[8];\nw13[9] = + Q11[90]*w11[0] + Q11[91]*w11[1] + Q11[92]*w11[2] + Q11[93]*w11[3] + Q11[94]*w11[4] + Q11[95]*w11[5] + Q11[96]*w11[6] + Q11[97]*w11[7] + Q11[98]*w11[8] + Q11[99]*w11[9] + w12[9];\n}\n\nvoid acado_macASbar( real_t* const Gx1, real_t* const w11, real_t* const w12 )\n{\nw12[0] += + Gx1[0]*w11[0] + Gx1[1]*w11[1] + Gx1[2]*w11[2] + Gx1[3]*w11[3] + Gx1[4]*w11[4] + Gx1[5]*w11[5] + Gx1[6]*w11[6] + Gx1[7]*w11[7] + Gx1[8]*w11[8] + Gx1[9]*w11[9];\nw12[1] += + Gx1[10]*w11[0] + Gx1[11]*w11[1] + Gx1[12]*w11[2] + Gx1[13]*w11[3] + Gx1[14]*w11[4] + Gx1[15]*w11[5] + Gx1[16]*w11[6] + Gx1[17]*w11[7] + Gx1[18]*w11[8] + Gx1[19]*w11[9];\nw12[2] += + Gx1[20]*w11[0] + Gx1[21]*w11[1] + Gx1[22]*w11[2] + Gx1[23]*w11[3] + Gx1[24]*w11[4] + Gx1[25]*w11[5] + Gx1[26]*w11[6] + Gx1[27]*w11[7] + Gx1[28]*w11[8] + Gx1[29]*w11[9];\nw12[3] += + Gx1[30]*w11[0] + Gx1[31]*w11[1] + Gx1[32]*w11[2] + Gx1[33]*w11[3] + Gx1[34]*w11[4] + Gx1[35]*w11[5] + Gx1[36]*w11[6] + Gx1[37]*w11[7] + Gx1[38]*w11[8] + Gx1[39]*w11[9];\nw12[4] += + Gx1[40]*w11[0] + Gx1[41]*w11[1] + Gx1[42]*w11[2] + Gx1[43]*w11[3] + Gx1[44]*w11[4] + Gx1[45]*w11[5] + Gx1[46]*w11[6] + Gx1[47]*w11[7] + Gx1[48]*w11[8] + Gx1[49]*w11[9];\nw12[5] += + Gx1[50]*w11[0] + Gx1[51]*w11[1] + Gx1[52]*w11[2] + Gx1[53]*w11[3] + Gx1[54]*w11[4] + Gx1[55]*w11[5] + Gx1[56]*w11[6] + Gx1[57]*w11[7] + Gx1[58]*w11[8] + Gx1[59]*w11[9];\nw12[6] += + Gx1[60]*w11[0] + Gx1[61]*w11[1] + Gx1[62]*w11[2] + Gx1[63]*w11[3] + Gx1[64]*w11[4] + Gx1[65]*w11[5] + Gx1[66]*w11[6] + Gx1[67]*w11[7] + Gx1[68]*w11[8] + Gx1[69]*w11[9];\nw12[7] += + Gx1[70]*w11[0] + Gx1[71]*w11[1] + Gx1[72]*w11[2] + Gx1[73]*w11[3] + Gx1[74]*w11[4] + Gx1[75]*w11[5] + Gx1[76]*w11[6] + Gx1[77]*w11[7] + Gx1[78]*w11[8] + Gx1[79]*w11[9];\nw12[8] += + Gx1[80]*w11[0] + Gx1[81]*w11[1] + Gx1[82]*w11[2] + Gx1[83]*w11[3] + Gx1[84]*w11[4] + Gx1[85]*w11[5] + Gx1[86]*w11[6] + Gx1[87]*w11[7] + Gx1[88]*w11[8] + Gx1[89]*w11[9];\nw12[9] += + Gx1[90]*w11[0] + Gx1[91]*w11[1] + Gx1[92]*w11[2] + Gx1[93]*w11[3] + Gx1[94]*w11[4] + Gx1[95]*w11[5] + Gx1[96]*w11[6] + Gx1[97]*w11[7] + Gx1[98]*w11[8] + Gx1[99]*w11[9];\n}\n\nvoid acado_expansionStep( real_t* const Gx1, real_t* const Gu1, real_t* const U1, real_t* const w11, real_t* const w12 )\n{\nw12[0] += + Gx1[0]*w11[0] + Gx1[1]*w11[1] + Gx1[2]*w11[2] + Gx1[3]*w11[3] + Gx1[4]*w11[4] + Gx1[5]*w11[5] + Gx1[6]*w11[6] + Gx1[7]*w11[7] + Gx1[8]*w11[8] + Gx1[9]*w11[9];\nw12[1] += + Gx1[10]*w11[0] + Gx1[11]*w11[1] + Gx1[12]*w11[2] + Gx1[13]*w11[3] + Gx1[14]*w11[4] + Gx1[15]*w11[5] + Gx1[16]*w11[6] + Gx1[17]*w11[7] + Gx1[18]*w11[8] + Gx1[19]*w11[9];\nw12[2] += + Gx1[20]*w11[0] + Gx1[21]*w11[1] + Gx1[22]*w11[2] + Gx1[23]*w11[3] + Gx1[24]*w11[4] + Gx1[25]*w11[5] + Gx1[26]*w11[6] + Gx1[27]*w11[7] + Gx1[28]*w11[8] + Gx1[29]*w11[9];\nw12[3] += + Gx1[30]*w11[0] + Gx1[31]*w11[1] + Gx1[32]*w11[2] + Gx1[33]*w11[3] + Gx1[34]*w11[4] + Gx1[35]*w11[5] + Gx1[36]*w11[6] + Gx1[37]*w11[7] + Gx1[38]*w11[8] + Gx1[39]*w11[9];\nw12[4] += + Gx1[40]*w11[0] + Gx1[41]*w11[1] + Gx1[42]*w11[2] + Gx1[43]*w11[3] + Gx1[44]*w11[4] + Gx1[45]*w11[5] + Gx1[46]*w11[6] + Gx1[47]*w11[7] + Gx1[48]*w11[8] + Gx1[49]*w11[9];\nw12[5] += + Gx1[50]*w11[0] + Gx1[51]*w11[1] + Gx1[52]*w11[2] + Gx1[53]*w11[3] + Gx1[54]*w11[4] + Gx1[55]*w11[5] + Gx1[56]*w11[6] + Gx1[57]*w11[7] + Gx1[58]*w11[8] + Gx1[59]*w11[9];\nw12[6] += + Gx1[60]*w11[0] + Gx1[61]*w11[1] + Gx1[62]*w11[2] + Gx1[63]*w11[3] + Gx1[64]*w11[4] + Gx1[65]*w11[5] + Gx1[66]*w11[6] + Gx1[67]*w11[7] + Gx1[68]*w11[8] + Gx1[69]*w11[9];\nw12[7] += + Gx1[70]*w11[0] + Gx1[71]*w11[1] + Gx1[72]*w11[2] + Gx1[73]*w11[3] + Gx1[74]*w11[4] + Gx1[75]*w11[5] + Gx1[76]*w11[6] + Gx1[77]*w11[7] + Gx1[78]*w11[8] + Gx1[79]*w11[9];\nw12[8] += + Gx1[80]*w11[0] + Gx1[81]*w11[1] + Gx1[82]*w11[2] + Gx1[83]*w11[3] + Gx1[84]*w11[4] + Gx1[85]*w11[5] + Gx1[86]*w11[6] + Gx1[87]*w11[7] + Gx1[88]*w11[8] + Gx1[89]*w11[9];\nw12[9] += + Gx1[90]*w11[0] + Gx1[91]*w11[1] + Gx1[92]*w11[2] + Gx1[93]*w11[3] + Gx1[94]*w11[4] + Gx1[95]*w11[5] + Gx1[96]*w11[6] + Gx1[97]*w11[7] + Gx1[98]*w11[8] + Gx1[99]*w11[9];\nw12[0] += + Gu1[0]*U1[0] + Gu1[1]*U1[1] + Gu1[2]*U1[2] + Gu1[3]*U1[3];\nw12[1] += + Gu1[4]*U1[0] + Gu1[5]*U1[1] + Gu1[6]*U1[2] + Gu1[7]*U1[3];\nw12[2] += + Gu1[8]*U1[0] + Gu1[9]*U1[1] + Gu1[10]*U1[2] + Gu1[11]*U1[3];\nw12[3] += + Gu1[12]*U1[0] + Gu1[13]*U1[1] + Gu1[14]*U1[2] + Gu1[15]*U1[3];\nw12[4] += + Gu1[16]*U1[0] + Gu1[17]*U1[1] + Gu1[18]*U1[2] + Gu1[19]*U1[3];\nw12[5] += + Gu1[20]*U1[0] + Gu1[21]*U1[1] + Gu1[22]*U1[2] + Gu1[23]*U1[3];\nw12[6] += + Gu1[24]*U1[0] + Gu1[25]*U1[1] + Gu1[26]*U1[2] + Gu1[27]*U1[3];\nw12[7] += + Gu1[28]*U1[0] + Gu1[29]*U1[1] + Gu1[30]*U1[2] + Gu1[31]*U1[3];\nw12[8] += + Gu1[32]*U1[0] + Gu1[33]*U1[1] + Gu1[34]*U1[2] + Gu1[35]*U1[3];\nw12[9] += + Gu1[36]*U1[0] + Gu1[37]*U1[1] + Gu1[38]*U1[2] + Gu1[39]*U1[3];\n}\n\nvoid acado_copyHTH( int iRow, int iCol )\n{\nacadoWorkspace.H[(iRow * 320) + (iCol * 4)] = acadoWorkspace.H[(iCol * 320) + (iRow * 4)];\nacadoWorkspace.H[(iRow * 320) + (iCol * 4 + 1)] = acadoWorkspace.H[(iCol * 320 + 80) + (iRow * 4)];\nacadoWorkspace.H[(iRow * 320) + (iCol * 4 + 2)] = acadoWorkspace.H[(iCol * 320 + 160) + (iRow * 4)];\nacadoWorkspace.H[(iRow * 320) + (iCol * 4 + 3)] = acadoWorkspace.H[(iCol * 320 + 240) + (iRow * 4)];\nacadoWorkspace.H[(iRow * 320 + 80) + (iCol * 4)] = acadoWorkspace.H[(iCol * 320) + (iRow * 4 + 1)];\nacadoWorkspace.H[(iRow * 320 + 80) + (iCol * 4 + 1)] = acadoWorkspace.H[(iCol * 320 + 80) + (iRow * 4 + 1)];\nacadoWorkspace.H[(iRow * 320 + 80) + (iCol * 4 + 2)] = acadoWorkspace.H[(iCol * 320 + 160) + (iRow * 4 + 1)];\nacadoWorkspace.H[(iRow * 320 + 80) + (iCol * 4 + 3)] = acadoWorkspace.H[(iCol * 320 + 240) + (iRow * 4 + 1)];\nacadoWorkspace.H[(iRow * 320 + 160) + (iCol * 4)] = acadoWorkspace.H[(iCol * 320) + (iRow * 4 + 2)];\nacadoWorkspace.H[(iRow * 320 + 160) + (iCol * 4 + 1)] = acadoWorkspace.H[(iCol * 320 + 80) + (iRow * 4 + 2)];\nacadoWorkspace.H[(iRow * 320 + 160) + (iCol * 4 + 2)] = acadoWorkspace.H[(iCol * 320 + 160) + (iRow * 4 + 2)];\nacadoWorkspace.H[(iRow * 320 + 160) + (iCol * 4 + 3)] = acadoWorkspace.H[(iCol * 320 + 240) + (iRow * 4 + 2)];\nacadoWorkspace.H[(iRow * 320 + 240) + (iCol * 4)] = acadoWorkspace.H[(iCol * 320) + (iRow * 4 + 3)];\nacadoWorkspace.H[(iRow * 320 + 240) + (iCol * 4 + 1)] = acadoWorkspace.H[(iCol * 320 + 80) + (iRow * 4 + 3)];\nacadoWorkspace.H[(iRow * 320 + 240) + (iCol * 4 + 2)] = acadoWorkspace.H[(iCol * 320 + 160) + (iRow * 4 + 3)];\nacadoWorkspace.H[(iRow * 320 + 240) + (iCol * 4 + 3)] = acadoWorkspace.H[(iCol * 320 + 240) + (iRow * 4 + 3)];\n}\n\nvoid acado_multRDy( real_t* const R2, real_t* const Dy1, real_t* const RDy1 )\n{\nRDy1[0] = + R2[0]*Dy1[0] + R2[1]*Dy1[1] + R2[2]*Dy1[2] + R2[3]*Dy1[3] + R2[4]*Dy1[4] + R2[5]*Dy1[5] + R2[6]*Dy1[6] + R2[7]*Dy1[7] + R2[8]*Dy1[8] + R2[9]*Dy1[9] + R2[10]*Dy1[10] + R2[11]*Dy1[11] + R2[12]*Dy1[12] + R2[13]*Dy1[13] + R2[14]*Dy1[14] + R2[15]*Dy1[15];\nRDy1[1] = + R2[16]*Dy1[0] + R2[17]*Dy1[1] + R2[18]*Dy1[2] + R2[19]*Dy1[3] + R2[20]*Dy1[4] + R2[21]*Dy1[5] + R2[22]*Dy1[6] + R2[23]*Dy1[7] + R2[24]*Dy1[8] + R2[25]*Dy1[9] + R2[26]*Dy1[10] + R2[27]*Dy1[11] + R2[28]*Dy1[12] + R2[29]*Dy1[13] + R2[30]*Dy1[14] + R2[31]*Dy1[15];\nRDy1[2] = + R2[32]*Dy1[0] + R2[33]*Dy1[1] + R2[34]*Dy1[2] + R2[35]*Dy1[3] + R2[36]*Dy1[4] + R2[37]*Dy1[5] + R2[38]*Dy1[6] + R2[39]*Dy1[7] + R2[40]*Dy1[8] + R2[41]*Dy1[9] + R2[42]*Dy1[10] + R2[43]*Dy1[11] + R2[44]*Dy1[12] + R2[45]*Dy1[13] + R2[46]*Dy1[14] + R2[47]*Dy1[15];\nRDy1[3] = + R2[48]*Dy1[0] + R2[49]*Dy1[1] + R2[50]*Dy1[2] + R2[51]*Dy1[3] + R2[52]*Dy1[4] + R2[53]*Dy1[5] + R2[54]*Dy1[6] + R2[55]*Dy1[7] + R2[56]*Dy1[8] + R2[57]*Dy1[9] + R2[58]*Dy1[10] + R2[59]*Dy1[11] + R2[60]*Dy1[12] + R2[61]*Dy1[13] + R2[62]*Dy1[14] + R2[63]*Dy1[15];\n}\n\nvoid acado_multQDy( real_t* const Q2, real_t* const Dy1, real_t* const QDy1 )\n{\nQDy1[0] = + Q2[0]*Dy1[0] + Q2[1]*Dy1[1] + Q2[2]*Dy1[2] + Q2[3]*Dy1[3] + Q2[4]*Dy1[4] + Q2[5]*Dy1[5] + Q2[6]*Dy1[6] + Q2[7]*Dy1[7] + Q2[8]*Dy1[8] + Q2[9]*Dy1[9] + Q2[10]*Dy1[10] + Q2[11]*Dy1[11] + Q2[12]*Dy1[12] + Q2[13]*Dy1[13] + Q2[14]*Dy1[14] + Q2[15]*Dy1[15];\nQDy1[1] = + Q2[16]*Dy1[0] + Q2[17]*Dy1[1] + Q2[18]*Dy1[2] + Q2[19]*Dy1[3] + Q2[20]*Dy1[4] + Q2[21]*Dy1[5] + Q2[22]*Dy1[6] + Q2[23]*Dy1[7] + Q2[24]*Dy1[8] + Q2[25]*Dy1[9] + Q2[26]*Dy1[10] + Q2[27]*Dy1[11] + Q2[28]*Dy1[12] + Q2[29]*Dy1[13] + Q2[30]*Dy1[14] + Q2[31]*Dy1[15];\nQDy1[2] = + Q2[32]*Dy1[0] + Q2[33]*Dy1[1] + Q2[34]*Dy1[2] + Q2[35]*Dy1[3] + Q2[36]*Dy1[4] + Q2[37]*Dy1[5] + Q2[38]*Dy1[6] + Q2[39]*Dy1[7] + Q2[40]*Dy1[8] + Q2[41]*Dy1[9] + Q2[42]*Dy1[10] + Q2[43]*Dy1[11] + Q2[44]*Dy1[12] + Q2[45]*Dy1[13] + Q2[46]*Dy1[14] + Q2[47]*Dy1[15];\nQDy1[3] = + Q2[48]*Dy1[0] + Q2[49]*Dy1[1] + Q2[50]*Dy1[2] + Q2[51]*Dy1[3] + Q2[52]*Dy1[4] + Q2[53]*Dy1[5] + Q2[54]*Dy1[6] + Q2[55]*Dy1[7] + Q2[56]*Dy1[8] + Q2[57]*Dy1[9] + Q2[58]*Dy1[10] + Q2[59]*Dy1[11] + Q2[60]*Dy1[12] + Q2[61]*Dy1[13] + Q2[62]*Dy1[14] + Q2[63]*Dy1[15];\nQDy1[4] = + Q2[64]*Dy1[0] + Q2[65]*Dy1[1] + Q2[66]*Dy1[2] + Q2[67]*Dy1[3] + Q2[68]*Dy1[4] + Q2[69]*Dy1[5] + Q2[70]*Dy1[6] + Q2[71]*Dy1[7] + Q2[72]*Dy1[8] + Q2[73]*Dy1[9] + Q2[74]*Dy1[10] + Q2[75]*Dy1[11] + Q2[76]*Dy1[12] + Q2[77]*Dy1[13] + Q2[78]*Dy1[14] + Q2[79]*Dy1[15];\nQDy1[5] = + Q2[80]*Dy1[0] + Q2[81]*Dy1[1] + Q2[82]*Dy1[2] + Q2[83]*Dy1[3] + Q2[84]*Dy1[4] + Q2[85]*Dy1[5] + Q2[86]*Dy1[6] + Q2[87]*Dy1[7] + Q2[88]*Dy1[8] + Q2[89]*Dy1[9] + Q2[90]*Dy1[10] + Q2[91]*Dy1[11] + Q2[92]*Dy1[12] + Q2[93]*Dy1[13] + Q2[94]*Dy1[14] + Q2[95]*Dy1[15];\nQDy1[6] = + Q2[96]*Dy1[0] + Q2[97]*Dy1[1] + Q2[98]*Dy1[2] + Q2[99]*Dy1[3] + Q2[100]*Dy1[4] + Q2[101]*Dy1[5] + Q2[102]*Dy1[6] + Q2[103]*Dy1[7] + Q2[104]*Dy1[8] + Q2[105]*Dy1[9] + Q2[106]*Dy1[10] + Q2[107]*Dy1[11] + Q2[108]*Dy1[12] + Q2[109]*Dy1[13] + Q2[110]*Dy1[14] + Q2[111]*Dy1[15];\nQDy1[7] = + Q2[112]*Dy1[0] + Q2[113]*Dy1[1] + Q2[114]*Dy1[2] + Q2[115]*Dy1[3] + Q2[116]*Dy1[4] + Q2[117]*Dy1[5] + Q2[118]*Dy1[6] + Q2[119]*Dy1[7] + Q2[120]*Dy1[8] + Q2[121]*Dy1[9] + Q2[122]*Dy1[10] + Q2[123]*Dy1[11] + Q2[124]*Dy1[12] + Q2[125]*Dy1[13] + Q2[126]*Dy1[14] + Q2[127]*Dy1[15];\nQDy1[8] = + Q2[128]*Dy1[0] + Q2[129]*Dy1[1] + Q2[130]*Dy1[2] + Q2[131]*Dy1[3] + Q2[132]*Dy1[4] + Q2[133]*Dy1[5] + Q2[134]*Dy1[6] + Q2[135]*Dy1[7] + Q2[136]*Dy1[8] + Q2[137]*Dy1[9] + Q2[138]*Dy1[10] + Q2[139]*Dy1[11] + Q2[140]*Dy1[12] + Q2[141]*Dy1[13] + Q2[142]*Dy1[14] + Q2[143]*Dy1[15];\nQDy1[9] = + Q2[144]*Dy1[0] + Q2[145]*Dy1[1] + Q2[146]*Dy1[2] + Q2[147]*Dy1[3] + Q2[148]*Dy1[4] + Q2[149]*Dy1[5] + Q2[150]*Dy1[6] + Q2[151]*Dy1[7] + Q2[152]*Dy1[8] + Q2[153]*Dy1[9] + Q2[154]*Dy1[10] + Q2[155]*Dy1[11] + Q2[156]*Dy1[12] + Q2[157]*Dy1[13] + Q2[158]*Dy1[14] + Q2[159]*Dy1[15];\n}\n\nvoid acado_condensePrep(  )\n{\nint lRun1;\nint lRun2;\nint lRun3;\nfor (lRun2 = 0; lRun2 < 20; ++lRun2)\n{\nlRun3 = ((lRun2) * (lRun2 * -1 + 41)) / (2);\nacado_moveGuE( &(acadoWorkspace.evGu[ lRun2 * 40 ]), &(acadoWorkspace.E[ lRun3 * 40 ]) );\nfor (lRun1 = 1; lRun1 < lRun2 * -1 + 20; ++lRun1)\n{\nacado_multGxGu( &(acadoWorkspace.evGx[ ((((lRun2) + (lRun1)) * (10)) * (10)) + (0) ]), &(acadoWorkspace.E[ (((((lRun3) + (lRun1)) - (1)) * (10)) * (4)) + (0) ]), &(acadoWorkspace.E[ ((((lRun3) + (lRun1)) * (10)) * (4)) + (0) ]) );\n}\n\nacado_multGxGu( acadoWorkspace.QN1, &(acadoWorkspace.E[ ((((((lRun3) - (lRun2)) + (20)) - (1)) * (10)) * (4)) + (0) ]), acadoWorkspace.W1 );\nfor (lRun1 = 19; lRun2 < lRun1; --lRun1)\n{\nacado_multBTW1( &(acadoWorkspace.evGu[ lRun1 * 40 ]), acadoWorkspace.W1, lRun1, lRun2 );\nacado_multGxTGu( &(acadoWorkspace.evGx[ lRun1 * 100 ]), acadoWorkspace.W1, acadoWorkspace.W2 );\nacado_multQEW2( &(acadoWorkspace.Q1[ lRun1 * 100 ]), &(acadoWorkspace.E[ ((((((lRun3) + (lRun1)) - (lRun2)) - (1)) * (10)) * (4)) + (0) ]), acadoWorkspace.W2, acadoWorkspace.W1 );\n}\nacado_multBTW1_R1( &(acadoWorkspace.R1[ lRun2 * 16 ]), &(acadoWorkspace.evGu[ lRun2 * 40 ]), acadoWorkspace.W1, lRun2 );\n}\n\nacado_copyHTH( 0, 1 );\nacado_copyHTH( 0, 2 );\nacado_copyHTH( 1, 2 );\nacado_copyHTH( 0, 3 );\nacado_copyHTH( 1, 3 );\nacado_copyHTH( 2, 3 );\nacado_copyHTH( 0, 4 );\nacado_copyHTH( 1, 4 );\nacado_copyHTH( 2, 4 );\nacado_copyHTH( 3, 4 );\nacado_copyHTH( 0, 5 );\nacado_copyHTH( 1, 5 );\nacado_copyHTH( 2, 5 );\nacado_copyHTH( 3, 5 );\nacado_copyHTH( 4, 5 );\nacado_copyHTH( 0, 6 );\nacado_copyHTH( 1, 6 );\nacado_copyHTH( 2, 6 );\nacado_copyHTH( 3, 6 );\nacado_copyHTH( 4, 6 );\nacado_copyHTH( 5, 6 );\nacado_copyHTH( 0, 7 );\nacado_copyHTH( 1, 7 );\nacado_copyHTH( 2, 7 );\nacado_copyHTH( 3, 7 );\nacado_copyHTH( 4, 7 );\nacado_copyHTH( 5, 7 );\nacado_copyHTH( 6, 7 );\nacado_copyHTH( 0, 8 );\nacado_copyHTH( 1, 8 );\nacado_copyHTH( 2, 8 );\nacado_copyHTH( 3, 8 );\nacado_copyHTH( 4, 8 );\nacado_copyHTH( 5, 8 );\nacado_copyHTH( 6, 8 );\nacado_copyHTH( 7, 8 );\nacado_copyHTH( 0, 9 );\nacado_copyHTH( 1, 9 );\nacado_copyHTH( 2, 9 );\nacado_copyHTH( 3, 9 );\nacado_copyHTH( 4, 9 );\nacado_copyHTH( 5, 9 );\nacado_copyHTH( 6, 9 );\nacado_copyHTH( 7, 9 );\nacado_copyHTH( 8, 9 );\nacado_copyHTH( 0, 10 );\nacado_copyHTH( 1, 10 );\nacado_copyHTH( 2, 10 );\nacado_copyHTH( 3, 10 );\nacado_copyHTH( 4, 10 );\nacado_copyHTH( 5, 10 );\nacado_copyHTH( 6, 10 );\nacado_copyHTH( 7, 10 );\nacado_copyHTH( 8, 10 );\nacado_copyHTH( 9, 10 );\nacado_copyHTH( 0, 11 );\nacado_copyHTH( 1, 11 );\nacado_copyHTH( 2, 11 );\nacado_copyHTH( 3, 11 );\nacado_copyHTH( 4, 11 );\nacado_copyHTH( 5, 11 );\nacado_copyHTH( 6, 11 );\nacado_copyHTH( 7, 11 );\nacado_copyHTH( 8, 11 );\nacado_copyHTH( 9, 11 );\nacado_copyHTH( 10, 11 );\nacado_copyHTH( 0, 12 );\nacado_copyHTH( 1, 12 );\nacado_copyHTH( 2, 12 );\nacado_copyHTH( 3, 12 );\nacado_copyHTH( 4, 12 );\nacado_copyHTH( 5, 12 );\nacado_copyHTH( 6, 12 );\nacado_copyHTH( 7, 12 );\nacado_copyHTH( 8, 12 );\nacado_copyHTH( 9, 12 );\nacado_copyHTH( 10, 12 );\nacado_copyHTH( 11, 12 );\nacado_copyHTH( 0, 13 );\nacado_copyHTH( 1, 13 );\nacado_copyHTH( 2, 13 );\nacado_copyHTH( 3, 13 );\nacado_copyHTH( 4, 13 );\nacado_copyHTH( 5, 13 );\nacado_copyHTH( 6, 13 );\nacado_copyHTH( 7, 13 );\nacado_copyHTH( 8, 13 );\nacado_copyHTH( 9, 13 );\nacado_copyHTH( 10, 13 );\nacado_copyHTH( 11, 13 );\nacado_copyHTH( 12, 13 );\nacado_copyHTH( 0, 14 );\nacado_copyHTH( 1, 14 );\nacado_copyHTH( 2, 14 );\nacado_copyHTH( 3, 14 );\nacado_copyHTH( 4, 14 );\nacado_copyHTH( 5, 14 );\nacado_copyHTH( 6, 14 );\nacado_copyHTH( 7, 14 );\nacado_copyHTH( 8, 14 );\nacado_copyHTH( 9, 14 );\nacado_copyHTH( 10, 14 );\nacado_copyHTH( 11, 14 );\nacado_copyHTH( 12, 14 );\nacado_copyHTH( 13, 14 );\nacado_copyHTH( 0, 15 );\nacado_copyHTH( 1, 15 );\nacado_copyHTH( 2, 15 );\nacado_copyHTH( 3, 15 );\nacado_copyHTH( 4, 15 );\nacado_copyHTH( 5, 15 );\nacado_copyHTH( 6, 15 );\nacado_copyHTH( 7, 15 );\nacado_copyHTH( 8, 15 );\nacado_copyHTH( 9, 15 );\nacado_copyHTH( 10, 15 );\nacado_copyHTH( 11, 15 );\nacado_copyHTH( 12, 15 );\nacado_copyHTH( 13, 15 );\nacado_copyHTH( 14, 15 );\nacado_copyHTH( 0, 16 );\nacado_copyHTH( 1, 16 );\nacado_copyHTH( 2, 16 );\nacado_copyHTH( 3, 16 );\nacado_copyHTH( 4, 16 );\nacado_copyHTH( 5, 16 );\nacado_copyHTH( 6, 16 );\nacado_copyHTH( 7, 16 );\nacado_copyHTH( 8, 16 );\nacado_copyHTH( 9, 16 );\nacado_copyHTH( 10, 16 );\nacado_copyHTH( 11, 16 );\nacado_copyHTH( 12, 16 );\nacado_copyHTH( 13, 16 );\nacado_copyHTH( 14, 16 );\nacado_copyHTH( 15, 16 );\nacado_copyHTH( 0, 17 );\nacado_copyHTH( 1, 17 );\nacado_copyHTH( 2, 17 );\nacado_copyHTH( 3, 17 );\nacado_copyHTH( 4, 17 );\nacado_copyHTH( 5, 17 );\nacado_copyHTH( 6, 17 );\nacado_copyHTH( 7, 17 );\nacado_copyHTH( 8, 17 );\nacado_copyHTH( 9, 17 );\nacado_copyHTH( 10, 17 );\nacado_copyHTH( 11, 17 );\nacado_copyHTH( 12, 17 );\nacado_copyHTH( 13, 17 );\nacado_copyHTH( 14, 17 );\nacado_copyHTH( 15, 17 );\nacado_copyHTH( 16, 17 );\nacado_copyHTH( 0, 18 );\nacado_copyHTH( 1, 18 );\nacado_copyHTH( 2, 18 );\nacado_copyHTH( 3, 18 );\nacado_copyHTH( 4, 18 );\nacado_copyHTH( 5, 18 );\nacado_copyHTH( 6, 18 );\nacado_copyHTH( 7, 18 );\nacado_copyHTH( 8, 18 );\nacado_copyHTH( 9, 18 );\nacado_copyHTH( 10, 18 );\nacado_copyHTH( 11, 18 );\nacado_copyHTH( 12, 18 );\nacado_copyHTH( 13, 18 );\nacado_copyHTH( 14, 18 );\nacado_copyHTH( 15, 18 );\nacado_copyHTH( 16, 18 );\nacado_copyHTH( 17, 18 );\nacado_copyHTH( 0, 19 );\nacado_copyHTH( 1, 19 );\nacado_copyHTH( 2, 19 );\nacado_copyHTH( 3, 19 );\nacado_copyHTH( 4, 19 );\nacado_copyHTH( 5, 19 );\nacado_copyHTH( 6, 19 );\nacado_copyHTH( 7, 19 );\nacado_copyHTH( 8, 19 );\nacado_copyHTH( 9, 19 );\nacado_copyHTH( 10, 19 );\nacado_copyHTH( 11, 19 );\nacado_copyHTH( 12, 19 );\nacado_copyHTH( 13, 19 );\nacado_copyHTH( 14, 19 );\nacado_copyHTH( 15, 19 );\nacado_copyHTH( 16, 19 );\nacado_copyHTH( 17, 19 );\nacado_copyHTH( 18, 19 );\n\nfor (lRun1 = 0; lRun1 < 200; ++lRun1)\nacadoWorkspace.sbar[lRun1 + 10] = acadoWorkspace.d[lRun1];\n\n\n}\n\nvoid acado_condenseFdb(  )\n{\nint lRun1;\nacadoWorkspace.Dx0[0] = acadoVariables.x0[0] - acadoVariables.x[0];\nacadoWorkspace.Dx0[1] = acadoVariables.x0[1] - acadoVariables.x[1];\nacadoWorkspace.Dx0[2] = acadoVariables.x0[2] - acadoVariables.x[2];\nacadoWorkspace.Dx0[3] = acadoVariables.x0[3] - acadoVariables.x[3];\nacadoWorkspace.Dx0[4] = acadoVariables.x0[4] - acadoVariables.x[4];\nacadoWorkspace.Dx0[5] = acadoVariables.x0[5] - acadoVariables.x[5];\nacadoWorkspace.Dx0[6] = acadoVariables.x0[6] - acadoVariables.x[6];\nacadoWorkspace.Dx0[7] = acadoVariables.x0[7] - acadoVariables.x[7];\nacadoWorkspace.Dx0[8] = acadoVariables.x0[8] - acadoVariables.x[8];\nacadoWorkspace.Dx0[9] = acadoVariables.x0[9] - acadoVariables.x[9];\nfor (lRun1 = 0; lRun1 < 320; ++lRun1)\nacadoWorkspace.Dy[lRun1] -= acadoVariables.y[lRun1];\n\nacadoWorkspace.DyN[0] -= acadoVariables.yN[0];\nacadoWorkspace.DyN[1] -= acadoVariables.yN[1];\nacadoWorkspace.DyN[2] -= acadoVariables.yN[2];\nacadoWorkspace.DyN[3] -= acadoVariables.yN[3];\nacadoWorkspace.DyN[4] -= acadoVariables.yN[4];\nacadoWorkspace.DyN[5] -= acadoVariables.yN[5];\nacadoWorkspace.DyN[6] -= acadoVariables.yN[6];\nacadoWorkspace.DyN[7] -= acadoVariables.yN[7];\nacadoWorkspace.DyN[8] -= acadoVariables.yN[8];\nacadoWorkspace.DyN[9] -= acadoVariables.yN[9];\nacadoWorkspace.DyN[10] -= acadoVariables.yN[10];\nacadoWorkspace.DyN[11] -= acadoVariables.yN[11];\n\nacado_multRDy( acadoWorkspace.R2, acadoWorkspace.Dy, acadoWorkspace.g );\nacado_multRDy( &(acadoWorkspace.R2[ 64 ]), &(acadoWorkspace.Dy[ 16 ]), &(acadoWorkspace.g[ 4 ]) );\nacado_multRDy( &(acadoWorkspace.R2[ 128 ]), &(acadoWorkspace.Dy[ 32 ]), &(acadoWorkspace.g[ 8 ]) );\nacado_multRDy( &(acadoWorkspace.R2[ 192 ]), &(acadoWorkspace.Dy[ 48 ]), &(acadoWorkspace.g[ 12 ]) );\nacado_multRDy( &(acadoWorkspace.R2[ 256 ]), &(acadoWorkspace.Dy[ 64 ]), &(acadoWorkspace.g[ 16 ]) );\nacado_multRDy( &(acadoWorkspace.R2[ 320 ]), &(acadoWorkspace.Dy[ 80 ]), &(acadoWorkspace.g[ 20 ]) );\nacado_multRDy( &(acadoWorkspace.R2[ 384 ]), &(acadoWorkspace.Dy[ 96 ]), &(acadoWorkspace.g[ 24 ]) );\nacado_multRDy( &(acadoWorkspace.R2[ 448 ]), &(acadoWorkspace.Dy[ 112 ]), &(acadoWorkspace.g[ 28 ]) );\nacado_multRDy( &(acadoWorkspace.R2[ 512 ]), &(acadoWorkspace.Dy[ 128 ]), &(acadoWorkspace.g[ 32 ]) );\nacado_multRDy( &(acadoWorkspace.R2[ 576 ]), &(acadoWorkspace.Dy[ 144 ]), &(acadoWorkspace.g[ 36 ]) );\nacado_multRDy( &(acadoWorkspace.R2[ 640 ]), &(acadoWorkspace.Dy[ 160 ]), &(acadoWorkspace.g[ 40 ]) );\nacado_multRDy( &(acadoWorkspace.R2[ 704 ]), &(acadoWorkspace.Dy[ 176 ]), &(acadoWorkspace.g[ 44 ]) );\nacado_multRDy( &(acadoWorkspace.R2[ 768 ]), &(acadoWorkspace.Dy[ 192 ]), &(acadoWorkspace.g[ 48 ]) );\nacado_multRDy( &(acadoWorkspace.R2[ 832 ]), &(acadoWorkspace.Dy[ 208 ]), &(acadoWorkspace.g[ 52 ]) );\nacado_multRDy( &(acadoWorkspace.R2[ 896 ]), &(acadoWorkspace.Dy[ 224 ]), &(acadoWorkspace.g[ 56 ]) );\nacado_multRDy( &(acadoWorkspace.R2[ 960 ]), &(acadoWorkspace.Dy[ 240 ]), &(acadoWorkspace.g[ 60 ]) );\nacado_multRDy( &(acadoWorkspace.R2[ 1024 ]), &(acadoWorkspace.Dy[ 256 ]), &(acadoWorkspace.g[ 64 ]) );\nacado_multRDy( &(acadoWorkspace.R2[ 1088 ]), &(acadoWorkspace.Dy[ 272 ]), &(acadoWorkspace.g[ 68 ]) );\nacado_multRDy( &(acadoWorkspace.R2[ 1152 ]), &(acadoWorkspace.Dy[ 288 ]), &(acadoWorkspace.g[ 72 ]) );\nacado_multRDy( &(acadoWorkspace.R2[ 1216 ]), &(acadoWorkspace.Dy[ 304 ]), &(acadoWorkspace.g[ 76 ]) );\n\nacado_multQDy( acadoWorkspace.Q2, acadoWorkspace.Dy, acadoWorkspace.QDy );\nacado_multQDy( &(acadoWorkspace.Q2[ 160 ]), &(acadoWorkspace.Dy[ 16 ]), &(acadoWorkspace.QDy[ 10 ]) );\nacado_multQDy( &(acadoWorkspace.Q2[ 320 ]), &(acadoWorkspace.Dy[ 32 ]), &(acadoWorkspace.QDy[ 20 ]) );\nacado_multQDy( &(acadoWorkspace.Q2[ 480 ]), &(acadoWorkspace.Dy[ 48 ]), &(acadoWorkspace.QDy[ 30 ]) );\nacado_multQDy( &(acadoWorkspace.Q2[ 640 ]), &(acadoWorkspace.Dy[ 64 ]), &(acadoWorkspace.QDy[ 40 ]) );\nacado_multQDy( &(acadoWorkspace.Q2[ 800 ]), &(acadoWorkspace.Dy[ 80 ]), &(acadoWorkspace.QDy[ 50 ]) );\nacado_multQDy( &(acadoWorkspace.Q2[ 960 ]), &(acadoWorkspace.Dy[ 96 ]), &(acadoWorkspace.QDy[ 60 ]) );\nacado_multQDy( &(acadoWorkspace.Q2[ 1120 ]), &(acadoWorkspace.Dy[ 112 ]), &(acadoWorkspace.QDy[ 70 ]) );\nacado_multQDy( &(acadoWorkspace.Q2[ 1280 ]), &(acadoWorkspace.Dy[ 128 ]), &(acadoWorkspace.QDy[ 80 ]) );\nacado_multQDy( &(acadoWorkspace.Q2[ 1440 ]), &(acadoWorkspace.Dy[ 144 ]), &(acadoWorkspace.QDy[ 90 ]) );\nacado_multQDy( &(acadoWorkspace.Q2[ 1600 ]), &(acadoWorkspace.Dy[ 160 ]), &(acadoWorkspace.QDy[ 100 ]) );\nacado_multQDy( &(acadoWorkspace.Q2[ 1760 ]), &(acadoWorkspace.Dy[ 176 ]), &(acadoWorkspace.QDy[ 110 ]) );\nacado_multQDy( &(acadoWorkspace.Q2[ 1920 ]), &(acadoWorkspace.Dy[ 192 ]), &(acadoWorkspace.QDy[ 120 ]) );\nacado_multQDy( &(acadoWorkspace.Q2[ 2080 ]), &(acadoWorkspace.Dy[ 208 ]), &(acadoWorkspace.QDy[ 130 ]) );\nacado_multQDy( &(acadoWorkspace.Q2[ 2240 ]), &(acadoWorkspace.Dy[ 224 ]), &(acadoWorkspace.QDy[ 140 ]) );\nacado_multQDy( &(acadoWorkspace.Q2[ 2400 ]), &(acadoWorkspace.Dy[ 240 ]), &(acadoWorkspace.QDy[ 150 ]) );\nacado_multQDy( &(acadoWorkspace.Q2[ 2560 ]), &(acadoWorkspace.Dy[ 256 ]), &(acadoWorkspace.QDy[ 160 ]) );\nacado_multQDy( &(acadoWorkspace.Q2[ 2720 ]), &(acadoWorkspace.Dy[ 272 ]), &(acadoWorkspace.QDy[ 170 ]) );\nacado_multQDy( &(acadoWorkspace.Q2[ 2880 ]), &(acadoWorkspace.Dy[ 288 ]), &(acadoWorkspace.QDy[ 180 ]) );\nacado_multQDy( &(acadoWorkspace.Q2[ 3040 ]), &(acadoWorkspace.Dy[ 304 ]), &(acadoWorkspace.QDy[ 190 ]) );\n\nacadoWorkspace.QDy[200] = + acadoWorkspace.QN2[0]*acadoWorkspace.DyN[0] + acadoWorkspace.QN2[1]*acadoWorkspace.DyN[1] + acadoWorkspace.QN2[2]*acadoWorkspace.DyN[2] + acadoWorkspace.QN2[3]*acadoWorkspace.DyN[3] + acadoWorkspace.QN2[4]*acadoWorkspace.DyN[4] + acadoWorkspace.QN2[5]*acadoWorkspace.DyN[5] + acadoWorkspace.QN2[6]*acadoWorkspace.DyN[6] + acadoWorkspace.QN2[7]*acadoWorkspace.DyN[7] + acadoWorkspace.QN2[8]*acadoWorkspace.DyN[8] + acadoWorkspace.QN2[9]*acadoWorkspace.DyN[9] + acadoWorkspace.QN2[10]*acadoWorkspace.DyN[10] + acadoWorkspace.QN2[11]*acadoWorkspace.DyN[11];\nacadoWorkspace.QDy[201] = + acadoWorkspace.QN2[12]*acadoWorkspace.DyN[0] + acadoWorkspace.QN2[13]*acadoWorkspace.DyN[1] + acadoWorkspace.QN2[14]*acadoWorkspace.DyN[2] + acadoWorkspace.QN2[15]*acadoWorkspace.DyN[3] + acadoWorkspace.QN2[16]*acadoWorkspace.DyN[4] + acadoWorkspace.QN2[17]*acadoWorkspace.DyN[5] + acadoWorkspace.QN2[18]*acadoWorkspace.DyN[6] + acadoWorkspace.QN2[19]*acadoWorkspace.DyN[7] + acadoWorkspace.QN2[20]*acadoWorkspace.DyN[8] + acadoWorkspace.QN2[21]*acadoWorkspace.DyN[9] + acadoWorkspace.QN2[22]*acadoWorkspace.DyN[10] + acadoWorkspace.QN2[23]*acadoWorkspace.DyN[11];\nacadoWorkspace.QDy[202] = + acadoWorkspace.QN2[24]*acadoWorkspace.DyN[0] + acadoWorkspace.QN2[25]*acadoWorkspace.DyN[1] + acadoWorkspace.QN2[26]*acadoWorkspace.DyN[2] + acadoWorkspace.QN2[27]*acadoWorkspace.DyN[3] + acadoWorkspace.QN2[28]*acadoWorkspace.DyN[4] + acadoWorkspace.QN2[29]*acadoWorkspace.DyN[5] + acadoWorkspace.QN2[30]*acadoWorkspace.DyN[6] + acadoWorkspace.QN2[31]*acadoWorkspace.DyN[7] + acadoWorkspace.QN2[32]*acadoWorkspace.DyN[8] + acadoWorkspace.QN2[33]*acadoWorkspace.DyN[9] + acadoWorkspace.QN2[34]*acadoWorkspace.DyN[10] + acadoWorkspace.QN2[35]*acadoWorkspace.DyN[11];\nacadoWorkspace.QDy[203] = + acadoWorkspace.QN2[36]*acadoWorkspace.DyN[0] + acadoWorkspace.QN2[37]*acadoWorkspace.DyN[1] + acadoWorkspace.QN2[38]*acadoWorkspace.DyN[2] + acadoWorkspace.QN2[39]*acadoWorkspace.DyN[3] + acadoWorkspace.QN2[40]*acadoWorkspace.DyN[4] + acadoWorkspace.QN2[41]*acadoWorkspace.DyN[5] + acadoWorkspace.QN2[42]*acadoWorkspace.DyN[6] + acadoWorkspace.QN2[43]*acadoWorkspace.DyN[7] + acadoWorkspace.QN2[44]*acadoWorkspace.DyN[8] + acadoWorkspace.QN2[45]*acadoWorkspace.DyN[9] + acadoWorkspace.QN2[46]*acadoWorkspace.DyN[10] + acadoWorkspace.QN2[47]*acadoWorkspace.DyN[11];\nacadoWorkspace.QDy[204] = + acadoWorkspace.QN2[48]*acadoWorkspace.DyN[0] + acadoWorkspace.QN2[49]*acadoWorkspace.DyN[1] + acadoWorkspace.QN2[50]*acadoWorkspace.DyN[2] + acadoWorkspace.QN2[51]*acadoWorkspace.DyN[3] + acadoWorkspace.QN2[52]*acadoWorkspace.DyN[4] + acadoWorkspace.QN2[53]*acadoWorkspace.DyN[5] + acadoWorkspace.QN2[54]*acadoWorkspace.DyN[6] + acadoWorkspace.QN2[55]*acadoWorkspace.DyN[7] + acadoWorkspace.QN2[56]*acadoWorkspace.DyN[8] + acadoWorkspace.QN2[57]*acadoWorkspace.DyN[9] + acadoWorkspace.QN2[58]*acadoWorkspace.DyN[10] + acadoWorkspace.QN2[59]*acadoWorkspace.DyN[11];\nacadoWorkspace.QDy[205] = + acadoWorkspace.QN2[60]*acadoWorkspace.DyN[0] + acadoWorkspace.QN2[61]*acadoWorkspace.DyN[1] + acadoWorkspace.QN2[62]*acadoWorkspace.DyN[2] + acadoWorkspace.QN2[63]*acadoWorkspace.DyN[3] + acadoWorkspace.QN2[64]*acadoWorkspace.DyN[4] + acadoWorkspace.QN2[65]*acadoWorkspace.DyN[5] + acadoWorkspace.QN2[66]*acadoWorkspace.DyN[6] + acadoWorkspace.QN2[67]*acadoWorkspace.DyN[7] + acadoWorkspace.QN2[68]*acadoWorkspace.DyN[8] + acadoWorkspace.QN2[69]*acadoWorkspace.DyN[9] + acadoWorkspace.QN2[70]*acadoWorkspace.DyN[10] + acadoWorkspace.QN2[71]*acadoWorkspace.DyN[11];\nacadoWorkspace.QDy[206] = + acadoWorkspace.QN2[72]*acadoWorkspace.DyN[0] + acadoWorkspace.QN2[73]*acadoWorkspace.DyN[1] + acadoWorkspace.QN2[74]*acadoWorkspace.DyN[2] + acadoWorkspace.QN2[75]*acadoWorkspace.DyN[3] + acadoWorkspace.QN2[76]*acadoWorkspace.DyN[4] + acadoWorkspace.QN2[77]*acadoWorkspace.DyN[5] + acadoWorkspace.QN2[78]*acadoWorkspace.DyN[6] + acadoWorkspace.QN2[79]*acadoWorkspace.DyN[7] + acadoWorkspace.QN2[80]*acadoWorkspace.DyN[8] + acadoWorkspace.QN2[81]*acadoWorkspace.DyN[9] + acadoWorkspace.QN2[82]*acadoWorkspace.DyN[10] + acadoWorkspace.QN2[83]*acadoWorkspace.DyN[11];\nacadoWorkspace.QDy[207] = + acadoWorkspace.QN2[84]*acadoWorkspace.DyN[0] + acadoWorkspace.QN2[85]*acadoWorkspace.DyN[1] + acadoWorkspace.QN2[86]*acadoWorkspace.DyN[2] + acadoWorkspace.QN2[87]*acadoWorkspace.DyN[3] + acadoWorkspace.QN2[88]*acadoWorkspace.DyN[4] + acadoWorkspace.QN2[89]*acadoWorkspace.DyN[5] + acadoWorkspace.QN2[90]*acadoWorkspace.DyN[6] + acadoWorkspace.QN2[91]*acadoWorkspace.DyN[7] + acadoWorkspace.QN2[92]*acadoWorkspace.DyN[8] + acadoWorkspace.QN2[93]*acadoWorkspace.DyN[9] + acadoWorkspace.QN2[94]*acadoWorkspace.DyN[10] + acadoWorkspace.QN2[95]*acadoWorkspace.DyN[11];\nacadoWorkspace.QDy[208] = + acadoWorkspace.QN2[96]*acadoWorkspace.DyN[0] + acadoWorkspace.QN2[97]*acadoWorkspace.DyN[1] + acadoWorkspace.QN2[98]*acadoWorkspace.DyN[2] + acadoWorkspace.QN2[99]*acadoWorkspace.DyN[3] + acadoWorkspace.QN2[100]*acadoWorkspace.DyN[4] + acadoWorkspace.QN2[101]*acadoWorkspace.DyN[5] + acadoWorkspace.QN2[102]*acadoWorkspace.DyN[6] + acadoWorkspace.QN2[103]*acadoWorkspace.DyN[7] + acadoWorkspace.QN2[104]*acadoWorkspace.DyN[8] + acadoWorkspace.QN2[105]*acadoWorkspace.DyN[9] + acadoWorkspace.QN2[106]*acadoWorkspace.DyN[10] + acadoWorkspace.QN2[107]*acadoWorkspace.DyN[11];\nacadoWorkspace.QDy[209] = + acadoWorkspace.QN2[108]*acadoWorkspace.DyN[0] + acadoWorkspace.QN2[109]*acadoWorkspace.DyN[1] + acadoWorkspace.QN2[110]*acadoWorkspace.DyN[2] + acadoWorkspace.QN2[111]*acadoWorkspace.DyN[3] + acadoWorkspace.QN2[112]*acadoWorkspace.DyN[4] + acadoWorkspace.QN2[113]*acadoWorkspace.DyN[5] + acadoWorkspace.QN2[114]*acadoWorkspace.DyN[6] + acadoWorkspace.QN2[115]*acadoWorkspace.DyN[7] + acadoWorkspace.QN2[116]*acadoWorkspace.DyN[8] + acadoWorkspace.QN2[117]*acadoWorkspace.DyN[9] + acadoWorkspace.QN2[118]*acadoWorkspace.DyN[10] + acadoWorkspace.QN2[119]*acadoWorkspace.DyN[11];\n\nacadoWorkspace.sbar[0] = acadoWorkspace.Dx0[0];\nacadoWorkspace.sbar[1] = acadoWorkspace.Dx0[1];\nacadoWorkspace.sbar[2] = acadoWorkspace.Dx0[2];\nacadoWorkspace.sbar[3] = acadoWorkspace.Dx0[3];\nacadoWorkspace.sbar[4] = acadoWorkspace.Dx0[4];\nacadoWorkspace.sbar[5] = acadoWorkspace.Dx0[5];\nacadoWorkspace.sbar[6] = acadoWorkspace.Dx0[6];\nacadoWorkspace.sbar[7] = acadoWorkspace.Dx0[7];\nacadoWorkspace.sbar[8] = acadoWorkspace.Dx0[8];\nacadoWorkspace.sbar[9] = acadoWorkspace.Dx0[9];\nacado_macASbar( acadoWorkspace.evGx, acadoWorkspace.sbar, &(acadoWorkspace.sbar[ 10 ]) );\nacado_macASbar( &(acadoWorkspace.evGx[ 100 ]), &(acadoWorkspace.sbar[ 10 ]), &(acadoWorkspace.sbar[ 20 ]) );\nacado_macASbar( &(acadoWorkspace.evGx[ 200 ]), &(acadoWorkspace.sbar[ 20 ]), &(acadoWorkspace.sbar[ 30 ]) );\nacado_macASbar( &(acadoWorkspace.evGx[ 300 ]), &(acadoWorkspace.sbar[ 30 ]), &(acadoWorkspace.sbar[ 40 ]) );\nacado_macASbar( &(acadoWorkspace.evGx[ 400 ]), &(acadoWorkspace.sbar[ 40 ]), &(acadoWorkspace.sbar[ 50 ]) );\nacado_macASbar( &(acadoWorkspace.evGx[ 500 ]), &(acadoWorkspace.sbar[ 50 ]), &(acadoWorkspace.sbar[ 60 ]) );\nacado_macASbar( &(acadoWorkspace.evGx[ 600 ]), &(acadoWorkspace.sbar[ 60 ]), &(acadoWorkspace.sbar[ 70 ]) );\nacado_macASbar( &(acadoWorkspace.evGx[ 700 ]), &(acadoWorkspace.sbar[ 70 ]), &(acadoWorkspace.sbar[ 80 ]) );\nacado_macASbar( &(acadoWorkspace.evGx[ 800 ]), &(acadoWorkspace.sbar[ 80 ]), &(acadoWorkspace.sbar[ 90 ]) );\nacado_macASbar( &(acadoWorkspace.evGx[ 900 ]), &(acadoWorkspace.sbar[ 90 ]), &(acadoWorkspace.sbar[ 100 ]) );\nacado_macASbar( &(acadoWorkspace.evGx[ 1000 ]), &(acadoWorkspace.sbar[ 100 ]), &(acadoWorkspace.sbar[ 110 ]) );\nacado_macASbar( &(acadoWorkspace.evGx[ 1100 ]), &(acadoWorkspace.sbar[ 110 ]), &(acadoWorkspace.sbar[ 120 ]) );\nacado_macASbar( &(acadoWorkspace.evGx[ 1200 ]), &(acadoWorkspace.sbar[ 120 ]), &(acadoWorkspace.sbar[ 130 ]) );\nacado_macASbar( &(acadoWorkspace.evGx[ 1300 ]), &(acadoWorkspace.sbar[ 130 ]), &(acadoWorkspace.sbar[ 140 ]) );\nacado_macASbar( &(acadoWorkspace.evGx[ 1400 ]), &(acadoWorkspace.sbar[ 140 ]), &(acadoWorkspace.sbar[ 150 ]) );\nacado_macASbar( &(acadoWorkspace.evGx[ 1500 ]), &(acadoWorkspace.sbar[ 150 ]), &(acadoWorkspace.sbar[ 160 ]) );\nacado_macASbar( &(acadoWorkspace.evGx[ 1600 ]), &(acadoWorkspace.sbar[ 160 ]), &(acadoWorkspace.sbar[ 170 ]) );\nacado_macASbar( &(acadoWorkspace.evGx[ 1700 ]), &(acadoWorkspace.sbar[ 170 ]), &(acadoWorkspace.sbar[ 180 ]) );\nacado_macASbar( &(acadoWorkspace.evGx[ 1800 ]), &(acadoWorkspace.sbar[ 180 ]), &(acadoWorkspace.sbar[ 190 ]) );\nacado_macASbar( &(acadoWorkspace.evGx[ 1900 ]), &(acadoWorkspace.sbar[ 190 ]), &(acadoWorkspace.sbar[ 200 ]) );\n\nacadoWorkspace.w1[0] = + acadoWorkspace.QN1[0]*acadoWorkspace.sbar[200] + acadoWorkspace.QN1[1]*acadoWorkspace.sbar[201] + acadoWorkspace.QN1[2]*acadoWorkspace.sbar[202] + acadoWorkspace.QN1[3]*acadoWorkspace.sbar[203] + acadoWorkspace.QN1[4]*acadoWorkspace.sbar[204] + acadoWorkspace.QN1[5]*acadoWorkspace.sbar[205] + acadoWorkspace.QN1[6]*acadoWorkspace.sbar[206] + acadoWorkspace.QN1[7]*acadoWorkspace.sbar[207] + acadoWorkspace.QN1[8]*acadoWorkspace.sbar[208] + acadoWorkspace.QN1[9]*acadoWorkspace.sbar[209] + acadoWorkspace.QDy[200];\nacadoWorkspace.w1[1] = + acadoWorkspace.QN1[10]*acadoWorkspace.sbar[200] + acadoWorkspace.QN1[11]*acadoWorkspace.sbar[201] + acadoWorkspace.QN1[12]*acadoWorkspace.sbar[202] + acadoWorkspace.QN1[13]*acadoWorkspace.sbar[203] + acadoWorkspace.QN1[14]*acadoWorkspace.sbar[204] + acadoWorkspace.QN1[15]*acadoWorkspace.sbar[205] + acadoWorkspace.QN1[16]*acadoWorkspace.sbar[206] + acadoWorkspace.QN1[17]*acadoWorkspace.sbar[207] + acadoWorkspace.QN1[18]*acadoWorkspace.sbar[208] + acadoWorkspace.QN1[19]*acadoWorkspace.sbar[209] + acadoWorkspace.QDy[201];\nacadoWorkspace.w1[2] = + acadoWorkspace.QN1[20]*acadoWorkspace.sbar[200] + acadoWorkspace.QN1[21]*acadoWorkspace.sbar[201] + acadoWorkspace.QN1[22]*acadoWorkspace.sbar[202] + acadoWorkspace.QN1[23]*acadoWorkspace.sbar[203] + acadoWorkspace.QN1[24]*acadoWorkspace.sbar[204] + acadoWorkspace.QN1[25]*acadoWorkspace.sbar[205] + acadoWorkspace.QN1[26]*acadoWorkspace.sbar[206] + acadoWorkspace.QN1[27]*acadoWorkspace.sbar[207] + acadoWorkspace.QN1[28]*acadoWorkspace.sbar[208] + acadoWorkspace.QN1[29]*acadoWorkspace.sbar[209] + acadoWorkspace.QDy[202];\nacadoWorkspace.w1[3] = + acadoWorkspace.QN1[30]*acadoWorkspace.sbar[200] + acadoWorkspace.QN1[31]*acadoWorkspace.sbar[201] + acadoWorkspace.QN1[32]*acadoWorkspace.sbar[202] + acadoWorkspace.QN1[33]*acadoWorkspace.sbar[203] + acadoWorkspace.QN1[34]*acadoWorkspace.sbar[204] + acadoWorkspace.QN1[35]*acadoWorkspace.sbar[205] + acadoWorkspace.QN1[36]*acadoWorkspace.sbar[206] + acadoWorkspace.QN1[37]*acadoWorkspace.sbar[207] + acadoWorkspace.QN1[38]*acadoWorkspace.sbar[208] + acadoWorkspace.QN1[39]*acadoWorkspace.sbar[209] + acadoWorkspace.QDy[203];\nacadoWorkspace.w1[4] = + acadoWorkspace.QN1[40]*acadoWorkspace.sbar[200] + acadoWorkspace.QN1[41]*acadoWorkspace.sbar[201] + acadoWorkspace.QN1[42]*acadoWorkspace.sbar[202] + acadoWorkspace.QN1[43]*acadoWorkspace.sbar[203] + acadoWorkspace.QN1[44]*acadoWorkspace.sbar[204] + acadoWorkspace.QN1[45]*acadoWorkspace.sbar[205] + acadoWorkspace.QN1[46]*acadoWorkspace.sbar[206] + acadoWorkspace.QN1[47]*acadoWorkspace.sbar[207] + acadoWorkspace.QN1[48]*acadoWorkspace.sbar[208] + acadoWorkspace.QN1[49]*acadoWorkspace.sbar[209] + acadoWorkspace.QDy[204];\nacadoWorkspace.w1[5] = + acadoWorkspace.QN1[50]*acadoWorkspace.sbar[200] + acadoWorkspace.QN1[51]*acadoWorkspace.sbar[201] + acadoWorkspace.QN1[52]*acadoWorkspace.sbar[202] + acadoWorkspace.QN1[53]*acadoWorkspace.sbar[203] + acadoWorkspace.QN1[54]*acadoWorkspace.sbar[204] + acadoWorkspace.QN1[55]*acadoWorkspace.sbar[205] + acadoWorkspace.QN1[56]*acadoWorkspace.sbar[206] + acadoWorkspace.QN1[57]*acadoWorkspace.sbar[207] + acadoWorkspace.QN1[58]*acadoWorkspace.sbar[208] + acadoWorkspace.QN1[59]*acadoWorkspace.sbar[209] + acadoWorkspace.QDy[205];\nacadoWorkspace.w1[6] = + acadoWorkspace.QN1[60]*acadoWorkspace.sbar[200] + acadoWorkspace.QN1[61]*acadoWorkspace.sbar[201] + acadoWorkspace.QN1[62]*acadoWorkspace.sbar[202] + acadoWorkspace.QN1[63]*acadoWorkspace.sbar[203] + acadoWorkspace.QN1[64]*acadoWorkspace.sbar[204] + acadoWorkspace.QN1[65]*acadoWorkspace.sbar[205] + acadoWorkspace.QN1[66]*acadoWorkspace.sbar[206] + acadoWorkspace.QN1[67]*acadoWorkspace.sbar[207] + acadoWorkspace.QN1[68]*acadoWorkspace.sbar[208] + acadoWorkspace.QN1[69]*acadoWorkspace.sbar[209] + acadoWorkspace.QDy[206];\nacadoWorkspace.w1[7] = + acadoWorkspace.QN1[70]*acadoWorkspace.sbar[200] + acadoWorkspace.QN1[71]*acadoWorkspace.sbar[201] + acadoWorkspace.QN1[72]*acadoWorkspace.sbar[202] + acadoWorkspace.QN1[73]*acadoWorkspace.sbar[203] + acadoWorkspace.QN1[74]*acadoWorkspace.sbar[204] + acadoWorkspace.QN1[75]*acadoWorkspace.sbar[205] + acadoWorkspace.QN1[76]*acadoWorkspace.sbar[206] + acadoWorkspace.QN1[77]*acadoWorkspace.sbar[207] + acadoWorkspace.QN1[78]*acadoWorkspace.sbar[208] + acadoWorkspace.QN1[79]*acadoWorkspace.sbar[209] + acadoWorkspace.QDy[207];\nacadoWorkspace.w1[8] = + acadoWorkspace.QN1[80]*acadoWorkspace.sbar[200] + acadoWorkspace.QN1[81]*acadoWorkspace.sbar[201] + acadoWorkspace.QN1[82]*acadoWorkspace.sbar[202] + acadoWorkspace.QN1[83]*acadoWorkspace.sbar[203] + acadoWorkspace.QN1[84]*acadoWorkspace.sbar[204] + acadoWorkspace.QN1[85]*acadoWorkspace.sbar[205] + acadoWorkspace.QN1[86]*acadoWorkspace.sbar[206] + acadoWorkspace.QN1[87]*acadoWorkspace.sbar[207] + acadoWorkspace.QN1[88]*acadoWorkspace.sbar[208] + acadoWorkspace.QN1[89]*acadoWorkspace.sbar[209] + acadoWorkspace.QDy[208];\nacadoWorkspace.w1[9] = + acadoWorkspace.QN1[90]*acadoWorkspace.sbar[200] + acadoWorkspace.QN1[91]*acadoWorkspace.sbar[201] + acadoWorkspace.QN1[92]*acadoWorkspace.sbar[202] + acadoWorkspace.QN1[93]*acadoWorkspace.sbar[203] + acadoWorkspace.QN1[94]*acadoWorkspace.sbar[204] + acadoWorkspace.QN1[95]*acadoWorkspace.sbar[205] + acadoWorkspace.QN1[96]*acadoWorkspace.sbar[206] + acadoWorkspace.QN1[97]*acadoWorkspace.sbar[207] + acadoWorkspace.QN1[98]*acadoWorkspace.sbar[208] + acadoWorkspace.QN1[99]*acadoWorkspace.sbar[209] + acadoWorkspace.QDy[209];\nacado_macBTw1( &(acadoWorkspace.evGu[ 760 ]), acadoWorkspace.w1, &(acadoWorkspace.g[ 76 ]) );\nacado_macATw1QDy( &(acadoWorkspace.evGx[ 1900 ]), acadoWorkspace.w1, &(acadoWorkspace.QDy[ 190 ]), acadoWorkspace.w2 );\nacado_macQSbarW2( &(acadoWorkspace.Q1[ 1900 ]), &(acadoWorkspace.sbar[ 190 ]), acadoWorkspace.w2, acadoWorkspace.w1 );\nacado_macBTw1( &(acadoWorkspace.evGu[ 720 ]), acadoWorkspace.w1, &(acadoWorkspace.g[ 72 ]) );\nacado_macATw1QDy( &(acadoWorkspace.evGx[ 1800 ]), acadoWorkspace.w1, &(acadoWorkspace.QDy[ 180 ]), acadoWorkspace.w2 );\nacado_macQSbarW2( &(acadoWorkspace.Q1[ 1800 ]), &(acadoWorkspace.sbar[ 180 ]), acadoWorkspace.w2, acadoWorkspace.w1 );\nacado_macBTw1( &(acadoWorkspace.evGu[ 680 ]), acadoWorkspace.w1, &(acadoWorkspace.g[ 68 ]) );\nacado_macATw1QDy( &(acadoWorkspace.evGx[ 1700 ]), acadoWorkspace.w1, &(acadoWorkspace.QDy[ 170 ]), acadoWorkspace.w2 );\nacado_macQSbarW2( &(acadoWorkspace.Q1[ 1700 ]), &(acadoWorkspace.sbar[ 170 ]), acadoWorkspace.w2, acadoWorkspace.w1 );\nacado_macBTw1( &(acadoWorkspace.evGu[ 640 ]), acadoWorkspace.w1, &(acadoWorkspace.g[ 64 ]) );\nacado_macATw1QDy( &(acadoWorkspace.evGx[ 1600 ]), acadoWorkspace.w1, &(acadoWorkspace.QDy[ 160 ]), acadoWorkspace.w2 );\nacado_macQSbarW2( &(acadoWorkspace.Q1[ 1600 ]), &(acadoWorkspace.sbar[ 160 ]), acadoWorkspace.w2, acadoWorkspace.w1 );\nacado_macBTw1( &(acadoWorkspace.evGu[ 600 ]), acadoWorkspace.w1, &(acadoWorkspace.g[ 60 ]) );\nacado_macATw1QDy( &(acadoWorkspace.evGx[ 1500 ]), acadoWorkspace.w1, &(acadoWorkspace.QDy[ 150 ]), acadoWorkspace.w2 );\nacado_macQSbarW2( &(acadoWorkspace.Q1[ 1500 ]), &(acadoWorkspace.sbar[ 150 ]), acadoWorkspace.w2, acadoWorkspace.w1 );\nacado_macBTw1( &(acadoWorkspace.evGu[ 560 ]), acadoWorkspace.w1, &(acadoWorkspace.g[ 56 ]) );\nacado_macATw1QDy( &(acadoWorkspace.evGx[ 1400 ]), acadoWorkspace.w1, &(acadoWorkspace.QDy[ 140 ]), acadoWorkspace.w2 );\nacado_macQSbarW2( &(acadoWorkspace.Q1[ 1400 ]), &(acadoWorkspace.sbar[ 140 ]), acadoWorkspace.w2, acadoWorkspace.w1 );\nacado_macBTw1( &(acadoWorkspace.evGu[ 520 ]), acadoWorkspace.w1, &(acadoWorkspace.g[ 52 ]) );\nacado_macATw1QDy( &(acadoWorkspace.evGx[ 1300 ]), acadoWorkspace.w1, &(acadoWorkspace.QDy[ 130 ]), acadoWorkspace.w2 );\nacado_macQSbarW2( &(acadoWorkspace.Q1[ 1300 ]), &(acadoWorkspace.sbar[ 130 ]), acadoWorkspace.w2, acadoWorkspace.w1 );\nacado_macBTw1( &(acadoWorkspace.evGu[ 480 ]), acadoWorkspace.w1, &(acadoWorkspace.g[ 48 ]) );\nacado_macATw1QDy( &(acadoWorkspace.evGx[ 1200 ]), acadoWorkspace.w1, &(acadoWorkspace.QDy[ 120 ]), acadoWorkspace.w2 );\nacado_macQSbarW2( &(acadoWorkspace.Q1[ 1200 ]), &(acadoWorkspace.sbar[ 120 ]), acadoWorkspace.w2, acadoWorkspace.w1 );\nacado_macBTw1( &(acadoWorkspace.evGu[ 440 ]), acadoWorkspace.w1, &(acadoWorkspace.g[ 44 ]) );\nacado_macATw1QDy( &(acadoWorkspace.evGx[ 1100 ]), acadoWorkspace.w1, &(acadoWorkspace.QDy[ 110 ]), acadoWorkspace.w2 );\nacado_macQSbarW2( &(acadoWorkspace.Q1[ 1100 ]), &(acadoWorkspace.sbar[ 110 ]), acadoWorkspace.w2, acadoWorkspace.w1 );\nacado_macBTw1( &(acadoWorkspace.evGu[ 400 ]), acadoWorkspace.w1, &(acadoWorkspace.g[ 40 ]) );\nacado_macATw1QDy( &(acadoWorkspace.evGx[ 1000 ]), acadoWorkspace.w1, &(acadoWorkspace.QDy[ 100 ]), acadoWorkspace.w2 );\nacado_macQSbarW2( &(acadoWorkspace.Q1[ 1000 ]), &(acadoWorkspace.sbar[ 100 ]), acadoWorkspace.w2, acadoWorkspace.w1 );\nacado_macBTw1( &(acadoWorkspace.evGu[ 360 ]), acadoWorkspace.w1, &(acadoWorkspace.g[ 36 ]) );\nacado_macATw1QDy( &(acadoWorkspace.evGx[ 900 ]), acadoWorkspace.w1, &(acadoWorkspace.QDy[ 90 ]), acadoWorkspace.w2 );\nacado_macQSbarW2( &(acadoWorkspace.Q1[ 900 ]), &(acadoWorkspace.sbar[ 90 ]), acadoWorkspace.w2, acadoWorkspace.w1 );\nacado_macBTw1( &(acadoWorkspace.evGu[ 320 ]), acadoWorkspace.w1, &(acadoWorkspace.g[ 32 ]) );\nacado_macATw1QDy( &(acadoWorkspace.evGx[ 800 ]), acadoWorkspace.w1, &(acadoWorkspace.QDy[ 80 ]), acadoWorkspace.w2 );\nacado_macQSbarW2( &(acadoWorkspace.Q1[ 800 ]), &(acadoWorkspace.sbar[ 80 ]), acadoWorkspace.w2, acadoWorkspace.w1 );\nacado_macBTw1( &(acadoWorkspace.evGu[ 280 ]), acadoWorkspace.w1, &(acadoWorkspace.g[ 28 ]) );\nacado_macATw1QDy( &(acadoWorkspace.evGx[ 700 ]), acadoWorkspace.w1, &(acadoWorkspace.QDy[ 70 ]), acadoWorkspace.w2 );\nacado_macQSbarW2( &(acadoWorkspace.Q1[ 700 ]), &(acadoWorkspace.sbar[ 70 ]), acadoWorkspace.w2, acadoWorkspace.w1 );\nacado_macBTw1( &(acadoWorkspace.evGu[ 240 ]), acadoWorkspace.w1, &(acadoWorkspace.g[ 24 ]) );\nacado_macATw1QDy( &(acadoWorkspace.evGx[ 600 ]), acadoWorkspace.w1, &(acadoWorkspace.QDy[ 60 ]), acadoWorkspace.w2 );\nacado_macQSbarW2( &(acadoWorkspace.Q1[ 600 ]), &(acadoWorkspace.sbar[ 60 ]), acadoWorkspace.w2, acadoWorkspace.w1 );\nacado_macBTw1( &(acadoWorkspace.evGu[ 200 ]), acadoWorkspace.w1, &(acadoWorkspace.g[ 20 ]) );\nacado_macATw1QDy( &(acadoWorkspace.evGx[ 500 ]), acadoWorkspace.w1, &(acadoWorkspace.QDy[ 50 ]), acadoWorkspace.w2 );\nacado_macQSbarW2( &(acadoWorkspace.Q1[ 500 ]), &(acadoWorkspace.sbar[ 50 ]), acadoWorkspace.w2, acadoWorkspace.w1 );\nacado_macBTw1( &(acadoWorkspace.evGu[ 160 ]), acadoWorkspace.w1, &(acadoWorkspace.g[ 16 ]) );\nacado_macATw1QDy( &(acadoWorkspace.evGx[ 400 ]), acadoWorkspace.w1, &(acadoWorkspace.QDy[ 40 ]), acadoWorkspace.w2 );\nacado_macQSbarW2( &(acadoWorkspace.Q1[ 400 ]), &(acadoWorkspace.sbar[ 40 ]), acadoWorkspace.w2, acadoWorkspace.w1 );\nacado_macBTw1( &(acadoWorkspace.evGu[ 120 ]), acadoWorkspace.w1, &(acadoWorkspace.g[ 12 ]) );\nacado_macATw1QDy( &(acadoWorkspace.evGx[ 300 ]), acadoWorkspace.w1, &(acadoWorkspace.QDy[ 30 ]), acadoWorkspace.w2 );\nacado_macQSbarW2( &(acadoWorkspace.Q1[ 300 ]), &(acadoWorkspace.sbar[ 30 ]), acadoWorkspace.w2, acadoWorkspace.w1 );\nacado_macBTw1( &(acadoWorkspace.evGu[ 80 ]), acadoWorkspace.w1, &(acadoWorkspace.g[ 8 ]) );\nacado_macATw1QDy( &(acadoWorkspace.evGx[ 200 ]), acadoWorkspace.w1, &(acadoWorkspace.QDy[ 20 ]), acadoWorkspace.w2 );\nacado_macQSbarW2( &(acadoWorkspace.Q1[ 200 ]), &(acadoWorkspace.sbar[ 20 ]), acadoWorkspace.w2, acadoWorkspace.w1 );\nacado_macBTw1( &(acadoWorkspace.evGu[ 40 ]), acadoWorkspace.w1, &(acadoWorkspace.g[ 4 ]) );\nacado_macATw1QDy( &(acadoWorkspace.evGx[ 100 ]), acadoWorkspace.w1, &(acadoWorkspace.QDy[ 10 ]), acadoWorkspace.w2 );\nacado_macQSbarW2( &(acadoWorkspace.Q1[ 100 ]), &(acadoWorkspace.sbar[ 10 ]), acadoWorkspace.w2, acadoWorkspace.w1 );\nacado_macBTw1( acadoWorkspace.evGu, acadoWorkspace.w1, acadoWorkspace.g );\n\nacadoWorkspace.lb[0] = acadoVariables.lbValues[0] - acadoVariables.u[0];\nacadoWorkspace.lb[1] = acadoVariables.lbValues[1] - acadoVariables.u[1];\nacadoWorkspace.lb[2] = acadoVariables.lbValues[2] - acadoVariables.u[2];\nacadoWorkspace.lb[3] = acadoVariables.lbValues[3] - acadoVariables.u[3];\nacadoWorkspace.lb[4] = acadoVariables.lbValues[4] - acadoVariables.u[4];\nacadoWorkspace.lb[5] = acadoVariables.lbValues[5] - acadoVariables.u[5];\nacadoWorkspace.lb[6] = acadoVariables.lbValues[6] - acadoVariables.u[6];\nacadoWorkspace.lb[7] = acadoVariables.lbValues[7] - acadoVariables.u[7];\nacadoWorkspace.lb[8] = acadoVariables.lbValues[8] - acadoVariables.u[8];\nacadoWorkspace.lb[9] = acadoVariables.lbValues[9] - acadoVariables.u[9];\nacadoWorkspace.lb[10] = acadoVariables.lbValues[10] - acadoVariables.u[10];\nacadoWorkspace.lb[11] = acadoVariables.lbValues[11] - acadoVariables.u[11];\nacadoWorkspace.lb[12] = acadoVariables.lbValues[12] - acadoVariables.u[12];\nacadoWorkspace.lb[13] = acadoVariables.lbValues[13] - acadoVariables.u[13];\nacadoWorkspace.lb[14] = acadoVariables.lbValues[14] - acadoVariables.u[14];\nacadoWorkspace.lb[15] = acadoVariables.lbValues[15] - acadoVariables.u[15];\nacadoWorkspace.lb[16] = acadoVariables.lbValues[16] - acadoVariables.u[16];\nacadoWorkspace.lb[17] = acadoVariables.lbValues[17] - acadoVariables.u[17];\nacadoWorkspace.lb[18] = acadoVariables.lbValues[18] - acadoVariables.u[18];\nacadoWorkspace.lb[19] = acadoVariables.lbValues[19] - acadoVariables.u[19];\nacadoWorkspace.lb[20] = acadoVariables.lbValues[20] - acadoVariables.u[20];\nacadoWorkspace.lb[21] = acadoVariables.lbValues[21] - acadoVariables.u[21];\nacadoWorkspace.lb[22] = acadoVariables.lbValues[22] - acadoVariables.u[22];\nacadoWorkspace.lb[23] = acadoVariables.lbValues[23] - acadoVariables.u[23];\nacadoWorkspace.lb[24] = acadoVariables.lbValues[24] - acadoVariables.u[24];\nacadoWorkspace.lb[25] = acadoVariables.lbValues[25] - acadoVariables.u[25];\nacadoWorkspace.lb[26] = acadoVariables.lbValues[26] - acadoVariables.u[26];\nacadoWorkspace.lb[27] = acadoVariables.lbValues[27] - acadoVariables.u[27];\nacadoWorkspace.lb[28] = acadoVariables.lbValues[28] - acadoVariables.u[28];\nacadoWorkspace.lb[29] = acadoVariables.lbValues[29] - acadoVariables.u[29];\nacadoWorkspace.lb[30] = acadoVariables.lbValues[30] - acadoVariables.u[30];\nacadoWorkspace.lb[31] = acadoVariables.lbValues[31] - acadoVariables.u[31];\nacadoWorkspace.lb[32] = acadoVariables.lbValues[32] - acadoVariables.u[32];\nacadoWorkspace.lb[33] = acadoVariables.lbValues[33] - acadoVariables.u[33];\nacadoWorkspace.lb[34] = acadoVariables.lbValues[34] - acadoVariables.u[34];\nacadoWorkspace.lb[35] = acadoVariables.lbValues[35] - acadoVariables.u[35];\nacadoWorkspace.lb[36] = acadoVariables.lbValues[36] - acadoVariables.u[36];\nacadoWorkspace.lb[37] = acadoVariables.lbValues[37] - acadoVariables.u[37];\nacadoWorkspace.lb[38] = acadoVariables.lbValues[38] - acadoVariables.u[38];\nacadoWorkspace.lb[39] = acadoVariables.lbValues[39] - acadoVariables.u[39];\nacadoWorkspace.lb[40] = acadoVariables.lbValues[40] - acadoVariables.u[40];\nacadoWorkspace.lb[41] = acadoVariables.lbValues[41] - acadoVariables.u[41];\nacadoWorkspace.lb[42] = acadoVariables.lbValues[42] - acadoVariables.u[42];\nacadoWorkspace.lb[43] = acadoVariables.lbValues[43] - acadoVariables.u[43];\nacadoWorkspace.lb[44] = acadoVariables.lbValues[44] - acadoVariables.u[44];\nacadoWorkspace.lb[45] = acadoVariables.lbValues[45] - acadoVariables.u[45];\nacadoWorkspace.lb[46] = acadoVariables.lbValues[46] - acadoVariables.u[46];\nacadoWorkspace.lb[47] = acadoVariables.lbValues[47] - acadoVariables.u[47];\nacadoWorkspace.lb[48] = acadoVariables.lbValues[48] - acadoVariables.u[48];\nacadoWorkspace.lb[49] = acadoVariables.lbValues[49] - acadoVariables.u[49];\nacadoWorkspace.lb[50] = acadoVariables.lbValues[50] - acadoVariables.u[50];\nacadoWorkspace.lb[51] = acadoVariables.lbValues[51] - acadoVariables.u[51];\nacadoWorkspace.lb[52] = acadoVariables.lbValues[52] - acadoVariables.u[52];\nacadoWorkspace.lb[53] = acadoVariables.lbValues[53] - acadoVariables.u[53];\nacadoWorkspace.lb[54] = acadoVariables.lbValues[54] - acadoVariables.u[54];\nacadoWorkspace.lb[55] = acadoVariables.lbValues[55] - acadoVariables.u[55];\nacadoWorkspace.lb[56] = acadoVariables.lbValues[56] - acadoVariables.u[56];\nacadoWorkspace.lb[57] = acadoVariables.lbValues[57] - acadoVariables.u[57];\nacadoWorkspace.lb[58] = acadoVariables.lbValues[58] - acadoVariables.u[58];\nacadoWorkspace.lb[59] = acadoVariables.lbValues[59] - acadoVariables.u[59];\nacadoWorkspace.lb[60] = acadoVariables.lbValues[60] - acadoVariables.u[60];\nacadoWorkspace.lb[61] = acadoVariables.lbValues[61] - acadoVariables.u[61];\nacadoWorkspace.lb[62] = acadoVariables.lbValues[62] - acadoVariables.u[62];\nacadoWorkspace.lb[63] = acadoVariables.lbValues[63] - acadoVariables.u[63];\nacadoWorkspace.lb[64] = acadoVariables.lbValues[64] - acadoVariables.u[64];\nacadoWorkspace.lb[65] = acadoVariables.lbValues[65] - acadoVariables.u[65];\nacadoWorkspace.lb[66] = acadoVariables.lbValues[66] - acadoVariables.u[66];\nacadoWorkspace.lb[67] = acadoVariables.lbValues[67] - acadoVariables.u[67];\nacadoWorkspace.lb[68] = acadoVariables.lbValues[68] - acadoVariables.u[68];\nacadoWorkspace.lb[69] = acadoVariables.lbValues[69] - acadoVariables.u[69];\nacadoWorkspace.lb[70] = acadoVariables.lbValues[70] - acadoVariables.u[70];\nacadoWorkspace.lb[71] = acadoVariables.lbValues[71] - acadoVariables.u[71];\nacadoWorkspace.lb[72] = acadoVariables.lbValues[72] - acadoVariables.u[72];\nacadoWorkspace.lb[73] = acadoVariables.lbValues[73] - acadoVariables.u[73];\nacadoWorkspace.lb[74] = acadoVariables.lbValues[74] - acadoVariables.u[74];\nacadoWorkspace.lb[75] = acadoVariables.lbValues[75] - acadoVariables.u[75];\nacadoWorkspace.lb[76] = acadoVariables.lbValues[76] - acadoVariables.u[76];\nacadoWorkspace.lb[77] = acadoVariables.lbValues[77] - acadoVariables.u[77];\nacadoWorkspace.lb[78] = acadoVariables.lbValues[78] - acadoVariables.u[78];\nacadoWorkspace.lb[79] = acadoVariables.lbValues[79] - acadoVariables.u[79];\nacadoWorkspace.ub[0] = acadoVariables.ubValues[0] - acadoVariables.u[0];\nacadoWorkspace.ub[1] = acadoVariables.ubValues[1] - acadoVariables.u[1];\nacadoWorkspace.ub[2] = acadoVariables.ubValues[2] - acadoVariables.u[2];\nacadoWorkspace.ub[3] = acadoVariables.ubValues[3] - acadoVariables.u[3];\nacadoWorkspace.ub[4] = acadoVariables.ubValues[4] - acadoVariables.u[4];\nacadoWorkspace.ub[5] = acadoVariables.ubValues[5] - acadoVariables.u[5];\nacadoWorkspace.ub[6] = acadoVariables.ubValues[6] - acadoVariables.u[6];\nacadoWorkspace.ub[7] = acadoVariables.ubValues[7] - acadoVariables.u[7];\nacadoWorkspace.ub[8] = acadoVariables.ubValues[8] - acadoVariables.u[8];\nacadoWorkspace.ub[9] = acadoVariables.ubValues[9] - acadoVariables.u[9];\nacadoWorkspace.ub[10] = acadoVariables.ubValues[10] - acadoVariables.u[10];\nacadoWorkspace.ub[11] = acadoVariables.ubValues[11] - acadoVariables.u[11];\nacadoWorkspace.ub[12] = acadoVariables.ubValues[12] - acadoVariables.u[12];\nacadoWorkspace.ub[13] = acadoVariables.ubValues[13] - acadoVariables.u[13];\nacadoWorkspace.ub[14] = acadoVariables.ubValues[14] - acadoVariables.u[14];\nacadoWorkspace.ub[15] = acadoVariables.ubValues[15] - acadoVariables.u[15];\nacadoWorkspace.ub[16] = acadoVariables.ubValues[16] - acadoVariables.u[16];\nacadoWorkspace.ub[17] = acadoVariables.ubValues[17] - acadoVariables.u[17];\nacadoWorkspace.ub[18] = acadoVariables.ubValues[18] - acadoVariables.u[18];\nacadoWorkspace.ub[19] = acadoVariables.ubValues[19] - acadoVariables.u[19];\nacadoWorkspace.ub[20] = acadoVariables.ubValues[20] - acadoVariables.u[20];\nacadoWorkspace.ub[21] = acadoVariables.ubValues[21] - acadoVariables.u[21];\nacadoWorkspace.ub[22] = acadoVariables.ubValues[22] - acadoVariables.u[22];\nacadoWorkspace.ub[23] = acadoVariables.ubValues[23] - acadoVariables.u[23];\nacadoWorkspace.ub[24] = acadoVariables.ubValues[24] - acadoVariables.u[24];\nacadoWorkspace.ub[25] = acadoVariables.ubValues[25] - acadoVariables.u[25];\nacadoWorkspace.ub[26] = acadoVariables.ubValues[26] - acadoVariables.u[26];\nacadoWorkspace.ub[27] = acadoVariables.ubValues[27] - acadoVariables.u[27];\nacadoWorkspace.ub[28] = acadoVariables.ubValues[28] - acadoVariables.u[28];\nacadoWorkspace.ub[29] = acadoVariables.ubValues[29] - acadoVariables.u[29];\nacadoWorkspace.ub[30] = acadoVariables.ubValues[30] - acadoVariables.u[30];\nacadoWorkspace.ub[31] = acadoVariables.ubValues[31] - acadoVariables.u[31];\nacadoWorkspace.ub[32] = acadoVariables.ubValues[32] - acadoVariables.u[32];\nacadoWorkspace.ub[33] = acadoVariables.ubValues[33] - acadoVariables.u[33];\nacadoWorkspace.ub[34] = acadoVariables.ubValues[34] - acadoVariables.u[34];\nacadoWorkspace.ub[35] = acadoVariables.ubValues[35] - acadoVariables.u[35];\nacadoWorkspace.ub[36] = acadoVariables.ubValues[36] - acadoVariables.u[36];\nacadoWorkspace.ub[37] = acadoVariables.ubValues[37] - acadoVariables.u[37];\nacadoWorkspace.ub[38] = acadoVariables.ubValues[38] - acadoVariables.u[38];\nacadoWorkspace.ub[39] = acadoVariables.ubValues[39] - acadoVariables.u[39];\nacadoWorkspace.ub[40] = acadoVariables.ubValues[40] - acadoVariables.u[40];\nacadoWorkspace.ub[41] = acadoVariables.ubValues[41] - acadoVariables.u[41];\nacadoWorkspace.ub[42] = acadoVariables.ubValues[42] - acadoVariables.u[42];\nacadoWorkspace.ub[43] = acadoVariables.ubValues[43] - acadoVariables.u[43];\nacadoWorkspace.ub[44] = acadoVariables.ubValues[44] - acadoVariables.u[44];\nacadoWorkspace.ub[45] = acadoVariables.ubValues[45] - acadoVariables.u[45];\nacadoWorkspace.ub[46] = acadoVariables.ubValues[46] - acadoVariables.u[46];\nacadoWorkspace.ub[47] = acadoVariables.ubValues[47] - acadoVariables.u[47];\nacadoWorkspace.ub[48] = acadoVariables.ubValues[48] - acadoVariables.u[48];\nacadoWorkspace.ub[49] = acadoVariables.ubValues[49] - acadoVariables.u[49];\nacadoWorkspace.ub[50] = acadoVariables.ubValues[50] - acadoVariables.u[50];\nacadoWorkspace.ub[51] = acadoVariables.ubValues[51] - acadoVariables.u[51];\nacadoWorkspace.ub[52] = acadoVariables.ubValues[52] - acadoVariables.u[52];\nacadoWorkspace.ub[53] = acadoVariables.ubValues[53] - acadoVariables.u[53];\nacadoWorkspace.ub[54] = acadoVariables.ubValues[54] - acadoVariables.u[54];\nacadoWorkspace.ub[55] = acadoVariables.ubValues[55] - acadoVariables.u[55];\nacadoWorkspace.ub[56] = acadoVariables.ubValues[56] - acadoVariables.u[56];\nacadoWorkspace.ub[57] = acadoVariables.ubValues[57] - acadoVariables.u[57];\nacadoWorkspace.ub[58] = acadoVariables.ubValues[58] - acadoVariables.u[58];\nacadoWorkspace.ub[59] = acadoVariables.ubValues[59] - acadoVariables.u[59];\nacadoWorkspace.ub[60] = acadoVariables.ubValues[60] - acadoVariables.u[60];\nacadoWorkspace.ub[61] = acadoVariables.ubValues[61] - acadoVariables.u[61];\nacadoWorkspace.ub[62] = acadoVariables.ubValues[62] - acadoVariables.u[62];\nacadoWorkspace.ub[63] = acadoVariables.ubValues[63] - acadoVariables.u[63];\nacadoWorkspace.ub[64] = acadoVariables.ubValues[64] - acadoVariables.u[64];\nacadoWorkspace.ub[65] = acadoVariables.ubValues[65] - acadoVariables.u[65];\nacadoWorkspace.ub[66] = acadoVariables.ubValues[66] - acadoVariables.u[66];\nacadoWorkspace.ub[67] = acadoVariables.ubValues[67] - acadoVariables.u[67];\nacadoWorkspace.ub[68] = acadoVariables.ubValues[68] - acadoVariables.u[68];\nacadoWorkspace.ub[69] = acadoVariables.ubValues[69] - acadoVariables.u[69];\nacadoWorkspace.ub[70] = acadoVariables.ubValues[70] - acadoVariables.u[70];\nacadoWorkspace.ub[71] = acadoVariables.ubValues[71] - acadoVariables.u[71];\nacadoWorkspace.ub[72] = acadoVariables.ubValues[72] - acadoVariables.u[72];\nacadoWorkspace.ub[73] = acadoVariables.ubValues[73] - acadoVariables.u[73];\nacadoWorkspace.ub[74] = acadoVariables.ubValues[74] - acadoVariables.u[74];\nacadoWorkspace.ub[75] = acadoVariables.ubValues[75] - acadoVariables.u[75];\nacadoWorkspace.ub[76] = acadoVariables.ubValues[76] - acadoVariables.u[76];\nacadoWorkspace.ub[77] = acadoVariables.ubValues[77] - acadoVariables.u[77];\nacadoWorkspace.ub[78] = acadoVariables.ubValues[78] - acadoVariables.u[78];\nacadoWorkspace.ub[79] = acadoVariables.ubValues[79] - acadoVariables.u[79];\n\n}\n\nvoid acado_expand(  )\n{\nint lRun1;\nacadoVariables.u[0] += acadoWorkspace.x[0];\nacadoVariables.u[1] += acadoWorkspace.x[1];\nacadoVariables.u[2] += acadoWorkspace.x[2];\nacadoVariables.u[3] += acadoWorkspace.x[3];\nacadoVariables.u[4] += acadoWorkspace.x[4];\nacadoVariables.u[5] += acadoWorkspace.x[5];\nacadoVariables.u[6] += acadoWorkspace.x[6];\nacadoVariables.u[7] += acadoWorkspace.x[7];\nacadoVariables.u[8] += acadoWorkspace.x[8];\nacadoVariables.u[9] += acadoWorkspace.x[9];\nacadoVariables.u[10] += acadoWorkspace.x[10];\nacadoVariables.u[11] += acadoWorkspace.x[11];\nacadoVariables.u[12] += acadoWorkspace.x[12];\nacadoVariables.u[13] += acadoWorkspace.x[13];\nacadoVariables.u[14] += acadoWorkspace.x[14];\nacadoVariables.u[15] += acadoWorkspace.x[15];\nacadoVariables.u[16] += acadoWorkspace.x[16];\nacadoVariables.u[17] += acadoWorkspace.x[17];\nacadoVariables.u[18] += acadoWorkspace.x[18];\nacadoVariables.u[19] += acadoWorkspace.x[19];\nacadoVariables.u[20] += acadoWorkspace.x[20];\nacadoVariables.u[21] += acadoWorkspace.x[21];\nacadoVariables.u[22] += acadoWorkspace.x[22];\nacadoVariables.u[23] += acadoWorkspace.x[23];\nacadoVariables.u[24] += acadoWorkspace.x[24];\nacadoVariables.u[25] += acadoWorkspace.x[25];\nacadoVariables.u[26] += acadoWorkspace.x[26];\nacadoVariables.u[27] += acadoWorkspace.x[27];\nacadoVariables.u[28] += acadoWorkspace.x[28];\nacadoVariables.u[29] += acadoWorkspace.x[29];\nacadoVariables.u[30] += acadoWorkspace.x[30];\nacadoVariables.u[31] += acadoWorkspace.x[31];\nacadoVariables.u[32] += acadoWorkspace.x[32];\nacadoVariables.u[33] += acadoWorkspace.x[33];\nacadoVariables.u[34] += acadoWorkspace.x[34];\nacadoVariables.u[35] += acadoWorkspace.x[35];\nacadoVariables.u[36] += acadoWorkspace.x[36];\nacadoVariables.u[37] += acadoWorkspace.x[37];\nacadoVariables.u[38] += acadoWorkspace.x[38];\nacadoVariables.u[39] += acadoWorkspace.x[39];\nacadoVariables.u[40] += acadoWorkspace.x[40];\nacadoVariables.u[41] += acadoWorkspace.x[41];\nacadoVariables.u[42] += acadoWorkspace.x[42];\nacadoVariables.u[43] += acadoWorkspace.x[43];\nacadoVariables.u[44] += acadoWorkspace.x[44];\nacadoVariables.u[45] += acadoWorkspace.x[45];\nacadoVariables.u[46] += acadoWorkspace.x[46];\nacadoVariables.u[47] += acadoWorkspace.x[47];\nacadoVariables.u[48] += acadoWorkspace.x[48];\nacadoVariables.u[49] += acadoWorkspace.x[49];\nacadoVariables.u[50] += acadoWorkspace.x[50];\nacadoVariables.u[51] += acadoWorkspace.x[51];\nacadoVariables.u[52] += acadoWorkspace.x[52];\nacadoVariables.u[53] += acadoWorkspace.x[53];\nacadoVariables.u[54] += acadoWorkspace.x[54];\nacadoVariables.u[55] += acadoWorkspace.x[55];\nacadoVariables.u[56] += acadoWorkspace.x[56];\nacadoVariables.u[57] += acadoWorkspace.x[57];\nacadoVariables.u[58] += acadoWorkspace.x[58];\nacadoVariables.u[59] += acadoWorkspace.x[59];\nacadoVariables.u[60] += acadoWorkspace.x[60];\nacadoVariables.u[61] += acadoWorkspace.x[61];\nacadoVariables.u[62] += acadoWorkspace.x[62];\nacadoVariables.u[63] += acadoWorkspace.x[63];\nacadoVariables.u[64] += acadoWorkspace.x[64];\nacadoVariables.u[65] += acadoWorkspace.x[65];\nacadoVariables.u[66] += acadoWorkspace.x[66];\nacadoVariables.u[67] += acadoWorkspace.x[67];\nacadoVariables.u[68] += acadoWorkspace.x[68];\nacadoVariables.u[69] += acadoWorkspace.x[69];\nacadoVariables.u[70] += acadoWorkspace.x[70];\nacadoVariables.u[71] += acadoWorkspace.x[71];\nacadoVariables.u[72] += acadoWorkspace.x[72];\nacadoVariables.u[73] += acadoWorkspace.x[73];\nacadoVariables.u[74] += acadoWorkspace.x[74];\nacadoVariables.u[75] += acadoWorkspace.x[75];\nacadoVariables.u[76] += acadoWorkspace.x[76];\nacadoVariables.u[77] += acadoWorkspace.x[77];\nacadoVariables.u[78] += acadoWorkspace.x[78];\nacadoVariables.u[79] += acadoWorkspace.x[79];\nacadoWorkspace.sbar[0] = acadoWorkspace.Dx0[0];\nacadoWorkspace.sbar[1] = acadoWorkspace.Dx0[1];\nacadoWorkspace.sbar[2] = acadoWorkspace.Dx0[2];\nacadoWorkspace.sbar[3] = acadoWorkspace.Dx0[3];\nacadoWorkspace.sbar[4] = acadoWorkspace.Dx0[4];\nacadoWorkspace.sbar[5] = acadoWorkspace.Dx0[5];\nacadoWorkspace.sbar[6] = acadoWorkspace.Dx0[6];\nacadoWorkspace.sbar[7] = acadoWorkspace.Dx0[7];\nacadoWorkspace.sbar[8] = acadoWorkspace.Dx0[8];\nacadoWorkspace.sbar[9] = acadoWorkspace.Dx0[9];\nfor (lRun1 = 0; lRun1 < 200; ++lRun1)\nacadoWorkspace.sbar[lRun1 + 10] = acadoWorkspace.d[lRun1];\n\nacado_expansionStep( acadoWorkspace.evGx, acadoWorkspace.evGu, acadoWorkspace.x, acadoWorkspace.sbar, &(acadoWorkspace.sbar[ 10 ]) );\nacado_expansionStep( &(acadoWorkspace.evGx[ 100 ]), &(acadoWorkspace.evGu[ 40 ]), &(acadoWorkspace.x[ 4 ]), &(acadoWorkspace.sbar[ 10 ]), &(acadoWorkspace.sbar[ 20 ]) );\nacado_expansionStep( &(acadoWorkspace.evGx[ 200 ]), &(acadoWorkspace.evGu[ 80 ]), &(acadoWorkspace.x[ 8 ]), &(acadoWorkspace.sbar[ 20 ]), &(acadoWorkspace.sbar[ 30 ]) );\nacado_expansionStep( &(acadoWorkspace.evGx[ 300 ]), &(acadoWorkspace.evGu[ 120 ]), &(acadoWorkspace.x[ 12 ]), &(acadoWorkspace.sbar[ 30 ]), &(acadoWorkspace.sbar[ 40 ]) );\nacado_expansionStep( &(acadoWorkspace.evGx[ 400 ]), &(acadoWorkspace.evGu[ 160 ]), &(acadoWorkspace.x[ 16 ]), &(acadoWorkspace.sbar[ 40 ]), &(acadoWorkspace.sbar[ 50 ]) );\nacado_expansionStep( &(acadoWorkspace.evGx[ 500 ]), &(acadoWorkspace.evGu[ 200 ]), &(acadoWorkspace.x[ 20 ]), &(acadoWorkspace.sbar[ 50 ]), &(acadoWorkspace.sbar[ 60 ]) );\nacado_expansionStep( &(acadoWorkspace.evGx[ 600 ]), &(acadoWorkspace.evGu[ 240 ]), &(acadoWorkspace.x[ 24 ]), &(acadoWorkspace.sbar[ 60 ]), &(acadoWorkspace.sbar[ 70 ]) );\nacado_expansionStep( &(acadoWorkspace.evGx[ 700 ]), &(acadoWorkspace.evGu[ 280 ]), &(acadoWorkspace.x[ 28 ]), &(acadoWorkspace.sbar[ 70 ]), &(acadoWorkspace.sbar[ 80 ]) );\nacado_expansionStep( &(acadoWorkspace.evGx[ 800 ]), &(acadoWorkspace.evGu[ 320 ]), &(acadoWorkspace.x[ 32 ]), &(acadoWorkspace.sbar[ 80 ]), &(acadoWorkspace.sbar[ 90 ]) );\nacado_expansionStep( &(acadoWorkspace.evGx[ 900 ]), &(acadoWorkspace.evGu[ 360 ]), &(acadoWorkspace.x[ 36 ]), &(acadoWorkspace.sbar[ 90 ]), &(acadoWorkspace.sbar[ 100 ]) );\nacado_expansionStep( &(acadoWorkspace.evGx[ 1000 ]), &(acadoWorkspace.evGu[ 400 ]), &(acadoWorkspace.x[ 40 ]), &(acadoWorkspace.sbar[ 100 ]), &(acadoWorkspace.sbar[ 110 ]) );\nacado_expansionStep( &(acadoWorkspace.evGx[ 1100 ]), &(acadoWorkspace.evGu[ 440 ]), &(acadoWorkspace.x[ 44 ]), &(acadoWorkspace.sbar[ 110 ]), &(acadoWorkspace.sbar[ 120 ]) );\nacado_expansionStep( &(acadoWorkspace.evGx[ 1200 ]), &(acadoWorkspace.evGu[ 480 ]), &(acadoWorkspace.x[ 48 ]), &(acadoWorkspace.sbar[ 120 ]), &(acadoWorkspace.sbar[ 130 ]) );\nacado_expansionStep( &(acadoWorkspace.evGx[ 1300 ]), &(acadoWorkspace.evGu[ 520 ]), &(acadoWorkspace.x[ 52 ]), &(acadoWorkspace.sbar[ 130 ]), &(acadoWorkspace.sbar[ 140 ]) );\nacado_expansionStep( &(acadoWorkspace.evGx[ 1400 ]), &(acadoWorkspace.evGu[ 560 ]), &(acadoWorkspace.x[ 56 ]), &(acadoWorkspace.sbar[ 140 ]), &(acadoWorkspace.sbar[ 150 ]) );\nacado_expansionStep( &(acadoWorkspace.evGx[ 1500 ]), &(acadoWorkspace.evGu[ 600 ]), &(acadoWorkspace.x[ 60 ]), &(acadoWorkspace.sbar[ 150 ]), &(acadoWorkspace.sbar[ 160 ]) );\nacado_expansionStep( &(acadoWorkspace.evGx[ 1600 ]), &(acadoWorkspace.evGu[ 640 ]), &(acadoWorkspace.x[ 64 ]), &(acadoWorkspace.sbar[ 160 ]), &(acadoWorkspace.sbar[ 170 ]) );\nacado_expansionStep( &(acadoWorkspace.evGx[ 1700 ]), &(acadoWorkspace.evGu[ 680 ]), &(acadoWorkspace.x[ 68 ]), &(acadoWorkspace.sbar[ 170 ]), &(acadoWorkspace.sbar[ 180 ]) );\nacado_expansionStep( &(acadoWorkspace.evGx[ 1800 ]), &(acadoWorkspace.evGu[ 720 ]), &(acadoWorkspace.x[ 72 ]), &(acadoWorkspace.sbar[ 180 ]), &(acadoWorkspace.sbar[ 190 ]) );\nacado_expansionStep( &(acadoWorkspace.evGx[ 1900 ]), &(acadoWorkspace.evGu[ 760 ]), &(acadoWorkspace.x[ 76 ]), &(acadoWorkspace.sbar[ 190 ]), &(acadoWorkspace.sbar[ 200 ]) );\nfor (lRun1 = 0; lRun1 < 210; ++lRun1)\nacadoVariables.x[lRun1] += acadoWorkspace.sbar[lRun1];\n\n}\n\nint acado_preparationStep(  )\n{\nint ret;\n\nret = acado_modelSimulation();\nacado_evaluateObjective(  );\nacado_condensePrep(  );\nreturn ret;\n}\n\nint acado_feedbackStep(  )\n{\nint tmp;\n\nacado_condenseFdb(  );\n\ntmp = acado_solve( );\n\nacado_expand(  );\nreturn tmp;\n}\n\nint acado_initializeSolver(  )\n{\nint ret;\n\n/* This is a function which must be called once before any other function call! */\n\n\nret = 0;\n\nmemset(&acadoWorkspace, 0, sizeof( acadoWorkspace ));\nacadoVariables.lbValues[0] = 2.0000000000000000e+00;\nacadoVariables.lbValues[1] = -3.0000000000000000e+00;\nacadoVariables.lbValues[2] = -3.0000000000000000e+00;\nacadoVariables.lbValues[3] = -1.0000000000000000e+00;\nacadoVariables.lbValues[4] = 2.0000000000000000e+00;\nacadoVariables.lbValues[5] = -3.0000000000000000e+00;\nacadoVariables.lbValues[6] = -3.0000000000000000e+00;\nacadoVariables.lbValues[7] = -1.0000000000000000e+00;\nacadoVariables.lbValues[8] = 2.0000000000000000e+00;\nacadoVariables.lbValues[9] = -3.0000000000000000e+00;\nacadoVariables.lbValues[10] = -3.0000000000000000e+00;\nacadoVariables.lbValues[11] = -1.0000000000000000e+00;\nacadoVariables.lbValues[12] = 2.0000000000000000e+00;\nacadoVariables.lbValues[13] = -3.0000000000000000e+00;\nacadoVariables.lbValues[14] = -3.0000000000000000e+00;\nacadoVariables.lbValues[15] = -1.0000000000000000e+00;\nacadoVariables.lbValues[16] = 2.0000000000000000e+00;\nacadoVariables.lbValues[17] = -3.0000000000000000e+00;\nacadoVariables.lbValues[18] = -3.0000000000000000e+00;\nacadoVariables.lbValues[19] = -1.0000000000000000e+00;\nacadoVariables.lbValues[20] = 2.0000000000000000e+00;\nacadoVariables.lbValues[21] = -3.0000000000000000e+00;\nacadoVariables.lbValues[22] = -3.0000000000000000e+00;\nacadoVariables.lbValues[23] = -1.0000000000000000e+00;\nacadoVariables.lbValues[24] = 2.0000000000000000e+00;\nacadoVariables.lbValues[25] = -3.0000000000000000e+00;\nacadoVariables.lbValues[26] = -3.0000000000000000e+00;\nacadoVariables.lbValues[27] = -1.0000000000000000e+00;\nacadoVariables.lbValues[28] = 2.0000000000000000e+00;\nacadoVariables.lbValues[29] = -3.0000000000000000e+00;\nacadoVariables.lbValues[30] = -3.0000000000000000e+00;\nacadoVariables.lbValues[31] = -1.0000000000000000e+00;\nacadoVariables.lbValues[32] = 2.0000000000000000e+00;\nacadoVariables.lbValues[33] = -3.0000000000000000e+00;\nacadoVariables.lbValues[34] = -3.0000000000000000e+00;\nacadoVariables.lbValues[35] = -1.0000000000000000e+00;\nacadoVariables.lbValues[36] = 2.0000000000000000e+00;\nacadoVariables.lbValues[37] = -3.0000000000000000e+00;\nacadoVariables.lbValues[38] = -3.0000000000000000e+00;\nacadoVariables.lbValues[39] = -1.0000000000000000e+00;\nacadoVariables.lbValues[40] = 2.0000000000000000e+00;\nacadoVariables.lbValues[41] = -3.0000000000000000e+00;\nacadoVariables.lbValues[42] = -3.0000000000000000e+00;\nacadoVariables.lbValues[43] = -1.0000000000000000e+00;\nacadoVariables.lbValues[44] = 2.0000000000000000e+00;\nacadoVariables.lbValues[45] = -3.0000000000000000e+00;\nacadoVariables.lbValues[46] = -3.0000000000000000e+00;\nacadoVariables.lbValues[47] = -1.0000000000000000e+00;\nacadoVariables.lbValues[48] = 2.0000000000000000e+00;\nacadoVariables.lbValues[49] = -3.0000000000000000e+00;\nacadoVariables.lbValues[50] = -3.0000000000000000e+00;\nacadoVariables.lbValues[51] = -1.0000000000000000e+00;\nacadoVariables.lbValues[52] = 2.0000000000000000e+00;\nacadoVariables.lbValues[53] = -3.0000000000000000e+00;\nacadoVariables.lbValues[54] = -3.0000000000000000e+00;\nacadoVariables.lbValues[55] = -1.0000000000000000e+00;\nacadoVariables.lbValues[56] = 2.0000000000000000e+00;\nacadoVariables.lbValues[57] = -3.0000000000000000e+00;\nacadoVariables.lbValues[58] = -3.0000000000000000e+00;\nacadoVariables.lbValues[59] = -1.0000000000000000e+00;\nacadoVariables.lbValues[60] = 2.0000000000000000e+00;\nacadoVariables.lbValues[61] = -3.0000000000000000e+00;\nacadoVariables.lbValues[62] = -3.0000000000000000e+00;\nacadoVariables.lbValues[63] = -1.0000000000000000e+00;\nacadoVariables.lbValues[64] = 2.0000000000000000e+00;\nacadoVariables.lbValues[65] = -3.0000000000000000e+00;\nacadoVariables.lbValues[66] = -3.0000000000000000e+00;\nacadoVariables.lbValues[67] = -1.0000000000000000e+00;\nacadoVariables.lbValues[68] = 2.0000000000000000e+00;\nacadoVariables.lbValues[69] = -3.0000000000000000e+00;\nacadoVariables.lbValues[70] = -3.0000000000000000e+00;\nacadoVariables.lbValues[71] = -1.0000000000000000e+00;\nacadoVariables.lbValues[72] = 2.0000000000000000e+00;\nacadoVariables.lbValues[73] = -3.0000000000000000e+00;\nacadoVariables.lbValues[74] = -3.0000000000000000e+00;\nacadoVariables.lbValues[75] = -1.0000000000000000e+00;\nacadoVariables.lbValues[76] = 2.0000000000000000e+00;\nacadoVariables.lbValues[77] = -3.0000000000000000e+00;\nacadoVariables.lbValues[78] = -3.0000000000000000e+00;\nacadoVariables.lbValues[79] = -1.0000000000000000e+00;\nacadoVariables.ubValues[0] = 2.0000000000000000e+01;\nacadoVariables.ubValues[1] = 3.0000000000000000e+00;\nacadoVariables.ubValues[2] = 3.0000000000000000e+00;\nacadoVariables.ubValues[3] = 1.0000000000000000e+00;\nacadoVariables.ubValues[4] = 2.0000000000000000e+01;\nacadoVariables.ubValues[5] = 3.0000000000000000e+00;\nacadoVariables.ubValues[6] = 3.0000000000000000e+00;\nacadoVariables.ubValues[7] = 1.0000000000000000e+00;\nacadoVariables.ubValues[8] = 2.0000000000000000e+01;\nacadoVariables.ubValues[9] = 3.0000000000000000e+00;\nacadoVariables.ubValues[10] = 3.0000000000000000e+00;\nacadoVariables.ubValues[11] = 1.0000000000000000e+00;\nacadoVariables.ubValues[12] = 2.0000000000000000e+01;\nacadoVariables.ubValues[13] = 3.0000000000000000e+00;\nacadoVariables.ubValues[14] = 3.0000000000000000e+00;\nacadoVariables.ubValues[15] = 1.0000000000000000e+00;\nacadoVariables.ubValues[16] = 2.0000000000000000e+01;\nacadoVariables.ubValues[17] = 3.0000000000000000e+00;\nacadoVariables.ubValues[18] = 3.0000000000000000e+00;\nacadoVariables.ubValues[19] = 1.0000000000000000e+00;\nacadoVariables.ubValues[20] = 2.0000000000000000e+01;\nacadoVariables.ubValues[21] = 3.0000000000000000e+00;\nacadoVariables.ubValues[22] = 3.0000000000000000e+00;\nacadoVariables.ubValues[23] = 1.0000000000000000e+00;\nacadoVariables.ubValues[24] = 2.0000000000000000e+01;\nacadoVariables.ubValues[25] = 3.0000000000000000e+00;\nacadoVariables.ubValues[26] = 3.0000000000000000e+00;\nacadoVariables.ubValues[27] = 1.0000000000000000e+00;\nacadoVariables.ubValues[28] = 2.0000000000000000e+01;\nacadoVariables.ubValues[29] = 3.0000000000000000e+00;\nacadoVariables.ubValues[30] = 3.0000000000000000e+00;\nacadoVariables.ubValues[31] = 1.0000000000000000e+00;\nacadoVariables.ubValues[32] = 2.0000000000000000e+01;\nacadoVariables.ubValues[33] = 3.0000000000000000e+00;\nacadoVariables.ubValues[34] = 3.0000000000000000e+00;\nacadoVariables.ubValues[35] = 1.0000000000000000e+00;\nacadoVariables.ubValues[36] = 2.0000000000000000e+01;\nacadoVariables.ubValues[37] = 3.0000000000000000e+00;\nacadoVariables.ubValues[38] = 3.0000000000000000e+00;\nacadoVariables.ubValues[39] = 1.0000000000000000e+00;\nacadoVariables.ubValues[40] = 2.0000000000000000e+01;\nacadoVariables.ubValues[41] = 3.0000000000000000e+00;\nacadoVariables.ubValues[42] = 3.0000000000000000e+00;\nacadoVariables.ubValues[43] = 1.0000000000000000e+00;\nacadoVariables.ubValues[44] = 2.0000000000000000e+01;\nacadoVariables.ubValues[45] = 3.0000000000000000e+00;\nacadoVariables.ubValues[46] = 3.0000000000000000e+00;\nacadoVariables.ubValues[47] = 1.0000000000000000e+00;\nacadoVariables.ubValues[48] = 2.0000000000000000e+01;\nacadoVariables.ubValues[49] = 3.0000000000000000e+00;\nacadoVariables.ubValues[50] = 3.0000000000000000e+00;\nacadoVariables.ubValues[51] = 1.0000000000000000e+00;\nacadoVariables.ubValues[52] = 2.0000000000000000e+01;\nacadoVariables.ubValues[53] = 3.0000000000000000e+00;\nacadoVariables.ubValues[54] = 3.0000000000000000e+00;\nacadoVariables.ubValues[55] = 1.0000000000000000e+00;\nacadoVariables.ubValues[56] = 2.0000000000000000e+01;\nacadoVariables.ubValues[57] = 3.0000000000000000e+00;\nacadoVariables.ubValues[58] = 3.0000000000000000e+00;\nacadoVariables.ubValues[59] = 1.0000000000000000e+00;\nacadoVariables.ubValues[60] = 2.0000000000000000e+01;\nacadoVariables.ubValues[61] = 3.0000000000000000e+00;\nacadoVariables.ubValues[62] = 3.0000000000000000e+00;\nacadoVariables.ubValues[63] = 1.0000000000000000e+00;\nacadoVariables.ubValues[64] = 2.0000000000000000e+01;\nacadoVariables.ubValues[65] = 3.0000000000000000e+00;\nacadoVariables.ubValues[66] = 3.0000000000000000e+00;\nacadoVariables.ubValues[67] = 1.0000000000000000e+00;\nacadoVariables.ubValues[68] = 2.0000000000000000e+01;\nacadoVariables.ubValues[69] = 3.0000000000000000e+00;\nacadoVariables.ubValues[70] = 3.0000000000000000e+00;\nacadoVariables.ubValues[71] = 1.0000000000000000e+00;\nacadoVariables.ubValues[72] = 2.0000000000000000e+01;\nacadoVariables.ubValues[73] = 3.0000000000000000e+00;\nacadoVariables.ubValues[74] = 3.0000000000000000e+00;\nacadoVariables.ubValues[75] = 1.0000000000000000e+00;\nacadoVariables.ubValues[76] = 2.0000000000000000e+01;\nacadoVariables.ubValues[77] = 3.0000000000000000e+00;\nacadoVariables.ubValues[78] = 3.0000000000000000e+00;\nacadoVariables.ubValues[79] = 1.0000000000000000e+00;\nreturn ret;\n}\n\nvoid acado_initializeNodesByForwardSimulation(  )\n{\nint index;\nfor (index = 0; index < 20; ++index)\n{\nstate[0] = acadoVariables.x[index * 10];\nstate[1] = acadoVariables.x[index * 10 + 1];\nstate[2] = acadoVariables.x[index * 10 + 2];\nstate[3] = acadoVariables.x[index * 10 + 3];\nstate[4] = acadoVariables.x[index * 10 + 4];\nstate[5] = acadoVariables.x[index * 10 + 5];\nstate[6] = acadoVariables.x[index * 10 + 6];\nstate[7] = acadoVariables.x[index * 10 + 7];\nstate[8] = acadoVariables.x[index * 10 + 8];\nstate[9] = acadoVariables.x[index * 10 + 9];\nstate[150] = acadoVariables.u[index * 4];\nstate[151] = acadoVariables.u[index * 4 + 1];\nstate[152] = acadoVariables.u[index * 4 + 2];\nstate[153] = acadoVariables.u[index * 4 + 3];\nstate[154] = acadoVariables.od[index * 10];\nstate[155] = acadoVariables.od[index * 10 + 1];\nstate[156] = acadoVariables.od[index * 10 + 2];\nstate[157] = acadoVariables.od[index * 10 + 3];\nstate[158] = acadoVariables.od[index * 10 + 4];\nstate[159] = acadoVariables.od[index * 10 + 5];\nstate[160] = acadoVariables.od[index * 10 + 6];\nstate[161] = acadoVariables.od[index * 10 + 7];\nstate[162] = acadoVariables.od[index * 10 + 8];\nstate[163] = acadoVariables.od[index * 10 + 9];\n\nacado_integrate(state, index == 0);\n\nacadoVariables.x[index * 10 + 10] = state[0];\nacadoVariables.x[index * 10 + 11] = state[1];\nacadoVariables.x[index * 10 + 12] = state[2];\nacadoVariables.x[index * 10 + 13] = state[3];\nacadoVariables.x[index * 10 + 14] = state[4];\nacadoVariables.x[index * 10 + 15] = state[5];\nacadoVariables.x[index * 10 + 16] = state[6];\nacadoVariables.x[index * 10 + 17] = state[7];\nacadoVariables.x[index * 10 + 18] = state[8];\nacadoVariables.x[index * 10 + 19] = state[9];\n}\n}\n\nvoid acado_shiftStates( int strategy, real_t* const xEnd, real_t* const uEnd )\n{\nint index;\nfor (index = 0; index < 20; ++index)\n{\nacadoVariables.x[index * 10] = acadoVariables.x[index * 10 + 10];\nacadoVariables.x[index * 10 + 1] = acadoVariables.x[index * 10 + 11];\nacadoVariables.x[index * 10 + 2] = acadoVariables.x[index * 10 + 12];\nacadoVariables.x[index * 10 + 3] = acadoVariables.x[index * 10 + 13];\nacadoVariables.x[index * 10 + 4] = acadoVariables.x[index * 10 + 14];\nacadoVariables.x[index * 10 + 5] = acadoVariables.x[index * 10 + 15];\nacadoVariables.x[index * 10 + 6] = acadoVariables.x[index * 10 + 16];\nacadoVariables.x[index * 10 + 7] = acadoVariables.x[index * 10 + 17];\nacadoVariables.x[index * 10 + 8] = acadoVariables.x[index * 10 + 18];\nacadoVariables.x[index * 10 + 9] = acadoVariables.x[index * 10 + 19];\n}\n\nif (strategy == 1 && xEnd != 0)\n{\nacadoVariables.x[200] = xEnd[0];\nacadoVariables.x[201] = xEnd[1];\nacadoVariables.x[202] = xEnd[2];\nacadoVariables.x[203] = xEnd[3];\nacadoVariables.x[204] = xEnd[4];\nacadoVariables.x[205] = xEnd[5];\nacadoVariables.x[206] = xEnd[6];\nacadoVariables.x[207] = xEnd[7];\nacadoVariables.x[208] = xEnd[8];\nacadoVariables.x[209] = xEnd[9];\n}\nelse if (strategy == 2) \n{\nstate[0] = acadoVariables.x[200];\nstate[1] = acadoVariables.x[201];\nstate[2] = acadoVariables.x[202];\nstate[3] = acadoVariables.x[203];\nstate[4] = acadoVariables.x[204];\nstate[5] = acadoVariables.x[205];\nstate[6] = acadoVariables.x[206];\nstate[7] = acadoVariables.x[207];\nstate[8] = acadoVariables.x[208];\nstate[9] = acadoVariables.x[209];\nif (uEnd != 0)\n{\nstate[150] = uEnd[0];\nstate[151] = uEnd[1];\nstate[152] = uEnd[2];\nstate[153] = uEnd[3];\n}\nelse\n{\nstate[150] = acadoVariables.u[76];\nstate[151] = acadoVariables.u[77];\nstate[152] = acadoVariables.u[78];\nstate[153] = acadoVariables.u[79];\n}\nstate[154] = acadoVariables.od[200];\nstate[155] = acadoVariables.od[201];\nstate[156] = acadoVariables.od[202];\nstate[157] = acadoVariables.od[203];\nstate[158] = acadoVariables.od[204];\nstate[159] = acadoVariables.od[205];\nstate[160] = acadoVariables.od[206];\nstate[161] = acadoVariables.od[207];\nstate[162] = acadoVariables.od[208];\nstate[163] = acadoVariables.od[209];\n\nacado_integrate(state, 1);\n\nacadoVariables.x[200] = state[0];\nacadoVariables.x[201] = state[1];\nacadoVariables.x[202] = state[2];\nacadoVariables.x[203] = state[3];\nacadoVariables.x[204] = state[4];\nacadoVariables.x[205] = state[5];\nacadoVariables.x[206] = state[6];\nacadoVariables.x[207] = state[7];\nacadoVariables.x[208] = state[8];\nacadoVariables.x[209] = state[9];\n}\n}\n\nvoid acado_shiftControls( real_t* const uEnd )\n{\nint index;\nfor (index = 0; index < 19; ++index)\n{\nacadoVariables.u[index * 4] = acadoVariables.u[index * 4 + 4];\nacadoVariables.u[index * 4 + 1] = acadoVariables.u[index * 4 + 5];\nacadoVariables.u[index * 4 + 2] = acadoVariables.u[index * 4 + 6];\nacadoVariables.u[index * 4 + 3] = acadoVariables.u[index * 4 + 7];\n}\n\nif (uEnd != 0)\n{\nacadoVariables.u[76] = uEnd[0];\nacadoVariables.u[77] = uEnd[1];\nacadoVariables.u[78] = uEnd[2];\nacadoVariables.u[79] = uEnd[3];\n}\n}\n\nreal_t acado_getKKT(  )\n{\nreal_t kkt;\n\nint index;\nreal_t prd;\n\nkkt = + acadoWorkspace.g[0]*acadoWorkspace.x[0] + acadoWorkspace.g[1]*acadoWorkspace.x[1] + acadoWorkspace.g[2]*acadoWorkspace.x[2] + acadoWorkspace.g[3]*acadoWorkspace.x[3] + acadoWorkspace.g[4]*acadoWorkspace.x[4] + acadoWorkspace.g[5]*acadoWorkspace.x[5] + acadoWorkspace.g[6]*acadoWorkspace.x[6] + acadoWorkspace.g[7]*acadoWorkspace.x[7] + acadoWorkspace.g[8]*acadoWorkspace.x[8] + acadoWorkspace.g[9]*acadoWorkspace.x[9] + acadoWorkspace.g[10]*acadoWorkspace.x[10] + acadoWorkspace.g[11]*acadoWorkspace.x[11] + acadoWorkspace.g[12]*acadoWorkspace.x[12] + acadoWorkspace.g[13]*acadoWorkspace.x[13] + acadoWorkspace.g[14]*acadoWorkspace.x[14] + acadoWorkspace.g[15]*acadoWorkspace.x[15] + acadoWorkspace.g[16]*acadoWorkspace.x[16] + acadoWorkspace.g[17]*acadoWorkspace.x[17] + acadoWorkspace.g[18]*acadoWorkspace.x[18] + acadoWorkspace.g[19]*acadoWorkspace.x[19] + acadoWorkspace.g[20]*acadoWorkspace.x[20] + acadoWorkspace.g[21]*acadoWorkspace.x[21] + acadoWorkspace.g[22]*acadoWorkspace.x[22] + acadoWorkspace.g[23]*acadoWorkspace.x[23] + acadoWorkspace.g[24]*acadoWorkspace.x[24] + acadoWorkspace.g[25]*acadoWorkspace.x[25] + acadoWorkspace.g[26]*acadoWorkspace.x[26] + acadoWorkspace.g[27]*acadoWorkspace.x[27] + acadoWorkspace.g[28]*acadoWorkspace.x[28] + acadoWorkspace.g[29]*acadoWorkspace.x[29] + acadoWorkspace.g[30]*acadoWorkspace.x[30] + acadoWorkspace.g[31]*acadoWorkspace.x[31] + acadoWorkspace.g[32]*acadoWorkspace.x[32] + acadoWorkspace.g[33]*acadoWorkspace.x[33] + acadoWorkspace.g[34]*acadoWorkspace.x[34] + acadoWorkspace.g[35]*acadoWorkspace.x[35] + acadoWorkspace.g[36]*acadoWorkspace.x[36] + acadoWorkspace.g[37]*acadoWorkspace.x[37] + acadoWorkspace.g[38]*acadoWorkspace.x[38] + acadoWorkspace.g[39]*acadoWorkspace.x[39] + acadoWorkspace.g[40]*acadoWorkspace.x[40] + acadoWorkspace.g[41]*acadoWorkspace.x[41] + acadoWorkspace.g[42]*acadoWorkspace.x[42] + acadoWorkspace.g[43]*acadoWorkspace.x[43] + acadoWorkspace.g[44]*acadoWorkspace.x[44] + acadoWorkspace.g[45]*acadoWorkspace.x[45] + acadoWorkspace.g[46]*acadoWorkspace.x[46] + acadoWorkspace.g[47]*acadoWorkspace.x[47] + acadoWorkspace.g[48]*acadoWorkspace.x[48] + acadoWorkspace.g[49]*acadoWorkspace.x[49] + acadoWorkspace.g[50]*acadoWorkspace.x[50] + acadoWorkspace.g[51]*acadoWorkspace.x[51] + acadoWorkspace.g[52]*acadoWorkspace.x[52] + acadoWorkspace.g[53]*acadoWorkspace.x[53] + acadoWorkspace.g[54]*acadoWorkspace.x[54] + acadoWorkspace.g[55]*acadoWorkspace.x[55] + acadoWorkspace.g[56]*acadoWorkspace.x[56] + acadoWorkspace.g[57]*acadoWorkspace.x[57] + acadoWorkspace.g[58]*acadoWorkspace.x[58] + acadoWorkspace.g[59]*acadoWorkspace.x[59] + acadoWorkspace.g[60]*acadoWorkspace.x[60] + acadoWorkspace.g[61]*acadoWorkspace.x[61] + acadoWorkspace.g[62]*acadoWorkspace.x[62] + acadoWorkspace.g[63]*acadoWorkspace.x[63] + acadoWorkspace.g[64]*acadoWorkspace.x[64] + acadoWorkspace.g[65]*acadoWorkspace.x[65] + acadoWorkspace.g[66]*acadoWorkspace.x[66] + acadoWorkspace.g[67]*acadoWorkspace.x[67] + acadoWorkspace.g[68]*acadoWorkspace.x[68] + acadoWorkspace.g[69]*acadoWorkspace.x[69] + acadoWorkspace.g[70]*acadoWorkspace.x[70] + acadoWorkspace.g[71]*acadoWorkspace.x[71] + acadoWorkspace.g[72]*acadoWorkspace.x[72] + acadoWorkspace.g[73]*acadoWorkspace.x[73] + acadoWorkspace.g[74]*acadoWorkspace.x[74] + acadoWorkspace.g[75]*acadoWorkspace.x[75] + acadoWorkspace.g[76]*acadoWorkspace.x[76] + acadoWorkspace.g[77]*acadoWorkspace.x[77] + acadoWorkspace.g[78]*acadoWorkspace.x[78] + acadoWorkspace.g[79]*acadoWorkspace.x[79];\nkkt = fabs( kkt );\nfor (index = 0; index < 80; ++index)\n{\nprd = acadoWorkspace.y[index];\nif (prd > 1e-12)\nkkt += fabs(acadoWorkspace.lb[index] * prd);\nelse if (prd < -1e-12)\nkkt += fabs(acadoWorkspace.ub[index] * prd);\n}\nreturn kkt;\n}\n\nreal_t acado_getObjective(  )\n{\nreal_t objVal;\n\nint lRun1;\n/** Row vector of size: 16 */\nreal_t tmpDy[ 16 ];\n\n/** Row vector of size: 12 */\nreal_t tmpDyN[ 12 ];\n\nfor (lRun1 = 0; lRun1 < 20; ++lRun1)\n{\nacadoWorkspace.objValueIn[0] = acadoVariables.x[lRun1 * 10];\nacadoWorkspace.objValueIn[1] = acadoVariables.x[lRun1 * 10 + 1];\nacadoWorkspace.objValueIn[2] = acadoVariables.x[lRun1 * 10 + 2];\nacadoWorkspace.objValueIn[3] = acadoVariables.x[lRun1 * 10 + 3];\nacadoWorkspace.objValueIn[4] = acadoVariables.x[lRun1 * 10 + 4];\nacadoWorkspace.objValueIn[5] = acadoVariables.x[lRun1 * 10 + 5];\nacadoWorkspace.objValueIn[6] = acadoVariables.x[lRun1 * 10 + 6];\nacadoWorkspace.objValueIn[7] = acadoVariables.x[lRun1 * 10 + 7];\nacadoWorkspace.objValueIn[8] = acadoVariables.x[lRun1 * 10 + 8];\nacadoWorkspace.objValueIn[9] = acadoVariables.x[lRun1 * 10 + 9];\nacadoWorkspace.objValueIn[10] = acadoVariables.u[lRun1 * 4];\nacadoWorkspace.objValueIn[11] = acadoVariables.u[lRun1 * 4 + 1];\nacadoWorkspace.objValueIn[12] = acadoVariables.u[lRun1 * 4 + 2];\nacadoWorkspace.objValueIn[13] = acadoVariables.u[lRun1 * 4 + 3];\nacadoWorkspace.objValueIn[14] = acadoVariables.od[lRun1 * 10];\nacadoWorkspace.objValueIn[15] = acadoVariables.od[lRun1 * 10 + 1];\nacadoWorkspace.objValueIn[16] = acadoVariables.od[lRun1 * 10 + 2];\nacadoWorkspace.objValueIn[17] = acadoVariables.od[lRun1 * 10 + 3];\nacadoWorkspace.objValueIn[18] = acadoVariables.od[lRun1 * 10 + 4];\nacadoWorkspace.objValueIn[19] = acadoVariables.od[lRun1 * 10 + 5];\nacadoWorkspace.objValueIn[20] = acadoVariables.od[lRun1 * 10 + 6];\nacadoWorkspace.objValueIn[21] = acadoVariables.od[lRun1 * 10 + 7];\nacadoWorkspace.objValueIn[22] = acadoVariables.od[lRun1 * 10 + 8];\nacadoWorkspace.objValueIn[23] = acadoVariables.od[lRun1 * 10 + 9];\n\nacado_evaluateLSQ( acadoWorkspace.objValueIn, acadoWorkspace.objValueOut );\nacadoWorkspace.Dy[lRun1 * 16] = acadoWorkspace.objValueOut[0] - acadoVariables.y[lRun1 * 16];\nacadoWorkspace.Dy[lRun1 * 16 + 1] = acadoWorkspace.objValueOut[1] - acadoVariables.y[lRun1 * 16 + 1];\nacadoWorkspace.Dy[lRun1 * 16 + 2] = acadoWorkspace.objValueOut[2] - acadoVariables.y[lRun1 * 16 + 2];\nacadoWorkspace.Dy[lRun1 * 16 + 3] = acadoWorkspace.objValueOut[3] - acadoVariables.y[lRun1 * 16 + 3];\nacadoWorkspace.Dy[lRun1 * 16 + 4] = acadoWorkspace.objValueOut[4] - acadoVariables.y[lRun1 * 16 + 4];\nacadoWorkspace.Dy[lRun1 * 16 + 5] = acadoWorkspace.objValueOut[5] - acadoVariables.y[lRun1 * 16 + 5];\nacadoWorkspace.Dy[lRun1 * 16 + 6] = acadoWorkspace.objValueOut[6] - acadoVariables.y[lRun1 * 16 + 6];\nacadoWorkspace.Dy[lRun1 * 16 + 7] = acadoWorkspace.objValueOut[7] - acadoVariables.y[lRun1 * 16 + 7];\nacadoWorkspace.Dy[lRun1 * 16 + 8] = acadoWorkspace.objValueOut[8] - acadoVariables.y[lRun1 * 16 + 8];\nacadoWorkspace.Dy[lRun1 * 16 + 9] = acadoWorkspace.objValueOut[9] - acadoVariables.y[lRun1 * 16 + 9];\nacadoWorkspace.Dy[lRun1 * 16 + 10] = acadoWorkspace.objValueOut[10] - acadoVariables.y[lRun1 * 16 + 10];\nacadoWorkspace.Dy[lRun1 * 16 + 11] = acadoWorkspace.objValueOut[11] - acadoVariables.y[lRun1 * 16 + 11];\nacadoWorkspace.Dy[lRun1 * 16 + 12] = acadoWorkspace.objValueOut[12] - acadoVariables.y[lRun1 * 16 + 12];\nacadoWorkspace.Dy[lRun1 * 16 + 13] = acadoWorkspace.objValueOut[13] - acadoVariables.y[lRun1 * 16 + 13];\nacadoWorkspace.Dy[lRun1 * 16 + 14] = acadoWorkspace.objValueOut[14] - acadoVariables.y[lRun1 * 16 + 14];\nacadoWorkspace.Dy[lRun1 * 16 + 15] = acadoWorkspace.objValueOut[15] - acadoVariables.y[lRun1 * 16 + 15];\n}\nacadoWorkspace.objValueIn[0] = acadoVariables.x[200];\nacadoWorkspace.objValueIn[1] = acadoVariables.x[201];\nacadoWorkspace.objValueIn[2] = acadoVariables.x[202];\nacadoWorkspace.objValueIn[3] = acadoVariables.x[203];\nacadoWorkspace.objValueIn[4] = acadoVariables.x[204];\nacadoWorkspace.objValueIn[5] = acadoVariables.x[205];\nacadoWorkspace.objValueIn[6] = acadoVariables.x[206];\nacadoWorkspace.objValueIn[7] = acadoVariables.x[207];\nacadoWorkspace.objValueIn[8] = acadoVariables.x[208];\nacadoWorkspace.objValueIn[9] = acadoVariables.x[209];\nacadoWorkspace.objValueIn[10] = acadoVariables.od[200];\nacadoWorkspace.objValueIn[11] = acadoVariables.od[201];\nacadoWorkspace.objValueIn[12] = acadoVariables.od[202];\nacadoWorkspace.objValueIn[13] = acadoVariables.od[203];\nacadoWorkspace.objValueIn[14] = acadoVariables.od[204];\nacadoWorkspace.objValueIn[15] = acadoVariables.od[205];\nacadoWorkspace.objValueIn[16] = acadoVariables.od[206];\nacadoWorkspace.objValueIn[17] = acadoVariables.od[207];\nacadoWorkspace.objValueIn[18] = acadoVariables.od[208];\nacadoWorkspace.objValueIn[19] = acadoVariables.od[209];\nacado_evaluateLSQEndTerm( acadoWorkspace.objValueIn, acadoWorkspace.objValueOut );\nacadoWorkspace.DyN[0] = acadoWorkspace.objValueOut[0] - acadoVariables.yN[0];\nacadoWorkspace.DyN[1] = acadoWorkspace.objValueOut[1] - acadoVariables.yN[1];\nacadoWorkspace.DyN[2] = acadoWorkspace.objValueOut[2] - acadoVariables.yN[2];\nacadoWorkspace.DyN[3] = acadoWorkspace.objValueOut[3] - acadoVariables.yN[3];\nacadoWorkspace.DyN[4] = acadoWorkspace.objValueOut[4] - acadoVariables.yN[4];\nacadoWorkspace.DyN[5] = acadoWorkspace.objValueOut[5] - acadoVariables.yN[5];\nacadoWorkspace.DyN[6] = acadoWorkspace.objValueOut[6] - acadoVariables.yN[6];\nacadoWorkspace.DyN[7] = acadoWorkspace.objValueOut[7] - acadoVariables.yN[7];\nacadoWorkspace.DyN[8] = acadoWorkspace.objValueOut[8] - acadoVariables.yN[8];\nacadoWorkspace.DyN[9] = acadoWorkspace.objValueOut[9] - acadoVariables.yN[9];\nacadoWorkspace.DyN[10] = acadoWorkspace.objValueOut[10] - acadoVariables.yN[10];\nacadoWorkspace.DyN[11] = acadoWorkspace.objValueOut[11] - acadoVariables.yN[11];\nobjVal = 0.0000000000000000e+00;\nfor (lRun1 = 0; lRun1 < 20; ++lRun1)\n{\ntmpDy[0] = + acadoWorkspace.Dy[lRun1 * 16]*acadoVariables.W[lRun1 * 256] + acadoWorkspace.Dy[lRun1 * 16 + 1]*acadoVariables.W[lRun1 * 256 + 16] + acadoWorkspace.Dy[lRun1 * 16 + 2]*acadoVariables.W[lRun1 * 256 + 32] + acadoWorkspace.Dy[lRun1 * 16 + 3]*acadoVariables.W[lRun1 * 256 + 48] + acadoWorkspace.Dy[lRun1 * 16 + 4]*acadoVariables.W[lRun1 * 256 + 64] + acadoWorkspace.Dy[lRun1 * 16 + 5]*acadoVariables.W[lRun1 * 256 + 80] + acadoWorkspace.Dy[lRun1 * 16 + 6]*acadoVariables.W[lRun1 * 256 + 96] + acadoWorkspace.Dy[lRun1 * 16 + 7]*acadoVariables.W[lRun1 * 256 + 112] + acadoWorkspace.Dy[lRun1 * 16 + 8]*acadoVariables.W[lRun1 * 256 + 128] + acadoWorkspace.Dy[lRun1 * 16 + 9]*acadoVariables.W[lRun1 * 256 + 144] + acadoWorkspace.Dy[lRun1 * 16 + 10]*acadoVariables.W[lRun1 * 256 + 160] + acadoWorkspace.Dy[lRun1 * 16 + 11]*acadoVariables.W[lRun1 * 256 + 176] + acadoWorkspace.Dy[lRun1 * 16 + 12]*acadoVariables.W[lRun1 * 256 + 192] + acadoWorkspace.Dy[lRun1 * 16 + 13]*acadoVariables.W[lRun1 * 256 + 208] + acadoWorkspace.Dy[lRun1 * 16 + 14]*acadoVariables.W[lRun1 * 256 + 224] + acadoWorkspace.Dy[lRun1 * 16 + 15]*acadoVariables.W[lRun1 * 256 + 240];\ntmpDy[1] = + acadoWorkspace.Dy[lRun1 * 16]*acadoVariables.W[lRun1 * 256 + 1] + acadoWorkspace.Dy[lRun1 * 16 + 1]*acadoVariables.W[lRun1 * 256 + 17] + acadoWorkspace.Dy[lRun1 * 16 + 2]*acadoVariables.W[lRun1 * 256 + 33] + acadoWorkspace.Dy[lRun1 * 16 + 3]*acadoVariables.W[lRun1 * 256 + 49] + acadoWorkspace.Dy[lRun1 * 16 + 4]*acadoVariables.W[lRun1 * 256 + 65] + acadoWorkspace.Dy[lRun1 * 16 + 5]*acadoVariables.W[lRun1 * 256 + 81] + acadoWorkspace.Dy[lRun1 * 16 + 6]*acadoVariables.W[lRun1 * 256 + 97] + acadoWorkspace.Dy[lRun1 * 16 + 7]*acadoVariables.W[lRun1 * 256 + 113] + acadoWorkspace.Dy[lRun1 * 16 + 8]*acadoVariables.W[lRun1 * 256 + 129] + acadoWorkspace.Dy[lRun1 * 16 + 9]*acadoVariables.W[lRun1 * 256 + 145] + acadoWorkspace.Dy[lRun1 * 16 + 10]*acadoVariables.W[lRun1 * 256 + 161] + acadoWorkspace.Dy[lRun1 * 16 + 11]*acadoVariables.W[lRun1 * 256 + 177] + acadoWorkspace.Dy[lRun1 * 16 + 12]*acadoVariables.W[lRun1 * 256 + 193] + acadoWorkspace.Dy[lRun1 * 16 + 13]*acadoVariables.W[lRun1 * 256 + 209] + acadoWorkspace.Dy[lRun1 * 16 + 14]*acadoVariables.W[lRun1 * 256 + 225] + acadoWorkspace.Dy[lRun1 * 16 + 15]*acadoVariables.W[lRun1 * 256 + 241];\ntmpDy[2] = + acadoWorkspace.Dy[lRun1 * 16]*acadoVariables.W[lRun1 * 256 + 2] + acadoWorkspace.Dy[lRun1 * 16 + 1]*acadoVariables.W[lRun1 * 256 + 18] + acadoWorkspace.Dy[lRun1 * 16 + 2]*acadoVariables.W[lRun1 * 256 + 34] + acadoWorkspace.Dy[lRun1 * 16 + 3]*acadoVariables.W[lRun1 * 256 + 50] + acadoWorkspace.Dy[lRun1 * 16 + 4]*acadoVariables.W[lRun1 * 256 + 66] + acadoWorkspace.Dy[lRun1 * 16 + 5]*acadoVariables.W[lRun1 * 256 + 82] + acadoWorkspace.Dy[lRun1 * 16 + 6]*acadoVariables.W[lRun1 * 256 + 98] + acadoWorkspace.Dy[lRun1 * 16 + 7]*acadoVariables.W[lRun1 * 256 + 114] + acadoWorkspace.Dy[lRun1 * 16 + 8]*acadoVariables.W[lRun1 * 256 + 130] + acadoWorkspace.Dy[lRun1 * 16 + 9]*acadoVariables.W[lRun1 * 256 + 146] + acadoWorkspace.Dy[lRun1 * 16 + 10]*acadoVariables.W[lRun1 * 256 + 162] + acadoWorkspace.Dy[lRun1 * 16 + 11]*acadoVariables.W[lRun1 * 256 + 178] + acadoWorkspace.Dy[lRun1 * 16 + 12]*acadoVariables.W[lRun1 * 256 + 194] + acadoWorkspace.Dy[lRun1 * 16 + 13]*acadoVariables.W[lRun1 * 256 + 210] + acadoWorkspace.Dy[lRun1 * 16 + 14]*acadoVariables.W[lRun1 * 256 + 226] + acadoWorkspace.Dy[lRun1 * 16 + 15]*acadoVariables.W[lRun1 * 256 + 242];\ntmpDy[3] = + acadoWorkspace.Dy[lRun1 * 16]*acadoVariables.W[lRun1 * 256 + 3] + acadoWorkspace.Dy[lRun1 * 16 + 1]*acadoVariables.W[lRun1 * 256 + 19] + acadoWorkspace.Dy[lRun1 * 16 + 2]*acadoVariables.W[lRun1 * 256 + 35] + acadoWorkspace.Dy[lRun1 * 16 + 3]*acadoVariables.W[lRun1 * 256 + 51] + acadoWorkspace.Dy[lRun1 * 16 + 4]*acadoVariables.W[lRun1 * 256 + 67] + acadoWorkspace.Dy[lRun1 * 16 + 5]*acadoVariables.W[lRun1 * 256 + 83] + acadoWorkspace.Dy[lRun1 * 16 + 6]*acadoVariables.W[lRun1 * 256 + 99] + acadoWorkspace.Dy[lRun1 * 16 + 7]*acadoVariables.W[lRun1 * 256 + 115] + acadoWorkspace.Dy[lRun1 * 16 + 8]*acadoVariables.W[lRun1 * 256 + 131] + acadoWorkspace.Dy[lRun1 * 16 + 9]*acadoVariables.W[lRun1 * 256 + 147] + acadoWorkspace.Dy[lRun1 * 16 + 10]*acadoVariables.W[lRun1 * 256 + 163] + acadoWorkspace.Dy[lRun1 * 16 + 11]*acadoVariables.W[lRun1 * 256 + 179] + acadoWorkspace.Dy[lRun1 * 16 + 12]*acadoVariables.W[lRun1 * 256 + 195] + acadoWorkspace.Dy[lRun1 * 16 + 13]*acadoVariables.W[lRun1 * 256 + 211] + acadoWorkspace.Dy[lRun1 * 16 + 14]*acadoVariables.W[lRun1 * 256 + 227] + acadoWorkspace.Dy[lRun1 * 16 + 15]*acadoVariables.W[lRun1 * 256 + 243];\ntmpDy[4] = + acadoWorkspace.Dy[lRun1 * 16]*acadoVariables.W[lRun1 * 256 + 4] + acadoWorkspace.Dy[lRun1 * 16 + 1]*acadoVariables.W[lRun1 * 256 + 20] + acadoWorkspace.Dy[lRun1 * 16 + 2]*acadoVariables.W[lRun1 * 256 + 36] + acadoWorkspace.Dy[lRun1 * 16 + 3]*acadoVariables.W[lRun1 * 256 + 52] + acadoWorkspace.Dy[lRun1 * 16 + 4]*acadoVariables.W[lRun1 * 256 + 68] + acadoWorkspace.Dy[lRun1 * 16 + 5]*acadoVariables.W[lRun1 * 256 + 84] + acadoWorkspace.Dy[lRun1 * 16 + 6]*acadoVariables.W[lRun1 * 256 + 100] + acadoWorkspace.Dy[lRun1 * 16 + 7]*acadoVariables.W[lRun1 * 256 + 116] + acadoWorkspace.Dy[lRun1 * 16 + 8]*acadoVariables.W[lRun1 * 256 + 132] + acadoWorkspace.Dy[lRun1 * 16 + 9]*acadoVariables.W[lRun1 * 256 + 148] + acadoWorkspace.Dy[lRun1 * 16 + 10]*acadoVariables.W[lRun1 * 256 + 164] + acadoWorkspace.Dy[lRun1 * 16 + 11]*acadoVariables.W[lRun1 * 256 + 180] + acadoWorkspace.Dy[lRun1 * 16 + 12]*acadoVariables.W[lRun1 * 256 + 196] + acadoWorkspace.Dy[lRun1 * 16 + 13]*acadoVariables.W[lRun1 * 256 + 212] + acadoWorkspace.Dy[lRun1 * 16 + 14]*acadoVariables.W[lRun1 * 256 + 228] + acadoWorkspace.Dy[lRun1 * 16 + 15]*acadoVariables.W[lRun1 * 256 + 244];\ntmpDy[5] = + acadoWorkspace.Dy[lRun1 * 16]*acadoVariables.W[lRun1 * 256 + 5] + acadoWorkspace.Dy[lRun1 * 16 + 1]*acadoVariables.W[lRun1 * 256 + 21] + acadoWorkspace.Dy[lRun1 * 16 + 2]*acadoVariables.W[lRun1 * 256 + 37] + acadoWorkspace.Dy[lRun1 * 16 + 3]*acadoVariables.W[lRun1 * 256 + 53] + acadoWorkspace.Dy[lRun1 * 16 + 4]*acadoVariables.W[lRun1 * 256 + 69] + acadoWorkspace.Dy[lRun1 * 16 + 5]*acadoVariables.W[lRun1 * 256 + 85] + acadoWorkspace.Dy[lRun1 * 16 + 6]*acadoVariables.W[lRun1 * 256 + 101] + acadoWorkspace.Dy[lRun1 * 16 + 7]*acadoVariables.W[lRun1 * 256 + 117] + acadoWorkspace.Dy[lRun1 * 16 + 8]*acadoVariables.W[lRun1 * 256 + 133] + acadoWorkspace.Dy[lRun1 * 16 + 9]*acadoVariables.W[lRun1 * 256 + 149] + acadoWorkspace.Dy[lRun1 * 16 + 10]*acadoVariables.W[lRun1 * 256 + 165] + acadoWorkspace.Dy[lRun1 * 16 + 11]*acadoVariables.W[lRun1 * 256 + 181] + acadoWorkspace.Dy[lRun1 * 16 + 12]*acadoVariables.W[lRun1 * 256 + 197] + acadoWorkspace.Dy[lRun1 * 16 + 13]*acadoVariables.W[lRun1 * 256 + 213] + acadoWorkspace.Dy[lRun1 * 16 + 14]*acadoVariables.W[lRun1 * 256 + 229] + acadoWorkspace.Dy[lRun1 * 16 + 15]*acadoVariables.W[lRun1 * 256 + 245];\ntmpDy[6] = + acadoWorkspace.Dy[lRun1 * 16]*acadoVariables.W[lRun1 * 256 + 6] + acadoWorkspace.Dy[lRun1 * 16 + 1]*acadoVariables.W[lRun1 * 256 + 22] + acadoWorkspace.Dy[lRun1 * 16 + 2]*acadoVariables.W[lRun1 * 256 + 38] + acadoWorkspace.Dy[lRun1 * 16 + 3]*acadoVariables.W[lRun1 * 256 + 54] + acadoWorkspace.Dy[lRun1 * 16 + 4]*acadoVariables.W[lRun1 * 256 + 70] + acadoWorkspace.Dy[lRun1 * 16 + 5]*acadoVariables.W[lRun1 * 256 + 86] + acadoWorkspace.Dy[lRun1 * 16 + 6]*acadoVariables.W[lRun1 * 256 + 102] + acadoWorkspace.Dy[lRun1 * 16 + 7]*acadoVariables.W[lRun1 * 256 + 118] + acadoWorkspace.Dy[lRun1 * 16 + 8]*acadoVariables.W[lRun1 * 256 + 134] + acadoWorkspace.Dy[lRun1 * 16 + 9]*acadoVariables.W[lRun1 * 256 + 150] + acadoWorkspace.Dy[lRun1 * 16 + 10]*acadoVariables.W[lRun1 * 256 + 166] + acadoWorkspace.Dy[lRun1 * 16 + 11]*acadoVariables.W[lRun1 * 256 + 182] + acadoWorkspace.Dy[lRun1 * 16 + 12]*acadoVariables.W[lRun1 * 256 + 198] + acadoWorkspace.Dy[lRun1 * 16 + 13]*acadoVariables.W[lRun1 * 256 + 214] + acadoWorkspace.Dy[lRun1 * 16 + 14]*acadoVariables.W[lRun1 * 256 + 230] + acadoWorkspace.Dy[lRun1 * 16 + 15]*acadoVariables.W[lRun1 * 256 + 246];\ntmpDy[7] = + acadoWorkspace.Dy[lRun1 * 16]*acadoVariables.W[lRun1 * 256 + 7] + acadoWorkspace.Dy[lRun1 * 16 + 1]*acadoVariables.W[lRun1 * 256 + 23] + acadoWorkspace.Dy[lRun1 * 16 + 2]*acadoVariables.W[lRun1 * 256 + 39] + acadoWorkspace.Dy[lRun1 * 16 + 3]*acadoVariables.W[lRun1 * 256 + 55] + acadoWorkspace.Dy[lRun1 * 16 + 4]*acadoVariables.W[lRun1 * 256 + 71] + acadoWorkspace.Dy[lRun1 * 16 + 5]*acadoVariables.W[lRun1 * 256 + 87] + acadoWorkspace.Dy[lRun1 * 16 + 6]*acadoVariables.W[lRun1 * 256 + 103] + acadoWorkspace.Dy[lRun1 * 16 + 7]*acadoVariables.W[lRun1 * 256 + 119] + acadoWorkspace.Dy[lRun1 * 16 + 8]*acadoVariables.W[lRun1 * 256 + 135] + acadoWorkspace.Dy[lRun1 * 16 + 9]*acadoVariables.W[lRun1 * 256 + 151] + acadoWorkspace.Dy[lRun1 * 16 + 10]*acadoVariables.W[lRun1 * 256 + 167] + acadoWorkspace.Dy[lRun1 * 16 + 11]*acadoVariables.W[lRun1 * 256 + 183] + acadoWorkspace.Dy[lRun1 * 16 + 12]*acadoVariables.W[lRun1 * 256 + 199] + acadoWorkspace.Dy[lRun1 * 16 + 13]*acadoVariables.W[lRun1 * 256 + 215] + acadoWorkspace.Dy[lRun1 * 16 + 14]*acadoVariables.W[lRun1 * 256 + 231] + acadoWorkspace.Dy[lRun1 * 16 + 15]*acadoVariables.W[lRun1 * 256 + 247];\ntmpDy[8] = + acadoWorkspace.Dy[lRun1 * 16]*acadoVariables.W[lRun1 * 256 + 8] + acadoWorkspace.Dy[lRun1 * 16 + 1]*acadoVariables.W[lRun1 * 256 + 24] + acadoWorkspace.Dy[lRun1 * 16 + 2]*acadoVariables.W[lRun1 * 256 + 40] + acadoWorkspace.Dy[lRun1 * 16 + 3]*acadoVariables.W[lRun1 * 256 + 56] + acadoWorkspace.Dy[lRun1 * 16 + 4]*acadoVariables.W[lRun1 * 256 + 72] + acadoWorkspace.Dy[lRun1 * 16 + 5]*acadoVariables.W[lRun1 * 256 + 88] + acadoWorkspace.Dy[lRun1 * 16 + 6]*acadoVariables.W[lRun1 * 256 + 104] + acadoWorkspace.Dy[lRun1 * 16 + 7]*acadoVariables.W[lRun1 * 256 + 120] + acadoWorkspace.Dy[lRun1 * 16 + 8]*acadoVariables.W[lRun1 * 256 + 136] + acadoWorkspace.Dy[lRun1 * 16 + 9]*acadoVariables.W[lRun1 * 256 + 152] + acadoWorkspace.Dy[lRun1 * 16 + 10]*acadoVariables.W[lRun1 * 256 + 168] + acadoWorkspace.Dy[lRun1 * 16 + 11]*acadoVariables.W[lRun1 * 256 + 184] + acadoWorkspace.Dy[lRun1 * 16 + 12]*acadoVariables.W[lRun1 * 256 + 200] + acadoWorkspace.Dy[lRun1 * 16 + 13]*acadoVariables.W[lRun1 * 256 + 216] + acadoWorkspace.Dy[lRun1 * 16 + 14]*acadoVariables.W[lRun1 * 256 + 232] + acadoWorkspace.Dy[lRun1 * 16 + 15]*acadoVariables.W[lRun1 * 256 + 248];\ntmpDy[9] = + acadoWorkspace.Dy[lRun1 * 16]*acadoVariables.W[lRun1 * 256 + 9] + acadoWorkspace.Dy[lRun1 * 16 + 1]*acadoVariables.W[lRun1 * 256 + 25] + acadoWorkspace.Dy[lRun1 * 16 + 2]*acadoVariables.W[lRun1 * 256 + 41] + acadoWorkspace.Dy[lRun1 * 16 + 3]*acadoVariables.W[lRun1 * 256 + 57] + acadoWorkspace.Dy[lRun1 * 16 + 4]*acadoVariables.W[lRun1 * 256 + 73] + acadoWorkspace.Dy[lRun1 * 16 + 5]*acadoVariables.W[lRun1 * 256 + 89] + acadoWorkspace.Dy[lRun1 * 16 + 6]*acadoVariables.W[lRun1 * 256 + 105] + acadoWorkspace.Dy[lRun1 * 16 + 7]*acadoVariables.W[lRun1 * 256 + 121] + acadoWorkspace.Dy[lRun1 * 16 + 8]*acadoVariables.W[lRun1 * 256 + 137] + acadoWorkspace.Dy[lRun1 * 16 + 9]*acadoVariables.W[lRun1 * 256 + 153] + acadoWorkspace.Dy[lRun1 * 16 + 10]*acadoVariables.W[lRun1 * 256 + 169] + acadoWorkspace.Dy[lRun1 * 16 + 11]*acadoVariables.W[lRun1 * 256 + 185] + acadoWorkspace.Dy[lRun1 * 16 + 12]*acadoVariables.W[lRun1 * 256 + 201] + acadoWorkspace.Dy[lRun1 * 16 + 13]*acadoVariables.W[lRun1 * 256 + 217] + acadoWorkspace.Dy[lRun1 * 16 + 14]*acadoVariables.W[lRun1 * 256 + 233] + acadoWorkspace.Dy[lRun1 * 16 + 15]*acadoVariables.W[lRun1 * 256 + 249];\ntmpDy[10] = + acadoWorkspace.Dy[lRun1 * 16]*acadoVariables.W[lRun1 * 256 + 10] + acadoWorkspace.Dy[lRun1 * 16 + 1]*acadoVariables.W[lRun1 * 256 + 26] + acadoWorkspace.Dy[lRun1 * 16 + 2]*acadoVariables.W[lRun1 * 256 + 42] + acadoWorkspace.Dy[lRun1 * 16 + 3]*acadoVariables.W[lRun1 * 256 + 58] + acadoWorkspace.Dy[lRun1 * 16 + 4]*acadoVariables.W[lRun1 * 256 + 74] + acadoWorkspace.Dy[lRun1 * 16 + 5]*acadoVariables.W[lRun1 * 256 + 90] + acadoWorkspace.Dy[lRun1 * 16 + 6]*acadoVariables.W[lRun1 * 256 + 106] + acadoWorkspace.Dy[lRun1 * 16 + 7]*acadoVariables.W[lRun1 * 256 + 122] + acadoWorkspace.Dy[lRun1 * 16 + 8]*acadoVariables.W[lRun1 * 256 + 138] + acadoWorkspace.Dy[lRun1 * 16 + 9]*acadoVariables.W[lRun1 * 256 + 154] + acadoWorkspace.Dy[lRun1 * 16 + 10]*acadoVariables.W[lRun1 * 256 + 170] + acadoWorkspace.Dy[lRun1 * 16 + 11]*acadoVariables.W[lRun1 * 256 + 186] + acadoWorkspace.Dy[lRun1 * 16 + 12]*acadoVariables.W[lRun1 * 256 + 202] + acadoWorkspace.Dy[lRun1 * 16 + 13]*acadoVariables.W[lRun1 * 256 + 218] + acadoWorkspace.Dy[lRun1 * 16 + 14]*acadoVariables.W[lRun1 * 256 + 234] + acadoWorkspace.Dy[lRun1 * 16 + 15]*acadoVariables.W[lRun1 * 256 + 250];\ntmpDy[11] = + acadoWorkspace.Dy[lRun1 * 16]*acadoVariables.W[lRun1 * 256 + 11] + acadoWorkspace.Dy[lRun1 * 16 + 1]*acadoVariables.W[lRun1 * 256 + 27] + acadoWorkspace.Dy[lRun1 * 16 + 2]*acadoVariables.W[lRun1 * 256 + 43] + acadoWorkspace.Dy[lRun1 * 16 + 3]*acadoVariables.W[lRun1 * 256 + 59] + acadoWorkspace.Dy[lRun1 * 16 + 4]*acadoVariables.W[lRun1 * 256 + 75] + acadoWorkspace.Dy[lRun1 * 16 + 5]*acadoVariables.W[lRun1 * 256 + 91] + acadoWorkspace.Dy[lRun1 * 16 + 6]*acadoVariables.W[lRun1 * 256 + 107] + acadoWorkspace.Dy[lRun1 * 16 + 7]*acadoVariables.W[lRun1 * 256 + 123] + acadoWorkspace.Dy[lRun1 * 16 + 8]*acadoVariables.W[lRun1 * 256 + 139] + acadoWorkspace.Dy[lRun1 * 16 + 9]*acadoVariables.W[lRun1 * 256 + 155] + acadoWorkspace.Dy[lRun1 * 16 + 10]*acadoVariables.W[lRun1 * 256 + 171] + acadoWorkspace.Dy[lRun1 * 16 + 11]*acadoVariables.W[lRun1 * 256 + 187] + acadoWorkspace.Dy[lRun1 * 16 + 12]*acadoVariables.W[lRun1 * 256 + 203] + acadoWorkspace.Dy[lRun1 * 16 + 13]*acadoVariables.W[lRun1 * 256 + 219] + acadoWorkspace.Dy[lRun1 * 16 + 14]*acadoVariables.W[lRun1 * 256 + 235] + acadoWorkspace.Dy[lRun1 * 16 + 15]*acadoVariables.W[lRun1 * 256 + 251];\ntmpDy[12] = + acadoWorkspace.Dy[lRun1 * 16]*acadoVariables.W[lRun1 * 256 + 12] + acadoWorkspace.Dy[lRun1 * 16 + 1]*acadoVariables.W[lRun1 * 256 + 28] + acadoWorkspace.Dy[lRun1 * 16 + 2]*acadoVariables.W[lRun1 * 256 + 44] + acadoWorkspace.Dy[lRun1 * 16 + 3]*acadoVariables.W[lRun1 * 256 + 60] + acadoWorkspace.Dy[lRun1 * 16 + 4]*acadoVariables.W[lRun1 * 256 + 76] + acadoWorkspace.Dy[lRun1 * 16 + 5]*acadoVariables.W[lRun1 * 256 + 92] + acadoWorkspace.Dy[lRun1 * 16 + 6]*acadoVariables.W[lRun1 * 256 + 108] + acadoWorkspace.Dy[lRun1 * 16 + 7]*acadoVariables.W[lRun1 * 256 + 124] + acadoWorkspace.Dy[lRun1 * 16 + 8]*acadoVariables.W[lRun1 * 256 + 140] + acadoWorkspace.Dy[lRun1 * 16 + 9]*acadoVariables.W[lRun1 * 256 + 156] + acadoWorkspace.Dy[lRun1 * 16 + 10]*acadoVariables.W[lRun1 * 256 + 172] + acadoWorkspace.Dy[lRun1 * 16 + 11]*acadoVariables.W[lRun1 * 256 + 188] + acadoWorkspace.Dy[lRun1 * 16 + 12]*acadoVariables.W[lRun1 * 256 + 204] + acadoWorkspace.Dy[lRun1 * 16 + 13]*acadoVariables.W[lRun1 * 256 + 220] + acadoWorkspace.Dy[lRun1 * 16 + 14]*acadoVariables.W[lRun1 * 256 + 236] + acadoWorkspace.Dy[lRun1 * 16 + 15]*acadoVariables.W[lRun1 * 256 + 252];\ntmpDy[13] = + acadoWorkspace.Dy[lRun1 * 16]*acadoVariables.W[lRun1 * 256 + 13] + acadoWorkspace.Dy[lRun1 * 16 + 1]*acadoVariables.W[lRun1 * 256 + 29] + acadoWorkspace.Dy[lRun1 * 16 + 2]*acadoVariables.W[lRun1 * 256 + 45] + acadoWorkspace.Dy[lRun1 * 16 + 3]*acadoVariables.W[lRun1 * 256 + 61] + acadoWorkspace.Dy[lRun1 * 16 + 4]*acadoVariables.W[lRun1 * 256 + 77] + acadoWorkspace.Dy[lRun1 * 16 + 5]*acadoVariables.W[lRun1 * 256 + 93] + acadoWorkspace.Dy[lRun1 * 16 + 6]*acadoVariables.W[lRun1 * 256 + 109] + acadoWorkspace.Dy[lRun1 * 16 + 7]*acadoVariables.W[lRun1 * 256 + 125] + acadoWorkspace.Dy[lRun1 * 16 + 8]*acadoVariables.W[lRun1 * 256 + 141] + acadoWorkspace.Dy[lRun1 * 16 + 9]*acadoVariables.W[lRun1 * 256 + 157] + acadoWorkspace.Dy[lRun1 * 16 + 10]*acadoVariables.W[lRun1 * 256 + 173] + acadoWorkspace.Dy[lRun1 * 16 + 11]*acadoVariables.W[lRun1 * 256 + 189] + acadoWorkspace.Dy[lRun1 * 16 + 12]*acadoVariables.W[lRun1 * 256 + 205] + acadoWorkspace.Dy[lRun1 * 16 + 13]*acadoVariables.W[lRun1 * 256 + 221] + acadoWorkspace.Dy[lRun1 * 16 + 14]*acadoVariables.W[lRun1 * 256 + 237] + acadoWorkspace.Dy[lRun1 * 16 + 15]*acadoVariables.W[lRun1 * 256 + 253];\ntmpDy[14] = + acadoWorkspace.Dy[lRun1 * 16]*acadoVariables.W[lRun1 * 256 + 14] + acadoWorkspace.Dy[lRun1 * 16 + 1]*acadoVariables.W[lRun1 * 256 + 30] + acadoWorkspace.Dy[lRun1 * 16 + 2]*acadoVariables.W[lRun1 * 256 + 46] + acadoWorkspace.Dy[lRun1 * 16 + 3]*acadoVariables.W[lRun1 * 256 + 62] + acadoWorkspace.Dy[lRun1 * 16 + 4]*acadoVariables.W[lRun1 * 256 + 78] + acadoWorkspace.Dy[lRun1 * 16 + 5]*acadoVariables.W[lRun1 * 256 + 94] + acadoWorkspace.Dy[lRun1 * 16 + 6]*acadoVariables.W[lRun1 * 256 + 110] + acadoWorkspace.Dy[lRun1 * 16 + 7]*acadoVariables.W[lRun1 * 256 + 126] + acadoWorkspace.Dy[lRun1 * 16 + 8]*acadoVariables.W[lRun1 * 256 + 142] + acadoWorkspace.Dy[lRun1 * 16 + 9]*acadoVariables.W[lRun1 * 256 + 158] + acadoWorkspace.Dy[lRun1 * 16 + 10]*acadoVariables.W[lRun1 * 256 + 174] + acadoWorkspace.Dy[lRun1 * 16 + 11]*acadoVariables.W[lRun1 * 256 + 190] + acadoWorkspace.Dy[lRun1 * 16 + 12]*acadoVariables.W[lRun1 * 256 + 206] + acadoWorkspace.Dy[lRun1 * 16 + 13]*acadoVariables.W[lRun1 * 256 + 222] + acadoWorkspace.Dy[lRun1 * 16 + 14]*acadoVariables.W[lRun1 * 256 + 238] + acadoWorkspace.Dy[lRun1 * 16 + 15]*acadoVariables.W[lRun1 * 256 + 254];\ntmpDy[15] = + acadoWorkspace.Dy[lRun1 * 16]*acadoVariables.W[lRun1 * 256 + 15] + acadoWorkspace.Dy[lRun1 * 16 + 1]*acadoVariables.W[lRun1 * 256 + 31] + acadoWorkspace.Dy[lRun1 * 16 + 2]*acadoVariables.W[lRun1 * 256 + 47] + acadoWorkspace.Dy[lRun1 * 16 + 3]*acadoVariables.W[lRun1 * 256 + 63] + acadoWorkspace.Dy[lRun1 * 16 + 4]*acadoVariables.W[lRun1 * 256 + 79] + acadoWorkspace.Dy[lRun1 * 16 + 5]*acadoVariables.W[lRun1 * 256 + 95] + acadoWorkspace.Dy[lRun1 * 16 + 6]*acadoVariables.W[lRun1 * 256 + 111] + acadoWorkspace.Dy[lRun1 * 16 + 7]*acadoVariables.W[lRun1 * 256 + 127] + acadoWorkspace.Dy[lRun1 * 16 + 8]*acadoVariables.W[lRun1 * 256 + 143] + acadoWorkspace.Dy[lRun1 * 16 + 9]*acadoVariables.W[lRun1 * 256 + 159] + acadoWorkspace.Dy[lRun1 * 16 + 10]*acadoVariables.W[lRun1 * 256 + 175] + acadoWorkspace.Dy[lRun1 * 16 + 11]*acadoVariables.W[lRun1 * 256 + 191] + acadoWorkspace.Dy[lRun1 * 16 + 12]*acadoVariables.W[lRun1 * 256 + 207] + acadoWorkspace.Dy[lRun1 * 16 + 13]*acadoVariables.W[lRun1 * 256 + 223] + acadoWorkspace.Dy[lRun1 * 16 + 14]*acadoVariables.W[lRun1 * 256 + 239] + acadoWorkspace.Dy[lRun1 * 16 + 15]*acadoVariables.W[lRun1 * 256 + 255];\nobjVal += + acadoWorkspace.Dy[lRun1 * 16]*tmpDy[0] + acadoWorkspace.Dy[lRun1 * 16 + 1]*tmpDy[1] + acadoWorkspace.Dy[lRun1 * 16 + 2]*tmpDy[2] + acadoWorkspace.Dy[lRun1 * 16 + 3]*tmpDy[3] + acadoWorkspace.Dy[lRun1 * 16 + 4]*tmpDy[4] + acadoWorkspace.Dy[lRun1 * 16 + 5]*tmpDy[5] + acadoWorkspace.Dy[lRun1 * 16 + 6]*tmpDy[6] + acadoWorkspace.Dy[lRun1 * 16 + 7]*tmpDy[7] + acadoWorkspace.Dy[lRun1 * 16 + 8]*tmpDy[8] + acadoWorkspace.Dy[lRun1 * 16 + 9]*tmpDy[9] + acadoWorkspace.Dy[lRun1 * 16 + 10]*tmpDy[10] + acadoWorkspace.Dy[lRun1 * 16 + 11]*tmpDy[11] + acadoWorkspace.Dy[lRun1 * 16 + 12]*tmpDy[12] + acadoWorkspace.Dy[lRun1 * 16 + 13]*tmpDy[13] + acadoWorkspace.Dy[lRun1 * 16 + 14]*tmpDy[14] + acadoWorkspace.Dy[lRun1 * 16 + 15]*tmpDy[15];\n}\n\ntmpDyN[0] = + acadoWorkspace.DyN[0]*acadoVariables.WN[0];\ntmpDyN[1] = + acadoWorkspace.DyN[1]*acadoVariables.WN[13];\ntmpDyN[2] = + acadoWorkspace.DyN[2]*acadoVariables.WN[26];\ntmpDyN[3] = + acadoWorkspace.DyN[3]*acadoVariables.WN[39];\ntmpDyN[4] = + acadoWorkspace.DyN[4]*acadoVariables.WN[52];\ntmpDyN[5] = + acadoWorkspace.DyN[5]*acadoVariables.WN[65];\ntmpDyN[6] = + acadoWorkspace.DyN[6]*acadoVariables.WN[78];\ntmpDyN[7] = + acadoWorkspace.DyN[7]*acadoVariables.WN[91];\ntmpDyN[8] = + acadoWorkspace.DyN[8]*acadoVariables.WN[104];\ntmpDyN[9] = + acadoWorkspace.DyN[9]*acadoVariables.WN[117];\ntmpDyN[10] = + acadoWorkspace.DyN[10]*acadoVariables.WN[130];\ntmpDyN[11] = + acadoWorkspace.DyN[11]*acadoVariables.WN[143];\nobjVal += + acadoWorkspace.DyN[0]*tmpDyN[0] + acadoWorkspace.DyN[1]*tmpDyN[1] + acadoWorkspace.DyN[2]*tmpDyN[2] + acadoWorkspace.DyN[3]*tmpDyN[3] + acadoWorkspace.DyN[4]*tmpDyN[4] + acadoWorkspace.DyN[5]*tmpDyN[5] + acadoWorkspace.DyN[6]*tmpDyN[6] + acadoWorkspace.DyN[7]*tmpDyN[7] + acadoWorkspace.DyN[8]*tmpDyN[8] + acadoWorkspace.DyN[9]*tmpDyN[9] + acadoWorkspace.DyN[10]*tmpDyN[10] + acadoWorkspace.DyN[11]*tmpDyN[11];\n\nobjVal *= 0.5;\nreturn objVal;\n}\n\n"
  },
  {
    "path": "package.xml",
    "content": "<?xml version=\"1.0\"?>\n<package format=\"2\">\n  <name>rpg_mpc</name>\n  <version>0.0.0</version>\n  <description>Model Predictive Control for Quadrotors</description>\n\n  <maintainer email=\"foehn@ifi.uzh.ch\">foehnph</maintainer>\n\n  <license>GNU GPL</license>\n\n  <buildtool_depend>catkin</buildtool_depend>\n  <buildtool_depend>catkin_simple</buildtool_depend>\n\n\n  <depend>autopilot</depend>\n  <depend>geometry_msgs</depend>\n  <depend>quadrotor_common</depend>\n  <depend>roscpp</depend>\n  <depend>std_msgs</depend>\n  <depend>trajectory_msgs</depend>\n\n  <export>\n  </export>\n</package>"
  },
  {
    "path": "parameters/default.yaml",
    "content": "#     rpg_quadrotor_mpc\n#     A model predictive control implementation for quadrotors.\n#     Copyright (C) 2017-2018 Philipp Foehn, \n#     Robotics and Perception Group, University of Zurich\n#  \n#     Intended to be used with rpg_quadrotor_control and rpg_quadrotor_common.\n#     https://github.com/uzh-rpg/rpg_quadrotor_control\n# \n#     This program is free software: you can redistribute it and/or modify\n#     it under the terms of the GNU General Public License as published by\n#     the Free Software Foundation, either version 3 of the License, or\n#     (at your option) any later version.\n# \n#     This program is distributed in the hope that it will be useful,\n#     but WITHOUT ANY WARRANTY; without even the implied warranty of\n#     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n#     GNU General Public License for more details.\n# \n#     You should have received a copy of the GNU General Public License\n#     along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\n\n# Cost on states\nQ_pos_xy:     200   # Cost for horizontal positon error\nQ_pos_z:      500   # Cost for vertical position error\nQ_attitude:   50    # Cost for attitude error\nQ_velocity:   10    # Cost for velocity error\nQ_perception: 0     # Cost for reprojection error to camera optical axis (PAMPC)\n\n# Cost on Inputs\nR_thrust:     1     # Cost on thrust input\nR_pitchroll:  1     # Cost on pitch and roll rate\nR_yaw:        1     # Cost on yaw ratte\n\n# Exponential scaling: W_i = W * exp(-i/N * cost_scaling).\n# cost_scaling = 0 means no scaling W_i = W. \nstate_cost_exponential: 0.0     # Scaling for state costs\ninput_cost_exponential: 0.0     # scaling for input costs\n\n# Limits for inputs\nmax_bodyrate_xy:    3.0       # ~ pi [rad/s]\nmax_bodyrate_z:     2         # ~ pi*2/3 [rad/s]\nmin_thrust:         2.0       # ~ 20% gravity [N]\nmax_thrust:         20.0      # ~ 200% gravity [N]\n\n# Extrinsics for Perception Aware MPC\np_B_C:      [ 0.0, 0.0, 0.0 ]               # camera in body center [m]\nq_B_C:      [ 0.6427876, 0, 0.7660444, 0 ]  # 45° pitched down\n\n# Print information such as timing to terminal\nprint_info:       true\n"
  },
  {
    "path": "src/autopilot_mpc_instance.cpp",
    "content": "/*    rpg_quadrotor_mpc\n *    A model predictive control implementation for quadrotors.\n *    Copyright (C) 2017-2018 Philipp Foehn, \n *    Robotics and Perception Group, University of Zurich\n * \n *    Intended to be used with rpg_quadrotor_control and rpg_quadrotor_common.\n *    https://github.com/uzh-rpg/rpg_quadrotor_control\n *\n *    This program is free software: you can redistribute it and/or modify\n *    it under the terms of the GNU General Public License as published by\n *    the Free Software Foundation, either version 3 of the License, or\n *    (at your option) any later version.\n *\n *    This program is distributed in the hope that it will be useful,\n *    but WITHOUT ANY WARRANTY; without even the implied warranty of\n *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n *    GNU General Public License for more details.\n *\n *    You should have received a copy of the GNU General Public License\n *    along with this program.  If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n\n#include <rpg_mpc/mpc_controller.h>\n#include <rpg_mpc/mpc_params.h>\n\n#include \"autopilot/autopilot.h\"\n\ntemplate class autopilot::AutoPilot<rpg_mpc::MpcController<float>,\n                         rpg_mpc::MpcParams<float>>;\ntemplate class autopilot::AutoPilot<rpg_mpc::MpcController<double>,\n                         rpg_mpc::MpcParams<double>>;\n\nint main(int argc, char **argv)\n{\n  ros::init(argc, argv, \"autopilot\");\n  autopilot::AutoPilot<rpg_mpc::MpcController<float>,\n                       rpg_mpc::MpcParams<float>> autopilot;\n\n  ros::spin();\n\n  return 0;\n}\n"
  },
  {
    "path": "src/mpc_controller.cpp",
    "content": "/*    rpg_quadrotor_mpc\n *    A model predictive control implementation for quadrotors.\n *    Copyright (C) 2017-2018 Philipp Foehn, \n *    Robotics and Perception Group, University of Zurich\n * \n *    Intended to be used with rpg_quadrotor_control and rpg_quadrotor_common.\n *    https://github.com/uzh-rpg/rpg_quadrotor_control\n *\n *    This program is free software: you can redistribute it and/or modify\n *    it under the terms of the GNU General Public License as published by\n *    the Free Software Foundation, either version 3 of the License, or\n *    (at your option) any later version.\n *\n *    This program is distributed in the hope that it will be useful,\n *    but WITHOUT ANY WARRANTY; without even the implied warranty of\n *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n *    GNU General Public License for more details.\n *\n *    You should have received a copy of the GNU General Public License\n *    along with this program.  If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n\n#include \"rpg_mpc/mpc_controller.h\"\n\n#include <ctime>\n\nnamespace rpg_mpc {\n\ntemplate<typename T>\nMpcController<T>::MpcController(\n    const ros::NodeHandle& nh, const ros::NodeHandle& pnh, const std::string& topic) :\n    nh_(nh),\n    pnh_(pnh),\n    mpc_wrapper_(MpcWrapper<T>()),\n    timing_feedback_(T(1e-3)),\n    timing_preparation_(T(1e-3)),\n    est_state_((Eigen::Matrix<T, kStateSize, 1>() <<\n                                                  0, 0, 0, 1, 0, 0, 0, 0, 0, 0).finished()),\n    reference_states_(Eigen::Matrix<T, kStateSize, kSamples + 1>::Zero()),\n    reference_inputs_(Eigen::Matrix<T, kInputSize, kSamples + 1>::Zero()),\n    predicted_states_(Eigen::Matrix<T, kStateSize, kSamples + 1>::Zero()),\n    predicted_inputs_(Eigen::Matrix<T, kInputSize, kSamples>::Zero()),\n    point_of_interest_(Eigen::Matrix<T, 3, 1>::Zero()) {\n  pub_predicted_trajectory_ =\n      nh_.advertise<nav_msgs::Path>(topic, 1);\n\n  sub_point_of_interest_ = nh_.subscribe(\"mpc/point_of_interest\", 1,\n                                         &MpcController<T>::pointOfInterestCallback, this);\n  sub_autopilot_off_ = nh_.subscribe(\"autopilot/off\", 1,\n                                     &MpcController<T>::offCallback, this);\n\n  if (!params_.loadParameters(pnh_)) {\n    ROS_ERROR(\"[%s] Could not load parameters.\", pnh_.getNamespace().c_str());\n    ros::shutdown();\n    return;\n  }\n  setNewParams(params_);\n\n  solve_from_scratch_ = true;\n  preparation_thread_ = std::thread(&MpcWrapper<T>::prepare, mpc_wrapper_);\n}\n\ntemplate<typename T>\nvoid MpcController<T>::pointOfInterestCallback(\n    const geometry_msgs::PointStamped::ConstPtr& msg) {\n  point_of_interest_(0) = msg->point.x;\n  point_of_interest_(1) = msg->point.y;\n  point_of_interest_(2) = msg->point.z;\n  mpc_wrapper_.setPointOfInterest(point_of_interest_);\n}\n\ntemplate<typename T>\nvoid MpcController<T>::offCallback(\n    const std_msgs::Empty::ConstPtr& msg) {\n  solve_from_scratch_ = true;\n}\n\ntemplate<typename T>\nquadrotor_common::ControlCommand MpcController<T>::off() {\n  quadrotor_common::ControlCommand command;\n\n  command.zero();\n\n  return command;\n}\n\ntemplate<typename T>\nquadrotor_common::ControlCommand MpcController<T>::run(\n    const quadrotor_common::QuadStateEstimate& state_estimate,\n    const quadrotor_common::Trajectory& reference_trajectory,\n    const MpcParams<T>& params) {\n  ros::Time call_time = ros::Time::now();\n  const clock_t start = clock();\n  if (params.changed_) {\n    params_ = params;\n    setNewParams(params_);\n  }\n\n  preparation_thread_.join();\n\n  // Convert everything into Eigen format.\n  setStateEstimate(state_estimate);\n  setReference(reference_trajectory);\n\n  static const bool do_preparation_step(false);\n\n  // Get the feedback from MPC.\n  mpc_wrapper_.setTrajectory(reference_states_, reference_inputs_);\n  if (solve_from_scratch_) {\n    ROS_INFO(\"Solving MPC with hover as initial guess.\");\n    mpc_wrapper_.solve(est_state_);\n    solve_from_scratch_ = false;\n  } else {\n    mpc_wrapper_.update(est_state_, do_preparation_step);\n  }\n  mpc_wrapper_.getStates(predicted_states_);\n  mpc_wrapper_.getInputs(predicted_inputs_);\n\n  // Publish the predicted trajectory.\n  publishPrediction(predicted_states_, predicted_inputs_, call_time);\n\n  // Start a thread to prepare for the next execution.\n  preparation_thread_ = std::thread(&MpcController<T>::preparationThread, this);\n\n  // Timing\n  const clock_t end = clock();\n  timing_feedback_ = 0.9 * timing_feedback_ +\n                     0.1 * double(end - start) / CLOCKS_PER_SEC;\n  if (params_.print_info_)\n    ROS_INFO_THROTTLE(1.0, \"MPC Timing: Latency: %1.1f ms  |  Total: %1.1f ms\",\n                      timing_feedback_ * 1000, (timing_feedback_ + timing_preparation_) * 1000);\n\n  // Return the input control command.\n  return updateControlCommand(predicted_states_.col(0),\n                              predicted_inputs_.col(0),\n                              call_time);\n}\n\ntemplate<typename T>\nbool MpcController<T>::setStateEstimate(\n    const quadrotor_common::QuadStateEstimate& state_estimate) {\n  est_state_(kPosX) = state_estimate.position.x();\n  est_state_(kPosY) = state_estimate.position.y();\n  est_state_(kPosZ) = state_estimate.position.z();\n  est_state_(kOriW) = state_estimate.orientation.w();\n  est_state_(kOriX) = state_estimate.orientation.x();\n  est_state_(kOriY) = state_estimate.orientation.y();\n  est_state_(kOriZ) = state_estimate.orientation.z();\n  est_state_(kVelX) = state_estimate.velocity.x();\n  est_state_(kVelY) = state_estimate.velocity.y();\n  est_state_(kVelZ) = state_estimate.velocity.z();\n  const bool quaternion_norm_ok = abs(est_state_.segment(kOriW, 4).norm() - 1.0) < 0.1;\n  return quaternion_norm_ok;\n}\n\ntemplate<typename T>\nbool MpcController<T>::setReference(\n    const quadrotor_common::Trajectory& reference_trajectory) {\n  reference_states_.setZero();\n  reference_inputs_.setZero();\n\n  const T dt = mpc_wrapper_.getTimestep();\n  Eigen::Matrix<T, 3, 1> acceleration;\n  const Eigen::Matrix<T, 3, 1> gravity(0.0, 0.0, -9.81);\n  Eigen::Quaternion<T> q_heading;\n  Eigen::Quaternion<T> q_orientation;\n  bool quaternion_norm_ok(true);\n  if (reference_trajectory.points.size() == 1) {\n    q_heading = Eigen::Quaternion<T>(Eigen::AngleAxis<T>(\n        reference_trajectory.points.front().heading,\n        Eigen::Matrix<T, 3, 1>::UnitZ()));\n    q_orientation = reference_trajectory.points.front().orientation.template cast<T>() * q_heading;\n    reference_states_ = (Eigen::Matrix<T, kStateSize, 1>()\n        << reference_trajectory.points.front().position.template cast<T>(),\n        q_orientation.w(),\n        q_orientation.x(),\n        q_orientation.y(),\n        q_orientation.z(),\n        reference_trajectory.points.front().velocity.template cast<T>()\n    ).finished().replicate(1, kSamples + 1);\n\n    acceleration << reference_trajectory.points.front().acceleration.template cast<T>() - gravity;\n    reference_inputs_ = (Eigen::Matrix<T, kInputSize, 1>() << acceleration.norm(),\n        reference_trajectory.points.front().bodyrates.template cast<T>()\n    ).finished().replicate(1, kSamples + 1);\n  } else {\n    auto iterator(reference_trajectory.points.begin());\n    ros::Duration t_start = reference_trajectory.points.begin()->time_from_start;\n    auto last_element = reference_trajectory.points.end();\n    last_element = std::prev(last_element);\n\n    for (int i = 0; i < kSamples + 1; i++) {\n      while ((iterator->time_from_start - t_start).toSec() <= i * dt &&\n             iterator != last_element) {\n        iterator++;\n      }\n\n      q_heading = Eigen::Quaternion<T>(Eigen::AngleAxis<T>(\n          iterator->heading, Eigen::Matrix<T, 3, 1>::UnitZ()));\n      q_orientation = q_heading * iterator->orientation.template cast<T>();\n      reference_states_.col(i) << iterator->position.template cast<T>(),\n          q_orientation.w(),\n          q_orientation.x(),\n          q_orientation.y(),\n          q_orientation.z(),\n          iterator->velocity.template cast<T>();\n      if (reference_states_.col(i).segment(kOriW, 4).dot(\n          est_state_.segment(kOriW, 4)) < 0.0)\n        reference_states_.block(kOriW, i, 4, 1) =\n            -reference_states_.block(kOriW, i, 4, 1);\n      acceleration << iterator->acceleration.template cast<T>() - gravity;\n      reference_inputs_.col(i) << acceleration.norm(),\n          iterator->bodyrates.template cast<T>();\n      quaternion_norm_ok &= abs(est_state_.segment(kOriW, 4).norm() - 1.0) < 0.1;\n    }\n  }\n  return quaternion_norm_ok;\n}\n\ntemplate<typename T>\nquadrotor_common::ControlCommand MpcController<T>::updateControlCommand(\n    const Eigen::Ref<const Eigen::Matrix<T, kStateSize, 1>> state,\n    const Eigen::Ref<const Eigen::Matrix<T, kInputSize, 1>> input,\n    ros::Time& time) {\n  Eigen::Matrix<T, kInputSize, 1> input_bounded = input.template cast<T>();\n\n  // Bound inputs for sanity.\n  input_bounded(INPUT::kThrust) = std::max(params_.min_thrust_,\n                                           std::min(params_.max_thrust_, input_bounded(INPUT::kThrust)));\n  input_bounded(INPUT::kRateX) = std::max(-params_.max_bodyrate_xy_,\n                                          std::min(params_.max_bodyrate_xy_, input_bounded(INPUT::kRateX)));\n  input_bounded(INPUT::kRateY) = std::max(-params_.max_bodyrate_xy_,\n                                          std::min(params_.max_bodyrate_xy_, input_bounded(INPUT::kRateY)));\n  input_bounded(INPUT::kRateZ) = std::max(-params_.max_bodyrate_z_,\n                                          std::min(params_.max_bodyrate_z_, input_bounded(INPUT::kRateZ)));\n\n  quadrotor_common::ControlCommand command;\n\n  command.timestamp = time;\n  command.armed = true;\n  command.control_mode = quadrotor_common::ControlMode::BODY_RATES;\n  command.expected_execution_time = time;\n  command.collective_thrust = input_bounded(INPUT::kThrust);\n  command.bodyrates.x() = input_bounded(INPUT::kRateX);\n  command.bodyrates.y() = input_bounded(INPUT::kRateY);\n  command.bodyrates.z() = input_bounded(INPUT::kRateZ);\n  command.orientation.w() = state(STATE::kOriW);\n  command.orientation.x() = state(STATE::kOriX);\n  command.orientation.y() = state(STATE::kOriY);\n  command.orientation.z() = state(STATE::kOriZ);\n  return command;\n}\n\ntemplate<typename T>\nbool MpcController<T>::publishPrediction(\n    const Eigen::Ref<const Eigen::Matrix<T, kStateSize, kSamples + 1>> states,\n    const Eigen::Ref<const Eigen::Matrix<T, kInputSize, kSamples>> inputs,\n    ros::Time& time) {\n  nav_msgs::Path path_msg;\n  path_msg.header.stamp = time;\n  path_msg.header.frame_id = \"world\";\n  geometry_msgs::PoseStamped pose;\n  T dt = mpc_wrapper_.getTimestep();\n\n  for (int i = 0; i < kSamples; i++) {\n    pose.header.stamp = time + ros::Duration(i * dt);\n    pose.header.seq = i;\n    pose.pose.position.x = states(kPosX, i);\n    pose.pose.position.y = states(kPosY, i);\n    pose.pose.position.z = states(kPosZ, i);\n    pose.pose.orientation.w = states(kOriW, i);\n    pose.pose.orientation.x = states(kOriX, i);\n    pose.pose.orientation.y = states(kOriY, i);\n    pose.pose.orientation.z = states(kOriZ, i);\n    path_msg.poses.push_back(pose);\n  }\n\n  pub_predicted_trajectory_.publish(path_msg);\n\n  return true;\n}\n\ntemplate<typename T>\nvoid MpcController<T>::preparationThread() {\n  const clock_t start = clock();\n\n  mpc_wrapper_.prepare();\n\n  // Timing\n  const clock_t end = clock();\n  timing_preparation_ = 0.9 * timing_preparation_ +\n                        0.1 * double(end - start) / CLOCKS_PER_SEC;\n}\n\ntemplate<typename T>\nbool MpcController<T>::setNewParams(MpcParams<T>& params) {\n  mpc_wrapper_.setCosts(params.Q_, params.R_);\n  mpc_wrapper_.setLimits(\n      params.min_thrust_, params.max_thrust_,\n      params.max_bodyrate_xy_, params.max_bodyrate_z_);\n  mpc_wrapper_.setCameraParameters(params.p_B_C_, params.q_B_C_);\n  params.changed_ = false;\n  return true;\n}\n\n\ntemplate\nclass MpcController<float>;\n\ntemplate\nclass MpcController<double>;\n\n} // namespace rpg_mpc\n"
  },
  {
    "path": "src/mpc_wrapper.cpp",
    "content": "/*    rpg_quadrotor_mpc\n *    A model predictive control implementation for quadrotors.\n *    Copyright (C) 2017-2018 Philipp Foehn, \n *    Robotics and Perception Group, University of Zurich\n * \n *    Intended to be used with rpg_quadrotor_control and rpg_quadrotor_common.\n *    https://github.com/uzh-rpg/rpg_quadrotor_control\n *\n *    This program is free software: you can redistribute it and/or modify\n *    it under the terms of the GNU General Public License as published by\n *    the Free Software Foundation, either version 3 of the License, or\n *    (at your option) any later version.\n *\n *    This program is distributed in the hope that it will be useful,\n *    but WITHOUT ANY WARRANTY; without even the implied warranty of\n *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n *    GNU General Public License for more details.\n *\n *    You should have received a copy of the GNU General Public License\n *    along with this program.  If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n\n#include \"rpg_mpc/mpc_wrapper.h\"\n\n\nnamespace rpg_mpc {\n\n// Default Constructor.\ntemplate <typename T>\nMpcWrapper<T>::MpcWrapper()\n{\n  // Clear solver memory.\n  memset(&acadoWorkspace, 0, sizeof( acadoWorkspace ));\n  memset(&acadoVariables, 0, sizeof( acadoVariables ));\n  \n  // Initialize the solver.\n  acado_initializeSolver();\n\n  // Initialize the states and controls.\n  const Eigen::Matrix<T, kStateSize, 1> hover_state =\n    (Eigen::Matrix<T, kStateSize, 1>() << 0.0, 0.0, 0.0,\n                                          1.0, 0.0, 0.0, 0.0,\n                                          0.0, 0.0, 0.0).finished();\n\n  // Initialize states x and xN and input u.\n  acado_initial_state_ = hover_state.template cast<float>();\n\n  acado_states_ = hover_state.replicate(1, kSamples+1).template cast<float>();\n\n  acado_inputs_ = kHoverInput_.replicate(1, kSamples).template cast<float>();\n\n  // Initialize references y and yN.\n  acado_reference_states_.block(0, 0, kStateSize, kSamples) =\n    hover_state.replicate(1, kSamples).template cast<float>();\n\n  acado_reference_states_.block(kStateSize, 0, kCostSize-kStateSize, kSamples) =\n    Eigen::Matrix<float, kCostSize-kStateSize, kSamples>::Zero();\n\n  acado_reference_states_.block(kCostSize, 0, kInputSize, kSamples) =\n    kHoverInput_.replicate(1, kSamples);\n\n  acado_reference_end_state_.segment(0, kStateSize) =\n    hover_state.template cast<float>();\n\n  acado_reference_end_state_.segment(kStateSize, kCostSize-kStateSize) =\n    Eigen::Matrix<float, kCostSize-kStateSize, 1>::Zero();\n\n  // Initialize Cost matrix W and WN.\n  if(!(acado_W_.trace()>0.0))\n  {\n    acado_W_ = W_.replicate(1, kSamples).template cast<float>();\n    acado_W_end_ = WN_.template cast<float>();\n  }\n\n  // Initialize online data.\n  Eigen::Matrix<T, 3, 1> p_B_C(0, 0, 0);\n  Eigen::Quaternion<T> q_B_C(1, 0, 0, 0);\n  Eigen::Matrix<T, 3, 1> point_of_interest(0, 0, -1000);\n\n  setCameraParameters(p_B_C, q_B_C);\n  setPointOfInterest(point_of_interest);\n\n  // Initialize solver.\n  acado_initializeNodesByForwardSimulation();\n  acado_preparationStep();\n  acado_is_prepared_ = true;\n}\n\n// Constructor with cost matrices as arguments.\ntemplate <typename T>\nMpcWrapper<T>::MpcWrapper(\n  const Eigen::Ref<const Eigen::Matrix<T, kCostSize, kCostSize>> Q,\n  const Eigen::Ref<const Eigen::Matrix<T, kInputSize, kInputSize>> R)\n{\n  setCosts(Q, R);\n  MpcWrapper();\n}\n\n// Set cost matrices with optional scaling.\ntemplate <typename T>\nbool MpcWrapper<T>::setCosts(\n  const Eigen::Ref<const Eigen::Matrix<T, kCostSize, kCostSize>> Q,\n  const Eigen::Ref<const Eigen::Matrix<T, kInputSize, kInputSize>> R,\n  const T state_cost_scaling, const T input_cost_scaling)\n{\n  if(state_cost_scaling < 0.0 || input_cost_scaling < 0.0 )\n  {\n    ROS_ERROR(\"MPC: Cost scaling is wrong, must be non-negative!\");\n    return false;\n  }\n  W_.block(0, 0, kCostSize, kCostSize) = Q;\n  W_.block(kCostSize, kCostSize, kInputSize, kInputSize) = R;\n  WN_ = W_.block(0, 0, kCostSize, kCostSize);\n\n  float state_scale{1.0};\n  float input_scale{1.0};\n  for(int i=0; i<kSamples; i++)\n  { \n    state_scale = exp(- float(i)/float(kSamples)\n      * float(state_cost_scaling));\n    input_scale = exp(- float(i)/float(kSamples)\n      * float(input_cost_scaling));\n    acado_W_.block(0, i*kRefSize, kCostSize, kCostSize) =\n      W_.block(0, 0, kCostSize, kCostSize).template cast<float>()\n      * state_scale;\n    acado_W_.block(kCostSize, i*kRefSize+kCostSize, kInputSize, kInputSize) =\n      W_.block(kCostSize, kCostSize, kInputSize, kInputSize\n        ).template cast<float>() * input_scale;\n  } \n  acado_W_end_ = WN_.template cast<float>() * state_scale;\n\n  return true;\n}\n\n// Set the input limits.\ntemplate <typename T>\nbool MpcWrapper<T>::setLimits(T min_thrust, T max_thrust,\n    T max_rollpitchrate, T max_yawrate)\n{\n  if(min_thrust <= 0.0 || min_thrust > max_thrust)\n  {\n    ROS_ERROR(\"MPC: Minimal thrust is not set properly, not changed.\");\n    return false;\n  }\n\n  if(max_thrust <= 0.0 || min_thrust > max_thrust)\n  {\n    ROS_ERROR(\"MPC: Maximal thrust is not set properly, not changed.\");\n    return false;\n  }\n\n  if(max_rollpitchrate <= 0.0)\n  {\n    ROS_ERROR(\"MPC: Maximal xy-rate is not set properly, not changed.\");\n    return false;\n  }\n\n  if(max_yawrate <= 0.0)\n  {\n    ROS_ERROR(\"MPC: Maximal yaw-rate is not set properly, not changed.\");\n    return false;\n  }\n\n  // Set input boundaries.\n  Eigen::Matrix<T, 4, 1> lower_bounds = Eigen::Matrix<T, 4, 1>::Zero();\n  Eigen::Matrix<T, 4, 1> upper_bounds = Eigen::Matrix<T, 4, 1>::Zero();\n  lower_bounds << min_thrust,\n    -max_rollpitchrate, -max_rollpitchrate, -max_yawrate;\n  upper_bounds << max_thrust,\n    max_rollpitchrate, max_rollpitchrate, max_yawrate;\n\n  acado_lower_bounds_ =\n    lower_bounds.replicate(1, kSamples).template cast<float>();\n\n  acado_upper_bounds_ =\n    upper_bounds.replicate(1, kSamples).template cast<float>();\n  return true;\n}\n\n// Set camera extrinsics.\ntemplate <typename T>\nbool MpcWrapper<T>::setCameraParameters(\n  const Eigen::Ref<const Eigen::Matrix<T, 3, 1>>& p_B_C,\n  Eigen::Quaternion<T>& q_B_C)\n{\n  acado_online_data_.block(3, 0, 3, ACADO_N+1)\n    = p_B_C.replicate(1, ACADO_N+1).template cast<float>();\n\n  Eigen::Matrix<T, 4, 1> q_B_C_mat(\n    q_B_C.w(), q_B_C.x(), q_B_C.y(), q_B_C.z());\n  acado_online_data_.block(6, 0, 4, ACADO_N+1)\n    = q_B_C_mat.replicate(1, ACADO_N+1).template cast<float>();\n\n  return true;\n}\n\n// Set the point of interest. Perception cost should be non-zero.\ntemplate <typename T>\nbool MpcWrapper<T>::setPointOfInterest(\n  const Eigen::Ref<const Eigen::Matrix<T, 3, 1>>& position)\n{\n  acado_online_data_.block(0, 0, 3, ACADO_N+1)\n    = position.replicate(1, ACADO_N+1).template cast<float>();\n  return true;\n}\n\n// Set a reference pose.\ntemplate <typename T>\nbool MpcWrapper<T>::setReferencePose(\n  const Eigen::Ref<const Eigen::Matrix<T, kStateSize, 1>> state)\n{\n  acado_reference_states_.block(0, 0, kStateSize, kSamples) =\n    state.replicate(1, kSamples).template cast<float>();\n\n  acado_reference_states_.block(kStateSize, 0, kCostSize-kStateSize, kSamples) =\n    Eigen::Matrix<float, kCostSize-kStateSize, kSamples>::Zero();\n\n  acado_reference_states_.block(kCostSize, 0, kInputSize, kSamples) =\n    kHoverInput_.replicate(1, kSamples);\n\n  acado_reference_end_state_.segment(0, kStateSize) =\n    state.template cast<float>();\n\n  acado_reference_end_state_.segment(kStateSize, kCostSize-kStateSize) =\n    Eigen::Matrix<float, kCostSize-kStateSize, 1>::Zero();\n\n  acado_initializeNodesByForwardSimulation();\n  return true;\n}\n\n// Set a reference trajectory.\ntemplate <typename T>\nbool MpcWrapper<T>::setTrajectory(\n  const Eigen::Ref<const Eigen::Matrix<T, kStateSize, kSamples+1>> states,\n  const Eigen::Ref<const Eigen::Matrix<T, kInputSize, kSamples+1>> inputs)\n{\n  Eigen::Map<Eigen::Matrix<float, kRefSize, kSamples, Eigen::ColMajor>>\n    y(const_cast<float*>(acadoVariables.y));\n\n  acado_reference_states_.block(0, 0, kStateSize, kSamples) =\n    states.block(0, 0, kStateSize, kSamples).template cast<float>();\n\n  acado_reference_states_.block(kStateSize, 0, kCostSize-kStateSize, kSamples) =\n    Eigen::Matrix<float, kCostSize-kStateSize, kSamples>::Zero();\n\n  acado_reference_states_.block(kCostSize, 0, kInputSize, kSamples) =\n    inputs.block(0, 0, kInputSize, kSamples).template cast<float>();\n\n  acado_reference_end_state_.segment(0, kStateSize) =\n    states.col(kSamples).template cast<float>();\n  acado_reference_end_state_.segment(kStateSize, kCostSize-kStateSize) =\n    Eigen::Matrix<float, kCostSize-kStateSize, 1>::Zero();\n\n  return true;\n}\n\n// Reset states and inputs and calculate new solution.\ntemplate <typename T>\nbool MpcWrapper<T>::solve(\n  const Eigen::Ref<const Eigen::Matrix<T, kStateSize, 1>> state)\n{\n  acado_states_ = state.replicate(1, kSamples+1).template cast<float>();\n\n  acado_inputs_ = kHoverInput_.replicate(1, kSamples);\n\n  return update(state);\n}\n\n\n// Calculate new solution from last known solution.\ntemplate <typename T>\nbool MpcWrapper<T>::update(\n  const Eigen::Ref<const Eigen::Matrix<T, kStateSize, 1>> state,\n  bool do_preparation)\n{\n  if(!acado_is_prepared_)\n  {\n    ROS_WARN(\"MPC: Solver was triggered without preparation, abort!\");\n    return false;\n  }\n\n  // Check if estimated and reference quaternion live in sthe same hemisphere.\n  acado_initial_state_ = state.template cast<float>();\n  if(acado_initial_state_.segment(3,4).dot(\n    Eigen::Vector4f(acado_reference_states_.block(3,0,4,1)))<(T)0.0)\n  {\n    acado_initial_state_.segment(3,4) = -acado_initial_state_.segment(3,4);\n  }\n\n  // Perform feedback step and reset preparation check.\n  acado_feedbackStep();\n  acado_is_prepared_ = false;\n\n  // Prepare if the solver if wanted\n  if(do_preparation)\n  {\n    acado_preparationStep();\n    acado_is_prepared_ = true;\n  }\n\n  return true;\n}\n\n// Prepare the solver.\n// Must be triggered between iterations if not done in the update function.\ntemplate <typename T>\nbool MpcWrapper<T>::prepare()\n{\n  acado_preparationStep();\n  acado_is_prepared_ = true;\n\n  return true;\n}\n\n// Get a specific state.\ntemplate <typename T>\nvoid MpcWrapper<T>::getState(const int node_index,\n    Eigen::Ref<Eigen::Matrix<T, kStateSize, 1>> return_state)\n{\n  return_state = acado_states_.col(node_index).cast<T>();\n}\n\n// Get all states.\ntemplate <typename T>\nvoid MpcWrapper<T>::getStates(\n    Eigen::Ref<Eigen::Matrix<T, kStateSize, kSamples+1>> return_states)\n{\n  return_states = acado_states_.cast<T>();\n}\n\n// Get a specific input.\ntemplate <typename T>\nvoid MpcWrapper<T>::getInput(const int node_index,\n    Eigen::Ref<Eigen::Matrix<T, kInputSize, 1>> return_input)\n{\n  return_input = acado_inputs_.col(node_index).cast<T>();\n}\n\n// Get all inputs.\ntemplate <typename T>\nvoid MpcWrapper<T>::getInputs(\n    Eigen::Ref<Eigen::Matrix<T, kInputSize, kSamples>> return_inputs)\n{\n  return_inputs = acado_inputs_.cast<T>();\n}\n\n\ntemplate class MpcWrapper<float>;\ntemplate class MpcWrapper<double>;\n\n} // namespace rpg_mpc\n\n"
  },
  {
    "path": "test/mpc_node.cpp",
    "content": "/*    rpg_quadrotor_mpc\n *    A model predictive control implementation for quadrotors.\n *    Copyright (C) 2017-2018 Philipp Foehn, \n *    Robotics and Perception Group, University of Zurich\n * \n *    Intended to be used with rpg_quadrotor_control and rpg_quadrotor_common.\n *    https://github.com/uzh-rpg/rpg_quadrotor_control\n *\n *    This program is free software: you can redistribute it and/or modify\n *    it under the terms of the GNU General Public License as published by\n *    the Free Software Foundation, either version 3 of the License, or\n *    (at your option) any later version.\n *\n *    This program is distributed in the hope that it will be useful,\n *    but WITHOUT ANY WARRANTY; without even the implied warranty of\n *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n *    GNU General Public License for more details.\n *\n *    You should have received a copy of the GNU General Public License\n *    along with this program.  If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n\n#include \"ros/ros.h\"\n#include \"ros/console.h\"\n#include \"rpg_mpc/mpc_controller.h\"\n\nint main(int argc, char **argv)\n{\n  ros::init(argc, argv, \"rpg_mpc\");\n  rpg_mpc::MpcController<float>\n    controller(ros::NodeHandle(), ros::NodeHandle(\"~\"));\n  ros::spin();\n\n  return 0;\n}\n"
  }
]