Implementation of a graph search algorithm for a point location problem.
[index, details] = locatePoint(U,x)
U |
Union of polyhedra returned from PLCP solver with an included adjacency list. Class: PolyUnion |
x |
A point in the same dimension as PolyUnion given as real column vector. Class: double |
index |
Index of a region where ![]() Class: double |
details |
A structure with statistical information numerical performance of the graph traversal algorithm. Class: struct Allowed values:
|
P = ExamplePoly.randVrep('d',3);Formulate a parametric optimization problem in 2D over the polytope P.
problem = Opt('f',[1,-0.4,0.4],'A',P.A,'b',P.b,'pB',randn(size(P.H,1),2));Solve the problem to get a polyunion with attached adjacency list.
res = problem.solve
mpt_plcp: 20 regions res = xopt: [1x1 PolyUnion] exitflag: 1 how: 'ok' stats: [1x1 struct]Get the interior point located in the last region.
last = res.xopt.Num
last = 20
p = res.xopt.Set(last).interiorPoint
p = x: [2x1 double] isStrict: 1 r: 916.361188799218Verify using the graph traversal algorithm that the point lies in the last region.
index = locatePoint(res.xopt,p.x)
index = 20
◀ | isbounded | isfulldim | ▶ |
© 2010-2013 Martin Herceg: ETH Zurich, herceg@control.ee.ethz.ch