heirung / pytope Goto Github PK
View Code? Open in Web Editor NEWMinimal package for operations on polytopes, zonotopes, and invariant sets.
License: MIT License
Minimal package for operations on polytopes, zonotopes, and invariant sets.
License: MIT License
Hello Tor,
We've been using your library in safe-control-gym for implementing robust tube MPC among other things.
Would you mind updating the pipy package to be version 0.0.5
?
We would greatly appreciate it!
There's a couple features that you added in your latest release that we need and we'd like to avoid having to git clone and pip install from source.
Hi,
I realized that when defining a one-dimensional polytope via its vertices and obtaining the H representation from its V representation, the vertices will be flipped.
For example, we want to define the polytope given by the inverval
Then the H representation of this polytope actually describes the polytope
Furthermore, when determining the V representation after determining the H representation, the V representation will also contain the flipped vertices.
Below I provide a code snippet to reproduce the issue, where
import numpy as np
import pytope as pt # tested version 0.0.5
# define vertices for the polytope [-0.5, 1]
V= np.array([[-0.5], [1]])
# define polytope by vertices
poly = pt.Polytope(V=V)
print('Vertices describing poly before determining H rep:')
print(poly._get_V().T)
poly.determine_H_rep()
# Check if vertices are in the H representation
for i in range(len(V)):
vertex = V[i]
print(f"Is vertex = {vertex[0]} in the H representation of the polytope defined by [-0.5, 1]?")
if sum(poly.A*vertex-poly.b>0)>0:
print("No")
# check vertices after determining the H rep
print('Vertices describing poly after determining H rep:')
print(poly._get_V().T)
# check vertices after determining both the H and V rep
poly.determine_V_rep()
print('Vertices describing poly after determining H rep and V rep:')
print(poly._get_V().T)
This code will print out "No", when we check if the vertex
Line 366 in ebd8540
Shouldn't this be H_cdd.row_size
instead of H_cdd.col_size
?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.