modelica_libraries / README.md
neighborwang's picture
Update README.md
cf48fc6 verified
---
license: apache-2.0
task_categories:
- text2text-generation
language:
- en
size_categories:
- 1M<n<10M
---
# ModelicaDat_v1.0
Total entries: 3935
## Dataset Collection Pipeline
#### 1. Source Identification (Manual)
Identify and select open-source repositories containing models and libraries with clean code and well-written descriptions.
#### 2. Data Collection (Automated)
For each model in the selected repositories, extract the following information:
* Name
* Location
* Type
* Code
* Description
Store this information in a JSONL file.
#### 3. Data Cleaning (Manual & Automated)
Remove irrelevant descriptions and overly long code snippets through a combination of automated scripts and manual review. Specifically:
* Exclusions:
* Omit visualization resources, such as icons and visualization-specific components.
* Exclude human-oriented text descriptions (e.g., "UsersGuide").
* Skip test components like "ModelicaTest."
* Annotations Handling:
* Use documentation found within annotations as descriptions, if available.
* Remove annotations containing only visualization details.
#### 4. Pairing and Storage (Automated)
Convert the cleaned data into text (description) and code (model) pairs.
Save these pairs in a JSONL file format.
#### 5. Prompt Generation and Enhancement (Automated)
Utilize an LLM to optimize and transform each text description into a more structured prompt, such as: "Generate a model/package using the xxx library for [specific purpose]."
Update the text entries with these refined prompts in the JSONL file.
#### 6. Final Cleanup (Manual)
Conduct a final manual review to ensure all entries are accurate, relevant, and ready for fine-tuning.
## Error Handling
To improve the dataset's utility, common Modelica modeling errors and their solutions have been included. These entries help users identify and resolve typical issues, benefiting both beginners and experienced users.
The pipeline utilizes an LLM and an experienced Modelica user to generate and verify error-handling entries, ensuring that solutions are both practical and actionable.
## List of Considered Repos
The current focus is on energy systems modeling. Therefore, only a representative repositories in these fields have been selected.
| Repo | Version & Release Date | Description | Number of Entries |
| :----------------------------------------------------------: | :--------------------: | :----------------------------------------------------------: | :---------------------: |
| [Standard Library](https://github.com/modelica/ModelicaStandardLibrary) | v4.1.0 (2024-02-06) | Modelica Standard library | 1806 |
| [AixLib](https://github.com/modelica-3rdparty/AixLib) | v2.0.0 (2024-08-19) | Building performance simulations | 2029 |
| [PhotoVoltaics](https://github.com/modelica-3rdparty/PhotoVoltaics) | v2.0.0 (2021-07-19) | Simulation of photo voltaic cells and modules | 47 |
| [OMCompiler](https://github.com/OpenModelica/OMCompiler/tree/master/Examples) | - | Collection of basic examples | 6 |
| [Modelica University](https://mbe.modelica.university) | - | Classic examples | 27 |
| Error Handling | - | Prompt pairs for error handling | 20 |