Skip to content

Commit

Permalink
minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
hongkai-dai committed Apr 3, 2018
1 parent bd8be37 commit d9251cd
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions solvers/mixed_integer_optimization_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,11 @@ struct LogarithmicSos2NewBinaryVariables<Eigen::Dynamic> {
*/
template <typename Derived>
typename std::enable_if<
std::is_base_of<Eigen::MatrixBase<Derived>, Derived>::value &&
std::is_same<typename Derived::Scalar, symbolic::Expression>::value &&
Derived::ColsAtCompileTime == 1,
drake::is_eigen_vector_of<Derived, symbolic::Expression>::value,
typename LogarithmicSos2NewBinaryVariables<
Derived::RowsAtCompileTime>::type>::type
AddLogarithmicSos2Constraint(MathematicalProgram* prog, const Derived& lambda,
AddLogarithmicSos2Constraint(MathematicalProgram* prog,
const Eigen::MatrixBase<Derived>& lambda,
const std::string& binary_variable_name = "y") {
const int binary_variable_size = CeilLog2(lambda.rows() - 1);
const auto y = prog->NewBinaryVariables<
Expand Down Expand Up @@ -178,7 +177,7 @@ enum class IntervalBinning {
* logarithmic binning.
* @return lambda The auxiliary continuous variables.
* x = φxᵀ * (λ.rowwise().sum())
* y = φyᵀ * (λ.cowwise().sum())
* y = φyᵀ * (λ.colwise().sum())
* w = sum_{i, j} φx(i) * φy(j) * λ(i, j)
* Both λ.rowwise().sum() and λ.colwise().sum() satisfy SOS2 constraint.
* If x ∈ [φx(M), φx(M+1)] and y ∈ [φy(N), φy(N+1)], then only λ(M, N),
Expand Down

0 comments on commit d9251cd

Please sign in to comment.