quintel / refinery

Calculates node demands and edge shares for sparse energy graphs.
2 stars 0 forks source link

Add 'primary_production.csv' #28

Closed StijnDellaert closed 11 years ago

StijnDellaert commented 11 years ago

In etsource/data/datasets/nl/ there is the central producers csv and an old chp.csv (can we remove this?). Can I add the new primary_production.csv to this folder, and will it then be used automatically?

antw commented 11 years ago

I'll remove the old chp.csv file which is no longer used.

Right now you'll need to name the file central_producers.csv (I assume the content is mostly the same?). I'll update Atlas' naming conventions today to use primary_production.csv instead and let you know when I'm done.

StijnDellaert commented 11 years ago

I think there is a misunderstanding, the primary_production.csv (extraction of fossil fuels etc.) is not the same as the central_producers.csv (production of power and heat plants) and they will both be needed to calculate the energy subgraph.

antw commented 11 years ago

I think there is a misunderstanding

Sorry. :innocent:

Can you come back to the energy sub-graph a little later? I'll need to add support for the new CSV to Atlas (this is fairly simple), but I also need to deal with time-curves, flex-max, and green gas splits before this sector works.

Of course you can add new CSVs while you're waiting on me, but Atlas won't find them automatically.

StijnDellaert commented 11 years ago

Yes sure, thanks :). We'll first work on the other sectors. And getting used to Git..

antw commented 11 years ago

I've added a PRIMARY_PRODUCTION function which you can now use in queries; if you provide a node key, it will return the value of the demand column from primary_production.csv. Place that CSV file in "data/datasets/nl" alongside central_producers.csv.

PRIMARY_PRODUCTION(energy_production_non_biogenic_waste)
# => 31202.0

I added TIME_CURVE also, but it will return always return 0.0 (until I implement it properly).

StijnDellaert commented 11 years ago

Nice, I'll try to update the nodes to use the file (locally for now)

StijnDellaert commented 11 years ago

I updated the primary production nodes, querying the PRIMARY_PRODUCTION. However Atlas has some problems with the nil values: rake aborted! Non-numeric query result: nil (executing: "PRIMARY_PRODUCTION(energy_production_manure)")

I git upped atlas and also did a bundle install to be sure. Any clues @antw ?

antw commented 11 years ago

Sorry, this is now fixed. git up Atlas one more time. :wink:

You don't need to bundle install most of the time; generally that's only necessary if a dependency (e.g Refinery, or some third-party library we use) has been changed.

StijnDellaert commented 11 years ago

It's working now! some additional nodes can be calculated.

wmeyers commented 11 years ago

Can this be closed @antw?