quintel / atlas

Ruby library for working with ETSource data
MIT License
5 stars 1 forks source link

Disable nodes based on sector keys? #90

Open ploh opened 7 years ago

ploh commented 7 years ago

I noticed that ZeroDisabledSectors only disables nodes based on their groups but not based on their sector. Additionally, metal_industry is the only group that will ever get disabled. Probably some more of the feature flags of Dataset should lead to disabling of nodes based on their sector!?

ploh commented 7 years ago

I created a branch disable_nodes_by_sector to test disabling all agriculture and industry nodes - in case that is specified in the dataset.ad file.

Unfortunately, when trying to load a (derived) dataset in ETEngine (with has_agriculture = has_industry = false), this leads to the following error:

Refinery::FailedValidationError: Post-calculation validations failed with the following errors:

  * #<Refinery::Slot (out, electricity) node=:buildings_local_production_electricity> demand (6.235077 PJ) does not match output of the node (6.737433 PJ) (-502,355,926.060168 MJ)
  * #<Refinery::Slot (in, electricity) node=:energy_cokesoven_consumption_coal_gas> demand (0 KJ) does not match demand from the node (0.015342 PJ) (-15,341,876.871023 MJ)/home/peter/synced/quintel/atlas/lib/atlas/runner.rb:30:in `block in calculate'

So it seems the problem is more complicated than I thought. Any ideas?

ChaelKruip commented 7 years ago

@antw is this a problem still?