# callrelax: Solve Network Flow Problem using RELAX-IV Algorithm In rcbsubset: Optimal Subset Matching with Refined Covariate Balance

## Description

An rcbalance method not meant to be called directly by users. Solves network flow optimization problems by calling the RELAX-IV algorithm, as implemented in FORTRAN by Dimitri Bertsekas and Paul Tseng.

IMPORTANT NOTE 1: the RELAX-IV code is not contained in this R package due to software license issues. Users can only access it by loading the `optmatch` package (>= 0.9-1) and accepting its license. The reference below gives background on `optmatch`.

## Usage

 `1` ```callrelax(net) ```

## Arguments

 `net` a network flow problem, formatted as a list with the following arguments (where the network contains nnode nodes, numbered 1 through nnode and narc arcs): startn: a vector of length narc containing the node numbers of the start nodes of each arc in the network. endn: a vector of length narc containing the node numbers of the end nodes of each arc in the network. ucap: a vector of length narc containing the (integer) upper capacity of each arc in the network. cost: a vector of length narc containing the (integer) cost of each arc in the network. b: a vector of length nnode containing the (integer) supply or demand of each node in the network. Supplies are given as positive numbers and demands as negative numbers.

## Value

A list with the following elements:

 `crash` an integer, equal to zero if the algorithm ran correctly and equal to 1 if it crashed. `feasible` an integer, equal to zero if the problem is infeasible and equal to 1 if it is feasible. `x` a vector equal in length to the number of arcs in argument problem net, giving in each coordinate the number of units of flow passing across the corresponding edge in the optimal network flow.

## Author(s)

Samuel D. Pimentel

## References

Hansen, B.B. and Klopfer, S.O. (2006) Optimal full matching and related designs via network flows, JCGS 15 609-627.

rcbsubset documentation built on Nov. 9, 2021, 1:06 a.m.