find_feasible: Find a feasible solution for a set of linear constraints

Description Usage Arguments Value Examples

View source: R/method_colwiseinverse.R

Description

Find a feasible solution for a set of linear constraints

Usage

1
find_feasible(B, col, gamma, m0 = rep(0, ncol(B)), max_it = 10000, tol = 1e-14)

Arguments

B

Matrix coding for a set of linear constraints

col

The column number.

gamma

Numeric. Non-negative

m0

Startup column.

max_it

Integer. Maximum number of iterations.

tol

Tolerance allowed for the constraints (mostly used to avoid floating point errors)

Value

A feasible point

Examples

1
2
3
4
5
6
7
8
B <- diag(1, 3)
find_feasible(B, 1, 0) ## c(1, 0, 0)
find_feasible(B, 1, 0.5) ## c(0.5, 0, 0)
B <- matrix(c(1, 1, 0, 0), 2)
## Not run: 
find_feasible(B, 1, gamma = 0.4) ## No solution for gamma lower than 0.5
## End(Not run)
find_feasible(B, 1, gamma = 0.6) ## Plenty of solutions for gamma higher than 0.5

abichat/zazou documentation built on Sept. 8, 2021, 6:53 a.m.