Repository navigation
Version 0.7.0: Multi-Objective Optimization, New Solvers, and Major Usability Upgrades
LatestVersion 0.7.0: Multi-Objective Optimization, New Solvers, and Major Usability Upgrades
This is a major feature release that transforms EPTHenOpt from a set of scripts into a professional, installable Python package with significantly expanded optimization capabilities. The focus of this release is on providing more powerful tools for real-world engineering analysis, including multi-objective optimization and a wider selection of algorithms.
✨ New Features
1. Multi-Objective Optimization with NSGA-II
The most significant new feature is the introduction of multi-objective optimization to find the optimal trade-off between economic cost and environmental impact.
- Dual Objectives: The package can now simultaneously optimize for Total Annualized Cost (TAC) and CO₂ Emissions.
- New Solver: This is powered by the industry-standard NSGA-II (Non-dominated Sorting Genetic Algorithm II).
- Pareto Front Export: When running in multi-objective mode, the entire Pareto front of non-dominated solutions is exported to
pareto_front_results.csv, perfect for plotting and analysis in Excel. - Usage: Activate this mode with the
--objective multicommand-line flag.
2. Expanded Suite of Optimization Algorithms
The package is no longer limited to GA and TLBO. Four powerful metaheuristics have been added to the library:
- Particle Swarm Optimization (PSO): A swarm intelligence algorithm inspired by the flocking behavior of birds.
- Simulated Annealing (SA): A probabilistic algorithm excellent for escaping local optima.
- Ant Colony Optimization (ACO): A constructive metaheuristic that models how ants find the shortest path using pheromone trails.
- NSGA-II: The new default for multi-objective runs.
3. JSON-Based Configuration
- You can now manage all run parameters from a central
config.jsonfile. This is ideal for managing complex setups and ensuring reproducibility. - Command-line arguments will always override settings from the JSON file, giving you the best of both worlds.
4. Structured Results Export
- A new
--output_dirargument allows you to save all results from a run into a specified directory. - The output includes:
summary.json: A complete cost breakdown.network_structure.csv: A detailed list of all exchangers, their duties, areas, and temperatures.stream_results.csv: A summary of the final state of all process streams and whether they met their targets.
🚀 Improvements & Changes
- Full Python Package:
EPTHenOptis now a proper, installable Python package with asetup.py. You can install it locally withpip install -e .. - New Command-Line Interface: The package now provides a clean command-line entry point:
run_hen_problem. - New Programmatic API: You can now easily import and use the package in your own Python scripts via the
EPTHenOpt.run()function. - Detailed Costing Model: The
config.jsonand internal models now support separate default cost parameters for process exchangers, heaters, and coolers, allowing for more realistic problem definitions. - Enhanced Documentation:
- A new
LITERATURE.mdfile explains the theoretical background of the Stage-Wise Superstructure model. - A new
CONTRIBUTING.mdfile provides guidelines for developers. - The project is now set up for automated API documentation generation using Sphinx.
- A new
How to Install/Upgrade
To install this new version, clone the repository and run the pip installation command from the project's root directory. Using editable mode is recommended for development.
pip install -e '.[dev]'