Creation of LP objects
- LPProcess(R, n): Rng, RngIntElt -> LP
A Linear Program over the ring \(R\) in \(n\) variables.
An LP object is a mutable process. Assignment, for example
M := L, makes both names refer to the same process. Changes made through either name are visible through the other. UseCopy(L)to obtain an independent process before changing it.
- Copy(L): LP -> LP
An independent copy of the linear program \(L\), preserving its constraints, objective function, bounds, integer-variable flags, optimisation direction, and coefficient and solution rings. Subsequent changes to either process leave the other unchanged.
- Example: Creating an LP Object (ex-a6b954)
We create an LP representing a problem in 2 real variables:
> R := RealField( ); > L := LPProcess(R, 2); > L; LP <Real Field, 2 variables> Minimising objective function: [0 0] Subject to constraints: Variables bounded above by: [ ] Variables bounded below by: [ ] Solving in integers for variables [ ]