📦 সাপ্লাই চেইন অপটিমাইজার
AI-চালিত সিমুলেশনের মাধ্যমে ইনভেন্টরি ম্যানেজমেন্ট এবং লজিস্টিকস অপটিমাইজেশন মাস্টার করুন! মিনিটের মধ্যে EOQ মডেল, চাহিদা পূর্বাভাস এবং সাপ্লাই চেইন স্থিতিস্থাপকতা কৌশল শিখুন।
সাপ্লাই চেইন অপটিমাইজারে স্বাগতম! 🎉
এখানে নতুন? চমৎকার!
সাপ্লাই চেইন অভিজ্ঞতার প্রয়োজন নেই!
অর্জন অনলক হয়েছে!
বিবরণ
🤔 সাপ্লাই চেইন অপটিমাইজেশন কী?
এটিকে একটি বিশাল টেট্রিস খেলা হিসেবে ভাবুন - তবে পণ্য, গুদাম এবং ট্রাকগুলি নিয়ে!
সাপ্লাই চেইন অপটিমাইজেশন কৃত্রিম বুদ্ধিমত্তা এবং গণিত ব্যবহার করে খরচ কমায় যখন পণ্যগুলি সময়মতো গ্রাহকদের কাছে পৌঁছায়। এটি আমাজনের ১-দিনের ডেলিভারির পিছনের মস্তিষ্ক এবং কীভাবে দোকানগুলিতে প্রয়োজনীয় জিনিসগুলি কখনও শেষ হয় না!
⚡ দ্রুত শুরু
📊 মৌলিক পরামিতি
📦 সাপ্লাই চেইন অপটিমাইজার
এআই-চালিত সিমুলেশনের মাধ্যমে ইনভেন্টরি ম্যানেজমেন্ট এবং লজিস্টিক অপটিমাইজেশন মাস্টার করুন! মিনিটের মধ্যে ইওকিউ মডেল, চাহিদা পূর্বাভাস এবং সাপ্লাই চেইন রেজিলিয়েন্স কৌশলগুলি শিখুন।
সাপ্লাই চেইন অপটিমাইজারে স্বাগতম! 🎉
এখানে প্রথমবার? চমৎকার!
সাপ্লাই চেইন অভিজ্ঞতার প্রয়োজন নেই!
অর্জন আনলক হয়েছে!
বিবরণ
🤔 সাপ্লাই চেইন অপটিমাইজেশন কী?
এটিকে একটি বিশাল টেট্রিস খেলা হিসেবে ভাবুন - তবে পণ্য, গুদাম এবং ট্রাকের সাথে!
সাপ্লাই চেইন অপটিমাইজেশন এআই এবং গণিত ব্যবহার করে খরচ কমায় এবং পণ্য সময়মতো গ্রাহকদের কাছে পৌঁছায়। এটি আমাজনের ১-দিনের ডেলিভারির পিছনের মস্তিষ্ক এবং কীভাবে দোকানগুলি প্রয়োজনীয় জিনিসগুলি কখনও শেষ হয় না!
⚡ দ্রুত শুরু
📊 মৌলিক পরামিতি
📦 সাপ্লাই চেইন অপটিমাইজার
এআই-চালিত সিমুলেশন দিয়ে ইনভেন্টরি ম্যানেজমেন্ট এবং লজিস্টিক অপটিমাইজেশনে পারদর্শী হোন! ইওকিউ মডেল, চাহিদা পূর্বাভাস এবং সাপ্লাই চেইন স্থিতিস্থাপকতা কৌশল মিনিটের মধ্যে শিখুন।
সাপ্লাই চেইন অপটিমাইজারে স্বাগতম! 🎉
এখানে প্রথমবার? চমৎকার!
সাপ্লাই চেইন অভিজ্ঞতার প্রয়োজন নেই!
অর্জন আনলক হয়েছে!
বিবরণ
🤔 সাপ্লাই চেইন অপটিমাইজেশন কী?
এটিকে একটি বিশাল টেট্রিস গেম পরিচালনার মতো ভাবুন - তবে পণ্য, গুদাম এবং ট্রাকের সাথে!
সাপ্লাই চেইন অপটিমাইজেশন এআই এবং গণিত ব্যবহার করে খরচ কমায় যখন পণ্য সময়মতো গ্রাহকদের কাছে পৌঁছায়। এটি আমাজনের ১-দিনের ডেলিভারি এবং দোকানগুলোতে প্রয়োজনীয় জিনিস কখনও শেষ না হওয়ার পিছনের মস্তিষ্ক!
⚡ দ্রুত শুরু
📊 মৌলিক পরামিতি
🤖 এআই অপটিমাইজেশন চলছে...
১০০০+ সরবরাহ শৃঙ্খল সিনারিও বিশ্লেষণ করা হচ্ছে...
'; document.body.appendChild(optimizing); setTimeout(() => { optimizing.remove(); calculateEOQ(); calculateSafetyStock(); // Show optimized results alert('✨ AI Optimization Complete!\n\nRecommendations:\n• Optimal EOQ: ' + supplyChainState.eoq + ' units\n• Safety Stock: ' + supplyChainState.safetyStock + ' units\n• Potential savings: 23% reduction in total costs'); OnboardingManager.unlockAchievement('ai_optimization', '🚀 AI Pioneer', 'Used AI to optimize your supply chain!'); }, 3000); } function switchTab(tab) { // Update tab buttons document.querySelectorAll('.viz-tab').forEach(t => t.classList.remove('active')); event.target.classList.add('active'); // Update content document.querySelectorAll('.viz-content').forEach(c => c.classList.remove('active')); document.getElementById(tab + 'দেখুন').classList.add('active'); // Initialize visualization for the tab if (tab === 'network') { visualizeSupplyChain(); } else if (tab === 'inventory') { visualizeInventory(); } else if (tab === 'costs') { visualizeCosts(); } else if (tab === 'forecast') { visualizeForecast(); } } function visualizeSupplyChain() { const canvas = document.getElementById('supplyChainCanvas'); const ctx = canvas.getContext('2d'); // Set canvas size canvas.width = canvas.offsetWidth; canvas.height = canvas.offsetHeight; // Clear canvas ctx.clearRect(0, 0, canvas.width, canvas.height); // Create supply chain nodes const nodes = [ { x: 100, y: canvas.height / 2, label: 'সরবরাহকারী', color: '#2196F3' }, { x: canvas.width / 3, y: canvas.height / 3, label: 'গুদাম ১', color: '#4CAF50' }, { x: canvas.width / 3, y: 2 * canvas.height / 3, label: 'গুদাম ২', color: '#4CAF50' }, { x: 2 * canvas.width / 3, y: canvas.height / 2, label: 'বিতরণ', color: '#FF9800' }, { x: canvas.width - 100, y: canvas.height / 3, label: 'খুচরা ১', color: '#E91E63' }, { x: canvas.width - 100, y: 2 * canvas.height / 3, label: 'খুচরা ২', color: '#E91E63' } ]; // Draw connections ctx.strokeStyle = '#ddd'; ctx.lineWidth = 2; // Supplier to warehouses drawConnection(ctx, nodes[0], nodes[1]); drawConnection(ctx, nodes[0], nodes[2]); // Warehouses to distribution drawConnection(ctx, nodes[1], nodes[3]); drawConnection(ctx, nodes[2], nodes[3]); // Distribution to retail drawConnection(ctx, nodes[3], nodes[4]); drawConnection(ctx, nodes[3], nodes[5]); // Draw nodes nodes.forEach(node => { // Node circle ctx.fillStyle = node.color; ctx.beginPath(); ctx.arc(node.x, node.y, 30, 0, Math.PI * 2); ctx.fill(); // Node label ctx.fillStyle = '#333'; ctx.font = '12px Arial'; ctx.textAlign = 'center'; ctx.fillText(node.label, node.x, node.y + 50); }); // Draw EOQ indicator if (supplyChainState.eoq > 0) { ctx.fillStyle = '#4CAF50'; ctx.font = 'bold 16px Arial'; ctx.fillText(`EOQ: ${supplyChainState.eoq} units`, canvas.width / 2, 30); } } function drawConnection(ctx, node1, node2) { ctx.beginPath(); ctx.moveTo(node1.x, node1.y); ctx.lineTo(node2.x, node2.y); ctx.stroke(); // Animated flow dots const steps = 10; const time = Date.now() / 1000; for (let i = 0; i < steps; i++) { const t = (i / steps + time * 0.2) % 1; const x = node1.x + (node2.x - node1.x) * t; const y = node1.y + (node2.y - node1.y) * t; ctx.fillStyle = '#2196F3'; ctx.beginPath(); ctx.arc(x, y, 3, 0, Math.PI * 2); ctx.fill(); } } function visualizeInventory() { const canvas = document.getElementById('inventoryCanvas'); const ctx = canvas.getContext('2d'); canvas.width = canvas.offsetWidth; canvas.height = canvas.offsetHeight; ctx.clearRect(0, 0, canvas.width, canvas.height); // Draw inventory sawtooth pattern const eoq = supplyChainState.eoq || 1000; const cycles = 5; const cycleWidth = canvas.width / cycles; ctx.strokeStyle = '#2196F3'; ctx.lineWidth = 3; ctx.beginPath(); for (let i = 0; i < cycles; i++) { const x1 = i * cycleWidth; const x2 = x1 + cycleWidth; const y1 = canvas.height * 0.2; const y2 = canvas.height * 0.8; ctx.moveTo(x1, y1); ctx.lineTo(x2, y2); if (i < cycles - 1) { ctx.lineTo(x2, y1); } } ctx.stroke(); // Labels ctx.fillStyle = '#333'; ctx.font = '14px Arial'; ctx.fillText('মজুদ পরিমাণ', 10, 20); ctx.fillText('Time →', canvas.width - 50, canvas.height - 10); ctx.fillText(`EOQ: ${eoq}`, canvas.width / 2 - 30, 30); } function visualizeCosts() { const canvas = document.getElementById('costsCanvas'); const ctx = canvas.getContext('2d'); canvas.width = canvas.offsetWidth; canvas.height = canvas.offsetHeight; ctx.clearRect(0, 0, canvas.width, canvas.height); // Pie chart of costs const orderingCost = supplyChainState.totalCost * 0.4; const holdingCost = supplyChainState.totalCost * 0.35; const shortageCost = supplyChainState.totalCost * 0.25; const total = orderingCost + holdingCost + shortageCost; const centerX = canvas.width / 2; const centerY = canvas.height / 2; const radius = Math.min(canvas.width, canvas.height) / 3; // Draw pie slices let currentAngle = 0; // Ordering cost drawPieSlice(ctx, centerX, centerY, radius, currentAngle, currentAngle + (orderingCost / total) * Math.PI * 2, '#2196F3'); currentAngle += (orderingCost / total) * Math.PI * 2; // Holding cost drawPieSlice(ctx, centerX, centerY, radius, currentAngle, currentAngle + (holdingCost / total) * Math.PI * 2, '#4CAF50'); currentAngle += (holdingCost / total) * Math.PI * 2; // Shortage cost drawPieSlice(ctx, centerX, centerY, radius, currentAngle, currentAngle + (shortageCost / total) * Math.PI * 2, '#FF9800'); // Legend ctx.font = '12px Arial'; const legendX = 20; let legendY = 30; ctx.fillStyle = '#2196F3'; ctx.fillRect(legendX, legendY, 15, 15); ctx.fillStyle = '#333'; ctx.fillText('Ordering Cost (40%)', legendX + 20, legendY + 12); legendY += 25; ctx.fillStyle = '#4CAF50'; ctx.fillRect(legendX, legendY, 15, 15); ctx.fillStyle = '#333'; ctx.fillText('Holding Cost (35%)', legendX + 20, legendY + 12); legendY += 25; ctx.fillStyle = '#FF9800'; ctx.fillRect(legendX, legendY, 15, 15); ctx.fillStyle = '#333'; ctx.fillText('Shortage Cost (25%)', legendX + 20, legendY + 12); } function drawPieSlice(ctx, centerX, centerY, radius, startAngle, endAngle, color) { ctx.fillStyle = color; ctx.beginPath(); ctx.moveTo(centerX, centerY); ctx.arc(centerX, centerY, radius, startAngle, endAngle); ctx.closePath(); ctx.fill(); } function visualizeForecast() { const canvas = document.getElementById('forecastCanvas'); const ctx = canvas.getContext('2d'); canvas.width = canvas.offsetWidth; canvas.height = canvas.offsetHeight; ctx.clearRect(0, 0, canvas.width, canvas.height); // Generate forecast data const months = 12; const demand = supplyChainState.demand / 12; const variability = supplyChainState.variability / 100; ctx.strokeStyle = '#2196F3'; ctx.lineWidth = 2; ctx.beginPath(); for (let i = 0; i <= months; i++) { const x = (i / months) * canvas.width; const variation = (Math.random() - 0.5) * 2 * variability; const y = canvas.height / 2 - (demand * (1 + variation) / demand) * canvas.height * 0.3; if (i === 0) { ctx.moveTo(x, y); } else { ctx.lineTo(x, y); } // Draw point ctx.fillStyle = '#2196F3'; ctx.beginPath(); ctx.arc(x, y, 4, 0, Math.PI * 2); ctx.fill(); } ctx.stroke(); // Draw trend line ctx.strokeStyle = '#4CAF50'; ctx.setLineDash([5, 5]); ctx.beginPath(); ctx.moveTo(0, canvas.height / 2); ctx.lineTo(canvas.width, canvas.height / 2); ctx.stroke(); ctx.setLineDash([]); // Labels ctx.fillStyle = '#333'; ctx.font = '14px Arial'; ctx.fillText('চাহিদার পূর্বাভাস', 10, 20); ctx.fillText('Months →', canvas.width - 60, canvas.height - 10); } // ========== OTA SECTION ========== function showOTA() { const otaContainer = document.getElementById('otaContainer'); if (otaContainer && (otaContainer.style.display === 'none' || !otaContainer.style.display)) { otaContainer.style.display = 'block'; setTimeout(() => { const otaHeader = document.querySelector('.ota-header h3'); if (otaHeader) { otaHeader.style.animation = 'pulse 1s ease-in-out'; } }, 100); } } // ========== AI ASSISTANT FUNCTIONS ========== function openAIModal() { const modal = document.getElementById('aiModal'); modal.classList.add('show'); if (aiModalState.apiKey && aiModalState.currentView === 'gemini') { showGeminiChat(); } else { showAISelector(); } updateAPIKeyStatus(); } function closeAIModal() { const modal = document.getElementById('aiModal'); modal.classList.remove('show'); setTimeout(() => { aiModalState.currentView = 'selector'; showAISelector(); }, 300); } function showAISelector() { document.getElementById('aiModalTitle').textContent = 'আপনার এআই সহকারী বেছে নিন'; document.getElementById('aiSelector').style.display = 'flex'; document.getElementById('geminiChat').style.display = 'none'; document.getElementById('apiKeySetup').style.display = 'none'; aiModalState.currentView = 'selector'; } function showGeminiChat() { document.getElementById('aiModalTitle').innerHTML = '✨ Gemini AI Assistant'; document.getElementById('aiSelector').style.display = 'none'; document.getElementById('geminiChat').style.display = 'flex'; document.getElementById('apiKeySetup').style.display = 'none'; aiModalState.currentView = 'gemini'; const chatMessages = document.getElementById('chatMessages'); if (!chatMessages.innerHTML.trim()) { addMessage('assistant', `Hello! I can help you with: • Understanding EOQ calculations • Optimizing inventory levels • Supply chain best practices • Interpreting the visualizations What would you like to know?`); } } function showAPIKeySetup() { document.getElementById('aiModalTitle').textContent = 'জেমিনি এপিআই সেটআপ করুন'; document.getElementById('aiSelector').style.display = 'none'; document.getElementById('geminiChat').style.display = 'none'; document.getElementById('apiKeySetup').style.display = 'block'; aiModalState.currentView = 'setup'; } function selectAI(aiType) { switch(aiType) { case 'chatgpt': const toolContext = `I need help with the Supply Chain Optimizer tool. Current settings: Demand=${supplyChainState.demand}, EOQ=${supplyChainState.eoq}`; const chatUrl = `https://chat.openai.com/?q=${encodeURIComponent(toolContext)}`; window.open(chatUrl, '_blank'); closeAIModal(); trackEvent('ai_selection', { ai_type: 'chatgpt' }); break; case 'claude': const claudeContext = `I need help with the Supply Chain Optimizer tool. Current settings: Demand=${supplyChainState.demand}, EOQ=${supplyChainState.eoq}`; const claudeUrl = `https://claude.ai/chat?q=${encodeURIComponent(claudeContext)}`; window.open(claudeUrl, '_blank'); closeAIModal(); trackEvent('ai_selection', { ai_type: 'claude' }); break; case 'gemini': if (!aiModalState.apiKey) { showAPIKeySetup(); } else { showGeminiChat(); } trackEvent('ai_selection', { ai_type: 'gemini' }); break; } } function saveGeminiApiKey() { const apiKey = document.getElementById('geminiApiKeyInput').value.trim(); if (apiKey) { localStorage.setItem('geminiApiKey', apiKey); aiModalState.apiKey = apiKey; showGeminiChat(); updateAPIKeyStatus(); } else { alert('অনুগ্রহ করে একটি বৈধ এপিআই কী প্রবেশ করান'); } } function updateAPIKeyStatus() { const statusEl = document.getElementById('apiKeyStatus'); if (aiModalState.apiKey) { statusEl.innerHTML = 'এপিআই কী পরিবর্তন করুন'; } else { statusEl.textContent = 'কোনো এপিআই কী সেট করা নেই'; } } function addMessage(type, content) { const chatMessages = document.getElementById('chatMessages'); const messageDiv = document.createElement('div'); messageDiv.className = `message ${type}`; if (type === 'user') { messageDiv.innerHTML = `You: ${content}`; } else { messageDiv.innerHTML = `✨ Gemini:${content.replace(/\n/g, '
')}`; } chatMessages.appendChild(messageDiv); chatMessages.scrollTop = chatMessages.scrollHeight; } async function sendToGemini() { const input = document.getElementById('geminiInput'); const message = input.value.trim(); if (!message) return; addMessage('user', message); input.value = ''; const loadingMsg = document.createElement('div'); loadingMsg.className = 'message assistant'; loadingMsg.innerHTML = '✨ Gemini:
Thinking...'; loadingMsg.id = 'loading-message'; document.getElementById('chatMessages').appendChild(loadingMsg); try { const response = await fetch(`https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent?key=${aiModalState.apiKey}`, { method: 'পোস্ট', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ contents: [{ parts: [{ text: `Context: User is using Supply Chain Optimizer tool on WIA Code platform. Current EOQ: ${supplyChainState.eoq} Annual Demand: ${supplyChainState.demand} Order Cost: ${supplyChainState.orderCost} Holding Cost: ${supplyChainState.holdingCost} User question: ${message}` }] }], generationConfig: { temperature: 0.7, maxOutputTokens: 1000 } }) }); const data = await response.json(); document.getElementById('loading-message').remove(); if (data.candidates && data.candidates[0] && data.candidates[0].content) { const reply = data.candidates[0].content.parts[0].text; addMessage('assistant', reply); } else { addMessage('assistant', 'Sorry, I could not generate a response. Please try again.'); } } catch (error) { document.getElementById('loading-message')?.remove(); if (error.message.includes('এপিআই কী')) { addMessage('error', 'Invalid API key. Please check your API key and try again.'); showAPIKeySetup(); } else { addMessage('error', 'Failed to connect to Gemini. Please check your internet connection and try again.'); } } } // ========== UTILITY FUNCTIONS ========== function trackEvent(eventName, data = {}) { if (typeof gtag !== 'undefined') { gtag('event', eventName, { 'event_category': TOOL_CONFIG.category, 'event_label': TOOL_CONFIG.name, ...data }); } } async function updateToolCount() { try { const fallbackCount = 333; document.querySelectorAll('.dynamic-count').forEach(el => { const prefix = el.getAttribute('data-text') || ''; const suffix = el.getAttribute('data-suffix') || ''; const icon = el.textContent.split(' ')[0] || ''; el.textContent = `${icon} ${prefix} ${fallbackCount}+ ${suffix}`; }); } catch (error) { console.log('Tool count update failed:', error); } } function updateCurrentYear() { const currentYear = new Date().getFullYear(); document.querySelectorAll('.current-year').forEach(el => { el.textContent = currentYear; }); } // ========== EVENT LISTENERS ========== document.addEventListener('ডমকনটেন্টলোডেড', function() { // Initialize OnboardingManager.init(); updateCurrentYear(); updateToolCount(); updateSliderValues(); visualizeSupplyChain(); // Set up sliders document.getElementById('demandSlider').addEventListener('input', function() { supplyChainState.demand = parseInt(this.value); updateSliderValues(); }); document.getElementById('orderCostSlider').addEventListener('input', function() { supplyChainState.orderCost = parseInt(this.value); updateSliderValues(); }); document.getElementById('holdingCostSlider').addEventListener('input', function() { supplyChainState.holdingCost = parseInt(this.value); updateSliderValues(); }); document.getElementById('serviceLevelSlider')?.addEventListener('input', function() { supplyChainState.serviceLevel = parseFloat(this.value); updateSliderValues(); }); document.getElementById('variabilitySlider')?.addEventListener('input', function() { supplyChainState.variability = parseInt(this.value); updateSliderValues(); }); document.getElementById('riskSlider')?.addEventListener('input', function() { updateSliderValues(); }); // AI Button document.getElementById('aiBtn').addEventListener('click', openAIModal); // Modal outside click document.getElementById('aiModal').addEventListener('click', function(e) { if (e.target === this) { closeAIModal(); } }); // Enter key support document.addEventListener('keydown', function(e) { if (e.key === 'এন্টার') { const geminiInput = document.getElementById('geminiInput'); if (document.activeElement === geminiInput) { sendToGemini(); } } if (e.key === 'এস্কেপ') { closeAIModal(); } }); // Track WIA Code clicks document.querySelectorAll('a[href*="wia"]').forEach(link => { link.addEventListener('click', function() { trackEvent('wia_link_click', { link: link.textContent }); }); }); // Continuous animation for supply chain function animate() { if (document.getElementById('networkView').classList.contains('active')) { visualizeSupplyChain(); } requestAnimationFrame(animate); } animate(); }); // ========== ANALYTICS ========== window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-XXXXXXXXX'); trackEvent('page_view', { tool: TOOL_CONFIG.name, category: TOOL_CONFIG.category });
📦 সাপ্লাই চেইন অপটিমাইজার
এআই-চালিত সিমুলেশন দিয়ে ইনভেন্টরি ম্যানেজমেন্ট এবং লজিস্টিকস অপটিমাইজেশনে মাস্টারি অর্জন করুন! মিনিটের মধ্যে EOQ মডেল, চাহিদা পূর্বাভাস এবং সাপ্লাই চেইন স্থিতিস্থাপকতা কৌশল শিখুন।
সাপ্লাই চেইন অপটিমাইজারে স্বাগতম! 🎉
এখানে প্রথমবার? চমৎকার!
সাপ্লাই চেইন অভিজ্ঞতার প্রয়োজন নেই!
অর্জন অনলক হয়েছে!
বিবরণ
🤔 সাপ্লাই চেইন অপটিমাইজেশন কী?
এটিকে একটি বিশাল টেট্রিস খেলা হিসেবে ভাবুন - তবে পণ্য, গুদাম এবং ট্রাকের সাথে!
সাপ্লাই চেইন অপটিমাইজেশন এআই এবং গণিত ব্যবহার করে খরচ কমায় এবং সময়মতো গ্রাহকদের কাছে পণ্য পৌঁছায়। এটি আমাজনের ১-দিনের ডেলিভারি এবং দোকানগুলিতে প্রয়োজনীয় জিনিসপত্র কখনও শেষ না হওয়ার পিছনের মস্তিষ্ক!