{"id":1553,"date":"2024-02-10T15:02:00","date_gmt":"2024-02-10T15:02:00","guid":{"rendered":"https:\/\/beams-experiments.com\/?page_id=1553"},"modified":"2024-09-06T07:47:58","modified_gmt":"2024-09-06T06:47:58","slug":"decision-making-strategic-human","status":"publish","type":"page","link":"https:\/\/beams-experiments.com\/index.php\/decision-making-strategic-human\/","title":{"rendered":"Task-DMS-H"},"content":{"rendered":"\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>SkyConnect Ventures Case Study<\/title>\n    <style>\n        table {\n            width: 100%;\n            border-collapse: collapse;\n        }\n        table, th, td {\n            border: 1px solid black;\n        }\n        th, td {\n            padding: 10px;\n            text-align: left;\n        }\n        th {\n            background-color: #f2f2f2;\n        }\n        h1 {\n            font-size: 18px;\n            text-align: center;\n            font-weight: bold;\n            margin-bottom: 8px;\n        }\n        p {\n            font-size: 14px;\n            margin-bottom: 8px;\n        }\n        input[type=range] {\n            -webkit-appearance: none;\n            width: 100%;\n            height: 5px;\n            background: #ddd;\n            outline: none;\n            opacity: 0.8;\n            transition: opacity .2s;\n        }\n        input[type=range]:hover {\n            opacity: 1;\n        }\n\n        .slider-container {\n            width: 100%;\n            margin: 20px 0;\n        }\n        .slider {\n            -webkit-appearance: none;\n            width: 100%;\n            height: 5px;\n            background: #ddd;\n            outline: none;\n            opacity: 0.7;\n            transition: opacity .2s;\n        }\n        .slider:hover {\n            opacity: 1;\n        }\n        .slider::-webkit-slider-thumb {\n            -webkit-appearance: none;\n            appearance: none;\n            width: 20px;\n            height: 20px;\n            background: #4CAF50;\n            cursor: pointer;\n        }\n        .slider::-moz-range-thumb {\n            width: 20px;\n            height: 20px;\n            background: #4CAF50;\n            cursor: pointer;\n        }\n        .slider-labels {\n            display: flex;\n            justify-content: space-between;\n            padding: 0 10px;\n        }\n        .slider-labels span {\n            position: relative;\n            text-align: center;\n            width: 1px;\n            background: #ddd;\n            height: 10px;\n            line-height: 20px;\n            font-size: 14px;\n        }\n        .small-font-table, .small-font-table th, .small-font-table td {\n            font-size: 13px;\n        }\n#loadingSpinnerPage {\n    border: 5px solid #f3f3f3; \/* Light grey border *\/\n    border-top: 5px solid #3498db; \/* Blue border for the top *\/\n    border-radius: 50%;\n    width: 60px;\n    height: 60px;\n    animation: spin 2s linear infinite;\n     position: fixed; \/* Position it relative to the viewport *\/\n    top: 50%; \/* Move it down 50% of the viewport height *\/\n    left: 50%; \/* Move it right 50% of the viewport width *\/\n    transform: translate(-50%, -50%); \/* Offset the spinner by half its width\/height to center it *\/\n    z-index: 9999; \/* Ensure it is above other content *\/\n}\n@keyframes spin {\n    0% { transform: rotate(0deg); }\n    100% { transform: rotate(360deg); }\n}\n #progressBarContainer {\n            width: 90%;\n            background-color: #e0e0e0;\n            border-radius: 5px;\n            margin-top: 10px;\n        }\n        #progressBar {\n            height: 10px;\n            background-color: #007bff;\n            border-radius: 5px;\n            width: 88%;\n        }\n        #progressText {\n            text-align: center;\n            margin-top: 5px;\n        }\n        #nextButton {\n            display: block;\n            padding: 10px 20px;\n            background-color: #007bff;\n            color: white;\n            border: none;\n            border-radius: 5px;\n            cursor: pointer;\n            margin: 10px auto;\n            width: fit-content;\n            position: relative;\n        }\n        #nextButton:disabled {\n            cursor: not-allowed;\n            opacity: 0.5;\n        }\n    <\/style>\n    <script src=\"https:\/\/code.jquery.com\/jquery-3.6.0.min.js\"><\/script>\n\n     <script>\n\/\/ Show an initial alert immediately\nalert(\"Please wait for the full page to load before interacting with it. This may depend on your internet speed.\");\n$('#loadingSpinnerPage').show();\n\ndocument.addEventListener('DOMContentLoaded', function() {\n    $('#loadingSpinnerPage').hide();\n\/\/check if user already did this section\nif (localStorage.getItem('strategicScore')) {\n    \/\/ If 'chatLog' already exists, make alert\n     alert ('You already did this section. Moving you back!');\n \/\/ Get the current task index from the URL or set to 0 if not present\n    const urlParams = new URLSearchParams(window.location.search);\n    let taskIndex = parseInt(urlParams.get('taskIndex')) || 0;\nwindow.location.href = 'https:\/\/beams-experiments.com\/index.php\/interim-task-questionnaire-h\/?taskIndex=' + taskIndex;\n  }\n\/\/tracking time screen not attended\nlet timePageNotVisibleStart = 0;\nlet totalTimeNotVisible = 0; \/\/ initialize totalTimeNotVisible\n\nfunction updateTotalTimeNotVisible() {\n    if (document.visibilityState === 'hidden' && timePageNotVisibleStart !== 0) {\n        \/\/ Calculate time page was not visible and reset start time\n        const notVisibleDuration = Date.now() - timePageNotVisibleStart;\n        totalTimeNotVisible += Math.round(notVisibleDuration \/ 1000);\n        timePageNotVisibleStart = 0;\n    }\n    \/\/ Optionally log the updated total time here for debugging\n}\n\ndocument.addEventListener('visibilitychange', () => {\n    \/\/console.log('Visibility changed to:', document.visibilityState);\n    if (document.visibilityState === 'visible') {\n        if (timePageNotVisibleStart !== 0) {\n            const notVisibleDuration = Date.now() - timePageNotVisibleStart;\n           \/\/ console.log('Not visible duration (ms):', notVisibleDuration);\n            totalTimeNotVisible += Math.round(notVisibleDuration \/ 1000); \/\/ Convert ms to seconds and accumulate\n            \/\/console.log('Total time not visible (s):', totalTimeNotVisible);\n            timePageNotVisibleStart = 0; \/\/ Reset the start time\n        }\n    } else {\n        timePageNotVisibleStart = Date.now();\n    }f\n});\n     \n    const nextButton = document.getElementById('nextButton');\n    const inputs = document.querySelectorAll('input[type=radio]');\n    const confidenceSlider = document.getElementById('confidence');\n    const radioGroups = [...new Set(Array.from(inputs).map(input => input.name))];\n    let confidenceMoved = false;\n    const taskSequence = JSON.parse(localStorage.getItem('taskSequence'));\n    const groupID = localStorage.getItem('groupID'); \/\/ Retrieve groupID from local storage\n    var startTime = Date.now();\n\n    \/\/ Get the current task index from the URL or set to 0 if not present\n    const urlParams = new URLSearchParams(window.location.search);\n    let taskIndex = parseInt(urlParams.get('taskIndex')) || 0;\n    \n    \/\/ Total number of pages: 15  \n    const totalPages = 15;\n\n    \/\/ Function to update the progress bar and progress text\n    function updateProgressBar(taskIndex) {\n        \/\/ Current page: Pre-task is page 4, tasks are 5-9, and post-task is page 10\n        const currentPage = taskIndex * 2 + 5; \/\/ +5 to account for previous pages; *2 to account for each task its interim questionnaire\n\n        \/\/ Calculate the progress percentage\n        const progressPercentage = (currentPage \/ totalPages) * 100;\n\n        \/\/ Update the progress bar width\n        document.getElementById('progressBar').style.width = `${progressPercentage}%`;\n\n        \/\/ Update the progress text\n        document.getElementById('progressText').innerText = `Page ${currentPage} out of ${totalPages}`;\n    }\n\n    \/\/ Call updateProgressBar with the current taskIndex on page load\n    updateProgressBar(taskIndex);\n\n    \/\/ Function to go to the next task or the post-task questionnaire\n    function goToNextTask() {\n        window.location.href = 'https:\/\/beams-experiments.com\/index.php\/interim-task-questionnaire-h\/?taskIndex=' + taskIndex;\n    }\n\n    function checkFormCompletion() {\n        const allRadiosChecked = radioGroups.every(name => {\n            return document.querySelector(`input[name=\"${name}\"]:checked`);\n        });\n        nextButton.disabled = !(allRadiosChecked && confidenceMoved);\n    }\n\n    inputs.forEach(input => {\n        input.addEventListener('change', checkFormCompletion);\n    });\n\n    confidenceSlider.addEventListener('input', function() {\n        confidenceMoved = true;\n        checkFormCompletion();\n    });\n\n    function setupExclusiveRanking() {\n        inputs.forEach(radio => {\n            radio.addEventListener('change', () => {\n                if (radio.type === 'radio') {\n                    inputs.forEach(otherRadio => {\n                        if (otherRadio !== radio && otherRadio.name !== radio.name && otherRadio.value === radio.value) {\n                            otherRadio.checked = false;\n                        }\n                    });\n                }\n                checkFormCompletion();\n            });\n        });\n    }\n    setupExclusiveRanking();\n\n    document.getElementById('decisionForm').addEventListener('submit', function(event) {\n        event.preventDefault();\n        calculateScoreAndSave();\n        \n        \/\/ Calculate task time \n        var endTime = Date.now();\n        \/\/ Calculate the duration in milliseconds\n        var durationMillis = endTime - startTime;\n        \/\/ Convert duration to seconds or minutes as needed\n        var strategicTaskTime = durationMillis \/ 1000;\n        localStorage.setItem('strategicTaskTime', strategicTaskTime);\n        console.log('strategicTaskTime is ', strategicTaskTime);\n        localStorage.setItem('finalTotalTimeNotVisible', totalTimeNotVisible.toString());\n\n        goToNextTask();\n    });\n\n    function calculateScoreAndSave() {\n        let strategicScore = 0;\n        try {\n            const correctAnswers = [5, 1, 3, 2, 4];\n            correctAnswers.forEach((correctAnswer, index) => {\n                const userAnswer = parseInt(document.querySelector(`input[name=\"rank${index + 1}\"]:checked`)?.value);\n                const deviation = Math.abs(correctAnswer - userAnswer);\n                strategicScore += deviation * 12;\n            });\n\n            console.log(`Strategic Score: ${strategicScore}`);\n            localStorage.setItem('strategicScore', strategicScore);\n\n            const strategicConfidence = document.getElementById('confidence').value;\n            console.log(`Confidence: ${strategicConfidence}`);\n            localStorage.setItem('strategicConfidence', strategicConfidence);\n        } catch (error) {\n            console.error('Error calculating score:', error);\n        }\n    }\n});\n<\/script>\n<\/head>\n<body>\n    <h1>SkyConnect Ventures \u2013 Case Study<\/h1>\n    <form id=\"decisionForm\">\n        <p>SkyConnect Ventures is a regional airline owned by Mr. Marshall, offering services to underserved communities and charter flights to secluded locations. Over the past 5 years, Mr. Marshall has expanded the fleet to 20 aircraft, employing 40 pilots and 10 support staff. Due to an economic downturn starting a year ago, the airline&#8217;s financial reserves have been significantly depleted. Despite this, Mr. Marshall is committed to keeping the airline operational until the market recovers within the next year. He must now secure short-term financing and strategize for long-term stability to prevent future financial strain.<\/p>\n\n        <p><b>What should Mr. Marshall do? (rank 1-5)<\/b><\/p>\n        <table class=\"small-font-table\">\n            <tr>\n                <th>Action<\/th>\n                <th>1 (Most Important)<\/th>\n                <th>2<\/th>\n                <th>3<\/th>\n                <th>4<\/th>\n                <th>5 (Least Important)<\/th>\n            <\/tr>\n            <tr>\n                <td>1. Reduce his inventory of planes.<\/td>\n                <td><input type=\"radio\" name=\"rank1\" value=\"1\"><\/td>\n                <td><input type=\"radio\" name=\"rank1\" value=\"2\"><\/td>\n                <td><input type=\"radio\" name=\"rank1\" value=\"3\"><\/td>\n                <td><input type=\"radio\" name=\"rank1\" value=\"4\"><\/td>\n                <td><input type=\"radio\" name=\"rank1\" value=\"5\"><\/td>\n            <\/tr>\n            <tr>\n                <td>2. Study \u2018downsizing\u2019 possibilities to streamline the operation and still offer the best possible service.<\/td>\n                <td><input type=\"radio\" name=\"rank2\" value=\"1\"><\/td>\n                <td><input type=\"radio\" name=\"rank2\" value=\"2\"><\/td>\n                <td><input type=\"radio\" name=\"rank2\" value=\"3\"><\/td>\n                <td><input type=\"radio\" name=\"rank2\" value=\"4\"><\/td>\n                <td><input type=\"radio\" name=\"rank2\" value=\"5\"><\/td>\n            <\/tr>\n            <tr>\n                <td>3. Look for a possible link-up with a major carrier.<\/td>\n                <td><input type=\"radio\" name=\"rank3\" value=\"1\"><\/td>\n                <td><input type=\"radio\" name=\"rank3\" value=\"2\"><\/td>\n                <td><input type=\"radio\" name=\"rank3\" value=\"3\"><\/td>\n                <td><input type=\"radio\" name=\"rank3\" value=\"4\"><\/td>\n                <td><input type=\"radio\" name=\"rank3\" value=\"5\"><\/td>\n            <\/tr>\n            <tr>\n                <td>4. Seek the opinions of his employees.<\/td>\n                <td><input type=\"radio\" name=\"rank4\" value=\"1\"><\/td>\n                <td><input type=\"radio\" name=\"rank4\" value=\"2\"><\/td>\n                <td><input type=\"radio\" name=\"rank4\" value=\"3\"><\/td>\n                <td><input type=\"radio\" name=\"rank4\" value=\"4\"><\/td>\n                <td><input type=\"radio\" name=\"rank4\" value=\"5\"><\/td>\n            <\/tr>\n            <tr>\n                <td>5. Pare down service to serve only the most profitable while maintaining the highest quality service.<\/td>\n                <td><input type=\"radio\" name=\"rank5\" value=\"1\"><\/td>\n                <td><input type=\"radio\" name=\"rank5\" value=\"2\"><\/td>\n                <td><input type=\"radio\" name=\"rank5\" value=\"3\"><\/td>\n                <td><input type=\"radio\" name=\"rank5\" value=\"4\"><\/td>\n                <td><input type=\"radio\" name=\"rank5\" value=\"5\"><\/td>\n            <\/tr>\n        <\/table>\n\n        <p><b>How confident are you in your ranking order?<\/b><\/p>\n        <div class=\"slider-container\">\n            <input type=\"range\" id=\"confidence\" name=\"confidence\" min=\"0\" max=\"10\" step=\"1\" class=\"slider\">\n            <div class=\"slider-labels\">\n                <span>0<\/span>\n                <span>1<\/span>\n                <span>2<\/span>\n                <span>3<\/span>\n                <span>4<\/span>\n                <span>5<\/span>\n                <span>6<\/span>\n                <span>7<\/span>\n                <span>8<\/span>\n                <span>9<\/span>\n                <span>10<\/span>\n            <\/div>\n        <\/div>\n        <button type=\"submit\" id=\"nextButton\" disabled>Next<\/button>\n<\/div>\n <div id=\"progressBarContainer\">\n    <div id=\"progressBar\"><\/div>\n<\/div>\n<div id=\"progressText\">Page 1 out of 15<\/div>\n    <\/form>\n    <div id=\"loadingSpinnerPage\"><\/div>\n\n<\/div>\n\n<\/body>\n<\/html>\n","protected":false},"excerpt":{"rendered":"<p>SkyConnect Ventures Case Study SkyConnect Ventures \u2013 Case Study SkyConnect Ventures is a regional airline owned by Mr. Marshall, offering services to underserved communities and charter flights to secluded locations. Over the past 5 years, Mr. Marshall has expanded the fleet to 20 aircraft, employing 40 pilots and 10 support staff. Due to an economic [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"om_disable_all_campaigns":false,"footnotes":""},"class_list":["post-1553","page","type-page","status-publish","hentry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/pages\/1553","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/comments?post=1553"}],"version-history":[{"count":81,"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/pages\/1553\/revisions"}],"predecessor-version":[{"id":3496,"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/pages\/1553\/revisions\/3496"}],"wp:attachment":[{"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/media?parent=1553"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}