EvgeneOskin / IntervalLinearEquations.jl

MIT License
1 stars 2 forks source link

How do the results compare to using `\`? #1

Open dpsanders opened 8 years ago

dpsanders commented 8 years ago

The Julia operation \ solves linear systems and may be used with ValidatedNumerics.Interval -- see e.g. here

Are the results from this package better / faster / more precise?

EDIT: This uses Julia's generic linear algebra capabilities.

EvgeneOskin commented 8 years ago

Hi @dpsanders,

The results from this package are better. I've checked \ operator, and it does not work for me.

I've checked the sample you've given

A =
    [
        @interval( 2, 4)    @interval(-2, 1) ;
        @interval(-1, 2)    @interval( 2, 4)
    ]

b =
    [
        @interval(-2, 2),
        @interval(-2, 2)
    ]
x = A \ b
A * x != b

As far as I see, \ operator does not solve the system of linear equations in the right way.

The difference between \ operator and this package is this package solves the system of linear equations, i.e. A * x == b. I have test for this case.

A =
    [
        @interval( 2, 4)    @interval(-2, 1) ;
        @interval(-1, 2)    @interval( 2, 4)
    ]

b =
    [
        @interval(-2, 2),
        @interval(-2, 2)
    ]
x = ILESolver.solve("G", a, b, 0.1, 10, 1.0)
A * x == b

Thank you for the issue, I'll add the note about \ to README.

dpsanders commented 8 years ago

We seem to have a different understanding of what solving a system of interval linear equations means. Are you following a particular reference?

Normally what people mean, as far as I can see, is the following: The solution set of the equation [A] x = [b], with [A] a matrix of intervals and [b] a vector of intervals, is the set of all vectors x of real numbers such that A x = b for some A ∈ [A] and b ∈ [b].

This gives a much bigger set, with a complicated structure; see e.g. Moore et al., Introduction to Interval Analysis (2009), pg. 89. It is then usual to return an interval that encloses this set.

The best would be to calculate the "interval hull", but this is quite hard. (It may be done using linear programming.).

The \ operator with ValidatedNumerics returns an interval box which is larger than this hull, but correctly encloses all the possible solutions.

EvgeneOskin commented 8 years ago

I've implemented Subdifferential Newton method. This method is described by S.P. Shary in Algebraic approach to the interval linear static identification, tolerance and control problems, or One more application of Kaucher arithmetic at 1996 ref.

Also, I'm planning to implement methods to find united, tolerable, controllable solution sets and algebraic solution too.

dpsanders commented 8 years ago

That paper looks interesting, thanks! So which kind of solution set do you currently find? Maybe the name of that type of solution set should appear somewhere in the function name or a parameter?

EvgeneOskin commented 8 years ago

As far as I know, I've implemented finding algebraic solution set. Sure, you right about naming and API. Thank you. When I implement finding the other solution sets, I'll refactor naming a bit.

dpsanders commented 8 years ago

Yes I see. I certainly think it would be useful to implement the 4 different types of solution sets described in that paper (although I understand that some of them are difficult to implement).

dpsanders commented 8 years ago

It would also be useful to describe all of this in more detail in the package documentation.

EvgeneOskin commented 8 years ago

Sure, thank you.

dpsanders commented 7 years ago

Are you still working on this? Currently the documentation of your package states that the result of A \ b is wrong, which is not correct -- it is just doing a different calculation.