Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
cdf7df5
GitHub templates (#280)
FBumann Jul 8, 2025
1691cc2
BUGFIX
FBumann Jul 8, 2025
245f94b
Improve Error Messages
FBumann Jul 8, 2025
4c33aad
Update CHANGELOG.md
FBumann Jul 8, 2025
888935c
Update CHANGELOG.md
FBumann Jul 8, 2025
48c1860
Update CHANGELOG.md
FBumann Jul 8, 2025
106574d
Fix Workflow
FBumann Jul 8, 2025
f82556a
First steps
FBumann Jul 18, 2025
33460a0
Improve Feature Patterns
FBumann Jul 18, 2025
ff70674
Improve acess to variables via short names
FBumann Jul 18, 2025
fa5e30a
Improve
FBumann Jul 18, 2025
a3511f9
Add naming options to big_m_binary_bounds()
FBumann Jul 18, 2025
404dc03
Fix and improve FLowModeling with Investment
FBumann Jul 18, 2025
1ad74ce
Improve
FBumann Jul 18, 2025
d1408a4
Tyring to improve the Methods for bounding variables in different sce…
FBumann Jul 18, 2025
ab000ca
Improve BoundingPatterns
FBumann Jul 18, 2025
2afc24e
Improve BoundingPatterns
FBumann Jul 18, 2025
b248f58
Improve BoundingPatterns
FBumann Jul 18, 2025
d34445c
Fix duration Modeling
FBumann Jul 18, 2025
bde07b4
Fix On + Size
FBumann Jul 18, 2025
5861b28
Fix InvestmentModel
FBumann Jul 19, 2025
7809ee4
Fix Models
FBumann Jul 19, 2025
2bbdb44
Update constraint names in test
FBumann Jul 19, 2025
2a01abe
Fix OnOffModel for multiple Flows
FBumann Jul 19, 2025
1f1ebb7
Update constraint names in tests
FBumann Jul 19, 2025
c7b351f
Simplify
FBumann Jul 19, 2025
5d9b591
Improve handling of vars/cons and models
FBumann Jul 19, 2025
5c56b63
Revising the basic structure of a class Model
FBumann Jul 20, 2025
9d242b6
Revising the basic structure of a class Model
FBumann Jul 20, 2025
0997843
Simplify and focus more on own Model class
FBumann Jul 21, 2025
1d6ef97
Update tests
FBumann Jul 21, 2025
972cb90
Improve state computation in ModelingUtilities
FBumann Jul 21, 2025
29bec8c
Improve handling of previous flowrates
FBumann Jul 21, 2025
370ac94
Imropove repr and submodel acess
FBumann Jul 21, 2025
0f89ff0
Update access pattern in tests
FBumann Jul 21, 2025
4781cff
Fix PiecewiseEffects and StorageModel
FBumann Jul 21, 2025
333ab83
Fix StorageModel and Remove PreventSimultaniousUseModel
FBumann Jul 21, 2025
9702303
Fix Aggregation and SegmentedCalculation
FBumann Jul 21, 2025
91bd461
Update tests
FBumann Jul 21, 2025
94314c3
Loosen precision in tests
FBumann Jul 21, 2025
50cc2cb
Update test_on_hours_computation.py and some types
FBumann Jul 21, 2025
e52f800
Rename class Model to Submodel
FBumann Jul 21, 2025
9281256
rename sub_model to submodel everywhere
FBumann Jul 21, 2025
9001c6a
rename self.model to self.submodel everywhere
FBumann Jul 21, 2025
286a8b7
Rename .model with .submodel if its only a submodel
FBumann Jul 21, 2025
ae1752b
Rename .sub_models with .submodels
FBumann Jul 21, 2025
1822384
Improve repr
FBumann Jul 22, 2025
2aa9d4b
Improve repr
FBumann Jul 22, 2025
5ca9707
Include def do_modeling() into __init__() of models
FBumann Jul 22, 2025
7e04399
Make properties private
FBumann Jul 22, 2025
4f95ebc
Improve Inheritance of Models
FBumann Jul 22, 2025
f73fe99
Merge branch 'main' into v3.0.0/main
FBumann Jul 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Contributing to FlixOpt

Thanks for your interest in contributing to FlixOpt! 🚀

## Quick Start

1. **Fork & Clone**
```bash
git clone https://github.com/yourusername/flixopt.git
cd flixopt
```

2. **Install for Development**
```bash
pip install -e ".[full]"
```

3. **Make Changes & Submit PR**
```bash
git checkout -b feature/your-change
# Make your changes
git commit -m "Add: description of changes"
git push origin feature/your-change
# Create Pull Request on GitHub
```

## How to Contribute

### 🐛 **Found a Bug?**
Use our [bug report template](https://github.com/flixOpt/flixopt/issues/new?template=bug_report.yml) with:
- Minimal code example
- FlixOpt version, Python version, solver used
- Expected vs actual behavior

### ✨ **Have a Feature Idea?**
Use our [feature request template](https://github.com/flixOpt/flixopt/issues/new?template=feature_request.yml) with:
- Clear energy system use case
- Specific examples of what you want to model

### ❓ **Need Help?**
- Check the [documentation](https://flixopt.github.io/flixopt/latest/) first
- Search [existing issues](https://github.com/flixOpt/flixopt/issues)
- Start a [discussion](https://github.com/flixOpt/flixopt/discussions)

## Code Guidelines

- **Style**: Follow PEP 8, use descriptive names
- **Documentation**: Add docstrings with units (kW, kWh, etc.) if applicable
- **Energy Focus**: Use energy domain terminology consistently
- **Testing**: Test with different solvers when applicable

### Example
```python
def create_storage(
label: str,
capacity_kwh: float,
charging_power_kw: float
) -> Storage:
"""
Create a battery storage component.

Args:
label: Unique identifier
capacity_kwh: Storage capacity [kWh]
charging_power_kw: Maximum charging power [kW]
"""
```

## What We Welcome

- 🔧 New energy components (batteries, heat pumps, etc.)
- 📚 Documentation improvements
- 🐛 Bug fixes
- 🧪 Test cases
- 💡 Energy system examples

## Questions?

- 📖 [Documentation](https://flixopt.github.io/flixopt/latest/)
- 💬 [Discussions](https://github.com/flixOpt/flixopt/discussions)
- 📧 Contact maintainers (see README)

---

**Every contribution helps advance sustainable energy solutions! 🌱⚡**
81 changes: 81 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: 🐛 Bug Report
description: Report a bug in flixopt
title: "[BUG] "
labels: ["type: bug"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: checkboxes
id: checks
attributes:
label: Version Checks (indicate both or one)
options:
- label: >
I have confirmed this bug exists on the latest
[release](https://github.com/flixOpt/flixopt/releases) of FlixOpt.
- label: >
I have confirmed this bug exists on the current
[`main`](https://github.com/flixOpt/flixopt/tree/main) branch of FlixOpt.
- type: textarea
id: problem
attributes:
label: Issue Description
description: >
Please provide a description of the issue.
validations:
required: true
- type: textarea
id: example
validations:
required: true
attributes:
label: Reproducible Example
description: >
Please provide a minimal reproducible example. See how to [craft minimal bug reports](https://matthewrocklin.com/minimal-bug-reports).
placeholder: >
import flixopt as fx

# Create simple energy system that reproduces the bug
timesteps = pd.date_range('2024-01-01', periods=24, freq='h')
flow_system = fx.FlowSystem(timesteps)

# Add your components here...
render: python
- type: textarea
id: expected-behavior
validations:
required: true
attributes:
label: Expected Behavior
description: >
Please describe or show a code example of the expected behavior.
- type: dropdown
id: solver
attributes:
label: Solver Used
description: Which solver were you using when the bug occurred?
options:
- HiGHS (default)
- Gurobi
- CPLEX
- GLPK
- Other (please specify in description)
validations:
required: true
- type: textarea
id: version
attributes:
label: Installed Versions
description: >
Please share information on your environment. Paste the output below.
For conda: `conda env export` and for pip: `pip freeze`.
value: >
<details>

```
Replace this with your environment info
```

</details>
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: ❓ Questions & Discussion
url: https://github.com/flixOpt/flixopt/discussions
about: Ask questions and discuss with the community
- name: 📖 Documentation
url: https://flixopt.github.io/flixopt/latest/
about: Check our documentation for guides and examples
88 changes: 88 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Feature Request
description: Suggest a new feature or enhancement for FlixOpt.
title: "[FEATURE] "
labels: ["type: feature"]
body:
- type: markdown
attributes:
value: |
Thanks for suggesting a new feature! Please provide as much detail as possible.
- type: checkboxes
id: checks
attributes:
label: Prerequisite Checks
options:
- label: >
I have searched the [existing issues](https://github.com/flixOpt/flixopt/issues)
and confirmed this feature doesn't already exist.
- label: >
I have checked the [documentation](https://flixopt.github.io/flixopt/latest/)
to ensure this feature isn't already available.
- type: textarea
id: problem
attributes:
label: Is your feature request related to a problem?
description: >
A clear and concise description of what the problem is.
placeholder: >
I'm always frustrated when modeling [specific energy system scenario]...
- type: textarea
id: solution
validations:
required: true
attributes:
label: Describe the solution you'd like
description: >
A clear and concise description of what you want to happen.
placeholder: >
I would like to be able to model [specific component/feature]...
- type: textarea
id: use-case
validations:
required: true
attributes:
label: Energy System Use Case
description: >
Describe your specific energy system modeling scenario and how this feature would help.
placeholder: >
I'm modeling a district heating system with seasonal thermal storage and need to...
- type: textarea
id: example
attributes:
label: Desired Code Example (optional)
description: >
If possible, show how you would like to use this feature in code.
placeholder: >
# Example of how the new feature might work
thermal_storage = fx.SeasonalStorage(
label='seasonal_storage',
capacity_mwh=1000,
efficiency=0.95
)
render: python
- type: dropdown
id: component-type
attributes:
label: Component Category (if applicable)
description: What type of energy system component does this relate to?
options:
- Storage (batteries, thermal storage, etc.)
- Generation (PV, wind, CHP, etc.)
- Conversion (heat pumps, boilers, etc.)
- Network/Grid (transmission, distribution)
- Optimization/Calculation (algorithms, solvers)
- Data/Input handling
- Results/Output
- Other
- type: textarea
id: alternatives
attributes:
label: Alternatives considered
description: >
Describe any alternative solutions or workarounds you've considered.
- type: textarea
id: additional-context
attributes:
label: Additional context
description: >
Add any other context, research papers, or examples about the feature request here.
20 changes: 20 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## Description
Brief description of the changes in this PR.

## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Documentation update
- [ ] Code refactoring

## Related Issues
Closes #(issue number)

## Testing
- [ ] I have tested my changes
- [ ] Existing tests still pass

## Checklist
- [ ] My code follows the project style
- [ ] I have updated documentation if needed
- [ ] I have added tests for new functionality (if applicable)
5 changes: 5 additions & 0 deletions .github/workflows/python-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,11 @@ jobs:
with:
python-version: "3.11"

- name: Sync changelog to docs
run: |
cp CHANGELOG.md docs/changelog.md
echo "✅ Synced changelog to docs"

- name: Install documentation dependencies
run: |
python -m pip install --upgrade pip
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,22 @@ This might occur when scenarios represent years or months, while an investment d
* The assignment of Bus Objects to Flow.bus is deprecated and will be removed in a future version. Use the label of the Bus instead.
* The usage of Effects objects in Dicts to assign shares to Effects is deprecated and will be removed in a future version. Use the label of the Effect instead.

## [2.1.5] - 2025-07-08

### Fixed
- Fixed Docs deployment

## [2.1.4] - 2025-07-08

### Fixed
- Fixing release notes of 2.1.3, as well as documentation build.


## [2.1.3] - 2025-07-08

### Fixed
- Using `Effect.maximum_operation_per_hour` raised an error, needing an extra timestep. This has been fixed thanks to @PRse4.

## [2.1.2] - 2025-06-14

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion examples/03_Calculation_types/example_calculation_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def get_solutions(calcs: List, variable: str) -> xr.Dataset:
if calc.name == 'Segmented':
dataarrays.append(calc.results.solution_without_overlap(variable).rename(calc.name))
else:
dataarrays.append(calc.results.model.variables[variable].solution.rename(calc.name))
dataarrays.append(calc.results.submodel.variables[variable].solution.rename(calc.name))
return xr.merge(dataarrays)

# --- Plotting for comparison ---
Expand Down
Loading
Loading