pyomo icon indicating copy to clipboard operation
pyomo copied to clipboard

`ContinuousSet.get_interval()` should always report a step None

Open jsiirola opened this issue 3 years ago • 2 comments
trafficstars

Summary

While the ContinuousSet is implemented as a discrete set, It should not report that its interval is discrete.

Steps to reproduce the issue

>>> from pyomo.dae import *
>>> c = ContinuousSet(bounds=(0,1))
>>> c.construct()
>>> c.get_interval()
(0, 1, 1)

Information on your system

Pyomo version: all Python version: Operating system: How Pyomo was installed (PyPI, conda, source): Solver (if applicable):

Additional information

jsiirola avatar Aug 26 '22 23:08 jsiirola

What should it report after discretization?

michaelbynum avatar Aug 29 '22 13:08 michaelbynum

I think it should probably still report None. That turns out to be a no-op for collocation as the discretization points do not use a fixed step. However, that would be a change for the finite difference discretization: right now, it results in the ContinuousSet reporting the discretization step as the ContinuousSet's step.

jsiirola avatar Aug 29 '22 13:08 jsiirola