multi-vector-simulator icon indicating copy to clipboard operation
multi-vector-simulator copied to clipboard

Create check for efficiency timeseries: Warning when value = 0

Open SabineHaas opened this issue 5 years ago • 6 comments

I had an unbound solution because one of my time series contained nans. This way the heat demand could not be covered during these time steps - as this was the COP time series. We should

  • [x] convert nans to zeros + logging.warning() :x: add an error message in case of zeros in time series while dispatch_costs==0 --> "...use minimal dispatch costs, for example 0.00001, to make excess cheaper than converting energy.

SabineHaas avatar Oct 19 '20 15:10 SabineHaas

Hi @paragpatil39!

I think this would be a good issue for a second programming task (first do #705). Here are the detailed steps to solve the issue:

  • [x] Copy this input file: ./tests/benchmark_test_inputs/Feature_parameters_as_timeseries into ./timeseries_nan
  • [x] Execute the simulation: python mvs_tool.py -ext csv -i timeseries_nan -f -pdf -> simulation runs though
  • [x] Change the file ./timeseries_nan/parameter_timeseries.csv by deleting some parameters
  • [x] Execute the simulation: python mvs_tool.py -ext csv -i timeseries_nan -f -pdf -> simulation should terminate, because the MVS can not interpret the nan in the csv file. We want the MVS to run though, and have to change C0.receive_timeseries_from_csv for that!
  • [ ] Read C0.receive_timeseries_from_csv and add docstrings (compare to other functions)
  • [ ] Propose some assertions for potential pytests for the function in this issue/the PR and discuss with @smartie2076
  • [ ] Create pytests for function C0.receive_timeseries_from_csv
  • [ ] Change function C0.receive_timeseries_from_csv: If any value in the pd.Series is NaN replace by 0. Also show an error message.
  • [ ] Create/change pytest for the changed function that tests the new feature

smartie2076 avatar Dec 10 '20 15:12 smartie2076

@smartie I don't exactly understand this particular instruction: Copy this input file: ./tests/benchmark_test_inputs/Feature_parameters_as_timeseries into ./timeseries_nan

I found out this (./tests/benchmark_test_inputs/Feature_parameters_as_timeseries ) location. But where exactly is./timeseries_nan?

paragpatil39 avatar Dec 21 '20 01:12 paragpatil39

I found out this (./tests/benchmark_test_inputs/Feature_parameters_as_timeseries ) location. But where exactly is./timeseries_nan?

I would like you to create the folder timeseries_nan in ./tests/benchmark_test_inputs :)

smartie2076 avatar Dec 21 '20 09:12 smartie2076

@SabineHaas was this intended for the case that efficiencies are defined by a timeseries? If you think it should be added, please reopen the PR and I will add it later.

[ ] add an error message in case of zeros in time series while dispatch_costs==0 --> "...use minimal dispatch costs, for example 0.00001, to make excess cheaper than converting energy.

smartie2076 avatar Jan 26 '21 17:01 smartie2076

@SabineHaas was this intended for the case that efficiencies are defined by a timeseries? If you think it should be added, please reopen the PR and I will add it later.

[ ] add an error message in case of zeros in time series while dispatch_costs==0 --> "...use minimal dispatch costs, for example 0.00001, to make excess cheaper than converting energy.

Puh, this is a long time and I don't remember exactly our discussions. As far as I remember, you're right, it's for efficiency time series, for the following case:

  • transformer's dispatch_costs==0
  • feed-in tariff == 0
  • efficiency of transformer == 0 (as far as I can see, this would usually only happen in COP time series..)

If this is the case the solver could use the transformer as excess sink, but we want it to use the actual excess sink.

SabineHaas avatar Jan 27 '21 08:01 SabineHaas

Hm, I feel like there should be a check for this, you are right.

smartie2076 avatar Jan 27 '21 09:01 smartie2076