Loading forecast_app/app.py +4 −4 Original line number Diff line number Diff line Loading @@ -40,8 +40,8 @@ TEST_DATA_PATH_EXTERNAL = os.path.join(DATA_DIR, 'sim2_data_test_external_events # TiRex model (loaded lazily on first request) _tirex_model = None # Teacher parameters (disabled by default) _ai_enabled = False # Teacher parameters _ai_enabled = True _simulation_type = 'normal' # 'normal' or 'external_event' AI_PASSWORD = os.environ.get('AI_PASSWORD', 'HorloML-AI') Loading Loading @@ -424,7 +424,7 @@ def download_excel(): headers = ['Year', 'Month', 'Date'] for watch in watches: headers.extend([ f"{watch['name']} - Demand", f"{watch['name']} - Units Sold", f"{watch['name']} - Revenue", f"{watch['name']} - Profit" ]) Loading Loading @@ -462,7 +462,7 @@ def download_excel(): yearly_headers = ['Year'] for watch in watches: yearly_headers.extend([ f"{watch['name']} - Total Demand", f"{watch['name']} - Total Units Sold", f"{watch['name']} - Total Revenue", f"{watch['name']} - Total Profit" ]) Loading forecast_app/smart_data_generator.py +2 −1 Original line number Diff line number Diff line Loading @@ -389,7 +389,8 @@ class SmartSupplyChainDataGenerator: demand = purchases[watch_id] # Production strategy: produce based on demand + safety stock production = int(demand * 1.05) # TODO : here maybe do a random value between .95 and 1.05 for noise ? # production = int(demand * 1.05) # TODO : here maybe do a random value between .95 and 1.05 for noise ? production = int(demand * np.random.uniform(0.95, 1.05)) # Calculate financials watch_data = self._calculate_costs_and_revenue( Loading forecast_app/templates/historical.html +3 −3 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ {% for watch in watches %} <div class="column is-4"> <div class="box"> <h4 class="title is-5">{{ watch.name }} - Monthly Demand</h4> <h4 class="title is-5">{{ watch.name }} - Monthly Units</h4> <div class="chart-container" style="height: 300px;"> <canvas id="chart_{{ watch.id }}"></canvas> </div> Loading @@ -115,7 +115,7 @@ <th></th> <th></th> {% for watch in watches %} <th class="has-text-right">Demand</th> <th class="has-text-right">Units</th> <th class="has-text-right">Revenue</th> {% endfor %} </tr> Loading Loading @@ -168,7 +168,7 @@ watches.forEach(watch => { data: { labels: labels, datasets: [{ label: 'Monthly Demand', label: 'Monthly Units Sold', data: watchData, borderColor: watch.id === 1 ? '#667eea' : watch.id === 2 ? '#f093fb' : '#4facfe', backgroundColor: watch.id === 1 ? '#667eea33' : watch.id === 2 ? '#f093fb33' : '#4facfe33', Loading Loading
forecast_app/app.py +4 −4 Original line number Diff line number Diff line Loading @@ -40,8 +40,8 @@ TEST_DATA_PATH_EXTERNAL = os.path.join(DATA_DIR, 'sim2_data_test_external_events # TiRex model (loaded lazily on first request) _tirex_model = None # Teacher parameters (disabled by default) _ai_enabled = False # Teacher parameters _ai_enabled = True _simulation_type = 'normal' # 'normal' or 'external_event' AI_PASSWORD = os.environ.get('AI_PASSWORD', 'HorloML-AI') Loading Loading @@ -424,7 +424,7 @@ def download_excel(): headers = ['Year', 'Month', 'Date'] for watch in watches: headers.extend([ f"{watch['name']} - Demand", f"{watch['name']} - Units Sold", f"{watch['name']} - Revenue", f"{watch['name']} - Profit" ]) Loading Loading @@ -462,7 +462,7 @@ def download_excel(): yearly_headers = ['Year'] for watch in watches: yearly_headers.extend([ f"{watch['name']} - Total Demand", f"{watch['name']} - Total Units Sold", f"{watch['name']} - Total Revenue", f"{watch['name']} - Total Profit" ]) Loading
forecast_app/smart_data_generator.py +2 −1 Original line number Diff line number Diff line Loading @@ -389,7 +389,8 @@ class SmartSupplyChainDataGenerator: demand = purchases[watch_id] # Production strategy: produce based on demand + safety stock production = int(demand * 1.05) # TODO : here maybe do a random value between .95 and 1.05 for noise ? # production = int(demand * 1.05) # TODO : here maybe do a random value between .95 and 1.05 for noise ? production = int(demand * np.random.uniform(0.95, 1.05)) # Calculate financials watch_data = self._calculate_costs_and_revenue( Loading
forecast_app/templates/historical.html +3 −3 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ {% for watch in watches %} <div class="column is-4"> <div class="box"> <h4 class="title is-5">{{ watch.name }} - Monthly Demand</h4> <h4 class="title is-5">{{ watch.name }} - Monthly Units</h4> <div class="chart-container" style="height: 300px;"> <canvas id="chart_{{ watch.id }}"></canvas> </div> Loading @@ -115,7 +115,7 @@ <th></th> <th></th> {% for watch in watches %} <th class="has-text-right">Demand</th> <th class="has-text-right">Units</th> <th class="has-text-right">Revenue</th> {% endfor %} </tr> Loading Loading @@ -168,7 +168,7 @@ watches.forEach(watch => { data: { labels: labels, datasets: [{ label: 'Monthly Demand', label: 'Monthly Units Sold', data: watchData, borderColor: watch.id === 1 ? '#667eea' : watch.id === 2 ? '#f093fb' : '#4facfe', backgroundColor: watch.id === 1 ? '#667eea33' : watch.id === 2 ? '#f093fb33' : '#4facfe33', Loading