richard-weinhold/pomato

run example file

Mikalls opened this issue · 5 comments

Hallo,
i´m trying to run the example file of the IEEE 118 bus system and DE system on my computer.i have the same problem and hope to get your help.my python version is 3.7.9 and julia version is 1.6.7,they are correctly installed on my computer.

These are the last lines in my Pycharm Shell:

INFO - ERROR: LoadError: ArgumentError: Package JSON not found in current path:
INFO - - Run import Pkg; Pkg.add("JSON") to install the JSON package.
INFO -
INFO - Stacktrace:
INFO - [1] require(into::Module, mod::Symbol)
INFO - @ Base .\loading.jl:893
INFO - in expression starting at C:\Users\Mika\PycharmProjects\pythonProject\pomato\julia_daemon.jl:1

Thank you for your help!
Beat regards. Mika

Hi @Mikalls - you need to run julia ../pomato/_installation/julia_install_from_git.jl main main to install the julia dependencies

For me, the installation instructions on a fresh Debian 12 with julia 1.9.2 installed is:

conda create -n pomato python=3.11
conda activate pomato
pip install -e .
julia ../pomato/_installation/julia_install_from_git.jl main main
python ./run_pomato_ieee.py

Still I get an error message:

INFO - ERROR: LoadError: You have installed version 1.17.7 of Clp, which is not supported by Clp.jl. If the version change was breaking, changes will need to be made to the Julia code. Please open an issue at https://github.com/jump-dev/Clp.jl.

which I could not fix easily.
@richard-weinhold can you help with this?

Hi Maurele, sorry for the late reply. Since I'm no longer actively working in academia I have little time to maintain the code. I have made significant updates and updated all packages to current versions. From the looks of your error messages this should fix the errors related to Clp.

Let me know if this works.

Thank you for updating the repository.
The DE and IEEE demo works fine, however the FBMC and CC demo still throws some errors:

  1. I get FutureWarnings in Pandas for groupby on dataframes with categorical values: The default of observed=False is deprecated and will be changed to True in a future version of pandas. Pass observed=False to retain current behavior or observed=True to adopt the future default and silence this warning. - but those are not relevant (yet)
  2. ValueError: negative dimensions are not allowed when trying to plot the IEEE network
  3. I still get errors in Julia running FBMC and CC examples? Do they work for you?
  4. Some path needed to have a dot before them to work
  5. options in ieee ipynb were not updated as in ieee.py
  6. nbformat is missing from requirements.txt

I provided a PR for some of the issues I had #6

In the FBMC example I get some infeasabilities after this error:

INFO - Using ECOS for Chance Constrained Market Model...
INFO - ERROR: LoadError: UndefVarError: `ECOS` not defined
INFO - Stacktrace:
INFO - [1] set_optimizer(file::Dict{String, Any})
INFO - @ Main ~/projects/pomato/pomato/julia_daemon.jl:87
INFO - [2] top-level scope
INFO - @ ~/projects/pomato/pomato/julia_daemon.jl:157
INFO - in expression starting at ~/projects/pomato/pomato/julia_daemon.jl:145
INFO - Coin0506I Presolve 299 (-641) rows, 679 (-315) columns and 1841 (-1095) elements
INFO - Clp0006I 0  Obj 12981.041 Primal inf 220206.67 (299)

By the way congratulations on finishing this project!
And the plots are awesome.
I fully understand, that this now is only a side project, so thanks anyway :)

Thank you for the input. It’s very welcome.

Regarding the jupyter examples I must admit I'm not very familiar with the requirements needed. As far as I understand, VS Code did promt me to install everything, including nbformat, so its not strictly a requirement for pomato as is. I have added a remark in the installation section of the documentation.

Regarding the FBMC and CC example. It seems the ECOS solver is not installed. You should be able to run pomato.tools.julia_management.instantiate_julia(redundancyremoval_branch="master", marketmodel_branch="master") to reinstall the julia repositories from git, the latest update should now install ECOS automatically.
Alternatively you can manually add ECOS by activating the julia environemt in pomato_installation\pomato, this should include MarketModel, RedundancyRemoval, Clp, ECOS and JSON.

I do not see the groupby warnings, I had plenty when I changed to categorical data for many of the inputs. For pandas im on version 2.0.2, maybe this explains the different behavior.

Let me know if this helps and again thank you for your input and feedback.