Git Product home page Git Product logo

offgridders's Introduction

Tool description

The simulation tool Offgridders * generates a model of an user-defined electricity supply system, optimizes the capacities of the system's generation, storage and electrical components and then performs a dispatch optimization of the optimized capacities.

Offgridders is written in python3 and utilizes the Open Energy Modelling Framework (Website) (Code) and as such uses linerarized component models. The electricity system can include AC- as well as DC demand, inverters/rectifiers, a connection to a central electricity grid (optional: with blackouts), diesel generator, PV panels, wind plant and storage. It is possible to allow a defined annual shortage or force a renewable share or system stability constraint. For a visualization of the components and demands to be included, see the Readthedocs: Definition of an electricity supply system.

Examples for electricity systems that can be simulated with Offgridders:

  • Off-grid micro grid, purely fossil-fuelled or hybridized
  • On-grid micro grid, either only consuming or also feeding into the central grid
  • Off-grid SHS
  • Backup systems (diesel generator, SHS, ...) to ensure reliable supply of consumers connected to weak national grids

If you have questions regarding the tool's execution or it's code pieces, please drop an issue so that as time goes by, I can build an FAQ for offgridders as well as improve its features.

*) previous working name: oesmot - Open Electricity System Modelling and Optimization Tool

Setup

  • Download and integrate cbc solver.
  • Open Anaconda prompt, create environment with python==3.6
  • Run: pip install -r requirements.txt
  • Execute test data: python Offgridders.py
  • Run your own simulations by defining the path to your input excel file: python Offgridders.py ./inputs/test_input_template.xlsx

When working as a dev, you need to install additional packages with pip install -r requirements_dev.txt

For Details: See Readthedocs: Installation

Literature

For further reading please refer to Readthedocs: Literature

Change log

MicroGridDesignTool_V3.0

  • New excel template - not compatible with previous versions
  • Taking into account investments into storage power
  • currently working with oemof 0.2.2

MicroGridDesignTool_V2.1

  • Error messages
  • Bugfix: Working renewable constraint
  • Bugfix: Excel-issues with max_shortage=='default' error (from columns='unnamed')

MicroGridDesignTool_V2.0

Major changes:

  • New excel template
  • DC and AC bus, connected with inverters/rectifiers, possible AC/DC demand
  • Forced battery charge criteria (linearized)
  • Minimal renewable share criteria not working!
  • Console execution via "python3 A_main_script.py FILE.xlsx"

MicroGridDesignTool_V1.1

  • Fixed termination due to undefined 'comments', occurring when simulation without sensitivity analysis is performed
  • New constraint: Renewable share (testing needed)
  • Added DC bus including rectifier/inverter (testing needed -> Flows, calculated values)
  • Enabled demand AC + demand DC (testing needed -> Flows, calculated values)
  • PV charge only through battery can be enabled by not inluding a rectifier (testing needed -> Flows, calculated values)
  • New Constraint: Linearized forced charge when national grid available
  • New Constraint: Discharge of battery only when maingrid experiences blackout
  • New Constraint: Inverter from DC to AC bus only active when blackout occurs

MicroGridDesignTool_V1.0

  • Simulation of off- or on-grid energy system (not only MG)
  • 1 hr timesteps, 1 to 365 days evaluation time
  • All input data via excel sheet
  • Easy case definition

Open issues

  • Timestep lengh 15 Min
  • Inlcude generation of network diagram
  • Demand shortage per timestep

offgridders's People

Contributors

bachibouzouk avatar dependabot[bot] avatar marc-juanpera avatar santiagoinfantinom avatar smartie2076 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

offgridders's Issues

GUI

Very, very far back in the priority list

How does one guarantee reliable results?

Hi,

When I researched some ways to verify Offgridders' results, I came to this recent study Martha co-authored: Sustainable Energy Solutions for Remote Areas in the Tropics in which Offgridders' settings were transferred to HOMER in the best possible way and it was shown that the results of both tools were roughly similar.
It showed that Offgridders can deliver results that are as good as HOMER's! To me, it then seems that a reliable Offgridders result is dependent on reliable input settings.
So, if I want to guarantuee reliable results, is it then simply a matter of being very precise about the input settings and case definitions? Or, is there another way I can guarantee valid results?
I'd like to know other's thoughts on this.

Negative timeseries values terminate simulation

When a timeseries has negative values for an investment object, the simulation terminates. This is for example the case for PV plants: Some API might generate a negative value at early/late hours of the day...
grafik

...which then is not noticed when reading the input files but only in a termination of the simulation. The termination message is very generic:

11:42:00-INFO-Starting simulation of case pv-diesel-storage-mg, project site FID_256753, experiment no. 50/200...
11:42:00-INFO-Added constraint: Stability though actual generation of diesel generators and backup through batteries.
11:42:00-INFO-Simulating...
11:42:00-INFO-Optimization successful...
11:42:01-INFO-Restoring attributes will overwrite existing attributes.
11:42:01-WARNING-Stability criterion is strictly not fullfilled, but deviation is less then e6.
11:42:01-INFO-Simulation of case "pv-diesel-storage-mg" resulted in :
                  3.576 currency/kWh, at a renewable share of 83.61 percent with a reliability of 100.0 percent
11:42:01-INFO-    Initial simulation time (s): 0.24 / Actual evaluation time (s): 1.01
11:42:01-INFO-    Estimated simulation time left: 2.3 minutes.


11:42:01-INFO-Starting simulation of case pv-storage-mg, project site FID_91254, experiment no. 51/200...
11:42:01-INFO-Added constraint: Stability though actual generation of diesel generators and backup through batteries.
11:42:01-INFO-Simulating...
11:42:02-ERROR-Optimization failed with status ok and terminal condition infeasible
ERROR: evaluating expression: No value for uninitialized NumericValue object
    InvestmentFlow.invest[bus_electricity_dc,transformer_inverter_dc_ac]
        (expression: 0.2073418975127565*InvestmentFlow.invest[bus_electricity_
        dc,transformer_inverter_dc_ac] +
        0.2125492347806967*InvestmentFlow.invest[source_pv,bus_electricity_dc]
        + 0.21434363752638408*GenericInvestmentStorageBlock.invest[generic_sto
        rage])
11:42:02-ERROR-evaluating expression: No value for uninitialized NumericValue object InvestmentFlow.invest[bus_electricity_dc,transformer_inverter_dc_ac]
    (expression: 0.2073418975127565*InvestmentFlow.invest[bus_electricity_dc,transformer_inverter_dc_ac] + 0.2125492347806967*InvestmentFlow.invest[source_pv,bus_electricity_dc]
 + 0.21434363752638408*GenericInvestmentStorageBlock.invest[generic_storage])
Traceback (most recent call last):
  File "Offgridders.py", line 275, in <module>
    main()
  File "Offgridders.py", line 185, in main
    sensitivity_experiment_s[experiment], experiment_case_dict
  File "D:\PycharmProjects\offgridders\src\G0_oemof_simulate.py", line 74, in run
    experiment, micro_grid_system, model, file_name
  File "D:\PycharmProjects\offgridders\src\G1_oemof_create_model.py", line 483, in simulate
    micro_grid_system.results["meta"] = outputlib.processing.meta_results(model)
  File "C:\ProgramData\Miniconda3\envs\offgridders_python3-6\lib\site-packages\oemof\outputlib\processing.py", line 189, in meta_results
    meta_res = {'objective': om.objective()}
  File "C:\ProgramData\Miniconda3\envs\offgridders_python3-6\lib\site-packages\pyomo\core\base\expression.py", line 55, in __call__
    return self.expr(exception=exception)
  File "C:\ProgramData\Miniconda3\envs\offgridders_python3-6\lib\site-packages\pyomo\core\kernel\expr_coopr3.py", line 208, in __call__
    exception=exception))
  File "C:\ProgramData\Miniconda3\envs\offgridders_python3-6\lib\site-packages\pyomo\core\kernel\expr_coopr3.py", line 812, in _apply_operation
    return sum(c*next(values) for c in self._coef) + self._const
  File "C:\ProgramData\Miniconda3\envs\offgridders_python3-6\lib\site-packages\pyomo\core\kernel\expr_coopr3.py", line 812, in <genexpr>
    return sum(c*next(values) for c in self._coef) + self._const
  File "C:\ProgramData\Miniconda3\envs\offgridders_python3-6\lib\site-packages\pyomo\core\kernel\expr_coopr3.py", line 217, in _evaluate_arglist
    yield value(arg, exception=exception)
  File "C:\ProgramData\Miniconda3\envs\offgridders_python3-6\lib\site-packages\pyomo\core\kernel\numvalue.py", line 170, in value
    % (obj.name,))
ValueError: No value for uninitialized NumericValue object InvestmentFlow.invest[bus_electricity_dc,transformer_inverter_dc_ac]

This could be fixed by printing a warnining for these cases and clipping everything below 0.

[Question] Is it possible to predefine a solar generator's capacity

Hi,
I've been playing around with Offgridders and trying different settings to get to know it. It seems like Offgridders will take the input and suggest a system that is to be built from the ground up.
My question is whether I can run a scenario in which I already have, say, 500 Wp of PV panels installed. Then Offgridders could simulate additional solar panels or sources (wind, generator) and batteries to fulfill the demand

I thought I could perhaps subtract the generated energy of the installed PV panels from the total demand Demand = Etotal - Epv. However, I think this will lead to incorrect results in the simulation. Could someone give some suggestions?

Add CO2 emissions to output parameters

CO2 emissions are important for most projects and would be nice to have as a direct output from Offgridders.

Checklist:

  • Add optional parameter: CO2 emissions per l diesel (template + processing, ensure compatibility!)
  • Add optional parameter: CO2 emissions per kWh maingrid consumtption (template + processing, ensure compatibility!)
  • Add calculation of CO2 emissions
  • Print CO2 emissions to outputs

Change dict parameter calls to constant variables

The simulations in Offgridders are set up from a dict with all necessary parameters. Those parameters are currently called as strings. When a spelling mistake in the code happens, however, these could go unnoticed especially in if-clauses. Replace all parameter calls by calls of a constant variable.

Comparable to this issue in the MVS, which is being solved in this PR.

[Bug] Bugs concerning module structure

I am gathering the bugs I ran into with the current master branch release (v4.2), and which also occur on dev.
This proves that we will need to include more tests so that all usage options are covered.

Add input Values

  • Create csv/excel files
  • read into script
  • link with energy system input

[Bug] Input folder in outputs can not be used for new simulation

When copying the input files to the output folder the folder structure is not kept intact, and no folder timeseries generated. This results in the fact that a simulation can not be run directly with the folder inputs that one accesses from the outputs folder.

Fixing this, one should take into account the setting input_folder_timeseries.

Version: dev, 2020-07-09

[Major] Change module structure

Curretly, classes are (incorrectly) used instead of simply defining functions in Offgridders. All functions and function calls have to be changed to a more pythonic structure. The same has happened with the MVS, and was mentioned in this issue and solved in his PR: Link.

Simulation annuity calculation needs to be checked

While it is expected that there is a large difference between simulating a year and a day with Offgridders, the difference is so high that one should check out if there is a bug in there somewhere.

Note: We are using a diesel generator that is fixed to the peak demand here.

Simulation results of 1 d:

14:16:45-INFO-
 Simulation complete. Resulting parameters saved in "results.csv".
 Overview over results:
  project_site_name                  case     lcoe  res_share
0         FID_15036         pv-storage-mg  0.26304    1.00000
1         FID_15036  pv-diesel-storage-mg  6.07412    0.70622
2        FID_347088         pv-storage-mg  0.26445    1.00000
3        FID_347088  pv-diesel-storage-mg  6.11633    0.70409
4        FID_275788         pv-storage-mg  0.26774    1.00000
5        FID_275788  pv-diesel-storage-mg  6.04419    0.70818
6        FID_233355         pv-storage-mg  0.26789    1.00000
7        FID_233355  pv-diesel-storage-mg  6.04429    0.70818

 Warnings or errors might have occurred.
Please check terminal output or saved log-file to make sure they do not influence your simulation results.

Simulation results of 365 d:

13:36:47-INFO-
 Simulation complete. Resulting parameters saved in "results.csv".
 Overview over results:
  project_site_name                  case     lcoe  res_share
0         FID_15036         pv-storage-mg  0.29812    1.00000
1         FID_15036  pv-diesel-storage-mg  0.29643    0.67439
2        FID_347088         pv-storage-mg  0.29126    1.00000
3        FID_347088  pv-diesel-storage-mg  0.29243    0.74686
4        FID_275788         pv-storage-mg  0.30210    1.00000
5        FID_275788  pv-diesel-storage-mg  0.29856    0.51512
6        FID_233355         pv-storage-mg  0.30190    1.00000
7        FID_233355  pv-diesel-storage-mg  0.29854    0.50489

 Warnings or errors might have occurred.
Please check terminal output or saved log-file to make sure they do not influence your simulation results.

[Documentation] General information on Offgridders

Here, we should gather all information that connected to Offgridders so that we can translate it into a readthedocs in the future.

Available info:

  • Presentation on how to use Offgridders / MST V1
  • Excerpt of Martha Hoffmann´s master thesis on Offgridders functionalities
  • Paper using Offgridders
  • Updated list on current publications with Offgridders
  • Link to a GUI for Offgridders

Inconsistent sizing of transformer station

Transformer station sizing currently a bit fuzzy: If there is only on station (in or out to/from national grid), capacity direct optimized. But if there is a station for consumption from and feed in into grid, the pcc is optimized as two capacities of each the same annuity:

def pointofcoupling_feedin_oem(micro_grid_system, bus_electricity_ac, bus_electricity_ng_feedin, experiment, min_cap_pointofcoupling):
    logging.debug('Added to oemof model: pcc feedin oem')
    pointofcoupling_feedin = solph.Transformer(label="transformer_pcc_feedin",
                                                   inputs={bus_electricity_ac: solph.Flow(
                                                       investment=solph.Investment(
                                                           ep_costs=experiment['pcoupling_cost_annuity']),
                                                       variable_costs=experiment['pcoupling_cost_var']-experiment['maingrid_feedin_tariff']
                                                   )},
                                                   outputs={bus_electricity_ng_feedin: solph.Flow()},
                                                   conversion_factors={bus_electricity_ac: experiment['pcoupling_efficiency']})
    micro_grid_system.add(pointofcoupling_feedin)
    return

def pointofcoupling_consumption_fix(micro_grid_system, bus_electricity_ac, bus_electricity_ng_consumption, experiment, cap_pointofcoupling):
    logging.debug('Added to oemof model: pcc consumption fix')
    pointofcoupling_consumption = solph.Transformer(label="transformer_pcc_consumption",
                                                   inputs={bus_electricity_ng_consumption: solph.Flow(
                                                       nominal_value=cap_pointofcoupling, # inflow is limited to nominal value!
                                                       variable_costs = experiment['pcoupling_cost_var']+experiment['maingrid_electricity_price'],                                                       )},
                                                   outputs={bus_electricity_ac: solph.Flow()},
                                                   conversion_factors={
                                                       bus_electricity_ng_consumption: experiment['pcoupling_efficiency']})  # is efficiency of the generator?? Then this should later on be included as a function of the load factor

    micro_grid_system.add(pointofcoupling_consumption)
    return pointofcoupling_consumption

Whereas when evaluating the results, the transformer station is sized as the maximum capacties of these two transfomers (assuming that a single transformer station is installed and can be used BIDIRECTIONALLY):

    # get capacities
    if case_dict['pcc_consumption_fixed_capacity'] != None or case_dict['pcc_feedin_fixed_capacity'] != None:
        pcc_cap = []
        if case_dict['pcc_consumption_fixed_capacity'] == False:
            pcc_cap.append(consumption_utility_side.max())
        elif isinstance(case_dict['pcc_consumption_fixed_capacity'], float):
            pcc_cap.append(case_dict['pcc_consumption_fixed_capacity'])

        if case_dict['pcc_feedin_fixed_capacity'] == False:
            pcc_cap.append(feedin_utility_side.max())
        elif isinstance(case_dict['pcc_feedin_fixed_capacity'], float):
            pcc_cap.append(case_dict['pcc_feedin_fixed_capacity'])

        oemof_results.update({'capacity_pcoupling_kW': max(pcc_cap)})
    elif case_dict['pcc_consumption_fixed_capacity'] == None and case_dict['pcc_feedin_fixed_capacity'] == None:
        oemof_results.update({'capacity_pcoupling_kW': 0})
    else:
        logging.warning("Invalid value of pcc_consumption_fixed_capacity and/or pcc_feedin_fixed_capacity.")

Then, again, the costs of the transformer station are multiplied by 2 (assuming that a bi-directional ts is twice as expensive as a unidirectional one and trying to replicate the optimization assumtions):

    if case_dict['pcc_consumption_fixed_capacity'] != None and case_dict['pcc_feedin_fixed_capacity'] != None:
        interval_annuity.update({'annuity_pcoupling': 2*experiment['pcoupling_cost_annuity'] * oemof_results['capacity_pcoupling_kW']})
    else:
        interval_annuity.update({'annuity_pcoupling': experiment['pcoupling_cost_annuity'] * oemof_results['capacity_pcoupling_kW']})

[Documentation] Check readthedocs for needed updates

The readthedocs has been copied from the Wiki, but that displayed an old version of Offgridders. We need to check if the documentation copied is still valid, and delete or create issues for outdated information. Also, we might want to reorder some of the content. Files to be checked:

  • Blackouts.rst
  • Exemplary.rst
  • Configuration.rst
  • index.rst
  • Solar.rst
  • Definition.rst
  • Sensitivity.rst
  • Results.rst
  • Home.rst
  • Constrains.rst
  • Installation.rst
  • Overview.rst
  • Stability.rst
  • Cost.rst
  • Validity.rst
  • Load.rst
  • Evaluation.rst
  • Inputs.rst
  • Example.rst
  • Components.rst

Travis does not update

When creating a PR, travis runs and tests the branch. The tests also run through:

image

image

Still, the test status is not updated in the PR request itself. What has to be changed?

#54
image

[Release] Prepare & Do Offgridders release v4.1

With the major changes in #53, a new release should be published:

  • #53 solved, dev is running though on travis
  • Run Offgridders locally including MCA
  • dev in master
  • changelog.md - update for [unreleased] to [Offgridders v4.1]
  • release
  • merge master back into dev
  • changelog.md - update for [unreleased]

[Bug] Cost connected to diesel generators not displayed correctly

A simulation resulting in a sole diesel system resulted in

  1
case pv-diesel-storage-mg
lcoe 0.06588
annuity 47.07107
npv 351.59474
co2_emissions_kgCO2eq 530.35728
total_demand_supplied_annual_kWh 714.50333
capacity_genset_kW 0.24
total_genset_generation_kWh 678.77816
consumption_fuel_annual_l 197.89451
annuity_genset 47.07107
expenditures_fuel_annual 0
costs_genset 351.59474
first_investment 60
operation_mantainance_expenditures 423.93891
expenditures_fuel_total 0

There are multiple issues with this:

  • Diesel generator generation total_genset_generation_kWh < total_demand_supplied_annual_kWh
  • first_investment very low compared to costs_genset
  • expenditures_fuel_annual = 0
  • Very low lcoe

Necessary code changes:

  • Calculation of total_demand_supplied_annual_kWh needs to be fixed
  • Calculation of price_fuel needs to be fixed
  • Residual value deducted as a present value
  • By hand calculation of specific generator costs and Offgridders calculation do not match up

A path error in windows when running large sensitivity experiments

When executing Offgridders on 5+ sensitivity parameters at once in windows, a path error in windows occurs:

23:44:59-INFO-Starting simulation of case PV-wind-storage-shortage-mg, project site Cluster3, experiment no. 1/208...
23:45:13-INFO-Added constraint: Stability though actual generation of diesel generators and backup through batteries.
23:45:17-INFO-Simulating...
23:45:40-INFO-Optimization successful...
Traceback (most recent call last):
  File "A0_main_script.py", line 131, in <module>
    oemof_results = oemof_simulate.run(sensitivity_experiment_s[experiment], experiment_case_dict)
  File "C:\MicroGridTool\offgridders-master\G0_oemof_simulate.py", line 57, in run
    oemof_model.store_results(micro_grid_system, file_name, experiment['output_folder'])
  File "C:\MicroGridTool\offgridders-master\G1_oemof_create_model.py", line 329, in store_results
    micro_grid_system.dump(dpath=output_folder+'/oemof', filename = file_name + ".oemof" )
  File "C:\Users\paul.bertheau\AppData\Local\Continuum\anaconda3\envs\environment_mgt\lib\site-packages\oemof\energy_system.py", line 191, in dump
    pickle.dump(self.__dict__, open(os.path.join(dpath, filename), 'wb'))
FileNotFoundError: [Errno 2] No such file or directory: 'simulation_results/energy_paper_v3/oemof\\PV-wind-storage-shortage-mg_s_Cluster3_demand_ac_scaling_factor_1.0_pv_cost_investment_1625.0_shortage_max_allowed_0.0_storage_capacity_cost_investment_700.0_wacc_0.08_wind_cost_investment_737.5.oemof'

This error does not occur on Ubuntu.

Used input template: test_input_template_paul.xlsx

[Bug] Reading input paths is not relative but from offgridders main directory

When executing Offgridders with

>python Offgridders.py NESP2_NDC/inputs/input_template_excel.xlsx NESP_2_Tests/outputs_martha

Ie. for simulation inputs in a sub-folder then the error message

Traceback (most recent call last):
  File "Offgridders.py", line 275, in <module>
    main()
  File "Offgridders.py", line 69, in main
    ) = excel_template.process_excel_file(input_excel_file)
  File "D:\PycharmProjects\offgridders\src\B_read_from_files.py", line 55, in process_excel_file
    shutil.copy(path_from, path_to)
  File "C:\ProgramData\Miniconda3\envs\offgridders_python3-6\lib\shutil.py", line 245, in copy
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "C:\ProgramData\Miniconda3\envs\offgridders_python3-6\lib\shutil.py", line 120, in copyfile
    with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: 'D:\\PycharmProjects\\offgridders\\inputs\\timeseries\\NESP_2.csv'

Terminates the simulation.

Version: dev, 2020-07-09

Battery charge with perfect foresight

Blackouts are perfected foresighted and batteries started when optimizing the energy system. this does not necessarily make sense. Ideas:

  • At least charge from the grid can be avoided by removing the rectifier -> That would only leave PV to charge battery
  • Create additional bus to enable wind to charge batteries, too -> still, gensets would not be allowed to feed-in, so generators with minimal loading would result in excess
  • Limit battery charge to renewable generation at a certain timestep. CAP*actual_value

Correct readthedocs

-[ ] Erase Oesmot Installation
-[ ] Erase Home
-[ ] Replace Oesmot in every page

Excessively long runtime for some scenarios with minimal loading

When using minimal loading with a generator (genset_with_minimal_loading), some scenarios will take very long to solve or not solve (or terminate) at all.

Possible explainations:

  • Minimal loading is higher than lowest night load.
    (1) It is somewhat random when the generator is turned on/off to charge a battery of sufficient size. This might cause the solver some troubles, as there is no perfect solution
    (2) Due to the status variables (0/1) of the generator and low battery capacities for PV, the solver has to size the batteries for storing excess diesel generation and gets stuck there.

Options:

  • Divide the generator into multiple generators, effectively decreasing the minimal power that can be provided (setting number_of_equal_generators)
  • Try to play around with the solvers settings, ie. cmdline_option and cmdline_option_value. Increasing the cmdline_option_value will produce a result faster, as we accept semi-optimal solutions. ratioGap refers to the procentual change between last found solution and next better solution, whild AllowedGap is an absolute value between last found solution and optimal (linear) solution.

Downward compability

V1 -> V2 currently not compatible?
V2 -> V3 input excel file should be downwards compatible, at least with error message

Wiki on github needs to be removed

To avoid a double structure with the readthedocs, can you @santiagoinfantinom delete all the Wiki entries on github? Make sure, that you copied there info into the new readthedocs before deleting!

For that, you go to the different headers in the index of the wiki and edit the pages:
grafik

You can then delete the page:
grafik

[Bug] Readthedocs is not working

The readthedocs is not working. Please use this as a reference on what might be wrong - basically, the structure should be the same in Offgridders.

User feedback to be discussed

There is user feedback that should be discussed in the future. Some of the notes might be referenced in other issues and, if so, should be linked.

Need to update Pyomo version in requirements.txt for python3.7

On my windows10 distribution, I am using a python3.7 environment for offgridders. However, this causes the simulation to terminate:

Traceback (most recent call last):
  File "Offgridders.py", line 20, in <module>
    import src.G0_oemof_simulate as oemof_simulate
  File "D:\PycharmProjects\offgridders\src\G0_oemof_simulate.py", line 22, in <module>
    import src.G1_oemof_create_model as oemof_model
  File "D:\PycharmProjects\offgridders\src\G1_oemof_create_model.py", line 3, in <module>
    import oemof.solph as solph
  File "D:\PycharmProjects\offgridders\win_env\lib\site-packages\oemof\solph\__init__.py", line 2, in <module>
    from oemof.solph.models import Model
  File "D:\PycharmProjects\offgridders\win_env\lib\site-packages\oemof\solph\models.py", line 11, in <module>
    import pyomo.environ as po
  File "D:\PycharmProjects\offgridders\win_env\lib\site-packages\pyomo\environ\__init__.py", line 100, in <module>
    _import_packages()
  File "D:\PycharmProjects\offgridders\win_env\lib\site-packages\pyomo\environ\__init__.py", line 66, in _import_packages
    _do_import(pname)
  File "D:\PycharmProjects\offgridders\win_env\lib\site-packages\pyomo\environ\__init__.py", line 17, in _do_import
    importlib.import_module(pkg_name)
  File "D:\PycharmProjects\offgridders\win_env\lib\importlib\__init__.py", line 133, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "D:\PycharmProjects\offgridders\win_env\lib\site-packages\pyomo\pysp\__init__.py", line 27, in <module>
    import pyomo.pysp.scenariotree
  File "D:\PycharmProjects\offgridders\win_env\lib\site-packages\pyomo\pysp\scenariotree\__init__.py", line 18, in <module>
    import pyomo.pysp.scenariotree.manager
  File "D:\PycharmProjects\offgridders\win_env\lib\site-packages\pyomo\pysp\scenariotree\manager.py", line 997
    async=False,
        ^
SyntaxError: invalid syntax

Here they acknowledge the issue with python3.7. The issue is solved when installing the most recent Pyomo version:

pip install pyomo==5.7

Therefore, the requirements.txt should be updated.

Translating project_location_name and column heads into strings automatically

When only using numbers as project location names of for the column heads of the csv files, the simulation terminates. This is because the excel reader parses both as a integer/float value and not as a string.
For project_location_name an error message is shown, but for the column heads, the number is interpreted as a column number and leads to an error futher down the line.

Clipboard - 13  Juli 2020 17_12

The documentation should mention the naming convention for labels/column heads. Maybe ways to solve this from a coding perspective can also be explored.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.