57 int v0,
int k0,
int lambda0)
62 void parse(
int& argc,
char* argv[]) {
74 std::cerr <<
"\t(unsigned int) default: " <<
v << std::endl
75 <<
"\t\tparameter v" << std::endl
76 <<
"\t(unsigned int) default: " <<
k << std::endl
77 <<
"\t\tparameter k" << std::endl
78 <<
"\t(unsigned int) default: " <<
lambda << std::endl
79 <<
"\t\tparameter lambda" << std::endl;
112 for (
int i=0; i<
opt.v; i++)
116 for (
int j=0; j<
opt.b; j++)
120 for (
int i1=0; i1<
opt.v; i1++)
121 for (
int i2=i1+1; i2<
opt.v; i2++) {
123 for (
int j=0; j<
opt.b; j++)
124 row[j] =
expr(*
this, p(j,i1) && p(j,i2));
135 for (
int i=1; i<
opt.v; i++)
137 for (
int j=1; j<
opt.b; j++)
149 <<
opt.v <<
"," <<
opt.k <<
","
150 <<
opt.lambda <<
")" << std::endl;
152 for (
int i = 0; i<
opt.v; i++) {
154 for (
int j = 0; j<
opt.b; j++)
164 _p.update(*
this, s.
_p);
170 return new BIBD(*
this);
187 opt.parse(argc,argv);
Options for BIBD problems
int lambda
Parameters to be given on command line.
virtual void help(void)
Print help message.
int r
Derived parameters Derive additional parameters.
void parse(int &argc, char *argv[])
Parse options from arguments argv (number is argc)
BIBDOptions(const char *s, int v0, int k0, int lambda0)
Initialize options for example with name s.
int main(int argc, char *argv[])
Main-function.
const BIBDOptions & opt
Options providing access to parameters.
BIBD(const BIBDOptions &o)
Actual model.
BoolVarArray _p
Matrix of Boolean variables.
virtual Space * copy(void)
Copy during cloning.
BIBD(BIBD &s)
Constructor for cloning s.
@ SYMMETRY_LEX
Lex-constraints on rows/columns.
@ SYMMETRY_LDSB
LDSB on rows/columns.
@ SYMMETRY_NONE
No symmetry breaking.
virtual void print(std::ostream &os) const
Print solution.
virtual void help(void)
Print help text.
void parse(int &argc, char *argv[])
Parse options from arguments argv (number is argc)
Passing Boolean variables.
static void run(const Options &opt, Script *s=NULL)
Matrix-interface for arrays.
Slice< A > col(int c) const
Access column c.
Slice< A > row(int r) const
Access row r.
Options(const char *s)
Initialize options for script with name s.
Collection of symmetries.
Driver::ScriptBase< Driver::IgnoreStepOption< Space > > Script
Base-class for scripts.
void branch(Home home, const FloatVarArgs &x, FloatVarBranch vars, FloatValBranch vals, FloatBranchFilter bf=nullptr, FloatVarValPrint vvp=nullptr)
Branch over x with variable selection vars and value selection vals.
void linear(Home home, const FloatVarArgs &x, FloatRelType frt, FloatVal c)
Post propagator for .
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVar x1)
Post propagator for .
@ IRT_GQ
Greater or equal ( )
Gecode toplevel namespace
IntVar expr(Home home, const LinIntExpr &e, const IntPropLevels &ipls=IntPropLevels::def)
Post linear expression and return its value.
BoolValBranch BOOL_VAL_MIN(void)
Select smallest value.
BoolVarBranch BOOL_VAR_NONE(void)
Select first unassigned variable.
SymmetryHandle rows_interchange(const Matrix< A > &m)
Interchangeable rows symmetry specification.
SymmetryHandle columns_interchange(const Matrix< A > &m)
Interchangeable columns symmetry specification.