Feature/integrate tsam seg objwei reviewed #1266
This run and associated checks have been archived and are scheduled for deletion.
Learn more about checks retention
Annotations
7 errors and 3 warnings
/home/runner/work/oemof-solph/oemof-solph/examples/tsam/invest_optimize_all_technologies_using_mp_and_tsam.py#L90
from oemof import solph
def main():
# Read data file
- filename = os.path.join(os.getcwd(), "../storage_investment/storage_investment.csv")
+ filename = os.path.join(
+ os.getcwd(), "../storage_investment/storage_investment.csv"
+ )
try:
data = pd.read_csv(filename)
except FileNotFoundError:
msg = "Data file not found: {0}. Only one value used!"
warnings.warn(msg.format(filename), UserWarning)
|
/home/runner/work/oemof-solph/oemof-solph/examples/tsam/invest_optimize_all_technologies_using_mp_and_tsam.py#L304
# initialise the operational model
om = solph.Model(energysystem)
# if tee_switch is true solver messages will be displayed
logging.info("Solve the optimization problem")
- om.write('my_model.lp', io_options={'symbolic_solver_labels': True})
+ om.write("my_model.lp", io_options={"symbolic_solver_labels": True})
om.solve(solver="cbc", solve_kwargs={"tee": True})
##########################################################################
# Check and plot the results
##########################################################################
|
/home/runner/work/oemof-solph/oemof-solph/tests/test_scripts/test_solph/test_tsam/test_full_load_hours_and_variable_costs.py#L71
outputs={
bel: solph.Flow(
full_load_time_min=0.8,
full_load_time_max=0.8,
nominal_value=100,
- variable_costs=[0.1, 0.2, 0.3, 0.4]
+ variable_costs=[0.1, 0.2, 0.3, 0.4],
)
},
)
# create simple sink object representing the electrical demand
|
/home/runner/work/oemof-solph/oemof-solph/tests/test_scripts/test_solph/test_tsam/test_storage_invest_tsam_integration.py#L148
init_soc = 0
def test_storage_investment():
"""Make sure that max SOC investment equals max load"""
- assert results[storage, None]["period_scalars"]["invest"].iloc[0] == pytest.approx(first_input)
+ assert results[storage, None]["period_scalars"]["invest"].iloc[
+ 0
+ ] == pytest.approx(first_input)
def test_storage_input():
- assert flows["electricity-storage"][0] == pytest.approx((first_input - 0.99 * init_soc) / 0.9)
+ assert flows["electricity-storage"][0] == pytest.approx(
+ (first_input - 0.99 * init_soc) / 0.9
+ )
assert flows["electricity-storage"][1] == 0
assert flows["electricity-storage"][2] == 0
assert flows["electricity-storage"][3] == 0
assert flows["electricity-storage"][4] == 0
assert flows["electricity-storage"][5] == 0
|
/home/runner/work/oemof-solph/oemof-solph/tests/test_scripts/test_solph/test_tsam/test_storage_tsam_integration.py#L145
last_output = (100 * 1 / 0.8) / 0.99
init_soc = (first_input - last_output) / (1 / 0.99 + 0.99)
def test_storage_input():
- assert flows["electricity-storage"][0] == pytest.approx((first_input - 0.99 * init_soc) / 0.9)
+ assert flows["electricity-storage"][0] == pytest.approx(
+ (first_input - 0.99 * init_soc) / 0.9
+ )
assert flows["electricity-storage"][1] == 0
assert flows["electricity-storage"][2] == 0
assert flows["electricity-storage"][3] == 0
assert flows["electricity-storage"][4] == 0
assert flows["electricity-storage"][5] == 0
|
check
Process completed with exit code 1.
|
docs
The operation was canceled.
|
clean
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions/setup-python@v2, actions/cache@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
check
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions/setup-python@v2, actions/cache@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
docs
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions/setup-python@v2, actions/cache@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|