.. index:: single: successive_shortest_paths(Dictionary)
.. _successive_shortest_paths/1:

.. rst-class:: right

**object**

``successive_shortest_paths(Dictionary)``
=========================================

* ``Dictionary`` - Dictionary object used by the flow network (e.g., ``avltree``).


Minimum cost flow using the successive shortest paths algorithm with node potentials (reduced costs), where each shortest path is found using Dijkstra algorithm and a binary heap. Arcs with negative cost are saturated beforehand so that all residual costs are non-negative, which also handles negative cost cycles. Supplies and demands are routed from a super source to a super sink. Integer capacities and costs only.

| **Availability:** 
|    ``logtalk_load(flow_networks(loader))``

| **Author:** Paulo Moura
| **Version:** 1:0:0
| **Date:** 2026-11-16

| **Compilation flags:**
|    ``static, context_switching_calls``


| **Implements:**
|    ``public`` :ref:`min_cost_flow_protocol <min_cost_flow_protocol/0>`
| **Imports:**
|    ``public`` :ref:`flow_support(Dictionary) <flow_support/1>`
| **Uses:**
|    :ref:`binary_heap_min <binary_heap_min/0>`
|    :ref:`dinic(Dictionary) <dinic/1>`
|    :ref:`flow_network(Dictionary) <flow_network/1>`
|    :ref:`type <type/0>`

| **Remarks:**
|    (none)

| **Inherited public predicates:**
|     :ref:`min_cost_flow_protocol/0::min_cost_flow/4`  :ref:`min_cost_flow_protocol/0::min_cost_flow/5`  :ref:`min_cost_flow_protocol/0::min_cost_max_flow/6`  :ref:`min_cost_flow_protocol/0::min_cost_max_flow/7`  

.. contents::
   :local:
   :backlinks: top

Public predicates
-----------------

(no local declarations; see entity ancestors if any)

Protected predicates
--------------------

(no local declarations; see entity ancestors if any)

Private predicates
------------------

(no local declarations; see entity ancestors if any)

Operators
---------

(none)

.. seealso::

   :ref:`dinic(Dictionary) <dinic/1>`, :ref:`flow_network(Dictionary) <flow_network/1>`, :ref:`successive_shortest_paths <successive_shortest_paths/0>`

