Skip to content

Commit

Permalink
Added decomposed overapproximate for lazy intersection between CPA an…
Browse files Browse the repository at this point in the history
…d Polyhedron

Squashed commit of the following:

commit 89913f2
Merge: 39d80d6 a96a698
Author: Unknown <[email protected]>
Date:   Mon Jun 17 01:09:40 2019 +1000

    Merge remote-tracking branch 'origin/kostemkin/1041_new' into kostemkin/1041_new

commit 39d80d6
Author: Kostiantyn Potomkin <[email protected]>
Date:   Mon Jun 17 00:46:43 2019 +1000

    Added decomposed overapproximate for lazy intersection between CPA and Polyhedron

    Squashed commit of the following:

    commit ac50169
    Author: Unknown <[email protected]>
    Date:   Sat Jun 15 17:40:24 2019 +1000

        added one more test for old overapproximate of lazy intersection

    commit 509b7f8
    Author: Unknown <[email protected]>
    Date:   Sat Jun 15 04:08:49 2019 +1000

        added using project

    commit 795f593
    Author: Unknown <[email protected]>
    Date:   Sat Jun 15 03:46:50 2019 +1000

        fixed tests

    commit b722c3c
    Author: Unknown <[email protected]>
    Date:   Fri Jun 14 19:01:32 2019 +1000

        small refactoring in unit_overapproximate

    commit 89fe48f
    Merge: 8f6f735 a5545ae
    Author: Unknown <[email protected]>
    Date:   Fri Jun 14 16:29:31 2019 +1000

        Merge remote-tracking branch 'origin/master' into kostemkin/1041_new

    commit 8f6f735
    Author: Unknown <[email protected]>
    Date:   Fri Jun 14 16:28:19 2019 +1000

        fixed tests

    commit 8448622
    Author: Unknown <[email protected]>
    Date:   Fri Jun 14 14:38:23 2019 +1000

        try to push the test

    commit a5545ae
    Author: Marcelo Forets <[email protected]>
    Date:   Thu Jun 13 15:15:09 2019 -0300

        Update Project.toml (#1437)

    commit 9dd9cc9
    Author: Marcelo Forets <[email protected]>
    Date:   Thu Jun 13 13:41:53 2019 -0300

        Pr/1408 (#1433)

        * Add TaylorModels optional requirement
        * Linear case
        * Nonlinear case

    commit 413743e
    Author: Unknown <[email protected]>
    Date:   Fri Jun 14 01:39:07 2019 +1000

        fixed tests

    commit 47f9226
    Author: Unknown <[email protected]>
    Date:   Thu Jun 13 16:54:11 2019 +1000

        added new tests for decomposed overapproximate and minor refactoring

    commit a7e8305
    Author: Sebastián Guadalupe <[email protected]>
    Date:   Wed Jun 12 18:29:49 2019 -0300

        remove redundant vertices of LinearMap (#1428)

    commit c0fb6d6
    Author: Unknown <[email protected]>
    Date:   Thu Jun 13 02:58:12 2019 +1000

        some code clean ups according to Christian`s comments

    commit 6d58c75
    Merge: 02916e5 c52a2c4
    Author: Christian Schilling <[email protected]>
    Date:   Wed Jun 12 09:56:12 2019 +0200

        Merge pull request #1432 from JuliaReach/schillic/times

        Export 'times' symbol

    commit c52a2c4
    Author: schillic <[email protected]>
    Date:   Wed Jun 12 08:42:55 2019 +0200

        export 'times' symbol

    commit d70ddef
    Merge: 6427a29 0aa9825
    Author: Unknown <[email protected]>
    Date:   Wed Jun 12 14:18:06 2019 +1000

        Merge remote-tracking branch 'origin/master' into kostemkin/1041_new

    commit 6427a29
    Author: Unknown <[email protected]>
    Date:   Wed Jun 12 04:03:30 2019 +1000

        fixed docs

    commit 02916e5
    Merge: 19b51ea 32a6cfa
    Author: Christian Schilling <[email protected]>
    Date:   Tue Jun 11 12:17:22 2019 +0200

        Merge pull request #1425 from JuliaReach/schillic/merge

        Simplifications in overapproximate

    commit b33cab8
    Author: Unknown <[email protected]>
    Date:   Tue Jun 11 20:10:58 2019 +1000

        further changes in documentation and removing redundant code and comments

    commit 19b51ea
    Author: Marcelo Forets <[email protected]>
    Date:   Tue Jun 11 06:34:19 2019 -0300

        Update README.md (#1423)

        * Update README.md

        * update README and About

    commit 5f17132
    Author: Unknown <[email protected]>
    Date:   Tue Jun 11 15:49:43 2019 +1000

        exporting common intersection preprocess part

    commit b965fb3
    Author: Unknown <[email protected]>
    Date:   Tue Jun 11 03:13:14 2019 +1000

        export common intersection preprocess part

    commit 1d55f57
    Author: Unknown <[email protected]>
    Date:   Tue Jun 11 02:47:23 2019 +1000

        better functions definition in docs and minor refactoring

    commit 77640db
    Author: Unknown <[email protected]>
    Date:   Mon Jun 10 19:27:27 2019 +1000

        add missing docs

    commit 133e962
    Author: Unknown <[email protected]>
    Date:   Mon Jun 10 18:59:09 2019 +1000

        updated doc

    commit f67024f
    Author: Unknown <[email protected]>
    Date:   Mon Jun 10 18:54:06 2019 +1000

        correct import

    commit 8b14a4a
    Author: Unknown <[email protected]>
    Date:   Mon Jun 10 18:51:16 2019 +1000

        small refactoring and updated doc

    commit 0aa9825
    Merge: 847ffe8 a56ebc3
    Author: Christian Schilling <[email protected]>
    Date:   Fri Jun 7 13:19:45 2019 +0200

        Merge pull request #1426 from JuliaReach/schillic/aspectratio

        Set default aspect ratio in plot recipes to :none

    commit 06bc249
    Author: Unknown <[email protected]>
    Date:   Fri Jun 7 21:00:27 2019 +1000

        refactoring to use Vector{Tuple{Int, Int}} for block indices

    commit a56ebc3
    Author: schillic <[email protected]>
    Date:   Fri Jun 7 07:52:54 2019 +0200

        set default aspectratio in plot recipes to :none

    commit 32a6cfa
    Author: schillic <[email protected]>
    Date:   Thu Jun 6 17:01:58 2019 +0200

        simplifications in overapproximate

    commit 847ffe8
    Merge: 2770dd6 af32212
    Author: Christian Schilling <[email protected]>
    Date:   Thu Jun 6 13:20:05 2019 +0200

        Merge pull request #1414 from JuliaReach/schillic/empty_polytope_intersection

        Check for emptiness in concrete intersection using Polyhedra

    commit 2770dd6
    Merge: 875ecaf 03823d1
    Author: Christian Schilling <[email protected]>
    Date:   Thu Jun 6 13:02:08 2019 +0200

        Merge pull request #1419 from JuliaReach/kostemkin/1091

        Decomposed linear map of CartesianProductArray

    commit 875ecaf
    Merge: 9bc6422 fd2f305
    Author: Christian Schilling <[email protected]>
    Date:   Thu Jun 6 12:26:06 2019 +0200

        Merge pull request #1409 from JuliaReach/schillic/378

        #378 - Add isapprox between sets

    commit 03823d1
    Author: Unknown <[email protected]>
    Date:   Thu Jun 6 18:15:10 2019 +1000

        updated tests due to sparse

    commit 9b8f5be
    Author: Unknown <[email protected]>
    Date:   Thu Jun 6 18:11:07 2019 +1000

        Code clean up

    commit 16f4a71
    Author: Unknown <[email protected]>
    Date:   Thu Jun 6 16:34:15 2019 +1000

        fixed tests and function signature

    commit 2c48134
    Author: Unknown <[email protected]>
    Date:   Thu Jun 6 16:27:08 2019 +1000

        Moved intersection to overapproximation

    commit e20224a
    Author: Unknown <[email protected]>
    Date:   Thu Jun 6 15:50:32 2019 +1000

        added new tests and refactoring

        added functionality to keep the original structure and preallocate corresponding  set

    commit 9bc6422
    Author: Marcelo Forets <[email protected]>
    Date:   Wed Jun 5 19:16:55 2019 -0300

        Update README.md

    commit 617de10
    Author: Sebastián Guadalupe <[email protected]>
    Date:   Wed Jun 5 19:15:32 2019 -0300

        Add three point case for concrete convex hull (#1411)

    commit 4221528
    Merge: e517950 f1aa1ae
    Author: Christian Schilling <[email protected]>
    Date:   Wed Jun 5 19:05:48 2019 +0200

        Merge pull request #1415 from JuliaReach/schillic/571

        #571 - Restrict iterative refinement to AbstractFloat

    commit f1aa1ae
    Author: schillic <[email protected]>
    Date:   Fri May 31 22:13:59 2019 +0200

        restrict type for iterative refinement

    commit 14a5980
    Author: Unknown <[email protected]>
    Date:   Wed Jun 5 20:31:08 2019 +1000

        fixed is_intersection_empty to use correct projection

    commit 5f033d7
    Author: Unknown <[email protected]>
    Date:   Wed Jun 5 20:12:34 2019 +1000

        removed redundant function

    commit 6b62873
    Author: Unknown <[email protected]>
    Date:   Wed Jun 5 20:08:21 2019 +1000

        added correct projection

    commit 6160bee
    Author: Unknown <[email protected]>
    Date:   Wed Jun 5 20:06:44 2019 +1000

        Removed workarounds for LinearMap projection

    commit 9f0a8ce
    Author: Unknown <[email protected]>
    Date:   Wed Jun 5 18:40:25 2019 +1000

        Added tests

    commit a03e868
    Author: Unknown <[email protected]>
    Date:   Wed Jun 5 18:18:35 2019 +1000

        Added missing is_intersection_empty functions

    commit 13e7b9c
    Author: kostakoida <[email protected]>
    Date:   Wed Jun 5 18:00:12 2019 +1000

        Update src/Approximations/overapproximate.jl

        Co-Authored-By: Christian Schilling <[email protected]>

    commit 80eed63
    Author: Unknown <[email protected]>
    Date:   Wed Jun 5 17:55:26 2019 +1000

        small refactoring according to Christian's recommendations

    commit a66586a
    Author: Unknown <[email protected]>
    Date:   Wed Jun 5 15:47:37 2019 +1000

        intersection works

    commit ece7d74
    Author: Unknown <[email protected]>
    Date:   Wed Jun 5 05:23:36 2019 +1000

        fixed tests and type instability

    commit 16521c3
    Author: Unknown <[email protected]>
    Date:   Wed Jun 5 05:06:09 2019 +1000

        small fixes and added intersection between Cartesian products

    commit 54d73fd
    Author: Unknown <[email protected]>
    Date:   Wed Jun 5 04:11:41 2019 +1000

        updated linear map to use correct rows and updated tests

    commit 8742462
    Author: Unknown <[email protected]>
    Date:   Wed Jun 5 01:23:36 2019 +1000

        added tests

    commit c7fc98d
    Author: Unknown <[email protected]>
    Date:   Wed Jun 5 01:10:10 2019 +1000

        cleaned up the code

    commit 80ab0cb
    Author: Unknown <[email protected]>
    Date:   Tue Jun 4 23:43:19 2019 +1000

        Correct minkowski sum addition

    commit e517950
    Merge: 873bbf1 cfae8fd
    Author: Christian Schilling <[email protected]>
    Date:   Tue Jun 4 14:11:15 2019 +0200

        Merge pull request #1420 from JuliaReach/schillic/README

        Update README

    commit cfae8fd
    Author: schillic <[email protected]>
    Date:   Tue Jun 4 10:42:22 2019 +0200

        update README

    commit 5b97aec
    Author: Unknown <[email protected]>
    Date:   Tue Jun 4 18:57:12 2019 +1000

        small fixes

    commit cf01ae6
    Author: Unknown <[email protected]>
    Date:   Tue Jun 4 18:50:19 2019 +1000

        updated according to comments

    commit 7e2891f
    Author: Unknown <[email protected]>
    Date:   Tue Jun 4 17:52:32 2019 +1000

        added getting block_structure for CPA and intersection by union of blocks

    commit a79b038
    Author: Unknown <[email protected]>
    Date:   Tue Jun 4 16:33:53 2019 +1000

        added block_indices and variable_indices

    commit b98b789
    Author: Unknown <[email protected]>
    Date:   Tue Jun 4 16:31:30 2019 +1000

        Added using @view

    commit ecabee5
    Author: Unknown <[email protected]>
    Date:   Tue Jun 4 14:45:14 2019 +1000

        updated overaproximation of  decomposed linear map according to Christian comments

    commit ef60e2e
    Author: Unknown <[email protected]>
    Date:   Sun Jun 2 01:46:13 2019 +1000

        Added overapproximation of Lazy linear map of cartesian product array

    commit af32212
    Author: schillic <[email protected]>
    Date:   Fri May 31 17:27:23 2019 +0200

        check for emptiness in concrete intersection using Polyhedra

    commit fd2f305
    Author: schillic <[email protected]>
    Date:   Tue May 28 20:17:35 2019 +0200

        add isapprox between 'LazySet's

commit a96a698
Author: Kostiantyn Potomkin <[email protected]>
Date:   Mon Jun 17 00:46:43 2019 +1000

    Added decomposed overapproximate for lazy intersection between CPA and Polyhedron

    Squashed commit of the following:

    commit ac50169
    Author: Unknown <[email protected]>
    Date:   Sat Jun 15 17:40:24 2019 +1000

        added one more test for old overapproximate of lazy intersection

    commit 509b7f8
    Author: Unknown <[email protected]>
    Date:   Sat Jun 15 04:08:49 2019 +1000

        added using project

    commit 795f593
    Author: Unknown <[email protected]>
    Date:   Sat Jun 15 03:46:50 2019 +1000

        fixed tests

    commit b722c3c
    Author: Unknown <[email protected]>
    Date:   Fri Jun 14 19:01:32 2019 +1000

        small refactoring in unit_overapproximate

    commit 89fe48f
    Merge: 8f6f735 a5545ae
    Author: Unknown <[email protected]>
    Date:   Fri Jun 14 16:29:31 2019 +1000

        Merge remote-tracking branch 'origin/master' into kostemkin/1041_new

    commit 8f6f735
    Author: Unknown <[email protected]>
    Date:   Fri Jun 14 16:28:19 2019 +1000

        fixed tests

    commit 8448622
    Author: Unknown <[email protected]>
    Date:   Fri Jun 14 14:38:23 2019 +1000

        try to push the test

    commit a5545ae
    Author: Marcelo Forets <[email protected]>
    Date:   Thu Jun 13 15:15:09 2019 -0300

        Update Project.toml (#1437)

    commit 9dd9cc9
    Author: Marcelo Forets <[email protected]>
    Date:   Thu Jun 13 13:41:53 2019 -0300

        Pr/1408 (#1433)

        * Add TaylorModels optional requirement
        * Linear case
        * Nonlinear case

    commit 413743e
    Author: Unknown <[email protected]>
    Date:   Fri Jun 14 01:39:07 2019 +1000

        fixed tests

    commit 47f9226
    Author: Unknown <[email protected]>
    Date:   Thu Jun 13 16:54:11 2019 +1000

        added new tests for decomposed overapproximate and minor refactoring

    commit a7e8305
    Author: Sebastián Guadalupe <[email protected]>
    Date:   Wed Jun 12 18:29:49 2019 -0300

        remove redundant vertices of LinearMap (#1428)

    commit c0fb6d6
    Author: Unknown <[email protected]>
    Date:   Thu Jun 13 02:58:12 2019 +1000

        some code clean ups according to Christian`s comments

    commit 6d58c75
    Merge: 02916e5 c52a2c4
    Author: Christian Schilling <[email protected]>
    Date:   Wed Jun 12 09:56:12 2019 +0200

        Merge pull request #1432 from JuliaReach/schillic/times

        Export 'times' symbol

    commit c52a2c4
    Author: schillic <[email protected]>
    Date:   Wed Jun 12 08:42:55 2019 +0200

        export 'times' symbol

    commit d70ddef
    Merge: 6427a29 0aa9825
    Author: Unknown <[email protected]>
    Date:   Wed Jun 12 14:18:06 2019 +1000

        Merge remote-tracking branch 'origin/master' into kostemkin/1041_new

    commit 6427a29
    Author: Unknown <[email protected]>
    Date:   Wed Jun 12 04:03:30 2019 +1000

        fixed docs

    commit 02916e5
    Merge: 19b51ea 32a6cfa
    Author: Christian Schilling <[email protected]>
    Date:   Tue Jun 11 12:17:22 2019 +0200

        Merge pull request #1425 from JuliaReach/schillic/merge

        Simplifications in overapproximate

    commit b33cab8
    Author: Unknown <[email protected]>
    Date:   Tue Jun 11 20:10:58 2019 +1000

        further changes in documentation and removing redundant code and comments

    commit 19b51ea
    Author: Marcelo Forets <[email protected]>
    Date:   Tue Jun 11 06:34:19 2019 -0300

        Update README.md (#1423)

        * Update README.md

        * update README and About

    commit 5f17132
    Author: Unknown <[email protected]>
    Date:   Tue Jun 11 15:49:43 2019 +1000

        exporting common intersection preprocess part

    commit b965fb3
    Author: Unknown <[email protected]>
    Date:   Tue Jun 11 03:13:14 2019 +1000

        export common intersection preprocess part

    commit 1d55f57
    Author: Unknown <[email protected]>
    Date:   Tue Jun 11 02:47:23 2019 +1000

        better functions definition in docs and minor refactoring

    commit 77640db
    Author: Unknown <[email protected]>
    Date:   Mon Jun 10 19:27:27 2019 +1000

        add missing docs

    commit 133e962
    Author: Unknown <[email protected]>
    Date:   Mon Jun 10 18:59:09 2019 +1000

        updated doc

    commit f67024f
    Author: Unknown <[email protected]>
    Date:   Mon Jun 10 18:54:06 2019 +1000

        correct import

    commit 8b14a4a
    Author: Unknown <[email protected]>
    Date:   Mon Jun 10 18:51:16 2019 +1000

        small refactoring and updated doc

    commit 0aa9825
    Merge: 847ffe8 a56ebc3
    Author: Christian Schilling <[email protected]>
    Date:   Fri Jun 7 13:19:45 2019 +0200

        Merge pull request #1426 from JuliaReach/schillic/aspectratio

        Set default aspect ratio in plot recipes to :none

    commit 06bc249
    Author: Unknown <[email protected]>
    Date:   Fri Jun 7 21:00:27 2019 +1000

        refactoring to use Vector{Tuple{Int, Int}} for block indices

    commit a56ebc3
    Author: schillic <[email protected]>
    Date:   Fri Jun 7 07:52:54 2019 +0200

        set default aspectratio in plot recipes to :none

    commit 32a6cfa
    Author: schillic <[email protected]>
    Date:   Thu Jun 6 17:01:58 2019 +0200

        simplifications in overapproximate

    commit 847ffe8
    Merge: 2770dd6 af32212
    Author: Christian Schilling <[email protected]>
    Date:   Thu Jun 6 13:20:05 2019 +0200

        Merge pull request #1414 from JuliaReach/schillic/empty_polytope_intersection

        Check for emptiness in concrete intersection using Polyhedra

    commit 2770dd6
    Merge: 875ecaf 03823d1
    Author: Christian Schilling <[email protected]>
    Date:   Thu Jun 6 13:02:08 2019 +0200

        Merge pull request #1419 from JuliaReach/kostemkin/1091

        Decomposed linear map of CartesianProductArray

    commit 875ecaf
    Merge: 9bc6422 fd2f305
    Author: Christian Schilling <[email protected]>
    Date:   Thu Jun 6 12:26:06 2019 +0200

        Merge pull request #1409 from JuliaReach/schillic/378

        #378 - Add isapprox between sets

    commit 03823d1
    Author: Unknown <[email protected]>
    Date:   Thu Jun 6 18:15:10 2019 +1000

        updated tests due to sparse

    commit 9b8f5be
    Author: Unknown <[email protected]>
    Date:   Thu Jun 6 18:11:07 2019 +1000

        Code clean up

    commit 16f4a71
    Author: Unknown <[email protected]>
    Date:   Thu Jun 6 16:34:15 2019 +1000

        fixed tests and function signature

    commit 2c48134
    Author: Unknown <[email protected]>
    Date:   Thu Jun 6 16:27:08 2019 +1000

        Moved intersection to overapproximation

    commit e20224a
    Author: Unknown <[email protected]>
    Date:   Thu Jun 6 15:50:32 2019 +1000

        added new tests and refactoring

        added functionality to keep the original structure and preallocate corresponding  set

    commit 9bc6422
    Author: Marcelo Forets <[email protected]>
    Date:   Wed Jun 5 19:16:55 2019 -0300

        Update README.md

    commit 617de10
    Author: Sebastián Guadalupe <[email protected]>
    Date:   Wed Jun 5 19:15:32 2019 -0300

        Add three point case for concrete convex hull (#1411)

    commit 4221528
    Merge: e517950 f1aa1ae
    Author: Christian Schilling <[email protected]>
    Date:   Wed Jun 5 19:05:48 2019 +0200

        Merge pull request #1415 from JuliaReach/schillic/571

        #571 - Restrict iterative refinement to AbstractFloat

    commit f1aa1ae
    Author: schillic <[email protected]>
    Date:   Fri May 31 22:13:59 2019 +0200

        restrict type for iterative refinement

    commit 14a5980
    Author: Unknown <[email protected]>
    Date:   Wed Jun 5 20:31:08 2019 +1000

        fixed is_intersection_empty to use correct projection

    commit 5f033d7
    Author: Unknown <[email protected]>
    Date:   Wed Jun 5 20:12:34 2019 +1000

        removed redundant function

    commit 6b62873
    Author: Unknown <[email protected]>
    Date:   Wed Jun 5 20:08:21 2019 +1000

        added correct projection

    commit 6160bee
    Author: Unknown <[email protected]>
    Date:   Wed Jun 5 20:06:44 2019 +1000

        Removed workarounds for LinearMap projection

    commit 9f0a8ce
    Author: Unknown <[email protected]>
    Date:   Wed Jun 5 18:40:25 2019 +1000

        Added tests

    commit a03e868
    Author: Unknown <[email protected]>
    Date:   Wed Jun 5 18:18:35 2019 +1000

        Added missing is_intersection_empty functions

    commit 13e7b9c
    Author: kostakoida <[email protected]>
    Date:   Wed Jun 5 18:00:12 2019 +1000

        Update src/Approximations/overapproximate.jl

        Co-Authored-By: Christian Schilling <[email protected]>

    commit 80eed63
    Author: Unknown <[email protected]>
    Date:   Wed Jun 5 17:55:26 2019 +1000

        small refactoring according to Christian's recommendations

    commit a66586a
    Author: Unknown <[email protected]>
    Date:   Wed Jun 5 15:47:37 2019 +1000

        intersection works

    commit ece7d74
    Author: Unknown <[email protected]>
    Date:   Wed Jun 5 05:23:36 2019 +1000

        fixed tests and type instability

    commit 16521c3
    Author: Unknown <[email protected]>
    Date:   Wed Jun 5 05:06:09 2019 +1000

        small fixes and added intersection between Cartesian products

    commit 54d73fd
    Author: Unknown <[email protected]>
    Date:   Wed Jun 5 04:11:41 2019 +1000

        updated linear map to use correct rows and updated tests

    commit 8742462
    Author: Unknown <[email protected]>
    Date:   Wed Jun 5 01:23:36 2019 +1000

        added tests

    commit c7fc98d
    Author: Unknown <[email protected]>
    Date:   Wed Jun 5 01:10:10 2019 +1000

        cleaned up the code

    commit 80ab0cb
    Author: Unknown <[email protected]>
    Date:   Tue Jun 4 23:43:19 2019 +1000

        Correct minkowski sum addition

    commit e517950
    Merge: 873bbf1 cfae8fd
    Author: Christian Schilling <[email protected]>
    Date:   Tue Jun 4 14:11:15 2019 +0200

        Merge pull request #1420 from JuliaReach/schillic/README

        Update README

    commit cfae8fd
    Author: schillic <[email protected]>
    Date:   Tue Jun 4 10:42:22 2019 +0200

        update README

    commit 5b97aec
    Author: Unknown <[email protected]>
    Date:   Tue Jun 4 18:57:12 2019 +1000

        small fixes

    commit cf01ae6
    Author: Unknown <[email protected]>
    Date:   Tue Jun 4 18:50:19 2019 +1000

        updated according to comments

    commit 7e2891f
    Author: Unknown <[email protected]>
    Date:   Tue Jun 4 17:52:32 2019 +1000

        added getting block_structure for CPA and intersection by union of blocks

    commit a79b038
    Author: Unknown <[email protected]>
    Date:   Tue Jun 4 16:33:53 2019 +1000

        added block_indices and variable_indices

    commit b98b789
    Author: Unknown <[email protected]>
    Date:   Tue Jun 4 16:31:30 2019 +1000

        Added using @view

    commit ecabee5
    Author: Unknown <[email protected]>
    Date:   Tue Jun 4 14:45:14 2019 +1000

        updated overaproximation of  decomposed linear map according to Christian comments

    commit ef60e2e
    Author: Unknown <[email protected]>
    Date:   Sun Jun 2 01:46:13 2019 +1000

        Added overapproximation of Lazy linear map of cartesian product array

    commit af32212
    Author: schillic <[email protected]>
    Date:   Fri May 31 17:27:23 2019 +0200

        check for emptiness in concrete intersection using Polyhedra

    commit fd2f305
    Author: schillic <[email protected]>
    Date:   Tue May 28 20:17:35 2019 +0200

        add isapprox between 'LazySet's

commit 894fda3
Merge: d9da4d4 0fd6c1e
Author: Christian Schilling <[email protected]>
Date:   Fri Jun 14 22:27:55 2019 +0200

    Merge pull request #1442 from JuliaReach/schillic/1364

    #1364 - Concrete linear map of a translation

commit 0fd6c1e
Author: schillic <[email protected]>
Date:   Fri Jun 14 16:19:22 2019 +0200

    concrete linear_map of lazy Translation
  • Loading branch information
kpotomkin committed Jun 16, 2019
1 parent d9da4d4 commit 34f4c5b
Show file tree
Hide file tree
Showing 14 changed files with 489 additions and 14 deletions.
3 changes: 3 additions & 0 deletions docs/src/lib/binary_functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ is_intersection_empty(::Universe{N}, ::LazySet{N}, ::Bool=false) where {N<:Real}
is_intersection_empty(::Complement{N}, ::LazySet{N}, ::Bool=false) where {N<:Real}
is_intersection_empty(::Zonotope{N}, ::Zonotope{N}, ::Bool=false) where {N<:Real}
is_intersection_empty(::Interval{N}, ::Interval{N}, ::Bool=false) where {N<:Real}
is_intersection_empty(X::CartesianProductArray{N}, Y::HPolyhedron{N}) where {N<:Real}
is_intersection_empty(X::CartesianProductArray{N}, Y::CartesianProductArray{N}) where {N}
```

## Convex hull
Expand Down Expand Up @@ -64,6 +66,7 @@ intersection(::UnionSet{N}, ::LazySet{N}) where {N<:Real}
intersection(::UnionSetArray{N}, ::LazySet{N}) where {N<:Real}
intersection(::Universe{N}, ::LazySet{N}) where {N<:Real}
intersection(::AbstractPolyhedron{N}, ::ResetMap{N}) where {N<:Real}
intersection(X::CartesianProductArray{N}, Y::CartesianProductArray{N}) where {N<:Real}
```

## Subset check
Expand Down
5 changes: 5 additions & 0 deletions docs/src/lib/operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ isempty(::CartesianProductArray)
constraints_list(::CartesianProductArray{N}) where {N<:Real}
vertices_list(::CartesianProductArray{N}) where {N<:Real}
array(::CartesianProductArray{N, S}) where {N<:Real, S<:LazySet{N}}
block_structure(cpa::CartesianProductArray{N}) where {N}
block_to_dimension_indices(cpa::CartesianProductArray{N}, vars::Vector{Int}) where {N}
substitute_blocks(low_dim_cpa::CartesianProductArray{N}, orig_cpa::CartesianProductArray{N},
blocks::Vector{Tuple{Int,Int}}) where {N}
```
Inherited from [`LazySet`](@ref):
* [`norm`](@ref norm(::LazySet, ::Real))
Expand Down Expand Up @@ -349,6 +353,7 @@ an_element(::Translation)
isempty(::Translation)
constraints_list(::Translation{N}, ::Val{true}) where {N<:Real}
LinearMap(::AbstractMatrix{N}, ::Translation{N}) where {N<:Real}
linear_map(M::AbstractMatrix{N}, tr::Translation{N}) where {N<:Real}
∈(::AbstractVector{N}, ::Translation{N}) where {N<:Real}
```

Expand Down
1 change: 1 addition & 0 deletions docs/src/lib/utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ same_block_structure
substitute
substitute!
σ_helper
get_constrained_lowdimset
@neutral
@absorbing
@neutral_absorbing
Expand Down
61 changes: 61 additions & 0 deletions src/Approximations/overapproximate.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using LazySets: block_to_dimension_indices, substitute_blocks, get_constrained_lowdimset
"""
overapproximate(X::S, ::Type{S}) where {S<:LazySet}
Expand Down Expand Up @@ -911,3 +912,63 @@ function _overapproximate_lm_cpa!(arr, M, cpa, overapprox_option)

return CartesianProductArray(arr)
end

"""
overapproximate(cap::Intersection{N,
<:CartesianProductArray{N},
<:AbstractPolyhedron{N}},
::Type{CartesianProductArray}, oa) where {N}
Return the intersection of the cartesian product of a finite number of convex sets and a polyhedron.
### Input
- `cap` -- Lazy intersection of cartesian product array and polyhedron
- `CartesianProductArray` -- type for dispatch
- `oa` -- template directions
### Output
The intersection between `cpa` and `P` with overapproximation in each constrained block.
### Algorithm
The intersection is only needed to be taken in the elements of the cartesian product array (subsets of
variables, or "blocks") which are constrained in `P`.
Hence we first search for constrained blocks and then take the intersection of
a lower-dimensional Cartesian product of these blocks with the projection of `Y`
onto the variables of these blocks. (This projection is syntactic and exact.)
The result is a `CartesianProductArray` with the same block structure as in `X`.
However, when we decompose back our set we overapproximate during projection operation,
therefore we need to specify overapproximation strategy (it is Hyperrectangle by default)
"""
function overapproximate(cap::Intersection{N,
<:CartesianProductArray{N},
<:AbstractPolyhedron{N}},
::Type{CartesianProductArray}, oa) where {N}

cpa, P = cap.X, cap.Y

cpa_low_dim, vars, block_structure, blocks = get_constrained_lowdimset(cpa, P)

low_intersection = intersection(cpa_low_dim, project(P, vars))

if isempty(low_intersection)
return EmptySet{N}()
end

decomposed_low_set = decompose(low_intersection, block_structure, oa)

return substitute_blocks(decomposed_low_set, cpa, blocks)
end

# symmetric method
function overapproximate(cap::Intersection{N,
<:AbstractPolyhedron{N},
<:CartesianProductArray{N}},
::Type{CartesianProductArray}, oa) where {N}
overapproximate(Intersection(cap.Y, cap.X), oa)
end


end
143 changes: 142 additions & 1 deletion src/CartesianProduct.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import Base: *, ∈, isempty
export CartesianProduct,
CartesianProductArray,
CartesianProduct!,
array
array,
same_block_structure

"""
CartesianProduct{N<:Real, S1<:LazySet{N}, S2<:LazySet{N}} <: LazySet{N}
Expand Down Expand Up @@ -562,3 +563,143 @@ function same_block_structure(x::AbstractVector{S1}, y::AbstractVector{S2}
end
return true
end

"""
block_structure(cpa::CartesianProductArray{N}) where {N}
Returns an array containing the dimension ranges of each block in a `CartesianProductArray`.
### Input
- `cpa` -- Cartesian product array
### Output
A vector of ranges
### Example
```jldoctest
julia> using LazySets: block_structure
julia> cpa = CartesianProductArray([BallInf(zeros(n), 1.0) for n in [3, 1, 2]]);
julia> block_structure(cpa)
3-element Array{UnitRange{Int64},1}:
1:3
4:4
5:6
```
"""
function block_structure(cpa::CartesianProductArray{N}) where {N}
result = Vector{UnitRange{Int}}(undef, length(array(cpa)))
start_index = 1
@inbounds for (i, bi) in enumerate(array(cpa))
end_index = start_index + dim(bi) - 1
result[i] = start_index:end_index
start_index = end_index + 1
end
return result
end


"""
block_to_dimension_indices(cpa::CartesianProductArray{N}, vars::Vector{Int}) where {N}
Returns a vector mapping block index `i`
to tuple `(f, l)` such that either `f = l = -1` or `f` is the first dimension index and `l` is the last dimension
index of the `i`-th block, depending on whether one of the block's dimension indices is specified in `vars`.
### Input
- `cpa` -- Cartesian product array
- `vars` -- list containing the variables of interest, sorted in ascending order
### Output
A vector of tuples, where values in tuple relate to range of dimensions in the i-th block.
### Example
```jldoctest
julia> using LazySets: block_to_dimension_indices
julia> cpa = CartesianProductArray([BallInf(zeros(n), 1.0) for n in [1, 3, 2, 3]]);
julia> block_to_dimension_indices(cpa, [2, 4, 8])
(Tuple{Int64,Int64}[(-1, -1), (2, 4), (-1, -1), (7, 9)], 2)
```
This vector represents the mapping "second block from dimension 2 to dimension 4,
fourth block from dimension 7 to dimension 9."
These blocks contain the dimensions specified in `[2, 4, 8]`.
"""
function block_to_dimension_indices(cpa::CartesianProductArray{N}, vars::Vector{Int}) where {N}
result = fill((-1, -1), length(array(cpa)))
non_empty_length = 0
start_index, end_index = 1, 0
v_i = 1
for i in 1:length(cpa.array)
end_index += dim(cpa.array[i])
if v_i <= length(vars) && vars[v_i] <= end_index
result[i] = (start_index, end_index)
non_empty_length += 1
while v_i <= length(vars) && vars[v_i] <= end_index
v_i += 1
end
end
if v_i > length(vars)
break
end
start_index = end_index + 1
end
return result, non_empty_length
end

#same but for all variables
function block_to_dimension_indices(cpa::CartesianProductArray{N}) where {N}
result = Vector{Tuple{Int, Int}}(undef, length(cpa.array))

start_index, end_index = 1, 0
for i in 1:length(cpa.array)
end_index += dim(cpa.array[i])
result[i] = (start_index, end_index)
start_index = end_index + 1
end
return result, length(cpa.array)
end

"""
substitute_blocks(low_dim_cpa::CartesianProductArray{N},
orig_cpa::CartesianProductArray{N},
blocks::Vector{Tuple{Int,Int}}) where {N}
Return merged Cartesian Product Array between original CPA and some low-dimensional CPA,
which represents updated subset of variables in specified blocks.
### Input
- `low_dim_cpa` -- low-dimensional cartesian product array
- `orig_cpa` -- original high-dimensional Cartesian product array
- `blocks` -- index of the first variable in each block of `orig_cpa`
### Output
Merged cartesian product array
"""
function substitute_blocks(low_dim_cpa::CartesianProductArray{N},
orig_cpa::CartesianProductArray{N},
blocks::Vector{Tuple{Int,Int}}) where {N}

array = Vector{LazySet{N}}(undef, length(orig_cpa.array))
index = 1
for bi in 1:length(orig_cpa.array)
start_ind, end_index = blocks[bi]
if start_ind == -1
array[bi] = orig_cpa.array[bi]
else
array[bi] = low_dim_cpa.array[index]
index += 1
end
end
return CartesianProductArray(array)
end
11 changes: 6 additions & 5 deletions src/LazySets.jl
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,14 @@ include("Rectification.jl")
# =============================
# Conversions between set types
# =============================
include("intersection_helper.jl")
include("convert.jl")

# =====================
# Approximations module
# =====================
include("Approximations/Approximations.jl")

# ===========================
# Concrete operations on sets
# ===========================
Expand All @@ -104,11 +110,6 @@ include("difference.jl")
# =======
include("aliases.jl")

# =====================
# Approximations module
# =====================
include("Approximations/Approximations.jl")

# ==========================
# Parallel algorithms module
# ==========================
Expand Down
29 changes: 28 additions & 1 deletion src/Translation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import Base: isempty

export Translation,
an_element,
constraints_list
constraints_list,
linear_map

"""
Translation{N<:Real, VN<:AbstractVector{N}, S<:LazySet{N}} <: LazySet{N}
Expand Down Expand Up @@ -364,3 +365,29 @@ This implementation relies on the set membership function for the wrapped set
function (x::AbstractVector{N}, tr::Translation{N})::Bool where {N<:Real}
return (x - tr.v, tr.X)
end

"""
linear_map(M::AbstractMatrix{N}, tr::Translation{N}) where {N<:Real}
Concrete linear map of a polyhedron in constraint representation.
### Input
- `M` -- matrix
- `tr` -- translation of a convex set
### Output
A concrete set corresponding to the linear map.
The type of the result depends on the type of the set wrapped by `tr`.
### Algorithm
We compute `translate(linear_map(M, tr.X), M * tr.v)`.
"""
function linear_map(M::AbstractMatrix{N}, tr::Translation{N}) where {N<:Real}
@assert dim(tr) == size(M, 2) "a linear map of size $(size(M)) cannot be " *
"applied to a set of dimension $(dim(tr))"

return translate(linear_map(M, tr.X), M * tr.v)
end
35 changes: 34 additions & 1 deletion src/concrete_intersection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ Return the intersection of a lazy linear map and a convex set.
- `L` -- linear map
- `S` -- convex set
### Output
The polytope obtained by the intersection of `l.M * L.X` and `S`.
Expand Down Expand Up @@ -782,3 +782,36 @@ function intersection(rm::ResetMap{N, <:AbstractPolytope},
P::AbstractPolyhedron{N}) where {N<:Real}
return intersection(P, rm)
end

function intersection(U::Universe{N}, X::CartesianProductArray{N}) where {N<:Real}
return X
end

# symmetric method
function intersection(X::CartesianProductArray{N}, U::Universe{N}) where {N<:Real}
return intersection(U, X)
end

"""
intersection(X::CartesianProductArray{N}, Y::CartesianProductArray{N})
Return the intersection between cartesian products of a finite number of convex sets.
### Input
- `X` -- cartesian product of a finite number of convex sets
- `Y` -- cartesian product of a finite number of convex sets
### Output
The decomposed set which represents concrete intersection between `X` and `Y`
### Algorithm
This algorithm intersect corresponding blocks between sets.
"""
function intersection(X::CartesianProductArray{N}, Y::CartesianProductArray{N}) where {N<:Real}
@assert same_block_structure(array(X), array(Y)) "block structure has to be the same"

return CartesianProductArray([intersection(array(X)[i], array(Y)[i]) for i in eachindex(X.array)])
end
4 changes: 2 additions & 2 deletions src/helper_functions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -542,9 +542,9 @@ julia> subtypes(AbstractPolytope, true)
function subtypes(interface, concrete::Bool)

subtypes_to_test = subtypes(interface)

# do not seek the concrete subtypes further
if !concrete
if !concrete
return sort(subtypes_to_test, by=string)
end

Expand Down
Loading

0 comments on commit 34f4c5b

Please sign in to comment.