Softanza
StartFrançais
Softanza
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 management
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 page
no extension
addIntegerVariable
variables management
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 page
no extension
addBinaryVariable
variables management
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 page
no extension
variables
variables management
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 page
no extension
variableNames
variables managementno extension
addConstraint
constraints managementno extension
constraints
constraints managementno extension
maximize
objective functionno extension
minimize
objective functionno extension
objective
objective function
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*y
composed from the signature, run for this page
no extension
objectiveType
objective function
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()
#--> maximize
composed from the signature, run for this page
no extension
solve
solving
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()
#--> optimal
composed from the signature, run for this page
no extension
solveWithGreedy
built-in solvers
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 page
no extension
solveWithSimplex
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 methods
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")
#--> 0
composed from the signature, run for this page
no extension
EvaluateSolution
(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 methods
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())
#--> 0
composed from the signature, run for this page
no extension
IsFeasible
(no comment in the source: the name reads as a sentence) is feasiblein the section solver helper methods
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())
#--> 1
composed from the signature, run for this page
no extension
EvaluateConstraintLeft
(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 access
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 page
no extension
solutionValue
solution access
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")
#--> 0
composed from the signature, run for this page
no extension
objectiveValue
solution accessno extension
evaluateExpression
solution accessno extension
status
solution access
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()
#--> optimal
composed from the signature, run for this page
no extension
iterations
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 methods
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()
#--> 1
composed from the signature, run for this page
no extension