00001 #ifndef SCIP_CONSTRAINT_HANDLER_H
00002 #define SCIP_CONSTRAINT_HANDLER_H
00003
00004 #include<scip/objscip.h>
00005 #include<scil/scil.h>
00006
00007 using namespace scip;
00008
00009 struct ConsData {
00010 SCIL::sym_constraint* sc;
00011 };
00012
00013
00014
00015 namespace SCIL {
00016
00017 struct ILP_Problem_Data {
00018 SCIP* scipp;
00019 subproblem* MYSub;
00020 CONSHDLR* conshdlr;
00021 SCIPConsHandler* sconshdlr;
00022 LEDA::h_array<int,var> VM;
00023 LEDA::list<cons> CL;
00024
00025
00026 };
00027
00028 struct Variable_Data {
00029 SCIP* scipp;
00030 VAR* varP;
00031 };
00032
00033 struct Basic_Constraint_Data {
00034 SCIP* scipp;
00035 ROW* rowp;
00036 };
00037
00038 class SCIPConsHandler : public ObjConshdlr {
00039 subproblem* MYSub;
00040
00041 public:
00042
00043 SCIPConsHandler(subproblem* MYSub_);
00044
00045 virtual RETCODE scip_delete(
00046 SCIP* scip,
00047 CONSHDLR* conshdlr,
00048 CONSDATA** consdata
00049 );
00050
00051 virtual RETCODE scip_trans(
00052 SCIP* scip,
00053 CONSHDLR* conshdlr,
00054 CONS* sourcecons,
00055 CONS** targetcons
00056 );
00057
00058 RETCODE scip_initlp(
00059 SCIP* scip,
00060 CONSHDLR* conshdlr,
00061 CONS** conss,
00062 int nconss
00063 );
00064
00065 virtual RETCODE scip_sepa(
00066 SCIP* scip,
00067 CONSHDLR* conshdlr,
00068 CONS** conss,
00069 int nconss,
00070 int nusefulconss,
00071 RESULT* result
00072 );
00073
00074 virtual RETCODE scip_enfolp(
00075 SCIP* scip,
00076 CONSHDLR* conshdlr,
00077 CONS** conss,
00078 int nconss,
00079 int nusefulconss,
00080 RESULT* result
00081 );
00082
00083 virtual RETCODE scip_enfops(
00084 SCIP* scip,
00085 CONSHDLR* conshdlr,
00086 CONS** conss,
00087 int nconss,
00088 int nusefulconss,
00089 Bool objinfeasible,
00090 RESULT* result
00091 );
00092
00093 virtual RETCODE scip_check(
00094 SCIP* scip,
00095 CONSHDLR* conshdlr,
00096 CONS** conss,
00097 int nconss,
00098 SOL* sol,
00099 Bool checkintegrality,
00100 Bool checklprows,
00101 RESULT* result
00102 );
00103
00104 virtual RETCODE scip_lock(
00105 SCIP* scip,
00106 CONSHDLR* conshdlr,
00107 CONS* cons,
00108 int nlockspos,
00109 int nlocksneg
00110 );
00111
00112 virtual RETCODE scip_unlock(
00113 SCIP* scip,
00114 CONSHDLR* conshdlr,
00115 CONS* cons,
00116 int nlockspos,
00117 int nlocksneg
00118 );
00119
00120
00121 void addCons(SCIP* scip, sym_constraint* sc);
00122 };
00123
00124 };
00125
00126 #endif