# Shipping Network Design is an API to tackle the Liner Shipping Network Design
and Scheduling Problem (LSNDSP). The problem involves the design and scheduling
of a liner shipping network that minimizes operational costs, while maximizing
revenue from the shipping of commodity demand between ports. The network design
subproblem focuses on determining the set of ports serviced by the network, the
number of vessels to be allocated to each route, and the routes to be taken by
the vessels. The scheduling subproblem, is concerned with developing sailing
schedules for the vessels, considering factors such as sailing time between
ports, cargo loading, unloading and transshipment times, and the demand for
transportation between different ports.

## API overview

The input of the API is a request that describes

- **Ports** with vessel class specific costs and restrictions
- **Vessel classes** with capacity and fleet size
- **Leg candidates** corresponding to possible connections between ports for a given duration and vessel class compatibility
- **Demands** between ports, with freight rate and optional transit time restrictions
- (optional) Existing vessel services

For details about the input request, refer to the request section in the
[REST reference](https://developers.google.com/optimization/service/reference/rest/v1/shipping/designShippingNetwork#request-body).

The output of the API is a response providing **vessel services** and
**commodity demand paths**. Vessel service schedules are defined as a sequence
of leg candidates with a given departure time. Each vessel service has an
assigned vessel class. Commodity demand paths are described as sequences of
vessel service legs.

For details about the output response, refer to the response section in the
[REST reference](https://developers.google.com/optimization/service/reference/rest/v1/shipping/designShippingNetwork#response-body).

## How to get started

To obtain access to the Shipping Network Design API, follow the steps on the
[Setup](https://developers.google.com/optimization/service/setup) page.

Once you have access, you can verify that everything works by following the
example on the [API example](https://developers.google.com/optimization/service/shipping/example) page.

> [!NOTE]
> **Note:** Solves are limited to 500 seconds with a maximum of 250 ports and 15000 demands. If you're interested in solving larger problems for a longer time, contact [or-shipping+contact@google.com](mailto:or-shipping+contact@google.com).