Skip to content
Discussion options

You must be logged in to vote

@UHLIHELE Bitte als Codebeispiel immer möglichst minimalistische Beispiele nutzen, die sich nur auf das eine THema fokussieren ( Siehe minimal_example.py

Anbei eine Möglichkeit eine eigene constraint dafür zu schreiben.

Linopy basics

import linopy
import pandas as pd
import numpy as np

# Create model
model = linopy.Model()

# Create hourly time index for 3 days
time_index = pd.date_range('2024-01-01', periods=72, freq='h', name='time')

# Add variable with rising bounds
var = model.add_variables(
    lower=0,
    upper=np.linspace(0, 100, len(time_index)),
    coords=(time_index,),
    name='power'
)

## ------------------------------------------------------------------------------------…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by FBumann
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants