Loading…

Using CasADi for Optimization and Symbolic Linearization/Extraction of Causality Graphs of Modelica Models via JModelica.Org

The Modelica language has become a handy modeling tool for multi-domain complex physical systems. Its object-oriented and equation-based approach eases the modeling process to a great extent. Dynamic models which are scripted according to the Modelica standards demand a simulation environment. There...

Full description

Saved in:
Bibliographic Details
Main Author: Perera, M. Anushka S
Format: Report
Language:English
Subjects:
Online Access:Request full text
Tags: Add Tag
No Tags, Be the first to tag this record!
cited_by
cites
container_end_page
container_issue
container_start_page
container_title
container_volume
creator Perera, M. Anushka S
description The Modelica language has become a handy modeling tool for multi-domain complex physical systems. Its object-oriented and equation-based approach eases the modeling process to a great extent. Dynamic models which are scripted according to the Modelica standards demand a simulation environment. There are many simulation tools such as OpenModelica, Dymola, JModelica.org, OPTIMICA Studio, etc. OpenModelica and JModelica are two examples of free Modelica-based simulation environments. Dynamic Optimization is also an important aspect in control engineering. JModelica.org, among others, provides support of Dynamic Optimization and it is free. Apart from being freeware, there are many other attractive features in it. Python, which is again free, is the scripting language used in the JModelica.org platform and it is possible to integrate various Python libraries on demand so as to get required functionalities that we seek. Often used Python libraries are Numpy, Scipy, MatPlotLib, etc. The JModelica.org installer installs those necessary packages automatically. More interestingly, JModelica interfaces to CasADi which is a symbolic framework for Automatic Differentiation and Nonlinear Optimization. The JModelica.org-CasADi interface is at our main interest in this report due to two main reasons: (1) it is possible to translate Modelica/Optimica models into a symbolic representation via the JModelica.org-CasADi interface and use the power of CasADi to find Jacobian matrices both symbolically and numerically - this can be used to linearize dynamic models and in particular symbolic Linearization is possible to use in analyzing structural properties of dynamic systems, and (2) CasADi is already interfaced with state of the art nonlinear optimizers (e.g. IPOPT.), integrators (e.g. SUNDIALS.), etc. and consequently, JModelica.org freely inherit those well-known integrators/nonlinear solvers so that we can use them in Python. The report treats three main tasks: (1) interfacing nonlinear optimizers and integrators | like IPOPT, CVODES, etc. - into Python, (2) linearization of Modelica models at a given operating point, and (3) extracting causality of Modelica models. All these objectives are achieved via JModelica.org within its limitations. Most of the content of this report depends on the JModelica.org-CasADi interface. Therefore a good understanding of CasADi is a prerequisite. Chapter 2 gives an introduction to basic symbolic manipulation in CasADi with several examples
format report
fullrecord <record><control><sourceid>cristin_3HK</sourceid><recordid>TN_cdi_cristin_nora_11250_2439151</recordid><sourceformat>XML</sourceformat><sourcesystem>PC</sourcesystem><sourcerecordid>11250_2439151</sourcerecordid><originalsourceid>FETCH-cristin_nora_11250_24391513</originalsourceid><addsrcrecordid>eNqNjM0OwUAUhbuxELzD9QB-ptWFpVQRIV1gPbn65ybtTDN3iIqHV9Te6pyc853TdZ4nJpVDgLxYEmTaQFRZKumBlrQCVAkc6vKsC4phRypF01aT8G4Nxh9KZ83BlbEgW8PaYHXhd7bXSdrs8GsYboSw_YXjyOR9p5Nhwemg1Z4zXIXHYDOKDbElJZU2KIVw_al0Z95c-ML7h3kBbshGdg</addsrcrecordid><sourcetype>Open Access Repository</sourcetype><iscdi>true</iscdi><recordtype>report</recordtype></control><display><type>report</type><title>Using CasADi for Optimization and Symbolic Linearization/Extraction of Causality Graphs of Modelica Models via JModelica.Org</title><source>NORA - Norwegian Open Research Archives</source><creator>Perera, M. Anushka S</creator><creatorcontrib>Perera, M. Anushka S</creatorcontrib><description>The Modelica language has become a handy modeling tool for multi-domain complex physical systems. Its object-oriented and equation-based approach eases the modeling process to a great extent. Dynamic models which are scripted according to the Modelica standards demand a simulation environment. There are many simulation tools such as OpenModelica, Dymola, JModelica.org, OPTIMICA Studio, etc. OpenModelica and JModelica are two examples of free Modelica-based simulation environments. Dynamic Optimization is also an important aspect in control engineering. JModelica.org, among others, provides support of Dynamic Optimization and it is free. Apart from being freeware, there are many other attractive features in it. Python, which is again free, is the scripting language used in the JModelica.org platform and it is possible to integrate various Python libraries on demand so as to get required functionalities that we seek. Often used Python libraries are Numpy, Scipy, MatPlotLib, etc. The JModelica.org installer installs those necessary packages automatically. More interestingly, JModelica interfaces to CasADi which is a symbolic framework for Automatic Differentiation and Nonlinear Optimization. The JModelica.org-CasADi interface is at our main interest in this report due to two main reasons: (1) it is possible to translate Modelica/Optimica models into a symbolic representation via the JModelica.org-CasADi interface and use the power of CasADi to find Jacobian matrices both symbolically and numerically - this can be used to linearize dynamic models and in particular symbolic Linearization is possible to use in analyzing structural properties of dynamic systems, and (2) CasADi is already interfaced with state of the art nonlinear optimizers (e.g. IPOPT.), integrators (e.g. SUNDIALS.), etc. and consequently, JModelica.org freely inherit those well-known integrators/nonlinear solvers so that we can use them in Python. The report treats three main tasks: (1) interfacing nonlinear optimizers and integrators | like IPOPT, CVODES, etc. - into Python, (2) linearization of Modelica models at a given operating point, and (3) extracting causality of Modelica models. All these objectives are achieved via JModelica.org within its limitations. Most of the content of this report depends on the JModelica.org-CasADi interface. Therefore a good understanding of CasADi is a prerequisite. Chapter 2 gives an introduction to basic symbolic manipulation in CasADi with several examples. Here defining and usage of symbolic expressions and functions are explained. A discussion on how to use built-in optimizers and integrators available in CasADi is given in Chapter 3. Chapters 2 and 3 cover tasks (1) and (2). Several modifications are made in the Python script casadi_interface.py (which is available in the JModelica.org installation directory.) to linearize Modelica models both symbolically and numerically as well as to do structural observability analysis, system decompositions, etc. This is given Chapter in 4. It is assumed that JModelica.org has been installed.</description><language>eng</language><publisher>Telemark University College</publisher><subject>Modelica ; modeling ; simulation</subject><creationdate>2014</creationdate><rights>info:eu-repo/semantics/openAccess</rights><oa>free_for_read</oa><woscitedreferencessubscribed>false</woscitedreferencessubscribed></display><links><openurl>$$Topenurl_article</openurl><openurlfulltext>$$Topenurlfull_article</openurlfulltext><thumbnail>$$Tsyndetics_thumb_exl</thumbnail><link.rule.ids>230,780,885,4490,26567</link.rule.ids><linktorsrc>$$Uhttp://hdl.handle.net/11250/2439151$$EView_record_in_NORA$$FView_record_in_$$GNORA$$Hfree_for_read</linktorsrc></links><search><creatorcontrib>Perera, M. Anushka S</creatorcontrib><title>Using CasADi for Optimization and Symbolic Linearization/Extraction of Causality Graphs of Modelica Models via JModelica.Org</title><description>The Modelica language has become a handy modeling tool for multi-domain complex physical systems. Its object-oriented and equation-based approach eases the modeling process to a great extent. Dynamic models which are scripted according to the Modelica standards demand a simulation environment. There are many simulation tools such as OpenModelica, Dymola, JModelica.org, OPTIMICA Studio, etc. OpenModelica and JModelica are two examples of free Modelica-based simulation environments. Dynamic Optimization is also an important aspect in control engineering. JModelica.org, among others, provides support of Dynamic Optimization and it is free. Apart from being freeware, there are many other attractive features in it. Python, which is again free, is the scripting language used in the JModelica.org platform and it is possible to integrate various Python libraries on demand so as to get required functionalities that we seek. Often used Python libraries are Numpy, Scipy, MatPlotLib, etc. The JModelica.org installer installs those necessary packages automatically. More interestingly, JModelica interfaces to CasADi which is a symbolic framework for Automatic Differentiation and Nonlinear Optimization. The JModelica.org-CasADi interface is at our main interest in this report due to two main reasons: (1) it is possible to translate Modelica/Optimica models into a symbolic representation via the JModelica.org-CasADi interface and use the power of CasADi to find Jacobian matrices both symbolically and numerically - this can be used to linearize dynamic models and in particular symbolic Linearization is possible to use in analyzing structural properties of dynamic systems, and (2) CasADi is already interfaced with state of the art nonlinear optimizers (e.g. IPOPT.), integrators (e.g. SUNDIALS.), etc. and consequently, JModelica.org freely inherit those well-known integrators/nonlinear solvers so that we can use them in Python. The report treats three main tasks: (1) interfacing nonlinear optimizers and integrators | like IPOPT, CVODES, etc. - into Python, (2) linearization of Modelica models at a given operating point, and (3) extracting causality of Modelica models. All these objectives are achieved via JModelica.org within its limitations. Most of the content of this report depends on the JModelica.org-CasADi interface. Therefore a good understanding of CasADi is a prerequisite. Chapter 2 gives an introduction to basic symbolic manipulation in CasADi with several examples. Here defining and usage of symbolic expressions and functions are explained. A discussion on how to use built-in optimizers and integrators available in CasADi is given in Chapter 3. Chapters 2 and 3 cover tasks (1) and (2). Several modifications are made in the Python script casadi_interface.py (which is available in the JModelica.org installation directory.) to linearize Modelica models both symbolically and numerically as well as to do structural observability analysis, system decompositions, etc. This is given Chapter in 4. It is assumed that JModelica.org has been installed.</description><subject>Modelica</subject><subject>modeling</subject><subject>simulation</subject><fulltext>true</fulltext><rsrctype>report</rsrctype><creationdate>2014</creationdate><recordtype>report</recordtype><sourceid>3HK</sourceid><recordid>eNqNjM0OwUAUhbuxELzD9QB-ptWFpVQRIV1gPbn65ybtTDN3iIqHV9Te6pyc853TdZ4nJpVDgLxYEmTaQFRZKumBlrQCVAkc6vKsC4phRypF01aT8G4Nxh9KZ83BlbEgW8PaYHXhd7bXSdrs8GsYboSw_YXjyOR9p5Nhwemg1Z4zXIXHYDOKDbElJZU2KIVw_al0Z95c-ML7h3kBbshGdg</recordid><startdate>2014</startdate><enddate>2014</enddate><creator>Perera, M. Anushka S</creator><general>Telemark University College</general><scope>3HK</scope></search><sort><creationdate>2014</creationdate><title>Using CasADi for Optimization and Symbolic Linearization/Extraction of Causality Graphs of Modelica Models via JModelica.Org</title><author>Perera, M. Anushka S</author></sort><facets><frbrtype>5</frbrtype><frbrgroupid>cdi_FETCH-cristin_nora_11250_24391513</frbrgroupid><rsrctype>reports</rsrctype><prefilter>reports</prefilter><language>eng</language><creationdate>2014</creationdate><topic>Modelica</topic><topic>modeling</topic><topic>simulation</topic><toplevel>online_resources</toplevel><creatorcontrib>Perera, M. Anushka S</creatorcontrib><collection>NORA - Norwegian Open Research Archives</collection></facets><delivery><delcategory>Remote Search Resource</delcategory><fulltext>fulltext_linktorsrc</fulltext></delivery><addata><au>Perera, M. Anushka S</au><format>book</format><genre>unknown</genre><ristype>RPRT</ristype><btitle>Using CasADi for Optimization and Symbolic Linearization/Extraction of Causality Graphs of Modelica Models via JModelica.Org</btitle><date>2014</date><risdate>2014</risdate><abstract>The Modelica language has become a handy modeling tool for multi-domain complex physical systems. Its object-oriented and equation-based approach eases the modeling process to a great extent. Dynamic models which are scripted according to the Modelica standards demand a simulation environment. There are many simulation tools such as OpenModelica, Dymola, JModelica.org, OPTIMICA Studio, etc. OpenModelica and JModelica are two examples of free Modelica-based simulation environments. Dynamic Optimization is also an important aspect in control engineering. JModelica.org, among others, provides support of Dynamic Optimization and it is free. Apart from being freeware, there are many other attractive features in it. Python, which is again free, is the scripting language used in the JModelica.org platform and it is possible to integrate various Python libraries on demand so as to get required functionalities that we seek. Often used Python libraries are Numpy, Scipy, MatPlotLib, etc. The JModelica.org installer installs those necessary packages automatically. More interestingly, JModelica interfaces to CasADi which is a symbolic framework for Automatic Differentiation and Nonlinear Optimization. The JModelica.org-CasADi interface is at our main interest in this report due to two main reasons: (1) it is possible to translate Modelica/Optimica models into a symbolic representation via the JModelica.org-CasADi interface and use the power of CasADi to find Jacobian matrices both symbolically and numerically - this can be used to linearize dynamic models and in particular symbolic Linearization is possible to use in analyzing structural properties of dynamic systems, and (2) CasADi is already interfaced with state of the art nonlinear optimizers (e.g. IPOPT.), integrators (e.g. SUNDIALS.), etc. and consequently, JModelica.org freely inherit those well-known integrators/nonlinear solvers so that we can use them in Python. The report treats three main tasks: (1) interfacing nonlinear optimizers and integrators | like IPOPT, CVODES, etc. - into Python, (2) linearization of Modelica models at a given operating point, and (3) extracting causality of Modelica models. All these objectives are achieved via JModelica.org within its limitations. Most of the content of this report depends on the JModelica.org-CasADi interface. Therefore a good understanding of CasADi is a prerequisite. Chapter 2 gives an introduction to basic symbolic manipulation in CasADi with several examples. Here defining and usage of symbolic expressions and functions are explained. A discussion on how to use built-in optimizers and integrators available in CasADi is given in Chapter 3. Chapters 2 and 3 cover tasks (1) and (2). Several modifications are made in the Python script casadi_interface.py (which is available in the JModelica.org installation directory.) to linearize Modelica models both symbolically and numerically as well as to do structural observability analysis, system decompositions, etc. This is given Chapter in 4. It is assumed that JModelica.org has been installed.</abstract><pub>Telemark University College</pub><oa>free_for_read</oa></addata></record>
fulltext fulltext_linktorsrc
identifier
ispartof
issn
language eng
recordid cdi_cristin_nora_11250_2439151
source NORA - Norwegian Open Research Archives
subjects Modelica
modeling
simulation
title Using CasADi for Optimization and Symbolic Linearization/Extraction of Causality Graphs of Modelica Models via JModelica.Org
url http://sfxeu10.hosted.exlibrisgroup.com/loughborough?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim=2025-01-06T00%3A19%3A37IST&url_ver=Z39.88-2004&url_ctx_fmt=infofi/fmt:kev:mtx:ctx&rfr_id=info:sid/primo.exlibrisgroup.com:primo3-Article-cristin_3HK&rft_val_fmt=info:ofi/fmt:kev:mtx:book&rft.genre=unknown&rft.btitle=Using%20CasADi%20for%20Optimization%20and%20Symbolic%20Linearization/Extraction%20of%20Causality%20Graphs%20of%20Modelica%20Models%20via%20JModelica.Org&rft.au=Perera,%20M.%20Anushka%20S&rft.date=2014&rft_id=info:doi/&rft_dat=%3Ccristin_3HK%3E11250_2439151%3C/cristin_3HK%3E%3Cgrp_id%3Ecdi_FETCH-cristin_nora_11250_24391513%3C/grp_id%3E%3Coa%3E%3C/oa%3E%3Curl%3E%3C/url%3E&rft_id=info:oai/&rft_id=info:pmid/&rfr_iscdi=true