Skip to content

Fix report_timing for constructing objects without index_set()#1298

Merged
jsiirola merged 1 commit intoPyomo:masterfrom
jsiirola:timing-fix
Feb 17, 2020
Merged

Fix report_timing for constructing objects without index_set()#1298
jsiirola merged 1 commit intoPyomo:masterfrom
jsiirola:timing-fix

Conversation

@jsiirola
Copy link
Copy Markdown
Member

Fixes #N/A

Summary/Motivation:

This fixes the exception being raised by report_timing() for non-indexed components (that do not implement the index_set() method.

Changes proposed in this PR:

  • fix exception raised when component is not an IndexedCOmponent
  • add unit tests for the construction timer

Legal Acknowledgement

By contributing to this software project, I agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the BSD license.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

@jsiirola jsiirola changed the title Fix timing construction of objects without index_set() Fix report_timing for constructing objects without index_set() Feb 17, 2020
Copy link
Copy Markdown
Member

@blnicho blnicho left a comment

Choose a reason for hiding this comment

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

Looks fine pending passing tests

@jsiirola jsiirola merged commit bf7daa3 into Pyomo:master Feb 17, 2020
@jsiirola jsiirola deleted the timing-fix branch February 17, 2020 21:26
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.

2 participants