examples: Fix main default parameter
This commit is contained in:
@@ -2053,7 +2053,7 @@
|
||||
" bus_driver_scheduling(False, num_drivers)\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"def main(_):\n",
|
||||
"def main(_=None):\n",
|
||||
" solve_bus_driver_scheduling()\n",
|
||||
"\n",
|
||||
"\n",
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
"from ortools.sat.python import cp_model\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"def main(_):\n",
|
||||
"def main(_=None):\n",
|
||||
" \"\"\"Solves the gate scheduling problem.\"\"\"\n",
|
||||
" model = cp_model.CpModel()\n",
|
||||
"\n",
|
||||
|
||||
@@ -160,7 +160,7 @@
|
||||
" print(f'- total wall time: {solver.WallTime()}ms\\n')\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"def main(_):\n",
|
||||
"def main(_=None):\n",
|
||||
" solve_golomb_ruler(FLAGS.order)\n",
|
||||
"\n",
|
||||
"\n",
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
" print(f'- wall time: {solver.WallTime()}s\\n')\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"def main(_):\n",
|
||||
"def main(_=None):\n",
|
||||
" solve_golomb_ruler(FLAGS.order, FLAGS.params)\n",
|
||||
"\n",
|
||||
"\n",
|
||||
|
||||
@@ -257,7 +257,7 @@
|
||||
" print(' - wall time : %f s' % solver.WallTime())\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"def main(_):\n",
|
||||
"def main(_=None):\n",
|
||||
" for pb in range(1, 7):\n",
|
||||
" solve_hidato(build_puzzle(pb), pb)\n",
|
||||
"\n",
|
||||
|
||||
@@ -432,7 +432,7 @@
|
||||
" solve_with_rotations(data, max_height, max_width)\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"def main(_):\n",
|
||||
"def main(_=None):\n",
|
||||
" solve_knapsack(FLAGS.model)\n",
|
||||
"\n",
|
||||
"\n",
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
" 'Some input costs are too large and may cause an integer overflow.')\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"def main(_):\n",
|
||||
"def main(_=None):\n",
|
||||
" RunAssignmentOn4x4Matrix()\n",
|
||||
"\n",
|
||||
"\n",
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
" print('There was an issue with the min cost flow input.')\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"def main(_):\n",
|
||||
"def main(_=None):\n",
|
||||
" MaxFlow()\n",
|
||||
" MinCostFlow()\n",
|
||||
"\n",
|
||||
|
||||
@@ -367,7 +367,7 @@
|
||||
" solver.Solve(model)\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"def main(_):\n",
|
||||
"def main(_=None):\n",
|
||||
" rcpsp_parser = pywraprcpsp.RcpspParser()\n",
|
||||
" rcpsp_parser.ParseFile(FLAGS.input)\n",
|
||||
" SolveRcpsp(rcpsp_parser.Problem(), FLAGS.output_proto, FLAGS.params)\n",
|
||||
|
||||
@@ -483,7 +483,7 @@
|
||||
" print(' - wall time : %f s' % solver.WallTime())\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"def main(_):\n",
|
||||
"def main(_=None):\n",
|
||||
" solve_shift_scheduling(FLAGS.params, FLAGS.output_proto)\n",
|
||||
"\n",
|
||||
"\n",
|
||||
|
||||
@@ -797,7 +797,7 @@
|
||||
" print('No solution')\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"def main(_):\n",
|
||||
"def main(_=None):\n",
|
||||
" if FLAGS.solver == 'sat':\n",
|
||||
" steel_mill_slab(FLAGS.problem, FLAGS.break_symmetries)\n",
|
||||
" elif FLAGS.solver == 'sat_table':\n",
|
||||
|
||||
Reference in New Issue
Block a user