# transportation-problem-solver

> Module that counts transportation problems using the potential method

Latest version **1.0.1** (published 2020-02-19) · ISC license · 0 weekly downloads

## Install

```sh
npm install transportation-problem-solver
pnpm add transportation-problem-solver
yarn add transportation-problem-solver
bun add transportation-problem-solver
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-02-19 |
| First published | 2020-02-19 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 14 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Adam Krowka https://github.com/AdamKrowka |
| Maintainers | adamkrowka |
| Keywords | transpotration, transport, transportation-problem, potential, north-west-corner, potential-method |

## Links

- npm: https://www.npmjs.com/package/transportation-problem-solver
- npm.io page: https://npm.io/package/transportation-problem-solver

## Recent versions

- 1.0.1 (latest) — 2020-02-19

## README

## :truck: Transportation problem calculator :truck:

### What to use this program for:grey_question:

With this program you can easly calculate the lowest cost of delivery products "Transportation Problem" using potentials method.

### Geting started :hammer:

To use this module you only have to install it via npm :relaxed:

```javascript
    npm install transportation-problem
```

or

```javascript
    npm i transportation-problem
```

### How to use:grey_question:

```javascript
import { TransportProblem } from "transportation-problem";

const tP = new TransportProblem();

const exampleDataTable = [
  [1, 3, 6, 4, 10],
  [3, 4, 5, 2, 20],
  [4, 4, 2, 1, 10],
  [6, 4, 2, 4, 10],
  [20, 20, 1, 9, 50]
];

tP.create(exampleDataTable);
```

## Possible usage

There is two possible ways to use this program:

1. One method to get solution

```javascript
const solution = tp.solution();
// solution = [
//  [10,   null, null],
//  [null, 10,   null],
//  [null, null, 10  ]
//];
```

2. The second way is to use the step by step method so that you can study how the minimum transport cost is calculated

```javascript
const nextStep = tp.nextStep();

// nextStep = {
//  data: [],
//  caseIndex = number,
//  desc =String a brief description of what was calculated in this step
// }
```

### This is my first atempt to implement mathematical algorythm in JavaScript so, if You find any bug fell free to send me a message i will try to correct them.

## [Github Repository ](https://github.com/AdamKrowka/-transportation-problem-solver)

---
_Source: https://npm.io/package/transportation-problem-solver · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
