category

linear_programming_common

Shared immutable model construction, validation, matrix conversion, result inspection, and printing for linear-programming solvers.

Availability:
logtalk_load(linear_programming(loader))
Author: Paulo Moura
Version: 1:0:0
Date: 2026-09-03
Compilation flags:
static
Implements:
Extends:
public options
Uses:
Remarks:
(none)

Public predicates

(no local declarations; see entity ancestors if any)

Protected predicates

check_problem/1

Checks that the argument is a structurally valid linear-program problem.

Compilation flags:
static
Template:
check_problem(Problem)
Mode and number of proofs:
check_problem(@term) - one_or_error
Exceptions:
Problem is a variable:
instantiation_error
Problem is not a linear-program problem:
type_error(linear_program,Problem)

check_result/1

Checks that the argument is a structurally valid linear-programming result.

Compilation flags:
static
Template:
check_result(Result)
Mode and number of proofs:
check_result(@term) - one_or_error
Exceptions:
Result is a variable:
instantiation_error
Result is not a linear-programming result:
type_error(linear_programming_result,Result)

relax_problem/2

Returns the continuous relaxation of a validated linear-program problem.

Compilation flags:
static
Template:
relax_problem(Problem,Relaxation)
Mode and number of proofs:
relax_problem(+compound,-compound) - one

discrete_variables/2

Returns the integer and binary variable declarations of a validated linear-program problem in declaration order.

Compilation flags:
static
Template:
discrete_variables(Problem,Variables)
Mode and number of proofs:
discrete_variables(+compound,-list(compound)) - one

tighten_variable_bounds/5

Returns a copy of a validated problem with the named variable bounds tightened to the given finite bounds.

Compilation flags:
static
Template:
tighten_variable_bounds(Name,Lower,Upper,Problem0,Problem)
Mode and number of proofs:
tighten_variable_bounds(+term,+number,+number,+compound,-compound) - one_or_error
Exceptions:
An argument is insufficiently instantiated:
instantiation_error
Problem0 is not a linear-program problem:
type_error(linear_program,Problem0)
Name is not a declared variable:
domain_error(linear_programming_variable,Name)
The bounds are invalid, inconsistent, or weaken the current bounds:
domain_error(linear_programming_bounds,Lower-Upper)

Private predicates

(no local declarations; see entity ancestors if any)

Operators

(none)