Skip to content
Snippets Groups Projects
Select Git revision
  • d37e7c07e5e92c396e7d5817f211b49a364c11a1
  • main default protected
2 results

jastadd

MOO4Modelica

A Multi-objective Optimization framework and workflow for Modelica.

GitHub Page: https://wangzizhe.github.io/MOO4Modelica

framework

Motivation: The paper "A Multi-objective Optimization Algorithm and Process for Modelica Model" stated two challenges:

  1. the functions for multi-objective optimization are limited in Modelica,
  2. MOO is slow.

I want to design a general framework to solve these two challenges by

  1. coupling Python's MOO frameworks to Modelica using OMPython,

  2. Speed up MOO by enabling parallel computing and adaptive instance selection.

Framework

Highlights:

  1. Easy to configure: All settings and configurations can be defined in config.json.
  2. SoTA algorithms for MOO: Dynamic import of algorithms from pymoo.
  3. Enable use of parallel computing: For accelerated process.
  4. Enable use of adaptive instance selection: Automated search space reduction.
  5. Support transformation into feature models: To better analyze and understand large-scale models.
  6. Comprehensive debugging system: Debugging functions for all critical steps.

Structure:

./src/ 
(Feature Model Transformation)
	|-- modelica.g4
	|-- parse_modelica.py
	|-- feature_model.py
(Optimization Operation)
	|-- config.json
	|-- config.py
	|-- optimize_main.py 
	|-- parallel_computing.py
	|-- adaptive_instance_selection.py 
	|-- optimization_libraries.py 
	|-- evaluate.py
  • (Feature Model Transformation)
    • modelica.g4: an ANTLR4 grammar for Modelica files
    • parse_modelica.py: parse a Modelica model to extract it components and their parameters
    • feature_model.py: create a feature model and add the extracted components
  • (Optimization Operation)
    • config.json & config.py: global settings and configurations
    • optimize_main.py: main optimization script
    • parallel_computing.py: parallel computing
    • adaptive_instance_selection.py: automated search space reduction
    • optimization_libraries.py: dynamic import of algorithms from pymoo
    • evaluate.py: performance evaluation (time efficiency, optimization accuracy, additional statistical analysis)

Usage

https://wangzizhe.github.io/MOO4Modelica/docs/Usage.html

Example

https://wangzizhe.github.io/MOO4Modelica/docs/Example.html)

Background

1. A Multi-objective Optimization Algorithm and Process for Modelica Model

Zhang, Congcong, et al. "A Multi-objective Optimization Algorithm and Process for Modelica Model." 2022 4th International Conference on Artificial Intelligence and Advanced Manufacturing (AIAM). IEEE, 2022.

Problem: In the current commercial software based on Modelica model, there are few functions for multi-objective optimization, and the current multi-objective optimization algorithm has the problems of insufficient approximation of the optimal solution set and uneven distribution of the solution set.

Objective: To solve this problem, Combined with the characteristics of Modelica model and NSGA-II algorithm, this paper proposes a multi-objective optimization algorithm and process for Modelica model.

Solution: This paper provides a multi-objective optimization design process for the current modeling and simulation platform. The process analyzes the model variables according to ANTLR4 and transforms the tree structure.

Future Work: MOO takes huge computing resources, so it is slow, the future work would be to implement parallel computing to solve this problem.

Overall Process

Zizhe's thoughts:

  • This paper only provides the idea of the overall process, I can't find it anywhere or reproduce it. Also, the ANTLR method seems complicated.
  • The future work part in this paper is interesting for me and the authors are not doing it. So I could think about implementing parallel computing.

2. DESA - Optimization of variable structure Modelica models using custom annotations

Bender, Daniel. "DESA: Optimization of variable structure modelica models using custom annotations." Proceedings of the 7th International Workshop on Equation-Based Object-Oriented Modeling Languages and Tools. 2016.

Contribution: The library DESA uses custom annotations to implement the optimization task to the model. Further, the model is exported including this meta-information. The DESA optimization tool then allows to set of the optimization task in a Matlab environment and operates the optimization run. In this way, the optimization of variable structure models is achieved.

DESA workflow

Zizhe's thoughts:

  • This only works in Dymola...