This Flask application is designed to help users select optimal activities based on budget and time constraints using linear programming techniques. It provides a web interface where users can input their constraints and preferences, and the application computes the best combination of activities to maximize value while adhering to the constraints.
Link Here Note: Due to free plan, might take longer in the first launch.
- Python 3.x installed
- Flask framework (
pip install Flask
) - OR-Tools library (
pip install ortools
)
-
Clone this repository:
git clone https://github.com/InMDev/DayTripPlanner.git cd DayTripPlanner
-
Install dependencies:
pip install -r requirements.txt
To start the Flask server, run the following command:
python app.py
By default, the application will be accessible at http://localhost:5000
.
-
Homepage (
/
): Displays a basic HTML form for user input. -
Submission Endpoint (
/submit/<string:string_activities>
): Accepts a POST request containing budget and time constraints, as well as a string representation of activities. It processes these inputs and computes the optimal set of activities using a linear programming model implemented with OR-Tools. -
Output: Upon successful computation, the application displays a list of recommended activities that fit within the provided budget and time constraints. If no optimal solution is found, an appropriate message is displayed.
- app/
- routes.py: Defines Flask routes, including logic for handling user input, invoking the linear programming model, and rendering the results.
- templates/: Contains HTML templates used to render pages.
Here's an example of how to use the application:
- Navigate to
http://localhost:5000
. - Fill out the form with your budget, time constraints, and activities.
- Submit the form.
- The application will display the optimal activities that maximize value within your constraints.
Contributions are welcome! If you find any issues or have suggestions for improvement, please open an issue or a pull request.
This project is licensed under the MIT License.
Feel free to expand on any sections or add additional details specific to your project. This README should provide a good starting point for users and developers who want to understand, install, and use your Flask application for activity selection optimization.