Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cluster network replace pyomo #903

Merged
merged 9 commits into from
Jan 31, 2024
Merged

Conversation

FabianHofmann
Copy link
Contributor

Changes proposed in this Pull Request

To determine the optimal topology to meet the number of clusters, the workflow used pyomo in combination with ipopt or gurobi. This dependency has been replaced by using linopy in combination with scipopt or gurobi. The environment file has been updated accordingly.

It seems that scipopt works better than ipopt. In my local test, scipopt always meets the same optimum as gurobi, whereas ipopt does not.

Checklist

  • I tested my contribution locally and it seems to work fine.
  • Code and workflow changes are sufficiently documented.
  • Changed dependencies are added to envs/environment.yaml.
  • Changes in configuration options are added in all of config.default.yaml.
  • Changes in configuration options are also documented in doc/configtables/*.csv.
  • A release note doc/release_notes.rst is added.

@FabianHofmann
Copy link
Contributor Author

CI fails because environment is not build/cashed correctly. Don't know how to fix that yet. @fneum any idea?

@fneum
Copy link
Member

fneum commented Jan 30, 2024

       │  ├─ pyscipopt [4.0.0|4.1.0|4.2.0] would require
      │  │  ├─ python_abi 3.10.* *_cp310, which can be installed;
      │  │  └─ scip >=8.0.0,<9.0a0  but there are no viable options
      │  │     ├─ scip 8.0.0 would require
      │  │     │  └─ ipopt >=3.14.6,<3.14.7.0a0 , which conflicts with any installable versions previously reported;
      │  │     ├─ scip 8.0.0 would require
      │  │     │  └─ ipopt >=3.14.4,<3.14.5.0a0 , which conflicts with any installable versions previously reported;
      │  │     ├─ scip 8.0.1 would require
      │  │     │  └─ ipopt >=3.14.9,<3.14.10.0a0 , which conflicts with any installable versions previously reported;
      │  │     ├─ scip 8.0.1 would require
      │  │     │  └─ ipopt >=3.14.7,<3.14.8.0a0 , which conflicts with any installable versions previously reported;
      │  │     ├─ scip [8.0.1|8.0.2] would require
      │  │     │  └─ ipopt >=3.14.8,<3.14.9.0a0 , which conflicts with any installable versions previously reported;
      │  │     ├─ scip [8.0.2|8.0.3] would require
      │  │     │  └─ ipopt >=3.14.10,<3.14.11.0a0 , which conflicts with any installable versions previously reported;
      │  │     ├─ scip [8.0.3|8.0.4|8.1.0] would require
      │  │     │  └─ ipopt >=3.14.12,<3.14.13.0a0 , which conflicts with any installable versions previously reported;
      │  │     ├─ scip 8.0.3 would require
      │  │     │  └─ ipopt >=3.14.11,<3.14.12.0a0 , which conflicts with any installable versions previously reported;
      │  │     ├─ scip 8.1.0 would require
      │  │     │  └─ ipopt >=3.14.14,<3.14.15.0a0 , which conflicts with any installable versions previously reported;
      │  │     └─ scip 8.1.0 would require
      │  │        └─ ipopt >=3.14.13,<3.14.14.0a0 , which conflicts with any installable versions previously reported;

I think the version constraint on ipopt causes the issue.

@fneum
Copy link
Member

fneum commented Jan 30, 2024

We can try to simplify:

https://github.com/PyPSA/pypsa-eur/blob/cb00f42476f8fdb9dd6db58f88ee19594763b028/.github/workflows/ci.yaml#L48C1-L57C47

    - name: Add solver to environment
      run: |
        echo -e "- glpk" >> envs/environment.yaml

Or even include glpk or highspy directly in the envs/environment.yaml.

@FabianHofmann FabianHofmann merged commit 0bb70b4 into master Jan 31, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants