The library documents itself · Statistics & data-viz
stzLinearSolver
55 own methods · 0 forms written with extensions, listed under their method
the source: base/stats/stzLinearSolver.ring(opens in a new tab) · All classes · The area reference: Statistics & data-viz
Under each method, its extensions (Q CS XT Z ZZ IB W U): bold and ticked, it exists; struck, it does not. The extensions and what they mean
Examples: 0 come from the library's tests; 15 were composed from each method's signature and run for this page, on a fresh object, for example o1 = new stzLinearSolver() o1.AddIntegerVariable("x", 0, 100) o1.AddIntegerVariable("y", 0, 100) o1.AddConstraint("2*x + y", "<=", 100) o1.Maximize("3*x + 2*y"). 40 methods have none yet. Examples run on 2026-10-04 07:31 inside the library at commit 0e72e2e2c.
Method
Explanation, as the source carries it
init
(no comment in the source: the name reads as a sentence) initno extension
clear
(no comment in the source: the name reads as a sentence) clearno extension
addVariable
variables managementno extension
composed example
o1 = new stzLinearSolver()
o1.AddIntegerVariable("x", 0, 100)
o1.AddIntegerVariable("y", 0, 100)
o1.AddConstraint("2*x + y", "<=", 100)
o1.Maximize("3*x + 2*y")
o1.addVariable("z", 0, 50)
? @@( o1.variableNames() )
#--> [ "x", "y", "z" ]composed from the signature, run for this pageaddIntegerVariable
variables managementno extension
composed example
o1 = new stzLinearSolver()
o1.AddIntegerVariable("x", 0, 100)
o1.AddIntegerVariable("y", 0, 100)
o1.AddConstraint("2*x + y", "<=", 100)
o1.Maximize("3*x + 2*y")
o1.addIntegerVariable("z", 0, 50)
? @@( o1.variableNames() )
#--> [ "x", "y", "z" ]composed from the signature, run for this pageaddBinaryVariable
variables managementno extension
composed example
o1 = new stzLinearSolver()
o1.AddIntegerVariable("x", 0, 100)
o1.AddIntegerVariable("y", 0, 100)
o1.AddConstraint("2*x + y", "<=", 100)
o1.Maximize("3*x + 2*y")
o1.addBinaryVariable("z")
? @@( o1.variableNames() )
#--> [ "x", "y", "z" ]composed from the signature, run for this pagevariables
variables managementno extension
composed example
o1 = new stzLinearSolver()
o1.AddIntegerVariable("x", 0, 100)
o1.AddIntegerVariable("y", 0, 100)
o1.AddConstraint("2*x + y", "<=", 100)
o1.Maximize("3*x + 2*y")
? @@( o1.variables() )
#--> [ [ [ "name", "x" ], [ "lowerbound", 0 ], [ "upperbound", 100 ], [ "type", "integer" ] ], [ [ "name", "y" ], [ "lowerbound", 0 ], [ "upperbound", 100 ], [ "type", "integer" ] ] ]composed from the signature, run for this pagevariableNames
variables managementno extension
addConstraint
constraints managementno extension
constraints
constraints managementno extension
maximize
objective functionno extension
minimize
objective functionno extension
objective
objective functionno extension
composed example
o1 = new stzLinearSolver()
o1.AddIntegerVariable("x", 0, 100)
o1.AddIntegerVariable("y", 0, 100)
o1.AddConstraint("2*x + y", "<=", 100)
o1.Maximize("3*x + 2*y")
? o1.objective()
#--> 3*x + 2*ycomposed from the signature, run for this pageobjectiveType
objective functionno extension
composed example
o1 = new stzLinearSolver()
o1.AddIntegerVariable("x", 0, 100)
o1.AddIntegerVariable("y", 0, 100)
o1.AddConstraint("2*x + y", "<=", 100)
o1.Maximize("3*x + 2*y")
? o1.objectiveType()
#--> maximizecomposed from the signature, run for this pagesolve
solvingno extension
composed example
o1 = new stzLinearSolver()
o1.AddIntegerVariable("x", 0, 100)
o1.AddIntegerVariable("y", 0, 100)
o1.AddConstraint("2*x + y", "<=", 100)
o1.Maximize("3*x + 2*y")
o1.Solve("greedy")
? o1.Status()
#--> optimalcomposed from the signature, run for this pagesolveWithGreedy
built-in solversno extension
composed example
o1 = new stzLinearSolver()
o1.AddIntegerVariable("x", 0, 100)
o1.AddIntegerVariable("y", 0, 100)
o1.AddConstraint("2*x + y", "<=", 100)
o1.Maximize("3*x + 2*y")
? @@( o1.solveWithGreedy() )
#--> [ [ "x", 0 ], [ "y", 100 ] ]composed from the signature, run for this pagesolveWithSimplex
built-in solversno extension
solveWithBranchAndBound
built-in solversno extension
solveWithGenetic
built-in solversno extension
parseObjectiveCoefficients
(no comment in the source: the name reads as a sentence) parse objective coefficientsin the section solver helper methodsno extension
extractCoefficient
(no comment in the source: the name reads as a sentence) extract coefficientin the section solver helper methodsno extension
calculateResourceCost
(no comment in the source: the name reads as a sentence) calculate resource costin the section solver helper methodsno extension
CalculateMaxPossibleValue
(no comment in the source: the name reads as a sentence) calculate max possible valuein the section solver helper methodsno extension
GetSolutionValue
(no comment in the source: the name reads as a sentence) get solution valuein the section solver helper methodsno extension
composed example
o1 = new stzLinearSolver()
o1.AddIntegerVariable("x", 0, 100)
o1.AddIntegerVariable("y", 0, 100)
o1.AddConstraint("2*x + y", "<=", 100)
o1.Maximize("3*x + 2*y")
o1.Solve("greedy")
? o1.GetSolutionValue(o1.Solution(), "x")
#--> 0composed from the signature, run for this pageEvaluateSolution
(no comment in the source: the name reads as a sentence) evaluate solutionin the section solver helper methodsno extension
isBetter
(no comment in the source: the name reads as a sentence) is betterin the section solver helper methodsno extension
BuildSimplexTableau
(no comment in the source: the name reads as a sentence) build simplex tableauin the section solver helper methodsno extension
HasNegativeCoefficient
(no comment in the source: the name reads as a sentence) has negative coefficientin the section solver helper methodsno extension
FindPivotColumn
(no comment in the source: the name reads as a sentence) find pivot columnin the section solver helper methodsno extension
FindPivotRow
(no comment in the source: the name reads as a sentence) find pivot rowin the section solver helper methodsno extension
PivotTableau
(no comment in the source: the name reads as a sentence) pivot tableauin the section solver helper methodsno extension
ExtractSimplexSolution
(no comment in the source: the name reads as a sentence) extract simplex solutionin the section solver helper methodsno extension
CreateRelaxedProblem
(no comment in the source: the name reads as a sentence) create relaxed problemin the section solver helper methodsno extension
isIntegerSolution
(no comment in the source: the name reads as a sentence) is integer solutionin the section solver helper methodsno extension
composed example
o1 = new stzLinearSolver()
o1.AddIntegerVariable("x", 0, 100)
o1.AddIntegerVariable("y", 0, 100)
o1.AddConstraint("2*x + y", "<=", 100)
o1.Maximize("3*x + 2*y")
o1.Solve("greedy")
? o1.isIntegerSolution(o1.Solution())
#--> 0composed from the signature, run for this pageIsFeasible
(no comment in the source: the name reads as a sentence) is feasiblein the section solver helper methodsno extension
composed example
o1 = new stzLinearSolver()
o1.AddIntegerVariable("x", 0, 100)
o1.AddIntegerVariable("y", 0, 100)
o1.AddConstraint("2*x + y", "<=", 100)
o1.Maximize("3*x + 2*y")
o1.Solve("greedy")
? o1.IsFeasible(o1.Solution())
#--> 1composed from the signature, run for this pageEvaluateConstraintLeft
(no comment in the source: the name reads as a sentence) evaluate constraint leftin the section solver helper methodsno extension
FindFractionalVariable
(no comment in the source: the name reads as a sentence) find fractional variablein the section solver helper methodsno extension
AddBranchConstraint
(no comment in the source: the name reads as a sentence) add branch constraintin the section solver helper methodsno extension
InitializePopulation
(no comment in the source: the name reads as a sentence) initialize populationin the section solver helper methodsno extension
CalculateFitness
(no comment in the source: the name reads as a sentence) calculate fitnessin the section solver helper methodsno extension
CalculatePenalty
(no comment in the source: the name reads as a sentence) calculate penaltyin the section solver helper methodsno extension
TournamentSelection
(no comment in the source: the name reads as a sentence) tournament selectionin the section solver helper methodsno extension
Crossover
(no comment in the source: the name reads as a sentence) crossoverin the section solver helper methodsno extension
Mutate
(no comment in the source: the name reads as a sentence) mutatein the section solver helper methodsno extension
Solution
solution accessno extension
composed example
o1 = new stzLinearSolver()
o1.AddIntegerVariable("x", 0, 100)
o1.AddIntegerVariable("y", 0, 100)
o1.AddConstraint("2*x + y", "<=", 100)
o1.Maximize("3*x + 2*y")
o1.Solve("greedy")
? @@( o1.Solution() )
#--> [ [ "x", 0 ], [ "y", 100 ] ]composed from the signature, run for this pagesolutionValue
solution accessno extension
composed example
o1 = new stzLinearSolver()
o1.AddIntegerVariable("x", 0, 100)
o1.AddIntegerVariable("y", 0, 100)
o1.AddConstraint("2*x + y", "<=", 100)
o1.Maximize("3*x + 2*y")
o1.Solve("greedy")
? o1.SolutionValue("x")
#--> 0composed from the signature, run for this pageobjectiveValue
solution accessno extension
evaluateExpression
solution accessno extension
status
solution accessno extension
composed example
o1 = new stzLinearSolver()
o1.AddIntegerVariable("x", 0, 100)
o1.AddIntegerVariable("y", 0, 100)
o1.AddConstraint("2*x + y", "<=", 100)
o1.Maximize("3*x + 2*y")
o1.Solve("greedy")
? o1.Status()
#--> optimalcomposed from the signature, run for this pageiterations
solution accessno extension
solveTime
solution accessno extension
show
display and reportingno extension
exportToCSV
display and reportingno extension
exportReport
display and reportingno extension
isValidVariableName
helper methodsno extension
validateProblem
helper methodsno extension
composed example
o1 = new stzLinearSolver()
o1.AddIntegerVariable("x", 0, 100)
o1.AddIntegerVariable("y", 0, 100)
o1.AddConstraint("2*x + y", "<=", 100)
o1.Maximize("3*x + 2*y")
? o1.validateProblem()
#--> 1composed from the signature, run for this page
