Electa-Git / PowerModelsACDC.jl

A hybrid AC/DC OPF package based on PowerModels.jl
BSD 3-Clause "New" or "Revised" License
52 stars 20 forks source link

Compilation error of PowerModelsACDC for Julia1.4 and higher #59

Closed SabineAuer closed 3 years ago

SabineAuer commented 3 years ago

We wanted to add PowerModelsACDC to the dependencies of PowerDynamics.jl and we are working on a PR there at the moment. However, for Julia1.4 and Julia1.5 the compilation of PowerModelsACDC fails with [this error message](Travis CI, see here https://travis-ci.org/github/JuliaEnergy/PowerDynamics.jl/jobs/723063577#L894) saying ERROR: LoadError: LoadError: UndefVarError: GenericPowerModel not defined

Can you help us out with this issue?

ccoffrin commented 3 years ago

Based on this CI run it looks to be working from a fresh install of Julia v1.4.

https://travis-ci.org/github/hakanergun/PowerModelsACDC.jl

I also tested locally on Julia v1.5 and it seemed to work.

My best guess is that you have another related dependency (like PowerModels.jl) and the package manager selected an old version of this package to try and meet some version constraints.

@hakanergun, if you like I can do a little work on your Project.toml file so that more version combinations can be supported.

hakanergun commented 3 years ago

That would be much appreciated. In a way, I always have trouble in creating the .toml if I try to register a new version, where I fix the version of PM & IM, to avoid having to run in breaking changes. So all info you can give me on that, I gold :).

hakanergun commented 3 years ago

@SabineAuer It seems that by default, v0.1.0 of PowerModelsACDC is added, which is not up to date anymore, of course. As Carleton pointed out. It seems that an older version of PMACDC is added, if you already have a higher version of PM 0.17.2 (to which the latest version of PMACDC is fixed) in your project.

SabineAuer commented 3 years ago

thanks a lot for your fast replies. So the solution for me is probably then to fix the version in the compat-section of our Project.toml, right? What combination of versions works well together then? PowerModelsACDC v0.3.2 and what version of PowerModels?

hakanergun commented 3 years ago

I guess so. Otherwise it is retrieving probably PowerModels first and ends up having the version conflict. It seems that I have set the PM version rather ambiguous in the v0.1.0 version of PMACDC, not sure if I can change that retroactively (@ccoffrin)?

Also, it's hard to keep up with PM versions sometimes ;).

ccoffrin commented 3 years ago

@SabineAuer the master branch should resolve your issue. Can you check on your side and report back? If all is good I would recommend theta @hakanergun tag a new patch release.

SabineAuer commented 3 years ago

I added the master branch of PowerModelsACDC and everything is compiling now properly now. A new patch sounds great, thank you!

ccoffrin commented 3 years ago

I think v0.3.3 addressed this issue, shall we close it?

hakanergun commented 3 years ago

Indeed, I am closing this issue. Thanks again @ccoffrin !