opticif

Global optimization of CIF specifications in Python

https://github.com/jdelagedavies/opticif

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.3%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Global optimization of CIF specifications in Python

Basic Info
  • Host: GitHub
  • Owner: jdelagedavies
  • License: mit
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 339 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 13
Created almost 3 years ago · Last pushed over 1 year ago
Metadata Files
Readme License Citation

README.md

OptiCIF: Global optimization of CIF specifications in Python

OptiCIF is a Python package for performing global optimization on CIF specifications by reordering explicit plant automaton declarations according to a provided input sequence. Global optimization is formally defined in Reijnen (2020). It integrates in the synthesis-based engineering development process. This package was developed as part of a bachelor thesis at the Eindhoven University of Technology.

Modules:

  • csv_utils: Utility functions for working with CSV files. Used to handle input sequences from other tools, see Usage for more details.
  • validators: Functions for validating the structure and grouping of CSV files containing node sequences, and the structure of binary DSM matrices.
  • cif_transformer: Function for performing global optimization by reordering explicit plant automaton declarations. Automatons part of a feedback loop are grouped.

Installation

To use OptiCIF, clone the repository:

bash git clone https://github.com/jdelagedavies/opticif.git

The project is managed using Poetry. Ensure that you have Poetry installed and then install the dependencies:

bash cd opticif poetry install

Alternatively, install the dependencies manually. You can find the list of dependencies in the pyproject.toml file, under the [tool.poetry.dependencies] section.

Usage

OptiCIF can be used as a standalone tool for global optimization on CIF specifications. It also offers seamless integration with input sequences generated by the RaGraph package and the MATLAB sequencing script developed by de Jong (2019).

Here's a basic example of using OptiCIF to perform global optimization on a CIF specification:

```python from opticif import doglobaloptimization

Define input files

cifpath = "path/to/your/cif/specification.cif" # CIF file containing the plant model csvpath = "path/to/your/sequence.csv" # CSV file containing the node sequence

Perform global optimization

doglobaloptimization(csvpath, cifpath) ```

The input CSV file should have a "name" column header. If a "labels" column is present, nodes that have a label will be grouped accordingly in the output CIF file. Ensure that the CSV file's node names match those in your CIF specification.

For instance:

csv name,labels a, b, c,partition1 d,partition1 e, f,partition2

This tool neither supports instantiations nor groups in the CIF plant model, see CIF to CIF transformer for information on how to eliminate them as a preprocessing step.

Example CIF models and corresponding input files can be found in the repository's tests/models directory. For more advanced usage, see the test scripts provided in the repository.

For detailed information on the functions and their parameters, refer to the function documentation (docstrings) in the source code.

License

MIT

Owner

  • Name: Jules Delage-Davies
  • Login: jdelagedavies
  • Kind: user
  • Location: Eindhoven, Netherlands
  • Company: Eindhoven University of Technology

BSc Mechanical Engineering Student at the Eindhoven University of Technology

Citation (CITATION.cff)

cff-version: 1.2.0
title: OptiCIF
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: "Jules Roger Daniel"
    family-names: Delage-Davies
    email: j.r.d.delage.davies@student.tue.nl
    affiliation: Eindhoven University of Technology
repository-code: 'https://github.com/jdelagedavies/opticif'
abstract: Global optimization of CIF specifications in Python
license: MIT
commit: 9fc798b9f401b9ed8c3b5ef3e854f7018ce78e3b
version: 0.8.2
date-released: '2023-06-15'

GitHub Events

Total
  • Push event: 1
Last Year
  • Push event: 1