Code Monkey home page Code Monkey logo

ship's Introduction

Container Ship Stowage Plan

This project is an implementation of a stowage plan for a container ship.
A stowage plan for container ships is the plan by which different types of container vessels are loaded with containers of specific standard sizes. The plans are used to maximize the economy of shipping and safety on board.

image


Definitions

  • Ship plan
    A container ship has floors, starting with the lower floor, indexed zero. Each floor has a “plan” which is like a map of the floor. An upper floor may add new container spots that were not available in a lower floor, but it cannot remove spots that were available in a lower floor. We assume all containers are the same size and sit exactly one top of the other. The ship’s “plan” is the plan of all its floors.
  • Container
    A container has the following properties:
    Weight (kgs)
    Destination port (5 english letters of seaport code)
    Unique identifier (according to the ISO 6346 international standard)
  • Ship Route
    A ship has a finite route, containing any number of destination ports.
  • Cranes operation
    The dock cranes can pull any container if there is no other container on top of it.
  • Stowage Process
    When a ship reaches a port, it unloads all the containers that should be unloaded at this location and loads all the containers that should be loaded to it.

Ship’s API

  • Special Global Types for ship: X, Y, Height
  • Ship’s template parameter: typename Container
  • Ship’s Constructors:
    Ship(X x, Y y, Height max_height,std::vector<std::tuple<X, Y, Height>> restrictions,Grouping groupingFunctions)
    Ship(X x, Y y, Height max_height,std::vector<std::tuple<X, Y, Height>> restrictions)
    Ship(X x, Y y, Height max_height)
  • Loading container: void load(X x, Y y, Container c)
  • Unloading container: Container unload(X x, Y y)
  • Moving container from one place to another: void move(X from_x, Y from_y, X to_x, Y to_y)
  • begin and end iterators iterating over all containers on the ship.
  • The following functions return a "view" of the ship that can be iterated over using the begin and end iterators:
    getContainersViewByPosition(X x, Y y)
    getContainersViewByGroup(const string& groupingName, const string& groupName)

ship's People

Contributors

yaramt avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.