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

Generic share constraint bounds #95

Merged
merged 1 commit into from
Aug 22, 2018
Merged

Conversation

gidden
Copy link
Member

@gidden gidden commented Aug 7, 2018

Here's the start of a test @danielhuppmann

Please confirm that this PR has done the following:

  • Tests Added
  • Documentation Added
  • Description in RELEASE_NOTES.md Added

Adding to RELEASE_NOTES.md

Please add a single line in the release notes similar to the following:

- (#XX)[http://link-to-pr.com] Added feature which does something

@gidden gidden changed the base branch from master to hackathon-prs August 7, 2018 09:39
---------------

Seattle canning_plant production (original: 350) is limited to 50% of all
transport_from_san-diego (original: 550). Expected outcome: some increase of

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E501 line too long (80 > 79 characters)

@gidden
Copy link
Member Author

gidden commented Aug 7, 2018

note this can also use mode='all' for the transport technology

@danielhuppmann
Copy link
Member

can we split up the tests into multiple files and call them test_feature_{}.py, like test_feature_addon.py? These tests are getting quite lenghty... Also, running the add-on test first is not ideal - should first test core features, then the MESSAGE-specific features...

@gidden
Copy link
Member Author

gidden commented Aug 7, 2018

Yes, as you wish. In principle, the order of tests should not matter (they should be independent of order). Please feel free to implement as you see fit.

@gidden
Copy link
Member Author

gidden commented Aug 7, 2018

rebased on most recent hackathon prs. should be good to go at your convenience @danielhuppmann

'kwargs': dict(
idx_sets=['shares', 'node', 'node', 'type_tec', 'mode',
'commodity', 'level', 'year', 'time'],
idx_names=['shares', 'node', 'node_loc', 'type_tec', 'mode',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E501 line too long (84 > 79 characters)

'kwargs': dict(
idx_sets=['shares', 'node', 'node', 'type_tec', 'mode',
'commodity', 'level', 'year', 'time'],
idx_names=['shares', 'node', 'node_loc', 'type_tec', 'mode',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E501 line too long (84 > 79 characters)

@gidden
Copy link
Member Author

gidden commented Aug 7, 2018

@danielhuppmann, I took a shot at implementing the first upper bound constraint. I have tests which pass and confirm it works in principle. I'm sure it's ugly, but I think it covers the broad strokes of our discussion today.

@OFR-IIASA, this should be ready for testing if you want to go for it. mode == 'all' is supported.

'type_tec'],
idx_names=['shares', 'commodity', 'level',
'type_tec_share', 'type_tec_total'])
# idx_sets=['shares', 'node', 'node', 'type_tec', 'mode',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E122 continuation line missing indentation or outdented
E501 line too long (80 > 79 characters)

idx_names=['shares', 'commodity', 'level',
'type_tec_share', 'type_tec_total'])
# idx_sets=['shares', 'node', 'node', 'type_tec', 'mode',
# 'commodity', 'level', 'year', 'time'],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E122 continuation line missing indentation or outdented

'type_tec_share', 'type_tec_total'])
# idx_sets=['shares', 'node', 'node', 'type_tec', 'mode',
# 'commodity', 'level', 'year', 'time'],
idx_sets=['shares', 'node', 'node', 'type_tec',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

W291 trailing whitespace

# idx_sets=['shares', 'node', 'node', 'type_tec', 'mode',
# 'commodity', 'level', 'year', 'time'],
idx_sets=['shares', 'node', 'node', 'type_tec',
'mode', 'commodity', 'level'],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

W291 trailing whitespace

# 'commodity', 'level', 'year', 'time'],
idx_sets=['shares', 'node', 'node', 'type_tec',
'mode', 'commodity', 'level'],
idx_names=['shares', 'node_share', 'node', 'type_tec',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

W291 trailing whitespace

idx_sets=['shares', 'node', 'node', 'type_tec',
'mode', 'commodity', 'level'],
idx_names=['shares', 'node_share', 'node', 'type_tec',
'mode', 'commodity', 'level'])

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

W291 trailing whitespace

(s.init_set, {
'args': ('map_shares_commodity_total',),
'kwargs': dict(
idx_sets=['shares', 'node', 'node', 'type_tec',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

W291 trailing whitespace

'args': ('map_shares_commodity_total',),
'kwargs': dict(
idx_sets=['shares', 'node', 'node', 'type_tec',
'mode', 'commodity', 'level'],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

W291 trailing whitespace

'kwargs': dict(
idx_sets=['shares', 'node', 'node', 'type_tec',
'mode', 'commodity', 'level'],
idx_names=['shares', 'node_share', 'node', 'type_tec',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

W291 trailing whitespace

idx_sets=['shares', 'node', 'node', 'type_tec',
'mode', 'commodity', 'level'],
idx_names=['shares', 'node_share', 'node', 'type_tec',
'mode', 'commodity', 'level'])

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

W291 trailing whitespace

@gidden
Copy link
Member Author

gidden commented Aug 9, 2018

Great PR @danielhuppmann, should we be good to go after docs are included?

@gidden
Copy link
Member Author

gidden commented Aug 9, 2018

and after stickler is appeased? =P

@gidden
Copy link
Member Author

gidden commented Aug 9, 2018

want me to make this PR based on an upstream branch so you can commit directly?

add LaTeX docstrings for generic commodity-share constraints
@gidden gidden merged commit dda2ff5 into iiasa:hackathon-prs Aug 22, 2018
@gidden gidden mentioned this pull request Aug 22, 2018
gidden added a commit that referenced this pull request Aug 29, 2018
add LaTeX docstrings for generic commodity-share constraints
gidden added a commit that referenced this pull request Aug 30, 2018
add LaTeX docstrings for generic commodity-share constraints
gidden added a commit that referenced this pull request Sep 17, 2018
add LaTeX docstrings for generic commodity-share constraints
gidden added a commit that referenced this pull request Nov 14, 2018
add LaTeX docstrings for generic commodity-share constraints
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants