-
Notifications
You must be signed in to change notification settings - Fork 68
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
oemof.solph installation error #84
Comments
and the example 创建时间索引,假设有24个小时time_index = range(24) 创建能源系统对象es = EnergySystem(timeindex=time_index) 创建电力总线electricity_bus = Bus(label="electricity") 创建风力发电机wind_generator = Source( 创建电力线路transmission_line = Flow( 创建负荷load = Sink( 将组件添加到能源系统es.add(electricity_bus, wind_generator, transmission_line, load) 创建模型对象optimization_model = Model(es) 求解模型optimization_model.solve() 查看模型结果print("Wind power production:") |
Hi @HANSBIBI. You are using solph v0.5, the examples are for legacy versions of solph. For v0.5 (and following) we have moved them to the solph repository. See https://github.com/oemof/oemof-solph/tree/v0.5/examples for examples working with the version you have installed. |
Hello community, after installing oemof.solph, I wanted to test the first example. Unfortunately I got an error message afterwards. What is my problem?
Traceback (most recent call last):
File "F:\python\0728\pf_oemof_0728.py", line 1, in
from oemof.solph import EnergySystem, Model, Bus, Flow, Source, Sink
ImportError: cannot import name 'Source' from 'oemof.solph' (G:\Python\Lib\site-packages\oemof\solph_init_.py)
add my pip list
Package Version
blinker 1.6.2
colorama 0.4.6
deepdiff 6.3.1
dill 0.3.7
networkx 3.1
numpy 1.25.1
oemof.network 0.5.0a1
oemof.solph 0.5.0
oemof.tools 0.4.2
ordered-set 4.1.0
packaging 23.1
pandapower 2.13.1
pandas 2.0.3
pip 23.1.2
ply 3.11
Pyomo 6.6.1
python-dateutil 2.8.2
pytz 2023.3
scipy 1.11.1
setuptools 65.5.0
six 1.16.0
tqdm 4.65.0
tzdata 2023.3
The text was updated successfully, but these errors were encountered: