Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
name: Run tests
needs: [check-preparation]
if: needs.check-preparation.outputs.prepared == 'true'
uses: ./.github/workflows/test.yaml
uses: ./.github/workflows/tests.yaml

build:
name: Build package
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yaml → .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on:
push:
branches: [main]
pull_request:
branches: ["*"]
branches: ["**"]
workflow_dispatch:
workflow_call: # Allow release.yaml to call this workflow
workflow_call: # Allow release.yaml to call this workflow.

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ venv/
.DS_Store
lib/
temp-plot.html
.cache
site/
*.egg-info
uv.lock
132 changes: 116 additions & 16 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This contains all commits, PRs, and contributors.
Therefore, the Changelog should focus on the user-facing changes.

Please remove all irrelevant sections before releasing.
Please keep the format of the changelog consistent with the other releases, so the extraction for mkdocs works.
Please keep the format of the changelog consistent: ## [VERSION] - YYYY-MM-DD
---

## [Template] - ????-??-??
Expand Down Expand Up @@ -49,22 +49,130 @@ If upgrading from v2.x, see the [v3.0.0 release notes](https://github.com/flixOp

---

## [Unreleased] - ????-??-??
Until here -->

**Summary**:
## [Upcoming]

If upgrading from v2.x, see the [v3.0.0 release notes](https://github.com/flixOpt/flixOpt/releases/tag/v3.0.0) and [Migration Guide](https://flixopt.github.io/flixopt/latest/user-guide/migration-guide-v3/).

### ✨ Added
**Summary**: Renamed OnOff terminology to Status terminology for better alignment with PyPSA and unit commitment standards. **All deprecated items from v4.x have been removed.**

### 💥 Breaking Changes

**Renamed `OnOffParameters` → `StatusParameters`**: Complete terminology update to align with industry standards (PyPSA, unit commitment). This is a clean breaking change with no backwards compatibility wrapper.

**Class and Constructor Parameters:**

| Category | Old Name (OnOffParameters) | New Name (StatusParameters) | Notes |
|----------|---------------------------|----------------------------|-------|
| **Class** | `OnOffParameters` | `StatusParameters` | Main class renamed |
| **Constructor** | `on_variable` | `status` | Model variable parameter |
| **Constructor** | `previous_states` | `previous_status` | Initial state parameter |
| **Parameter** | `effects_per_switch_on` | `effects_per_startup` | Startup costs/impacts |
| **Parameter** | `effects_per_running_hour` | `effects_per_active_hour` | Operating costs/impacts |
| **Parameter** | `on_hours_total_min` | `active_hours_min` | Minimum total operating hours |
| **Parameter** | `on_hours_total_max` | `active_hours_max` | Maximum total operating hours |
| **Parameter** | `consecutive_on_hours_min` | `min_uptime` | UC standard terminology |
| **Parameter** | `consecutive_on_hours_max` | `max_uptime` | UC standard terminology |
| **Parameter** | `consecutive_off_hours_min` | `min_downtime` | UC standard terminology |
| **Parameter** | `consecutive_off_hours_max` | `max_downtime` | UC standard terminology |
| **Parameter** | `switch_on_total_max` | `startup_limit` | Maximum number of startups |
| **Parameter** | `force_switch_on` | `force_startup_tracking` | Force creation of startup variables |

**Model Classes and Variables:**

| Category | Old Name (OnOffModel) | New Name (StatusModel) | Notes |
|----------|----------------------|------------------------|-------|
| **Model Class** | `OnOffModel` | `StatusModel` | Feature model class |
| **Variable** | `on` | `status` | Main binary state variable |
| **Variable** | `switch_on` | `startup` | Startup event variable |
| **Variable** | `switch_off` | `shutdown` | Shutdown event variable |
| **Variable** | `switch_on_nr` | `startup_count` | Cumulative startup counter |
| **Variable** | `on_hours_total` | `active_hours` | Total operating hours |
| **Variable** | `consecutive_on_hours` | `uptime` | Consecutive active hours |
| **Variable** | `consecutive_off_hours` | `downtime` | Consecutive inactive hours |
| **Variable** | `off` | `inactive` | Deprecated - use `1 - status` instead |

**Flow and Component API:**

| Category | Old Name | New Name | Location |
|----------|----------|----------|----------|
| **Parameter** | `on_off_parameters` | `status_parameters` | `Flow.__init__()` |
| **Parameter** | `on_off_parameters` | `status_parameters` | `Component.__init__()` |
| **Property** | `flow.submodel.on_off` | `flow.submodel.status` | Flow submodel access |
| **Property** | `component.submodel.on_off` | `component.submodel.status` | Component submodel access |

**Internal Properties:**

| Old Name | New Name |
|----------|----------|
| `use_switch_on` | `use_startup_tracking` |
| `use_consecutive_on_hours` | `use_uptime_tracking` |
| `use_consecutive_off_hours` | `use_downtime_tracking` |
| `with_on_off` | `with_status` |
| `previous_states` | `previous_status` |

**Migration Guide**:

Use find-and-replace to update your code with the mappings above. The functionality is identical - only naming has changed.

**Important**: This is a complete renaming with no backwards compatibility. The change affects:
- Constructor parameter names
- Model variable names and property access
- Results access patterns

A partial backwards compatibility wrapper would be misleading, so we opted for a clean breaking change.

- `Bus.imbalance_penalty_per_flow_hour` now defaults to `None` (strict balance) instead of `1e5`

### ♻️ Changed

- Renamed `BusModel.excess_input` → `virtual_supply` and `BusModel.excess_output` → `virtual_demand` for clearer semantics
- Renamed `Bus.excess_penalty_per_flow_hour` → `imbalance_penalty_per_flow_hour`
- Renamed `Bus.with_excess` → `allows_imbalance`

### 🗑️ Deprecated

- `Bus.excess_penalty_per_flow_hour` → use `imbalance_penalty_per_flow_hour`

### 🔥 Removed

**Modules removed:**
- `calculation.py` module - Use `optimization.py` instead

**Classes removed:**
- `Calculation`, `FullCalculation` → Use `Optimization`
- `AggregatedCalculation` → Use `ClusteredOptimization`
- `SegmentedCalculation` → Use `SegmentedOptimization`
- `Aggregation` → Use `Clustering`
- `AggregationParameters` → Use `ClusteringParameters`
- `AggregationModel` → Use `ClusteringModel`
- `CalculationResults` → Use `Results`
- `SegmentedCalculationResults` → Use `SegmentedResults`

**Functions removed:**
- `change_logging_level()` → Use `CONFIG.Logging.enable_console()`

**Methods removed:**
- `Optimization._perform_aggregation()` → Use `_perform_clustering()`
- `Optimization.calculate_aggregation_weights()` → Use `calculate_clustering_weights()`

**Parameters removed:**
- `Optimization.active_timesteps` → Use `flow_system.sel(time=...)` or `flow_system.isel(time=...)`
- `TimeSeriesData.from_dataarray()`: `aggregation_group` → Use `clustering_group`
- `TimeSeriesData.from_dataarray()`: `aggregation_weight` → Use `clustering_weight`
- `FlowSystem.weights` → Use `scenario_weights`
- `Results.__init__()`: `flow_system` → Use `flow_system_data`
- `Results` plotting methods: `indexer` → Use `select`
- `Results.plot_heatmap()`: `heatmap_timeframes`, `heatmap_timesteps_per_frame` → Use `reshape_time`
- `Results.plot_heatmap()`: `color_map` → Use `colors`

**Properties removed:**
- `FlowSystem.all_elements` → Use dict-like interface (`flow_system['label']`, `.keys()`, `.values()`, `.items()`)
- `FlowSystem.weights` → Use `scenario_weights`

**Features removed:**
- Passing `Bus` objects directly to `Flow` → Pass bus label string instead and add Bus to FlowSystem
- Using `Effect` objects in `EffectValues` → Use effect label strings instead

**Deprecated parameters removed** (all were deprecated in v4.0.0 or earlier):

**TimeSeriesData:**
Expand Down Expand Up @@ -104,22 +212,14 @@ If upgrading from v2.x, see the [v3.0.0 release notes](https://github.com/flixOp
- Flow parameters: `Q_fu` → use `fuel_flow`, `P_el` → use `electrical_flow`, `Q_th` → use `thermal_flow`, `Q_ab` → use `heat_source_flow`
- Efficiency parameters: `eta` → use `thermal_efficiency`, `eta_th` → use `thermal_efficiency`, `eta_el` → use `electrical_efficiency`, `COP` → use `cop`

### 🐛 Fixed

### 🔒 Security

### 📦 Dependencies

### 📝 Docs
- Improve documentation from the ground up

### 👷 Development

### 🚧 Known Issues
This is not yet publicly released!

---

Until here -->

## [4.3.5] - 2025-11-29

**Summary**: Fix zenodo again
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ boiler = fx.Boiler("Boiler", eta=0.9, ...)
### Key Features

**Multi-criteria optimization:** Model costs, emissions, resource use - any custom metric. Optimize single objectives or use weighted combinations and ε-constraints.
→ [Effects documentation](https://flixopt.github.io/flixopt/latest/user-guide/mathematical-notation/effects-penalty-objective/)
→ [Effects documentation](https://flixopt.github.io/flixopt/latest/user-guide/mathematical-notation/effects-and-dimensions/)

**Performance at any scale:** Choose optimization modes without changing your model - Optimization, SegmentedOptimization, or ClusteredOptimization (using [TSAM](https://github.com/FZJ-IEK3-VSA/tsam)).
→ [Optimization modes](https://flixopt.github.io/flixopt/latest/api-reference/optimization/)
Expand Down
65 changes: 0 additions & 65 deletions docs/getting-started.md

This file was deleted.

29 changes: 29 additions & 0 deletions docs/home/citing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Citing flixOpt

If you use flixOpt in your research, please cite it.

## Citation

When referencing flixOpt in academic publications, please use look here: [flixopt citation](https://zenodo.org/records/17756895)

## Publications

If you've published research using flixOpt, please let us know! We'd love to feature it here.

### List of Publications

*Coming soon: A list of academic publications that have used flixOpt*

## Contributing Back

If flixOpt helped your research:

- Share your model as an example
- Report issues or contribute code
- Improve documentation

See the [Contributing Guide](../contribute.md).

## License

flixOpt is released under the MIT License. See [License](license.md) for details.
91 changes: 91 additions & 0 deletions docs/home/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Installation

This guide covers installing flixOpt and its dependencies.


## Basic Installation

Install flixOpt directly into your environment using pip:

```bash
pip install flixopt
```

This provides the core functionality with the HiGHS solver included.

## Full Installation

For all features including interactive network visualizations and time series aggregation:

```bash
pip install "flixopt[full]"
```

## Development Installation

If you want to contribute to flixOpt or work with the latest development version:

```bash
git clone https://github.com/flixOpt/flixopt.git
cd flixopt
pip install -e ".[full,dev,docs]"
```

## Solver Installation

### HiGHS (Included)

The HiGHS solver is included with flixOpt and works out of the box. No additional installation is required.

### Gurobi (Optional)

For academic use, Gurobi offers free licenses:

1. Register for an academic license at [gurobi.com](https://www.gurobi.com/academia/)
2. Install Gurobi:
```bash
pip install gurobipy
```
3. Activate your license following Gurobi's instructions

## Verification

Verify your installation by running:

```python
import flixopt
print(flixopt.__version__)
```

## Logging Configuration

flixOpt uses Python's standard logging module with optional colored output via [colorlog](https://github.com/borntyping/python-colorlog). Logging is silent by default but can be easily configured:

```python
from flixopt import CONFIG

# Enable colored console logging
CONFIG.Logging.enable_console('INFO')

# Or use a preset configuration for exploring
CONFIG.exploring()
```

Since flixOpt uses Python's standard logging, you can also configure it directly:

```python
import logging

# Get the flixopt logger and configure it
logger = logging.getLogger('flixopt')
logger.setLevel(logging.DEBUG)
logger.addHandler(logging.StreamHandler())
```

For more details on logging configuration, see the [`CONFIG.Logging`][flixopt.config.CONFIG.Logging] documentation.

## Next Steps

- Follow the [Quick Start](quick-start.md) guide
- Explore the [Minimal Example](../examples/00-Minimal Example.md)
- Read about [Core Concepts](../user-guide/core-concepts.md)
Loading