The Hotel Pricing Engine is a web application that dynamically adjusts hotel room prices based on historical data, competitor prices, and user-defined parameters such as occupancy rate, base price, minimum price, and price factor. This application allows users to experiment with different inputs and see how they impact the adjusted room prices.
- Dynamic price adjustments based on predefined rules and historical data
- Interactive sliders for adjusting occupancy rate, base price, minimum price, and price factor
- Visualization of historical prices and occupancies
- Display of adjusted prices for a single room
The algorithm adjusts room prices based on the following rules:
-
Occupancy Rate Adjustments:
- If occupancy exceeds 80%, prices increase by 20%.
- If occupancy is below 50%, prices decrease by 20%.
-
Average Occupancy and Competitor Prices:
- If the average occupancy is above 75%, prices increase by an additional 10%.
-
Price Factor:
- The price factor multiplier is applied to the base price.
-
Minimum Price:
- The adjusted price will not go below the minimum price set by the user.
- Start with the base price.
- Apply occupancy rate adjustments.
- Consider average occupancy and competitor prices.
- Apply the price factor multiplier.
- Ensure the adjusted price is not below the minimum price.
- Node.js (v14 or higher)
- npm (v6 or higher)
-
Navigate to the backend directory:
cd backend -
Install the dependencies:
npm install
-
Start the backend server:
node server.js
The backend server will start on port 5000.
-
Navigate to the frontend directory:
cd frontend -
Install the dependencies:
npm install
-
Start the frontend server:
npm start
The frontend server will start on port 3000.
-
Start the backend server (if not already started):
cd backend npm install node server.js -
Start the frontend server (if not already started):
cd frontend npm install npm start -
Open your web browser and navigate to:
http://localhost:3000You should see the Hotel Pricing Engine application.
-
Adjust the Sliders:
- Occupancy Slider: Adjust the current occupancy percentage. Higher occupancy generally increases prices.
- Base Price Slider: Set the base price for the rooms. This is the starting point before any adjustments.
- Minimum Price Slider: Set the minimum price for the rooms. Prices will not go below this value.
- Price Factor Slider: Multiplier applied to the price. This can be used to adjust prices based on additional factors or desired pricing strategy.
-
View Adjusted Prices:
- The adjusted price will be updated automatically based on the slider inputs and displayed in the price list.
-
Historical Data:
- Historical prices and occupancies are shown in the chart at the bottom of the site. The adjusted prices are influenced by these historical values, with higher average occupancies leading to higher prices.
hotel-pricing-engine/
├── backend/
│ ├── server.js
│ └── package.json
├── frontend/
│ ├── src/
│ │ ├── components/
│ │ │ ├── Chart.js
│ │ │ ├── InputForm.js
│ │ │ ├── PriceList.js
│ │ │ └── InfoBox.js
│ │ ├── App.js
│ │ └── index.js
│ ├── public/
│ ├── package.json
│ └── README.md
└── README.md