Closed ayeosq closed 6 years ago
Just today i started trying to use minpower myself (facing stiff opposition due to incompatibilites with later versions of matplotlib, numpy) but i think i can help on this. Check the "~/.local/lib/python2.7/site-packages/minpower-4.4.0-py2.7.egg-info/installed-files.txt" It should contain the location of the binary file. mine is "../../../../bin/minpower" which puts it in my /bin directory. From then, either add that directory to your $PATH, or do a softlink of the exectuable to /bin
Please pardon if I asked an obvious question, am new to linux. Anyway, am I right to said what you mean by "add that directory to your $PATH" is to add this line, export PATH=$PATH:/usr/bin/minpower to ~/.bashrc?
This is what happened after I do a echo of PATH: arthur@arthur-linux:~/.local/lib/python2.7/site-packages/minpower/tests$ echo "$PATH" /bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/bin/minpower:/usr/bin/glpsol
Initially, I did this and realise that uc is in the tests direction, arthur@arthur-linux:~$ minpower uc minpower: command not found
So I navigate to the directory of uc folder: arthur@arthur-linux:~/.local/lib/python2.7/site-packages/minpower/tests$ minpower uc minpower: command not found
The "/usr/bin/minpower" address that you added to $PATH is bound to not be a valid place. You actually want to add the path of the minpower binary to that path. If i understand correctly, the binary in your case should be ~./local/bin/minpower Verify that, and if it is true, you can either softlink that binary to /bin/minpower, or just add that path to $PATH like so:
Instead of all this mess, you could just run minpower with /path/to/minpower/binary uc Make sure you are one level above the uc test or it won't find the uc - you could also give it the whole path leading to uc, eg:
PS. Warning: Afaiu, adding ~/.local/bin/ to $PATH is not very safe, because anyone with your permissions could hijack a binary by adding an identically named one to that folder. I'm intermediate with linux though, so i could be wrong.
Thanks for your help, I am getting further with this. However, this happened:
I changed my directory to the uc folder which is one level on top of the files: arthur@arthur-linux:~$ cd /home/arthur/.local/lib/python2.7/site-packages/minpower/tests
Then I did a minpower uc and these happened:
arthur@arthur-linux:~/.local/lib/python2.7/site-packages/minpower/tests$ minpower uc
Traceback (most recent call last):
File "/home/arthur/.local/bin/minpower", line 9, in
What do you think about this?
"ImportError: pyomo.environ failed to import pyomo.pysp.plugins: Original ImportError: cannot import name extractComponentIndices"
There seems to be an error with pyomo. I'd wager the pyomo version you are running is incompatible. Did you install with pip? Mine downgraded pandas & numpy & installed the correct pyomo. You could also find what is the pyomo version needed (in one of the build files) and manually install that one.
Just did a downgrade of pyomo and pandas to the required version: pyomo==4.0.9682 numpy==1.9.1 pandas==0.16
arthur@arthur-linux:~/.local/lib/python2.7/site-packages/minpower/tests$ minpower uc
Traceback (most recent call last):
File "/home/arthur/.local/bin/minpower", line 9, in
After hours, I found the author simple test uc files on his web.
arthur@arthur-linux:~/Downloads/uc$ ls generators.csv initial.csv loads.csv smallLoad.csv wildHorse.csv
anyway, the new problem is :
arthur@arthur-linux:~/Downloads$ minpower uc
Traceback (most recent call last):
File "/home/arthur/.local/bin/minpower", line 9, in
Can't comment on the last error msg. Sounds like a probem with the csv's you found. But i faced the glpk error myself. After a bit of search in the net, i found that current glpk versions have an incompatibitity with minpower. The cbc solver (https://projects.coin-or.org/Cbc) works perfectly though. After installing it (and having it in $PATH) use it like so:
This is what I did to make sure I have latest installed: sudo apt-get install glpkdoc glpk-utils libglpk-dev python-glpk
Finally, I managed to run minpower uc, seems like not having libglpk-dev might be the cause.
Hence to try if minpower really works, I did the following: arthur@arthur-linux:~/.local/lib/python2.7/site-packages/minpower/tests$ python run_all_cases.py testing: uc-gen-min-down-time-initial had error testing: opf-line-Pmax had error testing: ed-gen-Pmax had error testing: stochastic_shedding_wind_case Unknown option 'scenarioinstance' specified in call to ScenarioTree constructor had error testing: stochastic_short_case had error testing: uc-stochastic-rolling Unknown option 'scenarioinstance' specified in call to ScenarioTree constructor had error testing: ed-custom-bidding-points had error testing: ed testing: uc-WW-5-2 had error testing: ed-WW-3-7 testing: stochastic_cvar_case Unknown option 'scenarioinstance' specified in call to ScenarioTree constructor had error testing: scuc had error testing: uc testing: uc-rolling-shedding had error testing: ed-gen-Pmin had error testing: expected_observed_cost had error testing: uc-gen-ramp-rate had error testing: uc-reserve had error testing: stochastic_shedding_case Unknown option 'scenarioinstance' specified in call to ScenarioTree constructor had error testing: deterministic_perfect_difference had error testing: opf testing: uc-stochastic had error testing: opf-2bus had error testing: uc-gen-min-up-time had error testing: uc-gen-min-down-time had error testing: stochastic_mock_case Unknown option 'scenarioinstance' specified in call to ScenarioTree constructor had error testing: uc-rolling testing: uc-gen-min-up-time-initial had error
Thanks for your help jcd000, seems like there are still some stuff to clear up to ensure minpower is properly running.
These are copied from my terminal.
arthur@arthur-linux:~/.local/lib/python2.7/site-packages/minpower$ which glpsol /usr/bin/glpsol arthur@arthur-linux:~/.local/lib/python2.7/site-packages/minpower$ pip freeze adium-theme-ubuntu==0.3.4 appdirs==1.4.0 beautifulsoup4==4.4.1 chardet==2.3.0 cycler==0.9.0 decorator==4.0.9 glpk==0.4.52 html5lib==0.999 lxml==3.5.0 matplotlib==1.5.1 minpower==4.4.0 networkx==1.11 nose==1.3.7 numpy==1.9.1 PAM==0.4.2 pandas==0.18.1 pexpect==4.0.1 Pillow==3.1.2 ply==3.8 ptyprocess==0.5 pygobject==3.20.0 pyinotify==0.9.6 Pyomo==4.3.11377 pyparsing==2.0.3 PYPOWER==5.0.1 pypsa==0.4.1 python-dateutil==2.5.3 pytz==2016.4 PyUtilib==5.3.5 scipy==0.17.0 six==1.10.0 unity-lens-photos==1.0 arthur@arthur-linux:~/.local/lib/python2.7/site-packages/minpower$ minpower uc minpower: command not found arthur@arthur-linux:~/.local/lib/python2.7/site-packages/minpower$ python minpower uc python: can't open file 'minpower': [Errno 2] No such file or directory arthur@arthur-linux:~/.local/lib/python2.7/site-packages/minpower$ cd ~/.local/lib/python2.7/site-packages/ arthur@arthur-linux:~/.local/lib/python2.7/site-packages$ minpower ucminpower: command not found arthur@arthur-linux:~/.local/lib/python2.7/site-packages$ python minpower uc/usr/bin/python: can't find 'main' module in 'minpower' arthur@arthur-linux:~/.local/lib/python2.7/site-packages$
Clearly, I have installed minpower along with glpk and directory in ~/.bash is pathed right. However, when I follow the instruction of type "minpower uc" in terminal, expect a case is loaded and solved. Not happening for me, can any experienced minpower user assist me?
Thank you