BALL
1.4.1
|
00001 #ifndef BALL_STRUCTURE_BONDORDERS_ILPBONDORDERSTRATEGY_H 00002 #define BALL_STRUCTURE_BONDORDERS_ILPBONDORDERSTRATEGY_H 00003 00004 #ifndef BALL_STRUCTURE_BONDORDERS_BONDORDERASSIGNMENTSTRATEGY_H 00005 # include <BALL/STRUCTURE/BONDORDERS/bondOrderAssignmentStrategy.h> 00006 #endif 00007 00008 #ifndef BALL_STRUCTURE_BONDORDERS_BONDORDERASSIGNMENT_H 00009 # include <BALL/STRUCTURE/BONDORDERS/bondOrderAssignment.h> 00010 #endif 00011 // forward declaration for lp_solve 00012 struct _lprec; 00013 typedef struct _lprec lprec; 00014 00015 namespace BALL 00016 { 00023 class ILPBondOrderStrategy 00024 : public BondOrderAssignmentStrategy 00025 { 00026 public: 00027 ILPBondOrderStrategy(AssignBondOrderProcessor* parent); 00028 virtual ~ILPBondOrderStrategy(); 00029 00030 virtual void clear(); 00031 virtual void init(); 00032 00033 virtual bool readOptions(const Options& options); 00034 virtual void setDefaultOptions(); 00035 00036 virtual boost::shared_ptr<BondOrderAssignment> computeNextSolution(); 00037 00038 protected: 00039 bool valid_; 00040 00041 // Vector for mapping from variable indices onto free bonds in the 00042 // order used by the ILP 00043 std::vector<Bond*> index_to_free_bond_; 00044 00045 // number of bond variables in the ILP 00046 Position number_of_free_bonds_; 00047 00048 // Constant penalty (fixed bonds) 00049 float const_penalty_; 00050 00051 // flag indicating whether constraints need to be added 00052 bool first_solution_; 00053 00054 // the ilp 00055 lprec* ilp_; 00056 }; 00057 } 00058 #endif // BALL_STRUCTURE_BONDORDERS_ILPBONDORDERSTRATEGY_H