Rename greedy to infinity
This commit is contained in:
@@ -114,32 +114,32 @@ instances/%.done: $(multirow) 2row-cont/%.yaml 2row-lift/%.yaml 3row-cont/%.yaml
|
||||
|
||||
2row-cont/%.yaml: $(multirow) instances/%.mps.gz bases/%.bas
|
||||
@echo " 2row-cont $*..."
|
||||
@$(multirow) --mir --greedy --problem instances/$*.mps.gz --basis bases/$*.bas --log 2row-cont/$*.log --stats $@ --solution solutions/$*.x || touch 2row-cont/$*.err.$$?
|
||||
@$(multirow) --mir --infinity --problem instances/$*.mps.gz --basis bases/$*.bas --log 2row-cont/$*.log --stats $@ --solution solutions/$*.x || touch 2row-cont/$*.err.$$?
|
||||
@echo " 2row-cont $* [done]"
|
||||
|
||||
2row-lift/%.yaml: $(multirow) instances/%.mps.gz bases/%.bas
|
||||
@echo " 2row-lift $*..."
|
||||
@$(multirow) --mir --greedy --problem instances/$*.mps.gz --basis bases/$*.bas --log 2row-lift/$*.log --stats $@ --solution solutions/$*.x --lift || touch 2row-lift/$*.err.$$?
|
||||
@$(multirow) --mir --infinity --problem instances/$*.mps.gz --basis bases/$*.bas --log 2row-lift/$*.log --stats $@ --solution solutions/$*.x --lift || touch 2row-lift/$*.err.$$?
|
||||
@echo " 2row-lift $* [done]"
|
||||
|
||||
3row-cont/%.yaml: $(multirow) instances/%.mps.gz bases/%.bas
|
||||
@echo " 3row-cont $*..."
|
||||
@$(multirow) --mir --greedy --problem instances/$*.mps.gz --basis bases/$*.bas --log 3row-cont/$*.log --stats $@ --solution solutions/$*.x --rows 3 || touch 3row-cont/$*.err.$$?
|
||||
@$(multirow) --mir --infinity --problem instances/$*.mps.gz --basis bases/$*.bas --log 3row-cont/$*.log --stats $@ --solution solutions/$*.x --rows 3 || touch 3row-cont/$*.err.$$?
|
||||
@echo " 3row-cont $* [done]"
|
||||
|
||||
3row-lift/%.yaml: $(multirow) instances/%.mps.gz bases/%.bas
|
||||
@echo " 3row-lift $*..."
|
||||
@$(multirow) --mir --greedy --problem instances/$*.mps.gz --basis bases/$*.bas --log 3row-lift/$*.log --stats $@ --solution solutions/$*.x --rows 3 --lift || touch 3row-lift/$*.err.$$?
|
||||
@$(multirow) --mir --infinity --problem instances/$*.mps.gz --basis bases/$*.bas --log 3row-lift/$*.log --stats $@ --solution solutions/$*.x --rows 3 --lift || touch 3row-lift/$*.err.$$?
|
||||
@echo " 3row-lift $* [done]"
|
||||
|
||||
5row-cont/%.yaml: $(multirow) instances/%.mps.gz bases/%.bas
|
||||
@echo " 5row-cont $*..."
|
||||
@$(multirow) --mir --greedy --problem instances/$*.mps.gz --basis bases/$*.bas --log 5row-cont/$*.log --stats $@ --solution solutions/$*.x --rows 5 || touch 5row-cont/$*.err.$$?
|
||||
@$(multirow) --mir --infinity --problem instances/$*.mps.gz --basis bases/$*.bas --log 5row-cont/$*.log --stats $@ --solution solutions/$*.x --rows 5 || touch 5row-cont/$*.err.$$?
|
||||
@echo " 5row-cont $* [done]"
|
||||
|
||||
5row-lift/%.yaml: $(multirow) instances/%.mps.gz bases/%.bas
|
||||
@echo " 5row-lift $*..."
|
||||
@$(multirow) --mir --greedy --problem instances/$*.mps.gz --basis bases/$*.bas --log 5row-lift/$*.log --stats $@ --solution solutions/$*.x --rows 5 --lift || touch 5row-lift/$*.err.$$?
|
||||
@$(multirow) --mir --infinity --problem instances/$*.mps.gz --basis bases/$*.bas --log 5row-lift/$*.log --stats $@ --solution solutions/$*.x --rows 5 --lift || touch 5row-lift/$*.err.$$?
|
||||
@echo " 5row-lift $* [done]"
|
||||
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ int SHOULD_DUMP_CUTS = 0;
|
||||
int DUMP_CUT_N = 0;
|
||||
|
||||
int GENERATE_MIR = 0;
|
||||
int GENERATE_GREEDY = 0;
|
||||
int GENERATE_INFINITY = 0;
|
||||
int KEEP_INTEGRALITY = 0;
|
||||
int N_ROUNDS = 1;
|
||||
|
||||
@@ -63,7 +63,7 @@ static const struct option options_tab[] =
|
||||
{"problem", required_argument, 0, 'p'},
|
||||
{"solution", required_argument, 0, 'x'},
|
||||
{"mir", no_argument, 0, 'm'},
|
||||
{"greedy", no_argument, 0, 'g'},
|
||||
{"infinity", no_argument, 0, 'g'},
|
||||
{"rounds", required_argument, 0, 'r'},
|
||||
{"keep-integrality", no_argument, 0, 'k'},
|
||||
{"write-solution", required_argument, 0, OPTION_WRITE_SOLUTION},
|
||||
@@ -86,8 +86,8 @@ static void print_usage(char **argv)
|
||||
printf("%4s %-20s %s\n", "-b", "--basis=FILE",
|
||||
"BAS file containing an optimal basis for the linear relaxation of "
|
||||
"the problem");
|
||||
printf("%4s %-20s %s\n", "-g", "--greedy",
|
||||
"generate greedy intersection cuts");
|
||||
printf("%4s %-20s %s\n", "-g", "--infinity",
|
||||
"generate infinity cuts");
|
||||
printf("%4s %-20s %s\n", "-k", "--keep-integrality",
|
||||
"do not relax integrality of variables");
|
||||
printf("%4s %-20s %s\n", "-l", "--log=FILE",
|
||||
@@ -135,7 +135,7 @@ static int parse_args(int argc,
|
||||
break;
|
||||
|
||||
case 'g':
|
||||
GENERATE_GREEDY = 1;
|
||||
GENERATE_INFINITY = 1;
|
||||
break;
|
||||
|
||||
case 'k':
|
||||
@@ -207,7 +207,7 @@ static int parse_args(int argc,
|
||||
rval = 1;
|
||||
}
|
||||
|
||||
if (KEEP_INTEGRALITY && (GENERATE_GREEDY + GENERATE_MIR > 0))
|
||||
if (KEEP_INTEGRALITY && (GENERATE_INFINITY + GENERATE_MIR > 0))
|
||||
{
|
||||
fprintf(stderr, "Cutting planes cannot be added when integrality is "
|
||||
"kept\n");
|
||||
@@ -242,8 +242,7 @@ void print_header(int argc,
|
||||
|
||||
time_printf("Compile-time parameters:\n");
|
||||
time_printf(" EPSILON: %e\n", EPSILON);
|
||||
time_printf(" GREEDY_BIG_E: %e\n", GREEDY_BIG_E);
|
||||
time_printf(" GREEDY_MAX_GAP: %e\n", GREEDY_MAX_GAP);
|
||||
time_printf(" INFINITY_BIG_E: %e\n", INFINITY_BIG_E);
|
||||
|
||||
char cmdline[5000] = {0};
|
||||
for (int i = 0; i < argc; i++)
|
||||
@@ -356,7 +355,7 @@ int main(int argc,
|
||||
abort_if(rval, "LP_write_basis failed");
|
||||
}
|
||||
|
||||
if(GENERATE_MIR || GENERATE_GREEDY)
|
||||
if(GENERATE_MIR || GENERATE_INFINITY)
|
||||
{
|
||||
cg = (struct CG *) malloc(sizeof(struct CG));
|
||||
abort_if(!cg, "could not allocate cg");
|
||||
@@ -409,11 +408,11 @@ int main(int argc,
|
||||
STATS_finish_round();
|
||||
}
|
||||
|
||||
if (GENERATE_GREEDY)
|
||||
if (GENERATE_INFINITY)
|
||||
{
|
||||
for(int k = MIN_N_ROWS; k <= MAX_N_ROWS; k++)
|
||||
{
|
||||
log_info("Adding greedy intersection cuts (%d rows)...\n", k);
|
||||
log_info("Adding infinity cuts (%d rows)...\n", k);
|
||||
|
||||
rval = CG_add_multirow_cuts(cg, k,
|
||||
(MultiRowGeneratorCallback) INFINITY_generate_cut);
|
||||
|
||||
Reference in New Issue
Block a user