ControlSystems.jl icon indicating copy to clipboard operation
ControlSystems.jl copied to clipboard

iscontinuous function not found

Open hurak opened this issue 5 years ago • 6 comments

Why isn't the iscontinuous function among the exported (and thus available to users)? I am sure the function is very useful for users, why not exporting it? Was it just an unintended omission?

hurak avatar Mar 12 '19 09:03 hurak

Yes, seems like it would be a good idea to export a function with that functionality.

To me iscontinuous feels a little bit imprecise though, the state of a discrete-time linear system is also continuous, and one could think that iscontinuous is true for these systems while being false for boolean statespace models.

On the other hand, function names like iscontinuoustime or is_continuous_time are quite long. But since the function would probably be used only once in each call, and since it should "soon" be possible to dispatch on continuous and discrete time, it seems like is_continuous_time is a reasonable function name given that it is more precise. I would say I have a weak preference for is_continuous_time. But perhaps someone has a better suggestion altogether.

Anyway, the corresponding isdiscrete or is_discrete_time should also be exported as well.

olof3 avatar Dec 19 '19 13:12 olof3

I agree that iscontinuous is imprecise. And I like the proposed is_continuous_time and is_discrete_time.

hurak avatar Dec 19 '19 14:12 hurak

Idea: iscontinous means continous both in value and in time iscontinous can take an additional type to care just about being continuous in value or being continuous in time.

freemin7 avatar Feb 17 '20 12:02 freemin7

iscontinous means continous both in value and in time

I am not sure what this would mean in practice. I don't think we have any systems that are not continuous in "value".

I agree that iscontinuous is slightly ambiguous, but I am not a big fan of is_continuous_time. Whatever we choose, it will be exported once we pull this https://github.com/JuliaControl/ControlSystems.jl/pull/256 gigantic PR, so we have to make a decision.

mfalt avatar Apr 07 '20 23:04 mfalt

I guess an integer statespace model could be considered as having a discrete state space?

baggepinnen avatar Apr 08 '20 01:04 baggepinnen

Is it the length (6 extra characters) that is problem? The function will would not be used that often, at most once in a few functions here and there, and even less when it will be possible to dispatch on the sample time. To me, the slightly longer name is outweighed by the improved clarity.

olof3 avatar Apr 08 '20 06:04 olof3