adamgreenhall / minpower

power systems tools made beautiful
adamgreenhall.github.io/minpower
71 stars 33 forks source link

ImportError: No module named opt.base #16

Closed hithuanand closed 9 years ago

hithuanand commented 9 years ago

I am beginner in Linux, but I could manage home directory and installed Anaconda_Python,minpower and gurobi(licence activated).

Directed path for all 3 to /bin. So in terminal I get which python as "/home/hithuanand/anaconda/bin/python" which minpower as /home/hithuanand/anaconda/bin/minpower which gurobi_cl as /home/hithuanand/opt/gurobi603/linux64/bin/gurobi_cl

To run "minpower uc" I extract uc.zip in home directory. As instructed I run "minpower uc" in terminal but I get

File "/home/hithuanand/anaconda/lib/python2.7/site-packages/minpower/solve.py", line 16, in import powersystems, get_data, stochastic, results File "/home/hithuanand/anaconda/lib/python2.7/site-packages/minpower/powersystems.py", line 15, in from optimization import (value, OptimizationObject, File "/home/hithuanand/anaconda/lib/python2.7/site-packages/minpower/optimization.py", line 16, in from coopr.opt.base import solvers as cooprsolver ImportError: No module named opt.base

I have to import gurobi from python shell for checkin "gurobi" command. It works fine.

Please tell where is the mistake,COOPRSOLVER FROM 3 .py FILES. How to solve this? I hope minpower is run from home directory!

Bare with my lack of knowledge, am a newbie. The minpower can contribute to my research.

hithuanand commented 9 years ago

coopr is changed to pyomo right? Will you please update this minpower please..

for uc: File "pandas/src/generated.pyx", line 115, in pandas.algos.ensure_int64 (pandas/algos.c:51160) File "pandas/src/generated.pyx", line 120, in pandas.algos.ensure_int64 (pandas/algos.c:51056)

for ed and opf: File "/home/hithuanand/anaconda/lib/python2.7/site-packages/pyomo/core/base/numvalue.py", line 160, in value % (obj.cname(),)) ValueError: No value for uninitialized NumericValue object cost_first_stage

rschell commented 9 years ago

It is possible to update to Pyomo, but revision@9979 cuases problems for the Gurobi_direct solver interface. Just a few changes on import statements from coopr to pyomo or pyomo.core

hithuanand commented 9 years ago

After changing the import statements(to pyomo) am stuck with pandas issue and valueError. Is it possible to run older version?

rschell commented 9 years ago

pandas error might be related to a change in version 14 or 15 to the treatment of datetime. Try changing time in the cvs input files to a valid date/time entry.

adamgreenhall commented 9 years ago

I'll have more time to look into this problem this weekend. In the meantime, @hithuanand could you open a branch w pyomo-based code that you currently have?

adamgreenhall commented 9 years ago

@hithuanand - let me know if this doesn't work for you.

hithuanand commented 9 years ago

Hi, To run UC problem, I changed year from 2013 to 2015. Even changed the time format. Two cvs files are edited. Still it show up the same issue. Sent from my Cyanogen phone On 08-May-2015 6:06 pm, rschell notifications@github.com wrote:pandas error might be related to a change in version 14 or 15 to the treatment of datetime. Try changing time in the cvs input files to a valid date/time entry.

—Reply to this email directly or view it on GitHub.

hithuanand commented 9 years ago

Sir, I would love to do edit each script in your program. The problem is am new to Python. Will take time for me in making it to work. All the work in minpower is good. I really want to compile new problems once I understand it well. Why don't you have a look at your module and release an upgrade? I think it will be a refreshing experience for you. I was using Python installed in Ubuntu. I hope that won't bring any afore mentioned issues. Sent from my Cyanogen phone On 10-May-2015 7:37 am, Adam Greenhall notifications@github.com wrote:@hithuanand - let me know if this doesn't work for you.

—Reply to this email directly or view it on GitHub.