Skip to content
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

Objective value for CI returns nan unless load_shedding is true #361

Open
2 tasks done
GbotemiB opened this issue Jul 22, 2024 · 1 comment
Open
2 tasks done

Objective value for CI returns nan unless load_shedding is true #361

GbotemiB opened this issue Jul 22, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@GbotemiB
Copy link
Contributor

GbotemiB commented Jul 22, 2024

Checklist

  • I am using the current main branch or the latest release. Please indicate.
  • I am running on an up-to-date pypsa-africa environment. Update via conda env update -f envs/environment.yaml.

Describe the Bug

The test config for CI returns nan unless load_shedding is set to True

Please provide a description of what the bug is and add a minimal example/command for reproducing the bug.

Error Message

If applicable, paste any terminal output to help illustrating your problem.

WARNING:pypsa.io:The following Link have buses which are not defined:
Index(['H2 pipeline NG.10_1 -> NG.12_1', 'H2 pipeline NG.12_1 -> NG.10_1',
       'H2 pipeline NG.12_1 -> NG.23_1', 'H2 pipeline NG.12_1 -> NG.29_1',
       'H2 pipeline NG.14_1 -> NG.23_1', 'H2 pipeline NG.15_1 -> NG.19_1',
       'H2 pipeline NG.19_1 -> NG.20_1', 'H2 pipeline NG.19_1 -> NG.37_1',
       'H2 pipeline NG.1_1 -> NG.14_1', 'H2 pipeline NG.23_1 -> NG.26_1',
       'H2 pipeline NG.23_1 -> NG.27_1', 'H2 pipeline NG.23_1 -> NG.7_1',
       'H2 pipeline NG.24_1 -> NG.27_1', 'H2 pipeline NG.25_1 -> BJ.8_1',
       'H2 pipeline NG.25_1 -> NG.28_1', 'H2 pipeline NG.26_1 -> NG.15_1',
       'H2 pipeline NG.27_1 -> NG.19_1', 'H2 pipeline NG.28_1 -> NG.25_1',
       'H2 pipeline NG.28_1 -> NG.31_1', 'H2 pipeline NG.29_1 -> NG.12_1',
       'H2 pipeline NG.29_1 -> NG.23_1', 'H2 pipeline NG.29_1 -> NG.28_1',
       'H2 pipeline NG.30_1 -> NG.24_1', 'H2 pipeline NG.30_1 -> NG.29_1',
       'H2 pipeline NG.31_1 -> NG.30_1', 'H2 pipeline NG.33_1 -> NG.10_1',
       'H2 pipeline NG.33_1 -> NG.1_1', 'H2 pipeline NG.3_1 -> NG.33_1',
       'H2 pipeline NG.3_1 -> NG.9_1', 'H2 pipeline NG.6_1 -> NG.10_1',
       'H2 pipeline NG.6_1 -> NG.33_1', 'H2 pipeline NG.7_1 -> NG.26_1'],
      dtype='object', name='name')
WARNING:pypsa.io:The following Link have buses which are not defined:
Index(['H2 pipeline NG.10_1 -> NG.12_1', 'H2 pipeline NG.12_1 -> NG.10_1',
       'H2 pipeline NG.12_1 -> NG.23_1', 'H2 pipeline NG.12_1 -> NG.29_1',
       'H2 pipeline NG.14_1 -> NG.23_1', 'H2 pipeline NG.15_1 -> NG.19_1',
       'H2 pipeline NG.19_1 -> NG.20_1', 'H2 pipeline NG.19_1 -> NG.37_1',
       'H2 pipeline NG.1_1 -> NG.14_1', 'H2 pipeline NG.23_1 -> NG.26_1',
       'H2 pipeline NG.23_1 -> NG.27_1', 'H2 pipeline NG.23_1 -> NG.7_1',
       'H2 pipeline NG.24_1 -> NG.27_1', 'H2 pipeline NG.25_1 -> BJ.8_1',
       'H2 pipeline NG.25_1 -> NG.28_1', 'H2 pipeline NG.26_1 -> NG.15_1',
       'H2 pipeline NG.27_1 -> NG.19_1', 'H2 pipeline NG.28_1 -> NG.25_1',
       'H2 pipeline NG.28_1 -> NG.31_1', 'H2 pipeline NG.29_1 -> NG.12_1',
       'H2 pipeline NG.29_1 -> NG.23_1', 'H2 pipeline NG.29_1 -> NG.28_1',
       'H2 pipeline NG.30_1 -> NG.24_1', 'H2 pipeline NG.30_1 -> NG.29_1',
       'H2 pipeline NG.31_1 -> NG.30_1', 'H2 pipeline NG.33_1 -> NG.10_1',
       'H2 pipeline NG.33_1 -> NG.1_1', 'H2 pipeline NG.3_1 -> NG.33_1',
       'H2 pipeline NG.3_1 -> NG.9_1', 'H2 pipeline NG.6_1 -> NG.10_1',
       'H2 pipeline NG.6_1 -> NG.33_1', 'H2 pipeline NG.7_1 -> NG.26_1'],
      dtype='object', name='name')
WARNING:pypsa.io:Components Index(['BJ1 residential biomass', 'BJ1 residential oil',
       'NG0 residential biomass', 'NG0 residential oil',
       'NG2 residential biomass', 'NG2 residential oil'],
      dtype='object', name='Load') for attribute p_set of Load are not in main components dataframe loads
INFO:pypsa.io:Imported network elec_s_4_ec_lc1_Co2L_144H_2030_0.071_AB_120export.nc has buses, carriers, generators, global_constraints, lines, links, loads, storage_units, stores
INFO:pypsa.linopf:Prepare linear problem
INFO:__main__:no h2 export constraint set
WARNING:__main__:Impossible to set H2 cap for the following links: Index(['BJ1 0 Fischer-Tropsch', 'BJ1 0 H2 Electrolysis', 'BJ1 0 H2 Fuel Cell',
       'BJ1 0 H2 export', 'BJ1 0 OCGT', 'BJ1 0 SMR', 'BJ1 0 SMR CC',
       'BJ1 0 Sabatier', 'BJ1 0 battery charger', 'BJ1 0 battery discharger',
       ...
       'NG2 0 urban central gas CHP CC', 'NG2 0 urban central gas boiler',
       'NG2 0 urban central resistive heater',
       'NG2 0 urban central solid biomass CHP',
       'NG2 0 urban central solid biomass CHP CC',
       'NG2 0 urban central water tanks charger',
       'NG2 0 urban central water tanks discharger',
       'biomass transport NG0 0 <-> NG0 1',
       'biomass transport NG0 1 <-> NG0 0', 'process emissions'],
      dtype='object', length=206)
INFO:pypsa.linopf:Total preparation time: 1.17s
INFO:pypsa.linopf:Solve linear problem using Cbc solver
WARNING:pypsa.linopf:Optimization failed with status warning and termination condition other
INFO:pypsa.io:Exported network elec_s_4_ec_lc1_Co2L_144H_2030_0.071_AB_120export.nc has stores, carriers, lines, links, buses, storage_units, generators, global_constraints, loads
INFO:__main__:Objective function: nan
INFO:__main__:Objective constant: 1862023.814238865
INFO:__main__:Maximum memory usage: (577.03125, 1721641663.650857)

In some cases it may also be useful to share your list of installed packages: conda list.

<paste here>
@GbotemiB GbotemiB added the bug Something isn't working label Jul 22, 2024
@davide-f
Copy link
Member

davide-f commented Jul 25, 2024

Fixed with #360 ; many thanks! :D
Do I get it right?

@davide-f davide-f reopened this Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants