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

कार असेंबली लाइन: deterministic इवेंट जोड़ना

यह अभ्यास SimPy के बिना deterministic प्रक्रियाओं पर केंद्रित है. अगले अभ्यास में, हम SimPy पर ध्यान देंगे.

एक discrete-event मॉडल कार प्रोडक्शन लाइन को सिमुलेट करने के लिए माँगा गया है. यह मॉडल उत्पादकता बढ़ाने, bottlenecks पहचानने, और संसाधनों को मैनेज करने में मदद करेगा. शुरुआत करने के लिए, आपको पहले प्रोडक्शन लाइन में शामिल प्रमुख प्रक्रिया-समूहों की पहचान करनी थी. ये हैं (1) welding और painting और (2) assembly और testing. स्वाभाविक रूप से, इन प्रत्येक समूहों में कई उप-प्रक्रियाएँ और टास्क शामिल हैं, लेकिन अभी के लिए, आप अपने मॉडल का पहला हाई-लेवल संस्करण कोड करने पर केंद्रित हैं.

अब जब आपने महत्वपूर्ण प्रक्रिया-समूहों की पहचान कर ली है, तो यह तय करने का समय है कि प्रत्येक प्रक्रिया को पूरा होने में औसतन कितना समय लगता है. आपने रिसर्च की और पाया कि welding और painting के लिए 15 घंटे लगते हैं और parts की assembly और testing के लिए 24 घंटे. आइए इन deterministic प्रक्रियाओं को बिना SimPy के एक discrete-event मॉडल में दर्शाएँ.

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

Python में Discrete Event Simulation

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

अभ्यास निर्देश

  • "Welding and Painting" प्रक्रिया की अवधि clock-in करें.
  • "Assembly and Testing" प्रक्रिया की अवधि clock-in करें.

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

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

def car_production_line(SIMULATION_TIME):
    car_number, time  = 0, 0
    while time < SIMULATION_TIME:

        car_number += 1

        # Clock-in the time requirement for: Welding and Painting
        time += ____
        if time >= SIMULATION_TIME: break
        print(f"Time = {time:7.4f} | Car {car_number:02d} | Welding and Painting")

        # Clock-in the time requirement for: Assembly and testing
        time += ____
        if time >= SIMULATION_TIME: break
        print(f"Time = {time:7.4f} | Car {car_number:02d} | Assembly of parts and Testing")
        print(f"Time = {time:7.4f} | Car {car_number:02d} | Car ready for shipping!")

SIMULATION_TIME = 1000
car_production_line(SIMULATION_TIME)
कोड संपादित करें और चलाएँ