5 #ifndef FRAMEFAB_MPP_GECODEANALYZER_H 6 #define FRAMEFAB_MPP_GECODEANALYZER_H 15 #include <gecode/driver.hh> 16 #include <gecode/int.hh> 17 #include <gecode/search.hh> 18 #include <gecode/minimodel.hh> 35 const std::vector<int>& _A,
36 const std::vector<int>& _G,
37 const std::vector<int>& _T,
40 : Options(s), A(_A), G(_G), T(_T), n(_n), m(_m)
53 : Script(input_opt), opt(input_opt), o(*this, input_opt.
n, 0, input_opt.
n - 1)
70 for(
int i=0; i <
n; i++)
73 IntVarArgs connect_num(i+1);
75 for(
int j=0; j < i; j++)
78 element(*
this, A, o[j], n, o[i], n, connect_num[j]);
81 element(*
this, G, o[i], connect_num[i]);
83 linear(*
this, connect_num, IRT_GQ, 1);
118 : Script(share, s), opt(s.opt)
120 o.update(*
this, share, s.
o);
123 virtual Space *
copy(
bool share)
130 os <<
"\tAssembly Sequence(n: " 131 << opt.
n <<
", m: " << opt.
m <<
")" 134 os <<
"Order: " << o << std::endl;
164 typedef Eigen::MatrixXd
MX;
165 typedef Eigen::Matrix3d
M3;
166 typedef Eigen::VectorXd
VX;
167 typedef Eigen::Vector3d
V3;
176 bool terminal_output,
178 descartes_core::RobotModelPtr hotend_model,
179 moveit::core::RobotModelConstPtr moveit_model,
180 std::string hotend_group_name
182 :
SeqAnalyzer(ptr_dualgraph, ptr_collision, ptr_stiffness,
183 ptr_parm, ptr_path, terminal_output, file_output,
184 hotend_model, moveit_model, hotend_group_name){}
192 void ComputeGecodeInput(
193 const std::vector<WF_edge*>& layer_e,
197 void PrintOutTimer();
208 #endif //FRAMEFAB_MPP_GECODEANALYZER_H
AssemblySequenceOptions(const char *s, const std::vector< int > &_A, const std::vector< int > &_G, const std::vector< int > &_T, const int _n, const int _m)
std::vector< std::vector< WF_edge * > > layers_
GecodeAnalyzer(DualGraph *ptr_dualgraph, QuadricCollision *ptr_collision, Stiffness *ptr_stiffness, FiberPrintPARM *ptr_parm, char *ptr_path, bool terminal_output, bool file_output, descartes_core::RobotModelPtr hotend_model, moveit::core::RobotModelConstPtr moveit_model, std::string hotend_group_name) noexcept
const AssemblySequenceOptions & opt
AssemblySequence(const AssemblySequenceOptions &input_opt)
virtual Space * copy(bool share)
AssemblySequence(bool share, AssemblySequence &s)
void print(std::ostream &os) const