diff --git a/examples/contrib/AllDifferentExcept0.java b/examples/contrib/AllDifferentExcept0.java index 6aaf33a071..365357951e 100644 --- a/examples/contrib/AllDifferentExcept0.java +++ b/examples/contrib/AllDifferentExcept0.java @@ -10,6 +10,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +package com.google.ortools.contrib; + import com.google.ortools.constraintsolver.DecisionBuilder; import com.google.ortools.constraintsolver.IntVar; import com.google.ortools.constraintsolver.Solver; diff --git a/examples/contrib/AllInterval.java b/examples/contrib/AllInterval.java index 444fb9b182..efd36e61f3 100644 --- a/examples/contrib/AllInterval.java +++ b/examples/contrib/AllInterval.java @@ -10,6 +10,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +package com.google.ortools.contrib; + import com.google.ortools.constraintsolver.DecisionBuilder; import com.google.ortools.constraintsolver.IntVar; import com.google.ortools.constraintsolver.Solver; diff --git a/examples/contrib/Circuit.java b/examples/contrib/Circuit.java index 03659a4ae1..56ceb1348f 100644 --- a/examples/contrib/Circuit.java +++ b/examples/contrib/Circuit.java @@ -10,6 +10,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +package com.google.ortools.contrib; + import com.google.ortools.constraintsolver.DecisionBuilder; import com.google.ortools.constraintsolver.IntVar; import com.google.ortools.constraintsolver.Solver; diff --git a/examples/contrib/CoinsGrid.java b/examples/contrib/CoinsGrid.java index dbe0b709fe..8d8990157a 100644 --- a/examples/contrib/CoinsGrid.java +++ b/examples/contrib/CoinsGrid.java @@ -10,6 +10,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +package com.google.ortools.contrib; + import com.google.ortools.constraintsolver.DecisionBuilder; import com.google.ortools.constraintsolver.IntVar; import com.google.ortools.constraintsolver.OptimizeVar; diff --git a/examples/contrib/CoinsGridMIP.java b/examples/contrib/CoinsGridMIP.java index 38c82b8ed9..8aa8493e07 100755 --- a/examples/contrib/CoinsGridMIP.java +++ b/examples/contrib/CoinsGridMIP.java @@ -41,6 +41,7 @@ * * Java version by Darian Sastre (darian.sastre@minimaxlabs.com) */ +package com.google.ortools.contrib; import com.google.ortools.linearsolver.*; diff --git a/examples/contrib/ColoringMIP.java b/examples/contrib/ColoringMIP.java index 24f88479f5..a2e6bcd8a1 100755 --- a/examples/contrib/ColoringMIP.java +++ b/examples/contrib/ColoringMIP.java @@ -18,6 +18,8 @@ * * Java version by Darian Sastre (darian.sastre@minimaxlabs.com) */ +package com.google.ortools.contrib; + import com.google.ortools.linearsolver.MPConstraint; import com.google.ortools.linearsolver.MPObjective; import com.google.ortools.linearsolver.MPSolver; diff --git a/examples/contrib/CoveringOpl.java b/examples/contrib/CoveringOpl.java index 92be92eb93..1f127696d9 100644 --- a/examples/contrib/CoveringOpl.java +++ b/examples/contrib/CoveringOpl.java @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +package com.google.ortools.contrib; import com.google.ortools.constraintsolver.DecisionBuilder; import com.google.ortools.constraintsolver.IntVar; diff --git a/examples/contrib/Crossword.java b/examples/contrib/Crossword.java index cdff5b5e28..6c10f70214 100644 --- a/examples/contrib/Crossword.java +++ b/examples/contrib/Crossword.java @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +package com.google.ortools.contrib; import com.google.ortools.constraintsolver.DecisionBuilder; import com.google.ortools.constraintsolver.IntVar; diff --git a/examples/contrib/DeBruijn.java b/examples/contrib/DeBruijn.java index 78f8539d21..0800d15d88 100644 --- a/examples/contrib/DeBruijn.java +++ b/examples/contrib/DeBruijn.java @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +package com.google.ortools.contrib; import com.google.ortools.constraintsolver.DecisionBuilder; import com.google.ortools.constraintsolver.IntVar; diff --git a/examples/contrib/Diet.java b/examples/contrib/Diet.java index c2af97a3b3..5867edd806 100644 --- a/examples/contrib/Diet.java +++ b/examples/contrib/Diet.java @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +package com.google.ortools.contrib; import com.google.ortools.constraintsolver.*; import com.google.ortools.constraintsolver.DecisionBuilder; diff --git a/examples/contrib/DietMIP.java b/examples/contrib/DietMIP.java index b94643c802..3d63164208 100755 --- a/examples/contrib/DietMIP.java +++ b/examples/contrib/DietMIP.java @@ -4,19 +4,20 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * + * * ************************************************************************ - * + * * This model was created by Hakan Kjellerstrand (hakank@gmail.com) */ +package com.google.ortools.contrib; import com.google.ortools.linearsolver.MPConstraint; import com.google.ortools.linearsolver.MPObjective; diff --git a/examples/contrib/DivisibleBy9Through1.java b/examples/contrib/DivisibleBy9Through1.java index b5c4b111b4..9457723f96 100644 --- a/examples/contrib/DivisibleBy9Through1.java +++ b/examples/contrib/DivisibleBy9Through1.java @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +package com.google.ortools.contrib; import com.google.ortools.constraintsolver.DecisionBuilder; import com.google.ortools.constraintsolver.IntVar; diff --git a/examples/contrib/GolombRuler.java b/examples/contrib/GolombRuler.java index 8a5a2bfd88..e45878fe1b 100644 --- a/examples/contrib/GolombRuler.java +++ b/examples/contrib/GolombRuler.java @@ -19,6 +19,8 @@ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +package com.google.ortools.contrib; + import com.google.ortools.constraintsolver.DecisionBuilder; import com.google.ortools.constraintsolver.IntVar; import com.google.ortools.constraintsolver.OptimizeVar; diff --git a/examples/contrib/Issue173.java b/examples/contrib/Issue173.java index 50a4246cc1..4d05a514eb 100644 --- a/examples/contrib/Issue173.java +++ b/examples/contrib/Issue173.java @@ -1,3 +1,5 @@ +package com.google.ortools.contrib; + import com.google.ortools.linearsolver.MPConstraint; import com.google.ortools.linearsolver.MPObjective; import com.google.ortools.linearsolver.MPSolver; diff --git a/examples/contrib/KnapsackMIP.java b/examples/contrib/KnapsackMIP.java index 77d8dc9d88..de1f5cf148 100755 --- a/examples/contrib/KnapsackMIP.java +++ b/examples/contrib/KnapsackMIP.java @@ -20,6 +20,7 @@ * * This model was created by Hakan Kjellerstrand (hakank@gmail.com) */ +package com.google.ortools.contrib; import com.google.ortools.linearsolver.*; diff --git a/examples/contrib/LeastDiff.java b/examples/contrib/LeastDiff.java index 814f53bed5..5cf1760c97 100644 --- a/examples/contrib/LeastDiff.java +++ b/examples/contrib/LeastDiff.java @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +package com.google.ortools.contrib; import com.google.ortools.constraintsolver.*; import java.io.*; diff --git a/examples/contrib/MagicSquare.java b/examples/contrib/MagicSquare.java index 34da9935f6..7845c42076 100644 --- a/examples/contrib/MagicSquare.java +++ b/examples/contrib/MagicSquare.java @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +package com.google.ortools.contrib; import com.google.ortools.constraintsolver.DecisionBuilder; import com.google.ortools.constraintsolver.IntVar; diff --git a/examples/contrib/Map.java b/examples/contrib/Map.java index 61aa1ea3b8..efc273f2ff 100644 --- a/examples/contrib/Map.java +++ b/examples/contrib/Map.java @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +package com.google.ortools.contrib; import com.google.ortools.constraintsolver.*; import com.google.ortools.constraintsolver.DecisionBuilder; diff --git a/examples/contrib/Map2.java b/examples/contrib/Map2.java index d201ede07f..ecf383c87c 100644 --- a/examples/contrib/Map2.java +++ b/examples/contrib/Map2.java @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +package com.google.ortools.contrib; import com.google.ortools.constraintsolver.*; import com.google.ortools.constraintsolver.DecisionBuilder; diff --git a/examples/contrib/Minesweeper.java b/examples/contrib/Minesweeper.java index b452843658..5a92934980 100644 --- a/examples/contrib/Minesweeper.java +++ b/examples/contrib/Minesweeper.java @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +package com.google.ortools.contrib; import com.google.ortools.constraintsolver.*; import com.google.ortools.constraintsolver.DecisionBuilder; diff --git a/examples/contrib/MultiThreadTest.java b/examples/contrib/MultiThreadTest.java index a4d491cae8..e8cc6e17e1 100644 --- a/examples/contrib/MultiThreadTest.java +++ b/examples/contrib/MultiThreadTest.java @@ -1,3 +1,5 @@ +package com.google.ortools.contrib; + import com.google.ortools.linearsolver.MPConstraint; import com.google.ortools.linearsolver.MPObjective; import com.google.ortools.linearsolver.MPSolver; diff --git a/examples/contrib/NQueens.java b/examples/contrib/NQueens.java index ba32674ed6..4095b5b64a 100644 --- a/examples/contrib/NQueens.java +++ b/examples/contrib/NQueens.java @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +package com.google.ortools.contrib; import com.google.ortools.constraintsolver.DecisionBuilder; import com.google.ortools.constraintsolver.IntVar; diff --git a/examples/contrib/NQueens2.java b/examples/contrib/NQueens2.java index 0a30246ad5..149e31937c 100644 --- a/examples/contrib/NQueens2.java +++ b/examples/contrib/NQueens2.java @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +package com.google.ortools.contrib; import com.google.ortools.constraintsolver.DecisionBuilder; import com.google.ortools.constraintsolver.IntVar; diff --git a/examples/contrib/Partition.java b/examples/contrib/Partition.java index 2fc13be8ed..4005af2ea1 100644 --- a/examples/contrib/Partition.java +++ b/examples/contrib/Partition.java @@ -19,6 +19,8 @@ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +package com.google.ortools.contrib; + import com.google.ortools.constraintsolver.*; /** diff --git a/examples/contrib/QuasigroupCompletion.java b/examples/contrib/QuasigroupCompletion.java index c906bca903..38a327cf3d 100644 --- a/examples/contrib/QuasigroupCompletion.java +++ b/examples/contrib/QuasigroupCompletion.java @@ -10,6 +10,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +package com.google.ortools.contrib; + import com.google.ortools.constraintsolver.*; import com.google.ortools.constraintsolver.DecisionBuilder; import com.google.ortools.constraintsolver.IntVar; diff --git a/examples/contrib/SendMoreMoney.java b/examples/contrib/SendMoreMoney.java index d72c0c34f1..eb69c73ee6 100644 --- a/examples/contrib/SendMoreMoney.java +++ b/examples/contrib/SendMoreMoney.java @@ -10,6 +10,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +package com.google.ortools.contrib; + import com.google.ortools.constraintsolver.DecisionBuilder; import com.google.ortools.constraintsolver.IntVar; import com.google.ortools.constraintsolver.Solver; diff --git a/examples/contrib/SendMoreMoney2.java b/examples/contrib/SendMoreMoney2.java index 75d31dd89a..ccff95431e 100644 --- a/examples/contrib/SendMoreMoney2.java +++ b/examples/contrib/SendMoreMoney2.java @@ -10,6 +10,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +package com.google.ortools.contrib; + import com.google.ortools.constraintsolver.*; import java.io.*; import java.text.*; diff --git a/examples/contrib/SendMostMoney.java b/examples/contrib/SendMostMoney.java index 3b9552e54e..ad94f076bc 100644 --- a/examples/contrib/SendMostMoney.java +++ b/examples/contrib/SendMostMoney.java @@ -10,6 +10,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +package com.google.ortools.contrib; + import com.google.ortools.constraintsolver.*; import com.google.ortools.constraintsolver.DecisionBuilder; import com.google.ortools.constraintsolver.IntVar; diff --git a/examples/contrib/Seseman.java b/examples/contrib/Seseman.java index 344d07f347..681b97f40a 100644 --- a/examples/contrib/Seseman.java +++ b/examples/contrib/Seseman.java @@ -10,6 +10,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +package com.google.ortools.contrib; + import com.google.ortools.constraintsolver.DecisionBuilder; import com.google.ortools.constraintsolver.IntVar; import com.google.ortools.constraintsolver.Solver; diff --git a/examples/contrib/SetCovering.java b/examples/contrib/SetCovering.java index a23840fccf..bb71381e85 100644 --- a/examples/contrib/SetCovering.java +++ b/examples/contrib/SetCovering.java @@ -10,6 +10,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +package com.google.ortools.contrib; + import com.google.ortools.constraintsolver.DecisionBuilder; import com.google.ortools.constraintsolver.IntVar; import com.google.ortools.constraintsolver.OptimizeVar; diff --git a/examples/contrib/SetCovering2.java b/examples/contrib/SetCovering2.java index c2a5b80b01..0eaa4885f5 100644 --- a/examples/contrib/SetCovering2.java +++ b/examples/contrib/SetCovering2.java @@ -10,6 +10,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +package com.google.ortools.contrib; + import com.google.ortools.constraintsolver.DecisionBuilder; import com.google.ortools.constraintsolver.IntVar; import com.google.ortools.constraintsolver.OptimizeVar; diff --git a/examples/contrib/SetCovering3.java b/examples/contrib/SetCovering3.java index cbb8dd7afa..5e44ab7f16 100644 --- a/examples/contrib/SetCovering3.java +++ b/examples/contrib/SetCovering3.java @@ -10,6 +10,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +package com.google.ortools.contrib; + import com.google.ortools.constraintsolver.DecisionBuilder; import com.google.ortools.constraintsolver.IntVar; import com.google.ortools.constraintsolver.OptimizeVar; diff --git a/examples/contrib/SetCovering4.java b/examples/contrib/SetCovering4.java index a5a2a488f3..8452be818f 100644 --- a/examples/contrib/SetCovering4.java +++ b/examples/contrib/SetCovering4.java @@ -10,6 +10,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +package com.google.ortools.contrib; + import com.google.ortools.constraintsolver.DecisionBuilder; import com.google.ortools.constraintsolver.IntVar; import com.google.ortools.constraintsolver.OptimizeVar; diff --git a/examples/contrib/SetCoveringDeployment.java b/examples/contrib/SetCoveringDeployment.java index e429e90ef9..dd10b6ede9 100644 --- a/examples/contrib/SetCoveringDeployment.java +++ b/examples/contrib/SetCoveringDeployment.java @@ -10,6 +10,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +package com.google.ortools.contrib; + import com.google.ortools.constraintsolver.DecisionBuilder; import com.google.ortools.constraintsolver.IntVar; import com.google.ortools.constraintsolver.OptimizeVar; diff --git a/examples/contrib/SimpleRoutingTest.java b/examples/contrib/SimpleRoutingTest.java index 02e657d206..09cb485cdd 100644 --- a/examples/contrib/SimpleRoutingTest.java +++ b/examples/contrib/SimpleRoutingTest.java @@ -1,3 +1,5 @@ +package com.google.ortools.contrib; + import com.google.ortools.constraintsolver.Assignment; import com.google.ortools.constraintsolver.FirstSolutionStrategy; import com.google.ortools.constraintsolver.RoutingIndexManager; diff --git a/examples/contrib/StableMarriage.java b/examples/contrib/StableMarriage.java index d9aede3765..849742ab48 100644 --- a/examples/contrib/StableMarriage.java +++ b/examples/contrib/StableMarriage.java @@ -10,6 +10,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +package com.google.ortools.contrib; + import com.google.ortools.constraintsolver.DecisionBuilder; import com.google.ortools.constraintsolver.IntVar; import com.google.ortools.constraintsolver.Solver; diff --git a/examples/contrib/StiglerMIP.java b/examples/contrib/StiglerMIP.java index 914a9ab373..04b2c01d47 100755 --- a/examples/contrib/StiglerMIP.java +++ b/examples/contrib/StiglerMIP.java @@ -18,6 +18,8 @@ * * Java version by Darian Sastre (darian.sastre@minimaxlabs.com) */ +package com.google.ortools.contrib; + import com.google.ortools.linearsolver.MPConstraint; import com.google.ortools.linearsolver.MPObjective; import com.google.ortools.linearsolver.MPSolver; diff --git a/examples/contrib/Strimko2.java b/examples/contrib/Strimko2.java index 032371be63..f006f8437f 100644 --- a/examples/contrib/Strimko2.java +++ b/examples/contrib/Strimko2.java @@ -10,6 +10,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +package com.google.ortools.contrib; + import com.google.ortools.constraintsolver.DecisionBuilder; import com.google.ortools.constraintsolver.IntVar; import com.google.ortools.constraintsolver.Solver; diff --git a/examples/contrib/Sudoku.java b/examples/contrib/Sudoku.java index 2ccf0fb73b..6c196c95d0 100644 --- a/examples/contrib/Sudoku.java +++ b/examples/contrib/Sudoku.java @@ -10,6 +10,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +package com.google.ortools.contrib; + import com.google.ortools.constraintsolver.DecisionBuilder; import com.google.ortools.constraintsolver.IntVar; import com.google.ortools.constraintsolver.Solver; diff --git a/examples/contrib/SurvoPuzzle.java b/examples/contrib/SurvoPuzzle.java index 69af936e42..d564e2eb39 100644 --- a/examples/contrib/SurvoPuzzle.java +++ b/examples/contrib/SurvoPuzzle.java @@ -10,6 +10,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +package com.google.ortools.contrib; + import com.google.ortools.constraintsolver.*; import com.google.ortools.constraintsolver.DecisionBuilder; import com.google.ortools.constraintsolver.IntVar; diff --git a/examples/contrib/ToNum.java b/examples/contrib/ToNum.java index 037c065513..7988552b62 100644 --- a/examples/contrib/ToNum.java +++ b/examples/contrib/ToNum.java @@ -10,6 +10,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +package com.google.ortools.contrib; + import com.google.ortools.constraintsolver.DecisionBuilder; import com.google.ortools.constraintsolver.IntVar; import com.google.ortools.constraintsolver.Solver; diff --git a/examples/contrib/WhoKilledAgatha.java b/examples/contrib/WhoKilledAgatha.java index d4b191dad5..7a75b6ea2f 100644 --- a/examples/contrib/WhoKilledAgatha.java +++ b/examples/contrib/WhoKilledAgatha.java @@ -10,6 +10,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +package com.google.ortools.contrib; + import com.google.ortools.constraintsolver.DecisionBuilder; import com.google.ortools.constraintsolver.IntVar; import com.google.ortools.constraintsolver.Solver; diff --git a/examples/contrib/Xkcd.java b/examples/contrib/Xkcd.java index b31a56b8b7..ac30c391ea 100644 --- a/examples/contrib/Xkcd.java +++ b/examples/contrib/Xkcd.java @@ -10,6 +10,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +package com.google.ortools.contrib; + import com.google.ortools.constraintsolver.*; import com.google.ortools.constraintsolver.DecisionBuilder; import com.google.ortools.constraintsolver.IntVar; diff --git a/examples/contrib/YoungTableaux.java b/examples/contrib/YoungTableaux.java index d963e5ef9a..853ba61389 100644 --- a/examples/contrib/YoungTableaux.java +++ b/examples/contrib/YoungTableaux.java @@ -10,6 +10,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +package com.google.ortools.contrib; + import com.google.ortools.constraintsolver.DecisionBuilder; import com.google.ortools.constraintsolver.IntVar; import com.google.ortools.constraintsolver.Solver; diff --git a/examples/java/CapacitatedVehicleRoutingProblemWithTimeWindows.java b/examples/java/CapacitatedVehicleRoutingProblemWithTimeWindows.java index 1a8be2b87d..b897e57800 100644 --- a/examples/java/CapacitatedVehicleRoutingProblemWithTimeWindows.java +++ b/examples/java/CapacitatedVehicleRoutingProblemWithTimeWindows.java @@ -12,6 +12,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +package com.google.ortools.examples; + import com.google.ortools.constraintsolver.Assignment; import com.google.ortools.constraintsolver.FirstSolutionStrategy; import com.google.ortools.constraintsolver.IntVar; diff --git a/examples/java/FlowExample.java b/examples/java/FlowExample.java index 15e7872373..5befc084ac 100644 --- a/examples/java/FlowExample.java +++ b/examples/java/FlowExample.java @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +package com.google.ortools.examples; import com.google.ortools.graph.MaxFlow; import com.google.ortools.graph.MinCostFlow; diff --git a/examples/java/IntegerProgramming.java b/examples/java/IntegerProgramming.java index 29bf93b4eb..935a5db699 100644 --- a/examples/java/IntegerProgramming.java +++ b/examples/java/IntegerProgramming.java @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +package com.google.ortools.examples; import com.google.ortools.linearsolver.MPConstraint; import com.google.ortools.linearsolver.MPObjective; diff --git a/examples/java/LinearAssignmentAPI.java b/examples/java/LinearAssignmentAPI.java index 7effad6beb..d7f6a834c8 100644 --- a/examples/java/LinearAssignmentAPI.java +++ b/examples/java/LinearAssignmentAPI.java @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +package com.google.ortools.examples; import com.google.ortools.graph.LinearSumAssignment; diff --git a/examples/java/LinearProgramming.java b/examples/java/LinearProgramming.java index 4baeea3f56..05710a76fb 100644 --- a/examples/java/LinearProgramming.java +++ b/examples/java/LinearProgramming.java @@ -10,6 +10,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +package com.google.ortools.examples; import com.google.ortools.linearsolver.MPConstraint; import com.google.ortools.linearsolver.MPObjective; diff --git a/examples/java/RabbitsPheasants.java b/examples/java/RabbitsPheasants.java index 466ff5aee3..5a17b72325 100644 --- a/examples/java/RabbitsPheasants.java +++ b/examples/java/RabbitsPheasants.java @@ -10,6 +10,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +package com.google.ortools.examples; + import com.google.ortools.constraintsolver.ConstraintSolverParameters; import com.google.ortools.constraintsolver.DecisionBuilder; import com.google.ortools.constraintsolver.IntVar; diff --git a/examples/java/RandomTsp.java b/examples/java/RandomTsp.java index deca08fb9e..c47524a04d 100644 --- a/examples/java/RandomTsp.java +++ b/examples/java/RandomTsp.java @@ -12,6 +12,8 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +package com.google.ortools.examples; + import com.google.ortools.constraintsolver.Assignment; import com.google.ortools.constraintsolver.FirstSolutionStrategy; import com.google.ortools.constraintsolver.RoutingIndexManager; diff --git a/makefiles/Makefile.archive.mk b/makefiles/Makefile.archive.mk index dbddbc75e8..2f75b516f0 100644 --- a/makefiles/Makefile.archive.mk +++ b/makefiles/Makefile.archive.mk @@ -77,12 +77,19 @@ archive_java: java | $(TEMP_ARCHIVE_DIR) -$(COPY) $(JAVA_EX_PATH)$S*.java $(TEMP_ARCHIVE_DIR)$S$(INSTALL_DIR)$Sexamples$Sjava -$(COPY) $(JAVA_EX_PATH)$SREADME.md $(TEMP_ARCHIVE_DIR)$S$(INSTALL_DIR)$Sexamples$Sjava -$(COPY) $(CONTRIB_EX_PATH)$S*.java $(TEMP_ARCHIVE_DIR)$S$(INSTALL_DIR)$Sexamples$Sjava + -$(SED) -i -e 's/ortools.contrib/ortools.examples/' $(TEMP_ARCHIVE_DIR)$S$(INSTALL_DIR)$Sexamples$Sjava$S*.java -$(COPY) ortools$Salgorithms$Ssamples$S*.java $(TEMP_ARCHIVE_DIR)$S$(INSTALL_DIR)$Sexamples$Sjava + -$(SED) -i -e 's/algorithms.samples/examples/' $(TEMP_ARCHIVE_DIR)$S$(INSTALL_DIR)$Sexamples$Sjava$S*.java -$(COPY) ortools$Sgraph$Ssamples$S*.java $(TEMP_ARCHIVE_DIR)$S$(INSTALL_DIR)$Sexamples$Sjava + -$(SED) -i -e 's/graph.samples/examples/' $(TEMP_ARCHIVE_DIR)$S$(INSTALL_DIR)$Sexamples$Sjava$S*.java -$(COPY) ortools$Slinear_solver$Ssamples$S*.java $(TEMP_ARCHIVE_DIR)$S$(INSTALL_DIR)$Sexamples$Sjava + -$(SED) -i -e 's/linearsolver.samples/examples/' $(TEMP_ARCHIVE_DIR)$S$(INSTALL_DIR)$Sexamples$Sjava$S*.java -$(COPY) ortools$Sconstraint_solver$Ssamples$S*.java $(TEMP_ARCHIVE_DIR)$S$(INSTALL_DIR)$Sexamples$Sjava + -$(SED) -i -e 's/constraintsolver.samples/examples/' $(TEMP_ARCHIVE_DIR)$S$(INSTALL_DIR)$Sexamples$Sjava$S*.java -$(COPY) ortools$Srouting$Ssamples$S*.java $(TEMP_ARCHIVE_DIR)$S$(INSTALL_DIR)$Sexamples$Sjava + -$(SED) -i -e 's/routing.samples/examples/' $(TEMP_ARCHIVE_DIR)$S$(INSTALL_DIR)$Sexamples$Sjava$S*.java -$(COPY) ortools$Ssat$Ssamples$S*.java $(TEMP_ARCHIVE_DIR)$S$(INSTALL_DIR)$Sexamples$Sjava + -$(SED) -i -e 's/sat.samples/examples/' $(TEMP_ARCHIVE_DIR)$S$(INSTALL_DIR)$Sexamples$Sjava$S*.java .PHONY: archive_dotnet # Add .Net OR-Tools to archive. archive_dotnet: dotnet | $(TEMP_ARCHIVE_DIR) diff --git a/makefiles/Makefile.java.mk b/makefiles/Makefile.java.mk index bf78479548..f0be631e6e 100644 --- a/makefiles/Makefile.java.mk +++ b/makefiles/Makefile.java.mk @@ -399,12 +399,12 @@ rjava_%: $(TEST_DIR)/%.java $(LIB_DIR)/%$J FORCE rjava_%: $(JAVA_EX_DIR)/%.java $(LIB_DIR)/%$J FORCE "$(JAVA_BIN)" -Xss2048k $(JAVAFLAGS) \ -cp $(LIB_DIR)$S$*$J$(CPSEP)$(LIB_DIR)$Scom.google.ortools.jar$(CPSEP)$(LIB_DIR)$Sprotobuf.jar \ - $* $(ARGS) + com.google.ortools.examples.$* $(ARGS) rjava_%: $(CONTRIB_EX_DIR)/%.java $(LIB_DIR)/%$J FORCE "$(JAVA_BIN)" -Xss2048k $(JAVAFLAGS) \ -cp $(LIB_DIR)$S$*$J$(CPSEP)$(LIB_DIR)$Scom.google.ortools.jar$(CPSEP)$(LIB_DIR)$Sprotobuf.jar \ - $* $(ARGS) + com.google.ortools.contrib.$* $(ARGS) rjava_%: $(SRC_DIR)/ortools/algorithms/samples/%.java $(LIB_DIR)/%$J FORCE "$(JAVA_BIN)" -Xss2048k $(JAVAFLAGS) \ diff --git a/ortools/sat/samples/AssignmentSat.cs b/ortools/sat/samples/AssignmentSat.cs index ba28fbc934..a102f788d0 100644 --- a/ortools/sat/samples/AssignmentSat.cs +++ b/ortools/sat/samples/AssignmentSat.cs @@ -30,9 +30,6 @@ public class AssignmentSat {45, 110, 95, 115}, {50, 100, 90, 100}, }; - int[] costsFlat = { - 90, 80, 75, 70, 35, 85, 55, 65, 125, 95, 90, 95, 45, 110, 95, 115, 50, 100, 90, 100 - }; int numWorkers = costs.GetLength(0); int numTasks = costs.GetLength(1); // [END data_model] @@ -47,6 +44,7 @@ public class AssignmentSat IntVar[,] x = new IntVar[numWorkers, numTasks]; // Variables in a 1-dim array. IntVar[] xFlat = new IntVar[numWorkers * numTasks]; + int[] costsFlat = new int[numWorkers * numTasks]; for (int i = 0; i < numWorkers; ++i) { for (int j = 0; j < numTasks; ++j) @@ -54,6 +52,7 @@ public class AssignmentSat x[i, j] = model.NewIntVar(0, 1, $"worker_{i}_task_{j}"); int k = i * numTasks + j; xFlat[k] = x[i, j]; + costsFlat[k] = costs[i, j]; } } // [END variables] @@ -61,7 +60,6 @@ public class AssignmentSat // Constraints // [START constraints] // Each worker is assigned to at most one task. - int[] onesTasks = {1, 1, 1, 1}; for (int i = 0; i < numWorkers; ++i) { IntVar[] vars = new IntVar[numTasks]; @@ -69,11 +67,10 @@ public class AssignmentSat { vars[j] = x[i, j]; } - model.Add(LinearExpr.ScalProd(vars, onesTasks) <= 1); + model.Add(LinearExpr.Sum(vars) <= 1); } // Each task is assigned to exactly one worker. - int[] onesWorkers = {1, 1, 1, 1, 1}; for (int j = 0; j < numTasks; ++j) { IntVar[] vars = new IntVar[numWorkers]; @@ -81,7 +78,7 @@ public class AssignmentSat { vars[i] = x[i, j]; } - model.Add(LinearExpr.ScalProd(vars, onesWorkers) == 1); + model.Add(LinearExpr.Sum(vars) == 1); } // [END constraints] diff --git a/tools/Makefile.cc.java.dotnet b/tools/Makefile.cc.java.dotnet index 5743569ca2..38e1c0c615 100644 --- a/tools/Makefile.cc.java.dotnet +++ b/tools/Makefile.cc.java.dotnet @@ -408,7 +408,7 @@ test_java: detect_java ifeq ($(SOURCE_SUFFIX),.java) # Those rules will be used if SOURCE contain a .java file $(CLASS_DIR)/$(SOURCE_NAME): $(SOURCE) | $(CLASS_DIR) -$(MKDIR) $(CLASS_DIR)$S$(SOURCE_NAME) - "$(JAVAC_BIN)" -d $(CLASS_DIR)$S$(SOURCE_NAME) \ + "$(JAVAC_BIN)" -encoding UTF-8 -d $(CLASS_DIR)$S$(SOURCE_NAME) \ -cp $(LIB_DIR)$Scom.google.ortools.jar$(CPSEP)$(LIB_DIR)$Sprotobuf.jar \ $(SOURCE_PATH) @@ -423,7 +423,7 @@ build: $(LIB_DIR)/$(SOURCE_NAME)$J run: build "$(JAVA_BIN)" -Xss2048k $(JAVAFLAGS) \ -cp $(LIB_DIR)$S$(SOURCE_NAME)$J$(CPSEP)$(LIB_DIR)$Scom.google.ortools.jar$(CPSEP)$(LIB_DIR)$Sprotobuf.jar \ - $(SOURCE_NAME) $(ARGS) + com.google.ortools.examples.$(SOURCE_NAME) $(ARGS) endif # ifeq ($(SOURCE_SUFFIX),.java) endif # ifndef HAS_JAVA