{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2025,3,29]],"date-time":"2025-03-29T16:47:26Z","timestamp":1743266846367,"version":"3.37.3"},"reference-count":30,"publisher":"Springer Science and Business Media LLC","issue":"3","license":[{"start":{"date-parts":[[2022,2,8]],"date-time":"2022-02-08T00:00:00Z","timestamp":1644278400000},"content-version":"tdm","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0"},{"start":{"date-parts":[[2022,2,8]],"date-time":"2022-02-08T00:00:00Z","timestamp":1644278400000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0"}],"content-domain":{"domain":["link.springer.com"],"crossmark-restriction":false},"short-container-title":["Math. Prog. Comp."],"published-print":{"date-parts":[[2022,9]]},"abstract":"<jats:title>Abstract<\/jats:title><jats:p>We describe the toolbox <jats:inline-formula><jats:alternatives><jats:tex-math>$$\\mathtt {Tenscalc}$$<\/jats:tex-math><mml:math xmlns:mml=\"http:\/\/www.w3.org\/1998\/Math\/MathML\">\n                  <mml:mi>Tenscalc<\/mml:mi>\n                <\/mml:math><\/jats:alternatives><\/jats:inline-formula> that generates specialized C-code to solve nonlinear constrained optimizations and to compute Nash equilibria. <jats:inline-formula><jats:alternatives><jats:tex-math>$$\\mathtt {Tenscalc}$$<\/jats:tex-math><mml:math xmlns:mml=\"http:\/\/www.w3.org\/1998\/Math\/MathML\">\n                  <mml:mi>Tenscalc<\/mml:mi>\n                <\/mml:math><\/jats:alternatives><\/jats:inline-formula> is aimed at scenarios where one needs to solve very fast a large number of optimizations that are structurally similar. This is common in applications where the optimizations depend on measured data and one wants to compute optima for large or evolving datasets, e.g., in robust estimation and classification, maximum likelihood estimation, model predictive control (MPC), moving horizon estimation (MHE), and combined MPC-MHE (which requires the computation of a saddle-point equilibria). <jats:inline-formula><jats:alternatives><jats:tex-math>$$\\mathtt {Tenscalc}$$<\/jats:tex-math><mml:math xmlns:mml=\"http:\/\/www.w3.org\/1998\/Math\/MathML\">\n                  <mml:mi>Tenscalc<\/mml:mi>\n                <\/mml:math><\/jats:alternatives><\/jats:inline-formula> is mostly aimed at generating solvers for optimizations with up to a few thousands of optimization variables\/constraints and solve times up to a few milliseconds. The speed achieved by the solver arises from a combination of features: reuse of intermediate computations across and within iterations of the solver, detection and exploitation of matrix sparsity, avoidance of run-time memory allocation and garbage collection, and reliance on flat code that improves the efficiency of the microprocessor pipelining and caching. All these features have been automated and embedded into the code generation process. We include a few representative examples to illustrate how the speed and memory footprint of the solver scale with the size of the problem.\n<\/jats:p>","DOI":"10.1007\/s12532-022-00216-2","type":"journal-article","created":{"date-parts":[[2022,2,8]],"date-time":"2022-02-08T12:02:34Z","timestamp":1644321754000},"page":"451-496","update-policy":"https:\/\/doi.org\/10.1007\/springer_crossmark_policy","source":"Crossref","is-referenced-by-count":5,"title":["$$\\mathtt {Tenscalc}$$: a toolbox to generate fast code to solve nonlinear constrained minimizations and compute Nash equilibria"],"prefix":"10.1007","volume":"14","author":[{"ORCID":"https:\/\/orcid.org\/0000-0003-2809-4718","authenticated-orcid":false,"given":"Jo\u00e3o P.","family":"Hespanha","sequence":"first","affiliation":[],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"297","published-online":{"date-parts":[[2022,2,8]]},"reference":[{"issue":"1","key":"216_CR1","doi-asserted-by":"publisher","first-page":"1","DOI":"10.1007\/s12532-018-0139-4","volume":"11","author":"JA Andersson","year":"2019","unstructured":"Andersson, J.A., Gillis, J., Horn, G., Rawlings, J.B., Diehl, M.: CasADi: a software framework for nonlinear optimization and optimal control. Math. Program. Comput. 11(1), 1\u201336 (2019)","journal-title":"Math. Program. Comput."},{"key":"216_CR2","volume-title":"Modern Compiler Implementation in C","author":"AW Appel","year":"2004","unstructured":"Appel, A.W.: Modern Compiler Implementation in C. Cambridge University Press, Cambridge (2004)"},{"issue":"3","key":"216_CR3","doi-asserted-by":"publisher","first-page":"575","DOI":"10.1016\/j.compchemeng.2008.08.006","volume":"33","author":"LT Biegler","year":"2009","unstructured":"Biegler, L.T., Zavala, V.M.: Large-scale nonlinear programming using IPOPT: an integrating framework for enterprise-wide dynamic optimization. Comput. Chem. Eng. 33(3), 575\u2013582 (2009)","journal-title":"Comput. Chem. Eng."},{"key":"216_CR4","doi-asserted-by":"publisher","first-page":"143","DOI":"10.1016\/j.automatica.2016.11.041","volume":"77","author":"DA Copp","year":"2017","unstructured":"Copp, D.A., Hespanha, J.P.: Simultaneous nonlinear model predictive control and state estimation. Automatica 77, 143\u2013154 (2017)","journal-title":"Automatica"},{"key":"216_CR5","unstructured":"Davis, T.: SuiteSparse: a suite of sparse matrix software. http:\/\/faculty.cse.tamu.edu\/davis\/suitesparse.html. Accessed 2 Feb 2022"},{"issue":"2","key":"216_CR6","doi-asserted-by":"publisher","first-page":"196","DOI":"10.1145\/992200.992206","volume":"30","author":"TA Davis","year":"2004","unstructured":"Davis, T.A.: Algorithm 832: UMFPACK v4.3\u2014an unsymmetric-pattern multifrontal method. ACM Trans. Math. Softw. 30(2), 196\u2013199 (2004)","journal-title":"ACM Trans. Math. Softw."},{"issue":"3","key":"216_CR7","doi-asserted-by":"publisher","first-page":"377","DOI":"10.1145\/1024074.1024080","volume":"30","author":"TA Davis","year":"2004","unstructured":"Davis, T.A., Gilbert, J.R., Larimore, S.I., Ng, E.G.: Algorithm 836: COLAMD, a column approximate minimum degree ordering algorithm. ACM Trans. Math. Softw. 30(3), 377\u2013380 (2004)","journal-title":"ACM Trans. Math. Softw."},{"issue":"3","key":"216_CR8","doi-asserted-by":"publisher","first-page":"353","DOI":"10.1145\/1024074.1024079","volume":"30","author":"TA Davis","year":"2004","unstructured":"Davis, T.A., Gilbert, J.R., Larimore, S.I., Ng, E.G.: A column approximate minimum degree ordering algorithm. ACM Trans. Math. Softw. 30(3), 353\u2013376 (2004)","journal-title":"ACM Trans. Math. Softw."},{"key":"216_CR9","unstructured":"Farquhar, J.: tprod: arbitrary tensor product between $$n$$-d arrays. MathWorks File Exchange (2007)"},{"issue":"2","key":"216_CR10","doi-asserted-by":"publisher","first-page":"209","DOI":"10.1287\/ijoc.1080.0286","volume":"21","author":"AH Gebremedhin","year":"2009","unstructured":"Gebremedhin, A.H., Tarafdar, A., Pothen, A., Walther, A.: Efficient computation of sparse Hessians using coloring and automatic differentiation. INFORMS J. Comput. 21(2), 209\u2013223 (2009)","journal-title":"INFORMS J. Comput."},{"issue":"1","key":"216_CR11","doi-asserted-by":"publisher","first-page":"35","DOI":"10.1137\/S0895479893252623","volume":"17","author":"PE Gill","year":"1996","unstructured":"Gill, P.E., Saunders, M.A., Shinnerl, J.R.: On the stability of Cholesky factorization for symmetric quasidefinite systems. SIAM J. Matrix Anal. Appl. 17(1), 35\u201346 (1996)","journal-title":"SIAM J. Matrix Anal. Appl."},{"key":"216_CR12","volume-title":"Matrix Computations. Johns Hopkins Series in Mathematical Sciences","author":"GH Golub","year":"1990","unstructured":"Golub, G.H., Loan, C.F.V.: Matrix Computations. Johns Hopkins Series in Mathematical Sciences, 2nd edn. The Johns Hopkins University Press, Baltimore (1990)","edition":"2"},{"issue":"2","key":"216_CR13","doi-asserted-by":"publisher","first-page":"251","DOI":"10.1080\/10556788.2011.580098","volume":"27","author":"RM Gower","year":"2012","unstructured":"Gower, R.M., Mello, M.P.: A new framework for the computation of Hessians. Optim. Methods Softw. 27(2), 251\u2013273 (2012)","journal-title":"Optim. Methods Softw."},{"key":"216_CR14","series-title":"Lecture Notes in Control and Information Sciences","doi-asserted-by":"publisher","first-page":"95","DOI":"10.1007\/978-1-84800-155-8_7","volume-title":"Recent Advances in Learning and Control","author":"M Grant","year":"2008","unstructured":"Grant, M., Boyd, S.: Graph implementations for nonsmooth convex programs. In: Blondel, V., Boyd, S., Kimura, H. (eds.) Recent Advances in Learning and Control. Lecture Notes in Control and Information Sciences, vol. 371, pp. 95\u2013110. Springer, Berlin (2008)"},{"key":"216_CR15","volume-title":"CVX: Matlab Software for Disciplined Convex Programming","author":"M Grant","year":"2008","unstructured":"Grant, M., Boyd, S., Ye, Y.: CVX: Matlab Software for Disciplined Convex Programming. Stanford University, Palo Alto (2008)"},{"key":"216_CR16","unstructured":"Gurobi Optimization: Gurobi optimizer reference manual (2D017). http:\/\/www.gurobi.com. Accessed 2 Feb 2022"},{"key":"216_CR17","unstructured":"Gwinner, F.: Transitive reduction of a DAG. Mathworks\u00ae File Exchange (2011)"},{"key":"216_CR18","unstructured":"Lofberg, J.: YALMIP: a toolbox for modeling and optimization in MATLAB. In: 2004 IEEE International Symposium on Computer Aided Control Systems Design, pp. 284\u2013289. IEEE (2004)"},{"key":"216_CR19","doi-asserted-by":"publisher","first-page":"1","DOI":"10.1007\/s11081-011-9176-9","volume":"13","author":"J Mattingley","year":"2012","unstructured":"Mattingley, J., Boyd, S.: CVXGEN: a code generator for embedded convex optimization. Optim. Eng. 13, 1\u201327 (2012)","journal-title":"Optim. Eng."},{"issue":"2","key":"216_CR20","doi-asserted-by":"publisher","first-page":"70","DOI":"10.1287\/ijoc.1.2.70","volume":"1","author":"KA McShane","year":"1989","unstructured":"McShane, K.A., Monma, C.L., Rutcor, D.S.: An implementation of a primal-dual interior point method for linear programming. ORSA J. Comput. 1(2), 70 (1989)","journal-title":"ORSA J. Comput."},{"issue":"4","key":"216_CR21","doi-asserted-by":"publisher","first-page":"575","DOI":"10.1137\/0802028","volume":"2","author":"S Mehrotra","year":"1992","unstructured":"Mehrotra, S.: On the implementation of a primal-dual interior point method. SIAM J. Optim. 2(4), 575\u2013601 (1992)","journal-title":"SIAM J. Optim."},{"issue":"1","key":"216_CR22","doi-asserted-by":"publisher","first-page":"1","DOI":"10.1287\/moor.22.1.1","volume":"22","author":"YE Nesterov","year":"1997","unstructured":"Nesterov, Y.E., Todd, M.J.: Self-scaled barriers and interior-point methods for convex programming. Math. Oper. Res. 22(1), 1\u201342 (1997)","journal-title":"Math. Oper. Res."},{"issue":"2","key":"216_CR23","doi-asserted-by":"publisher","first-page":"324","DOI":"10.1137\/S1052623495290209","volume":"8","author":"YE Nesterov","year":"1998","unstructured":"Nesterov, Y.E., Todd, M.J.: Primal-dual interior-point methods for self-scaled cones. SIAM J. Optim. 8(2), 324\u2013364 (1998)","journal-title":"SIAM J. Optim."},{"issue":"4\u20136","key":"216_CR24","doi-asserted-by":"publisher","first-page":"1010","DOI":"10.1080\/10556788.2018.1480625","volume":"33","author":"CG Petra","year":"2018","unstructured":"Petra, C.G., Qiang, F., Lubin, M., Huchette, J.: On efficient hessian computation using the edge pushing algorithm in Julia. Optim. Methods Softw. 33(4\u20136), 1010\u20131029 (2018)","journal-title":"Optim. Methods Softw."},{"issue":"1\u20134","key":"216_CR25","doi-asserted-by":"publisher","first-page":"625","DOI":"10.1080\/10556789908805766","volume":"11","author":"JF Sturm","year":"1999","unstructured":"Sturm, J.F.: Using SeDuMi 1.02, a MATLAb toolbox for optimization over symmetric cones. Optim. Methods Softw. 11(1\u20134), 625\u2013653 (1999)","journal-title":"Optim. Methods Softw."},{"key":"216_CR26","doi-asserted-by":"publisher","first-page":"189","DOI":"10.1007\/s10107-002-0347-5","volume":"95","author":"RH T\u00fct\u00fcnc\u00fc","year":"2003","unstructured":"T\u00fct\u00fcnc\u00fc, R.H., Toh, K.C., Todd, M.J.: Solving semidefinite-quadratic-linear programs using SDPT3. Math. Program. 95, 189\u2013217 (2003)","journal-title":"Math. Program."},{"key":"216_CR27","unstructured":"Vandenberghe, L.: The CVXOPT linear and quadratic cone program solvers. Technical report, University California, Los Angeles (2010). http:\/\/cvxopt.org\/documentation. Accessed 2 Feb 2022"},{"issue":"1","key":"216_CR28","doi-asserted-by":"publisher","first-page":"100","DOI":"10.1137\/0805005","volume":"5","author":"RJ Vanderbei","year":"1995","unstructured":"Vanderbei, R.J.: Symmetric quasidefinite matrices. SIAM J. Optim. 5(1), 100\u2013113 (1995)","journal-title":"SIAM J. Optim."},{"issue":"3","key":"216_CR29","doi-asserted-by":"publisher","first-page":"563","DOI":"10.1080\/10556788.2017.1335312","volume":"33","author":"S Vigerske","year":"2018","unstructured":"Vigerske, S., Gleixner, A.: SCIP: global optimization of mixed-integer nonlinear programs in a branch-and-cut framework. Optim. Methods Softw. 33(3), 563\u2013593 (2018)","journal-title":"Optim. Methods Softw."},{"issue":"1","key":"216_CR30","doi-asserted-by":"publisher","first-page":"25","DOI":"10.1007\/s10107-004-0559-y","volume":"106","author":"A W\u00e4chter","year":"2006","unstructured":"W\u00e4chter, A., Biegler, L.T.: On the implementation of an interior-point filter line-search algorithm for large-scale nonlinear programming. Math. Program. 106(1), 25\u201357 (2006)","journal-title":"Math. Program."}],"container-title":["Mathematical Programming Computation"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/link.springer.com\/content\/pdf\/10.1007\/s12532-022-00216-2.pdf","content-type":"application\/pdf","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/link.springer.com\/article\/10.1007\/s12532-022-00216-2\/fulltext.html","content-type":"text\/html","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/link.springer.com\/content\/pdf\/10.1007\/s12532-022-00216-2.pdf","content-type":"application\/pdf","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2022,8,16]],"date-time":"2022-08-16T17:49:16Z","timestamp":1660672156000},"score":1,"resource":{"primary":{"URL":"https:\/\/link.springer.com\/10.1007\/s12532-022-00216-2"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2022,2,8]]},"references-count":30,"journal-issue":{"issue":"3","published-print":{"date-parts":[[2022,9]]}},"alternative-id":["216"],"URL":"https:\/\/doi.org\/10.1007\/s12532-022-00216-2","relation":{},"ISSN":["1867-2949","1867-2957"],"issn-type":[{"type":"print","value":"1867-2949"},{"type":"electronic","value":"1867-2957"}],"subject":[],"published":{"date-parts":[[2022,2,8]]},"assertion":[{"value":"23 April 2020","order":1,"name":"received","label":"Received","group":{"name":"ArticleHistory","label":"Article History"}},{"value":"24 December 2021","order":2,"name":"accepted","label":"Accepted","group":{"name":"ArticleHistory","label":"Article History"}},{"value":"8 February 2022","order":3,"name":"first_online","label":"First Online","group":{"name":"ArticleHistory","label":"Article History"}},{"order":1,"name":"Ethics","group":{"name":"EthicsHeading","label":"Declarations"}},{"value":"The author declares no conflict of interests nor competing interests.","order":2,"name":"Ethics","group":{"name":"EthicsHeading","label":"Conflict of interest"}},{"value":"All code is available at  under the GNU General Public License v3.0 and the documentation is available at .","order":3,"name":"Ethics","group":{"name":"EthicsHeading","label":"Code availability"}}]}}