Adds java gurobi knapsack example#113
Merged
merschformann merged 9 commits intodevelopfrom Jun 4, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request adds a new Java example project for solving a knapsack problem using the Gurobi Maven package. Key changes include:
- A new application (java-gurobi-knapsack) implementing the knapsack problem.
- Updates to README files in existing Java apps to correctly reference the new Java source paths.
- Supporting changes in Maven configuration, workspace files, and test scripts.
Reviewed Changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| java-ortools-routing/README.md | Updated to reference the Java main class instead of main.py. |
| java-ortools-knapsack/README.md | Updated to reference the Java main class instead of main.py. |
| java-gurobi-knapsack/src/main/java/com/nextmv/example/Output.java | New output class implementation with nested classes. |
| java-gurobi-knapsack/src/main/java/com/nextmv/example/Options.java | New options parsing code for the Gurobi knapsack example. |
| java-gurobi-knapsack/src/main/java/com/nextmv/example/Main.java | Main program implementation for the knapsack solver. |
| java-gurobi-knapsack/src/main/java/com/nextmv/example/Item.java | New Item class to represent knapsack items. |
| java-gurobi-knapsack/src/main/java/com/nextmv/example/Input.java | New input parsing class using Gson for JSON input. |
| java-gurobi-knapsack/pom.xml | Maven configuration for building the Java Gurobi example. |
| Other files (code-workspace, input.json, app.yaml, README.md, LICENSE, devcontainer, and workflow files) | Supporting configurations and documentation for development and CI. |
dirkschumacher
approved these changes
Jun 4, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds an example project using Gurobi Maven package directly for modeling a simple knapsack problem.
Changes
java-gurobi-knapsackapp.com.gurobi.gurobiMaven package.