{"id":1195,"date":"2022-04-04T14:41:41","date_gmt":"2022-04-04T05:41:41","guid":{"rendered":"http:\/\/targa.iptime.org\/?p=1195"},"modified":"2024-04-25T07:42:20","modified_gmt":"2024-04-24T22:42:20","slug":"system-of-linear-equations-solver-library","status":"publish","type":"post","link":"http:\/\/targa.iptime.org\/?p=1195","title":{"rendered":"Solving System of Linear Equations in Microsoft EXCEL with Various Open Source Libraries"},"content":{"rendered":"\n<div class=\"wp-block-jetpack-markdown\"><p>General purpose open source numerical analysis libraries for solving system of linear equations are used to interface with more specified numerical analysis procedures such as Finite Element Analysis.<br>\nThey are built as dynamic link libraries and iterfaced with VBA, so that they can be easily used as EXCEL&#8217;s worksheet functions.<\/p>\n<p><strong>Open Source Libraries Used and their dlls<\/strong><\/p>\n<ol>\n<li><a href=\"https:\/\/eigen.tuxfamily.org\/index.php?title=Main_Page\">EIGEN<\/a><br>\neigen.dll<\/li>\n<li><a href=\"https:\/\/www.alglib.net\">ALGLIB<\/a><br>\nalglib.dll<\/li>\n<li><a href=\"http:\/\/www.netlib.org\/lapack\/\">LAPACK<\/a> with <a href=\"https:\/\/www.openblas.net\/\">OpenBLAS<\/a><br>\nlapack_and_openblas.dll<\/li>\n<li>Reference algorithm implementations<br>\ntarga.dll<br>\ntriangular_solver.dll<\/li>\n<li>Additional libraries related to <a href=\"https:\/\/www.msys2.org\/\">MSYS2<\/a><br>\nlibwinpthread-1.dll<br>\nlibgcc_s_seh-1.dll<br>\nlibgfortran-5.dll<br>\nlibquadmath-0.dll<br>\nlapack and openblas dlls are built under MSYS2 and depend on these additional libraries<\/li>\n<\/ol>\n<p><strong>Installation<\/strong><\/p>\n<ol>\n<li>Copy library files to your specific folder (e.g. C:\\NumericalAnalysisLibrary).<\/li>\n<li>Add that folder to PATH environment variable of Windows.<\/li>\n<\/ol>\n<p><strong>Testing in Microsoft EXCEL<\/strong><\/p>\n<ol>\n<li>Open NumericalAnalysisLibrary.xlam<br>\nOptionally, if this file is registered as an EXCEL ADD-IN, it is not necessary to open this file every time you use this library.<\/li>\n<li>Open test_NumericalAnalysisLibrary.xlsm<\/li>\n<li>In test_NumericalAnalysisLibrary.xlsm, input equation (variable) numbers in D4 cell and right hand side vector numbers in D5 cell and select solver to test in D6 cell.\nAvailable solvers are listed in range M5:M39<\/li>\n<\/ol>\n<\/div>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"445\" src=\"http:\/\/targa.iptime.org\/wp-content\/uploads\/2022\/04\/1-1024x445.png\" alt=\"\" class=\"wp-image-1255\" srcset=\"http:\/\/targa.iptime.org\/wp-content\/uploads\/2022\/04\/1-1024x445.png 1024w, http:\/\/targa.iptime.org\/wp-content\/uploads\/2022\/04\/1-300x130.png 300w, http:\/\/targa.iptime.org\/wp-content\/uploads\/2022\/04\/1-768x334.png 768w, http:\/\/targa.iptime.org\/wp-content\/uploads\/2022\/04\/1-624x271.png 624w, http:\/\/targa.iptime.org\/wp-content\/uploads\/2022\/04\/1.png 1203w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><p><strong>Sample Test Result<\/strong><\/p>\n<p>If equations and rhs columns are set to 5 and 3 and EIGEN&#8217;s PartialPivLU_decompose is selected as an solver, then the intermediate process and results will be output as follows. At the end of the result worksheet, residual value of solution is also output as an verification of the solver.\nYou can also refer to named ranges defined in output worksheet.<\/p>\n<\/div>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"855\" src=\"http:\/\/targa.iptime.org\/wp-content\/uploads\/2022\/04\/1-1-1024x855.png\" alt=\"\" class=\"wp-image-1271\" srcset=\"http:\/\/targa.iptime.org\/wp-content\/uploads\/2022\/04\/1-1-1024x855.png 1024w, http:\/\/targa.iptime.org\/wp-content\/uploads\/2022\/04\/1-1-300x251.png 300w, http:\/\/targa.iptime.org\/wp-content\/uploads\/2022\/04\/1-1-768x642.png 768w, http:\/\/targa.iptime.org\/wp-content\/uploads\/2022\/04\/1-1-624x521.png 624w, http:\/\/targa.iptime.org\/wp-content\/uploads\/2022\/04\/1-1.png 1203w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><p><strong>Download<\/strong><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-file\"><a id=\"wp-block-file--media-f3e48eb8-5cc8-44d2-855b-6e1e7376dd96\" href=\"http:\/\/targa.iptime.org\/wp-content\/uploads\/2022\/04\/NumericalAnalysisLibrary.7z\">NumericalAnalysisLibrary<\/a><a href=\"http:\/\/targa.iptime.org\/wp-content\/uploads\/2022\/04\/NumericalAnalysisLibrary.7z\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-f3e48eb8-5cc8-44d2-855b-6e1e7376dd96\">Download<\/a><\/div>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><p><strong>Support or Contact<\/strong><\/p>\n<p>Having any question using this library, please leave a reply to this post or contact me by <a href=\"mailto:jangwj7@gmail.com\">jangwj7@gmail.com<\/a>.<\/p>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":true,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3,5,7,10],"tags":[13,15,17,20],"class_list":["post-1195","post","type-post","status-publish","format-standard","hentry","category-c","category-excel","category-numerical-analysis","category-vba","tag-c","tag-excel","tag-numerical-analysis","tag-vba"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/targa.iptime.org\/index.php?rest_route=\/wp\/v2\/posts\/1195","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/targa.iptime.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/targa.iptime.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/targa.iptime.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/targa.iptime.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1195"}],"version-history":[{"count":112,"href":"http:\/\/targa.iptime.org\/index.php?rest_route=\/wp\/v2\/posts\/1195\/revisions"}],"predecessor-version":[{"id":1464,"href":"http:\/\/targa.iptime.org\/index.php?rest_route=\/wp\/v2\/posts\/1195\/revisions\/1464"}],"wp:attachment":[{"href":"http:\/\/targa.iptime.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1195"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/targa.iptime.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1195"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/targa.iptime.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1195"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}