Sure, I can help you structure your README.md file. Here's a more structured version:
This project provides a Java solution for the knapsack problem. It uses a dynamic programming approach to determine the optimal set of items to include in a package such that the total weight is less than or equal to the package limit and the total cost is maximized.
These instructions will guide you on how to get a copy of this project up and running on your local machine for development and testing purposes.
Ensure you have the following installed on your local machine:
- Java 8 or higher
- Maven
Follow these steps to get a development environment running:
- Clone the repository to your local machine.
- Navigate to the project directory.
- Run
mvn clean installto build the project.
The main class of the application is com.mobiquity.packer.Packer. This class has a static method pack that takes the path to a file as an argument and returns a string representing the optimal packing solution for each test case in the file.
Please note that this is a standalone application and does not include a main method.
You can test the functionality with the following command:
mvn test -Dconfig.properties=src/main/resources/config.properties -Dinput.file.path=src/test/resources/example_input -Doutput.file.path=src/test/resources/example_outputFeel free to replace input_file, output_files, and config.properties files with those you desire.
Also, remember to update the .jar file directory in Dockerfile depending on where it is located.