This PR updates all of the notebooks and python modules to use snake case #34
I re-ran everything I could to test that it was still working.
On Jupyter notebooks, where possible, I updated the code to snake case and saved the code changes, then test ran the notebook without saving the new notebook outputs - this largely prevents the big diffs.
Occasionally, I did save all the outputs, and you get the big diffs. Sorry about that.
A couple of obstacles I had when re-running code after changing to snake case:
examples/add_no_overlap_2d_parameters.ipynb - I get an AssertionError (assert status == cp_model.OPTIMAL) with pack() instances that have scale=10_000, so I set scale=1000 and ran the notebook to completion.
evaluations/tsp - I didn't rerun the benchmarks because they rely on a comparison with gurobi, and I don't have access to a gurobi license.
evaluations/embedding_cpsat & evaluations/optimization_api - I only made modest changes to the cp_model function calls, and didn't rerun these.
In examples/add_no_overlap_2d_parameters.py commented out the solve parameter use_pairwise_reasoning_in_no_overlap_2d as it wasn't found.
There are a couple of additional small fixes:
There was one remaining place where the conjugation of proof needed to be updated: proving/proofing and proved/proofed.
The constructor for PiecewiseConstantConstraint, the default value of parameter restrict_domain has been changed to False. (This aligns will all usages of this class.)
In utils/piecewise_function_approximation.ipynb I named the arguments to PiecewiseConstantConstraint and PiecewiseLinearConstraint to avoid an error that had occurred on parameter ordering.
This PR updates all of the notebooks and python modules to use snake case #34 I re-ran everything I could to test that it was still working. On Jupyter notebooks, where possible, I updated the code to snake case and saved the code changes, then test ran the notebook without saving the new notebook outputs - this largely prevents the big diffs. Occasionally, I did save all the outputs, and you get the big diffs. Sorry about that.
A couple of obstacles I had when re-running code after changing to snake case:
examples/add_no_overlap_2d_parameters.ipynb
- I get an AssertionError (assert status == cp_model.OPTIMAL
) withpack()
instances that havescale=10_000
, so I setscale=1000
and ran the notebook to completion.evaluations/tsp
- I didn't rerun the benchmarks because they rely on a comparison with gurobi, and I don't have access to a gurobi license.evaluations/embedding_cpsat
&evaluations/optimization_api
- I only made modest changes to the cp_model function calls, and didn't rerun these.examples/add_no_overlap_2d_parameters.py
commented out the solve parameteruse_pairwise_reasoning_in_no_overlap_2d
as it wasn't found.There are a couple of additional small fixes:
PiecewiseConstantConstraint
, the default value of parameterrestrict_domain
has been changed toFalse
. (This aligns will all usages of this class.)utils/piecewise_function_approximation.ipynb
I named the arguments toPiecewiseConstantConstraint
andPiecewiseLinearConstraint
to avoid an error that had occurred on parameter ordering.Let me know if you need any adjustments.