Skip to content

A multi-threaded simulation comparing human workers' production efficiency to machine production in a factory.

Notifications You must be signed in to change notification settings

bl33h/machineVShuman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 

Repository files navigation

machineVShuman

A multi-threaded simulation of production in a factory, specifically comparing the efficiency of production carried out by human workers versus production carried out by machines. Additionally, it generates a report for the user indicating whether it is a better option to invest more in human labor or acquire another machine.


pic

General informationFilesFeaturesHow To Use

General information

  • Application/Problem: Assessing the long-term efficiency and profitability of machine production compared to human labor.
  • Context: The CEO of a company wants to determine whether it is more advantageous to hire a group of people for assembling parts per minute over a long period of time or to make a significant investment in purchasing a machine.
  • Solution: Develop a program that simulates the productivity of both the machine and human workforce based on user-inputted data. The program analyzes and calculates the production time for each scenario using parallel programming techniques in different work processes. Ultimately, a report is generated, indicating the most viable option based on calculations and aligned with the company's conditions.

Files

  • src: the file that implements de solution.
  • flowchart: the model construction.

Features

The main features of the application include:

  • Multi-threading: The code utilizes multi-threading to simulate concurrent production processes. It creates and manages threads for different production areas, allowing for parallel execution of tasks.
  • User Input: The code prompts the user to input various information such as the type of work, wages, and investment in machines. This allows customization and flexibility in simulating different scenarios.
  • Production Simulation: The code simulates the production process by coordinating the work of human workers and machines. It tracks the progress of production in different areas and ensures that the assembly process depends on the completion of a specific number of pieces in the previous area.
  • Cost Calculation: The code calculates the production costs based on the number of assembled pieces and the wages of human workers. It provides insights into the financial aspects of production, helping users make informed decisions.
  • Reporting: After simulating the production and calculating the costs, the code generates a report for the user. The report indicates whether it is more advantageous to invest in human labor or acquire another machine based on the simulated results. This feature assists users in making data-driven decisions for optimizing production efficiency and cost-effectiveness.
  • Synchronization: The code employs synchronization mechanisms such as mutexes and conditions to ensure thread safety and proper coordination between human workers and machines during the production simulation.

How To Use

To clone and run this application, you'll need Git and a C++ compiler installed on your computer. From your command line:

# Clone this repository
$ git clone https://github.com/bl33h/machineVShuman

# Open the folder
$ cd src

# Run the app
$ g++ machineVShuman.cpp -o machineVShuman
$ ./machineVShuman

About

A multi-threaded simulation comparing human workers' production efficiency to machine production in a factory.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages