/ContainerShips

Optimizing container loading on cargo ships, ensuring efficient utilization of space, weight distribution, and ship stability through Python-based data structures and algorithms

Primary LanguagePython

ContainerShips

Optimizing container loading on cargo ships, ensuring efficient utilization of space, weight distribution, and ship stability through Python-based data structures and algorithms

Presentation of the Problem

You are tasked with designing a program to manage container loading and unloading on cargo ships for Trondheim International Shipping (TIS). This assignment focuses on processing large datasets using Python.

Containers

Task 1-3: Container Data Structure In this section, I have designed a data structure for containers and implemented set and get functions.

Task 4 & 6: File Handling I have implemented functions to write containers to a file and load containers from a file in TSV format.

Ships

Task 5 & 7: Container Loading I have developed the core logic for loading containers onto the ship, ensuring no gaps, sorting by weight, and balancing the ship.

Task 8 -10: Ship Balance and Weight Calculation I have designed functions to calculate various ship-related metrics, such as total weight, weight distribution, and ship balance. I also check compliance with stability constraints.

Docks

Task 11 & 12: Crane Operations I have calculated the time required to load the ship using one crane and made assumptions about the use of four cranes.

Assumptions

In this section, I have outlined important assumptions made during the assignment, such as ship dimensions, stacking rules, and crane operations.

Tasks and Documentation

Here, I have documented my approach to each task, including the functions used and their roles in the code.

  • Task 1-3: Container Data Structure
  • Task 4 & 6: File Handling
  • Task 5 & 7: Container Loading
  • Task 8 -10: Ship Balance and Weight Calculation
  • Task 11 & 12: Crane Operations