Skip to content

Evaluation of CPSAT solver log and results. Into CSV and bounds/objectives list.

Notifications You must be signed in to change notification settings

cfsfifty/CPSAT_logcsv

Repository files navigation

class SolverStatsCSV

Write CP-SAT solver statistics to a CSV file given as csv_filename, activated in CP-SAT as


solver.parameters.log_search_progress = True
solver.parameters.log_to_response     = True

CSV table schema, where objective1 == objective2 (and corresponding time and bound)


[
'Date', 'ModelName', 'Objective', 'UserTime', '#Booleans', '#Branches', '#Conflicts', 'SolverParameters', 'SolverLog',
'time1', 'bound1', 'objective1', 'time2', 'bound2', 'objective2'
]

Additionally, get the bound/objective history from the CP-SAT log response string after solving. Then write_stats extracts and returns a time-ordered list log_list = [ (time, bound, objective, gapInPercent) ]. Please see the example testCircles_FromLog.py.


responseString = str(solver.ResponseProto())
log_list = csv.write_stats(solver, "circles_%d_%d" % (num_circles_dim, radius_circles), responseString)

About

Evaluation of CPSAT solver log and results. Into CSV and bounds/objectives list.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages