शुरू करेंमुफ़्त में शुरू करें

गारमेंट प्रोडक्शन: मल्टी-प्रोसेसेज़ और मॉड्युलैरिटी

आपसे इटली के फैशन कैपिटल मिलान में स्थित एक गारमेंट प्रोडक्शन फ़ैक्टरी को ऑप्टिमाइज़ करने के लिए एक discrete-event मॉडल बनाने के लिए कहा गया है.

आप बहुत उत्साहित हैं और चाहते हैं कि आप एक मददगार और स्केलेबल मॉडल बनाएँ, क्योंकि आपको पता है कि गारमेंट इंडस्ट्री जटिल है और इसमें कई प्रक्रियाएँ और संसाधन शामिल होते हैं, जिनसे आप अभी परिचित हो रहे हैं.

आपने रिसर्च किया और नीचे दी गई तालिका में दिखाए गए प्रोसेसेज़ की सूची तैयार की. आपने सावधानी से हर प्रक्रिया के लिए अलग फंक्शन बनाया ताकि आपका मॉडल मॉड्युलर रहे और नियंत्रित तरीके से बढ़ सके.

अब आपको अपने मैनेजर से फीडबैक मिला है, और आपको मॉडल में एक नई प्रक्रिया शामिल करने के लिए कहा गया है: "Spot cleaning and laundry", जो चरण 8 और 9 के बीच आनी चाहिए (तालिका में लाल रंग से हाइलाइट की गई पंक्ति देखें). पैकेज random और simpy पहले से इम्पोर्ट किए गए हैं.

Table with process names, respective functions, and information about whether the process has been incorporated in the model.

यह अभ्यास पाठ्यक्रम का हिस्सा है

Python में Discrete Event Simulation

पाठ्यक्रम देखें

इंटरैक्टिव व्यावहारिक अभ्यास

इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।

# Create a function for the new process
def ____(gen_type=None, gauss_mean=None, gauss_std=None, unif_start=None, unif_end=None):
  if gen_type == "gauss":
    duration = random.gauss(gauss_mean, gauss_std)
  elif gen_type == "uniform":
    duration = random.uniform(unif_start, unif_end)
  return duration

def all_processes(env, prod_line):

  with prod_line.request() as request:
    yield request

    t1 = fabric_relaxing(gen_type="gauss", gauss_mean=2*60, gauss_std=15)
    t2 = spread_form_layout(gen_type="gauss", gauss_mean=6, gauss_std=1)
    t3 = laying_paper_pattern(gen_type="uniform", unif_start=3, unif_end=0.5)
    t4 = marking(gen_type="gauss", gauss_mean=6, gauss_std=1)
    t5 = cutting(gen_type="gauss", gauss_mean=5, gauss_std=0.5)
    t6 = embroidery_screen_and_printing(gen_type="uniform", unif_start=10, unif_end=2)
    t7 = sewing(gen_type="gauss", gauss_mean=15, gauss_std=3)
    t8 = checking(gen_type="gauss", gauss_mean=2, gauss_std=0.5)

    # Add the new process
    tnew = ____

    # Account for the new process duration in the entire process duration
    total_duration = sum([t1, t2, t3, t4, t5, t6, t7, t8, ____, t9, t10])

    yield env.timeout(total_duration)
कोड संपादित करें और चलाएँ