Drake

This test is taken from the course notes of EE127A from University of California, Berkeley The goal is to find a hyperplane, that separates two ellipsoids E₁ = x₁ + R₁ * u₁, u₁ ≤ 1 E₂ = x₂ + R₂ * u₂, u₂ ≤ 1 A hyperplane aᵀ * x = b separates these two ellipsoids, if and only if for SOCP p* = min t₁ + t₂ s.t t₁ ≥ R₁ᵀ * a t₂ ≥ R₂ᵀ * a aᵀ(x₂x₁) = 1 the optimal solution p* is no larger than 1. More...
#include <solvers/test/second_order_cone_program_examples.h>
Public Member Functions  
TestEllipsoidsSeparation ()  
void  SolveAndCheckSolution (const MathematicalProgramSolverInterface &solver, double tol=1E8) 
This test is taken from the course notes of EE127A from University of California, Berkeley The goal is to find a hyperplane, that separates two ellipsoids E₁ = x₁ + R₁ * u₁, u₁ ≤ 1 E₂ = x₂ + R₂ * u₂, u₂ ≤ 1 A hyperplane aᵀ * x = b separates these two ellipsoids, if and only if for SOCP p* = min t₁ + t₂ s.t t₁ ≥ R₁ᵀ * a t₂ ≥ R₂ᵀ * a aᵀ(x₂x₁) = 1 the optimal solution p* is no larger than 1.
In that case, an appropriate value of b is b = 0.5(b₁ + b₂), where b₁ = aᵀx₁ + R₁ᵀ * a b₂ = aᵀx₂  R₂ᵀ * a
x1  the center of ellipsoid 1 
x2  the center of ellipsoid 2 
R1  the shape of ellipsoid 1 
R2  the shape of ellipsoid 2 
void SolveAndCheckSolution  (  const MathematicalProgramSolverInterface &  solver, 
double  tol = 1E8 

) 