•All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
double_description_method.cpp
Go to the documentation of this file.
93 wov_ = m_coeff*minus.wov_ - p_coeff*plus.wov_; // return m_coeff * ray_minus - p_coeff * ray_plus
152 return (std::count_if(weight_.cbegin(), weight_.cend(), [](const ValueType& val){return val != 0.;}) > 1);
190 else if (std::any_of(weight_.cbegin(), weight_.cend(), [threshold](ValueType w){return w > threshold;}))
234 bool V_RepT::hasZeroIndsSuperSet(const std::bitset<kMaxInitialHrepSize>& common_zero_inds) const {
261 h_rep_.emplace_back(std::move(unit_vec), 0.); // add constraint: e_i 0 >= 0 with e_i being i-th unit vector
278 std::tuple<bool, DoubleDescriptionMethod::VarOrder, size_t> DoubleDescriptionMethod::minInfeasCondition(const V_RepT& r1, const V_RepT& r2) const {
295 * Detailed description of algorithm can be found on page 13 in "Double Description Method Revisited"
412 auto new_ray = make_shared<V_RepT>(scip_, p.first.get(), p.second.get(), current_hrep_index_, h_rep_);
458 extended_v_rep.push_back(make_shared<V_RepT>(scip_, p.first.get(), p.second.get(), current_hrep_index_, h_rep_));
474 DoubleDescriptionMethod::AdjPairContainer DoubleDescriptionMethod::computeAdjacentPairs(const V_RepC& plus,
494 std::bitset<V_RepT::kMaxInitialHrepSize> DoubleDescriptionMethod::getCommonZeroSlackIndices(const V_RepT &v,
563 if (SCIPisZero(scip_, v.wov_)) { // -> w.wov!=0 implying v == k*w only if k=0 && v=0 implying something is wrong since v.weight should != 0
564 assert (!std::all_of(begin(v.weight_), end(v.weight_), [scip_ptr](ValueType val){return SCIPisZero(scip_ptr,val);})); // assert (v.weight!=0)
567 else if (SCIPisZero(scip_, w.wov_)) { // -> v.wov!=0 implying w == k*v only if k=0 && w=0 implying something is wrong since w.weight should != 0
568 assert (!std::all_of(begin(w.weight_), end(w.weight_), [scip_ptr](ValueType val){return SCIPisZero(scip_ptr,val);})); // assert (w.weight!=0)
579 * Indicates whether weight of first element is a multiple (with value v_multiple) of weight of second element
584 * @return true if weight of first element is a v_multiple of weight of second element; false otherwise
586 bool DoubleDescriptionMethod::weightIsMultiple(SCIP* scip, double v_multiple, const V_RepT& v, const V_RepT& w) const {
608 init_v_rep.push_back(make_shared<V_RepT>(scip_, WeightType(outcome_dimension_, 0.), -1., h_rep_)); // add v_rep: 0 0 ... 0 -1
613 init_v_rep.push_back(make_shared<V_RepT>(scip_, std::move(unit_vec), std::move(wov), h_rep_)); // add v_rep: e_i, vrep_wov with e_i being i-th unit vector
Some preprocessor directives.
bool hasZeroIndsSuperSet(const std::bitset< kMaxInitialHrepSize > &common_zero_inds) const
Definition: double_description_method.cpp:234
Class for element of v-representation.
Definition: double_description_method.h:57
Definition: struct_scip.h:58
std::vector< AdjPair > AdjPairContainer
Container for adjacent pairs.
Definition: double_description_method.h:200
V_RepT(SCIP *scip, WeightType &&weight, ValueType &&wov, const H_RepC &h_rep)
Definition: double_description_method.cpp:57
void print(std::ostream &os, bool withIncidentFacets, const H_RepC &h_rep) const
Definition: double_description_method.cpp:212
static constexpr std::size_t kMaxInitialHrepSize
Maximal initial size of h-representation.
Definition: double_description_method.h:61
bool hasNonUnitAndNonZeroWeight() const
Definition: double_description_method.cpp:151
std::size_t getMinInfeasIndex() const
Definition: double_description_method.cpp:133
void printVRep(std::ostream &os=std::cout, bool withIncidentFacets=false) const
Definition: double_description_method.cpp:324
std::vector< std::shared_ptr< V_RepT > > V_RepC
Container for v-representations.
Definition: double_description_method.h:190
bool operator==(const V_RepT &rhs) const
Definition: double_description_method.cpp:106
std::vector< H_RepT > H_RepC
Container for h-representations.
Definition: double_description_method.h:51
General types used for PolySCIP.
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
Definition: scip_numerics.c:516
std::vector< ValueType > OutcomeType
Type for points, rays in objective space.
Definition: polyscip_types.h:35
void computeVRep_Var1()
Definition: double_description_method.cpp:370
bool isZeroSlackIndex(std::size_t index) const
Definition: double_description_method.cpp:143
void print(const Container &container, const std::string &prefix="", const std::string &suffix="", std::ostream &os=std::cout, bool negate=false, int prec=6)
Definition: global_functions.h:95
C++ wrapper classes for SCIP.
DoubleDescriptionMethod(SCIP *scip, std::size_t no_all_obj, const ResultContainer &bounded, const ResultContainer &unbounded)
Definition: double_description_method.cpp:246
bool operator!=(const V_RepT &rhs) const
Definition: double_description_method.cpp:115
Global helper functions.
void computeVRep()
Definition: double_description_method.cpp:332
Definition: cmd_line_args.cpp:37
std::pair< OutcomeType, ValueType > H_RepT
Type for element of h-representation.
Definition: double_description_method.h:50
Double description method for transforming a polyhedron given via its h-representation into its v-rep...
Definition: objbenders.h:33