Debian Codegraph @

include/BALL/STRUCTURE/BONDORDERS/ILPBondOrderStrategy.h

raw symbols SCIP
1 #ifndef BALL_STRUCTURE_BONDORDERS_ILPBONDORDERSTRATEGY_H
2 #define BALL_STRUCTURE_BONDORDERS_ILPBONDORDERSTRATEGY_H
3
4 #ifndef BALL_STRUCTURE_BONDORDERS_BONDORDERASSIGNMENTSTRATEGY_H
5 # include <BALL/STRUCTURE/BONDORDERS/bondOrderAssignmentStrategy.h>
6 #endif
7
8 #ifndef BALL_STRUCTURE_BONDORDERS_BONDORDERASSIGNMENT_H
9 # include <BALL/STRUCTURE/BONDORDERS/bondOrderAssignment.h>
10 #endif
11 // forward declaration for lp_solve
12 struct _lprec;
13 typedef struct _lprec lprec;
14
15 namespace BALL
16 {
17 /** ILP algorithm for bond order assignment.
18 *
19 * This class implements an Integer Linear Programming approach
20 * for the bond order assignment problem that can be used by
21 * the \link AssignBondOrderProcessor AssignBondOrderProcessor \endlink.
22 */
23 class ILPBondOrderStrategy
24 : public BondOrderAssignmentStrategy
25 {
26 public:
27 ILPBondOrderStrategy(AssignBondOrderProcessor* parent);
28 virtual ~ILPBondOrderStrategy();
29
30 virtual void clear();
31 virtual void init();
32
33 virtual bool readOptions(const Options& options);
34 virtual void setDefaultOptions();
35
36 virtual boost::shared_ptr<BondOrderAssignment> computeNextSolution();
37
38 protected:
39 bool valid_;
40
41 // Vector for mapping from variable indices onto free bonds in the
42 // order used by the ILP
43 std::vector<Bond*> index_to_free_bond_;
44
45 // number of bond variables in the ILP
46 Position number_of_free_bonds_;
47
48 // Constant penalty (fixed bonds)
49 float const_penalty_;
50
51 // flag indicating whether constraints need to be added
52 bool first_solution_;
53
54 // the ilp
55 lprec* ilp_;
56 };
57 }
58 #endif // BALL_STRUCTURE_BONDORDERS_ILPBONDORDERSTRATEGY_H