1 (* ========================================================================== *)
2 (* FLYSPECK - CODE FORMALIZATION *)
4 (* Program: Linear Programs *)
5 (* Author: Thomas C. Hales *)
7 (* ========================================================================== *)
11 Local build file for linear programs.
14 flyspeck_needs "nonlinear/ineq.hl";;
15 flyspeck_needs "nonlinear/parse_ineq.hl";;
16 flyspeck_needs "../glpk/glpk_link.ml";;
17 flyspeck_needs "../glpk/tame_archive/lpproc.ml";;
18 flyspeck_needs "../glpk/sphere.ml";;
19 flyspeck_needs "../glpk/tame_archive/hard_lp.ml";;
20 flyspeck_needs "../glpk/tame_archive/scaffolding.hl";;
22 module Build_lp = struct
24 let test_nonlinear_lp() = let lpineq = Ineq.getfield Lp in
25 Parse_ineq.execute_cfsqp_list lpineq;;
27 let rebuild_body_mod() =
28 let _ = Parse_ineq.output_filestring "/tmp/body.mod" (Parse_ineq.lpstring()) in
29 let _ = Sys.command("diff /tmp/body.mod "^flyspeck_dir^"/../glpk/tame_archive/body.mod") in
30 "--end of diff-- To install, move /tmp/body.mod to glpk/tame_archive/body.mod";;
39 let _ = Sys.command("date") in
40 let startdate = process_to_string "date" in
41 let lpdata = Lpproc.execute() in
42 let (tame_bb,feasible_bb,hard_bb,easy_bb,
43 remaining_easy_bb) = lpdata in
45 if (remaining_easy_bb=[]) then (([],[],[],[],[]),Hard_lp.execute(),"finished output")
46 else (lpdata,[[]],"easy cases remain- aborted") in
47 let _ = Sys.command("date") in
48 let enddate = process_to_string "date" in
49 (startdate,!Glpk_link.solve_counter,output,enddate);;
58 !Glpk_link.solve_counter;;
60 Run of Hard_lp.execute();;
61 started at Thu Aug 5 16:58:26 ICT 2010
63 STACK 1 15413 (so about 30K linear programs)
64 val it : Lpproc.branchnbound list list =
65 [[]; []; []; []; []; []; []; []; []; []; []; []]
67 retested Sep 22 on Thackmac, identical results, svn 1978.
69 retested Oct 22, 2010 on Malt, 2026, some weakened ineqs.
72 All retested svn 2402 on Malt
73 May 10, 2011, eliminated ineq 7676202716 from body.mod.
74 Still passes. So this inequality can be eliminated entirely!
76 val it : Lpproc.branchnbound list list =
77 [[]; []; []; []; []; []; []; []; []; []; []; []]
80 May 18, svn 2411 on malt,
81 experiment 0.696 -> 0.616, and moved 3 more cases to hardid.
83 let run_output = run_all();;
86 val hard_out : Lpproc.branchnbound list list =
87 [[]; []; []; []; []; []; []; []; []; []; []; []; []; []; []]
88 I also ran the new hex cases (at least those with a pent), and they all pass easily.
91 svn 2412 on malt, May 22, 2011,
92 tameTableD[6,0]->0.712, tameTableD[4,1]->0.616.
93 This only affects the hexagon cases. Graph generator for hexagons was rerun.
95 Lpproc.archiveraw := (Filename.concat archive_dir "string_hex_may2011.txt");;
97 let lpdata = Lpproc.execute();;
98 let (tame_bb,feasible_bb,hard_bb,easy_bb,remaining_easy_bb) = lpdata;;
99 (no hexagons in the hardid list)
101 April 14, 2012. Preparing new run. Seems to be running fine on Thackmac.
104 Quad Inequalities "6944699408 a" and "7043724150 a" have been removed.
105 Everything still goes through.
108 ((Lpproc.branchnbound list * Lpproc.branchnbound list *
109 Lpproc.branchnbound list * Lpproc.branchnbound list *
110 Lpproc.branchnbound list) *
111 Lpproc.branchnbound list list * string) *
113 ("Mon Jul 29 14:50:39 EDT 2013\n", 62748,
114 (([], [], [], [], []),
115 [[]; []; []; []; []; []; []; []; []; []; []; []; []; []; []],
117 "Mon Jul 29 20:31:03 EDT 2013\n")