TMtxLP Class

Source: MtxVecTools.cs · Assembly: Dew.Math
ComponentTMtxComponentTMtxLP

public class TMtxLP : TMtxComponent

Interfaces Linear Programming algorithms.

The component can be used to solve several linear programming problems.

How to use TMtxLP component?

  • Drop a TMtxLP component on the form.
  • Set the Dew.Math.TMtxLP.Minimize property to minimize or maximize objective function f(x).
  • By setting Dew.Math.TMtxLP.Algorithm select which algorithm will be used to solve LP problem.
  • Define Dew.Math.TMtxLP.A, Dew.Math.TMtxLP.b, Dew.Math.TMtxLP.c and optionaly Dew.Math.TMtxLP.Relations , keeping in mind correct size of matrix, vectors and string.
  • Call the Dew.Math.TMtxLP.Recalculate method to solve LP problem.

The results of solving LP are returned as:

  • Final tableaux Dew.Math.TMtxLP.AFinal,
  • Legitimate variables, stored in vector Dew.Math.TMtxLP.x,
  • Indexes of legitimate variables, stored in vector Dew.Math.TMtxLP.Indexes IValues,
  • Solution type, stored in Dew.Math.TMtxLP.SolutionType,
  • Objective function Dew.Math.TMtxLP.z, evaluated at minimum or maximum.

Properties

NameTypeDescription
ATMtxDefines A in A*x <= b equation.
AFinalTMtxFinal tableaux.
AlgorithmTLPAlgorithmDefines LP solving algorithm.
bTVecDefines b in A*x <= b equation.
BlockAssignBooleanBlock streaming of specific properties when storing only a "template".
cTVecDefines c in f=c(T)*x equation.
DirtyBooleanBecomes true, after any property has changed.
EditorActiveBooleanReturns True, if the component editor is displayed.
IndexesTVecIntReturns indices (stored in IValues) of basic variables in final tableaux.
MinimizeBooleanFind minimum or maximum of objective function.
ReferenceTReferenceListStores a list of components that have to be notified, when this component is destroyed.
RelationsStringDefines relations for two phase algorithm.
SolutionTypeTLPSolutionLP solution type.
VerboseTStringsLog optimization algorithm calculation.
xTVecValues of the legitimate variables.
zDoubleValue of the objective function.

Methods

NameDescription
AllowStreamingReturns the negatated value of BlockAssign.
AssignAssign values of all published properties from Source.
AssignTemplateAssign values of "template-like" published properties from Source.
CheckDimensionsChecks A,b,c and relations dimensions.
EditorClassTo be overriden in descendanr classses.
LoadFromStreamLoad the component from Src stream.
LoadTemplateFromFileLoad a template from file.
LoadTemplateFromStreamLoad a template from stream.
RecalculateTriggers TMtxLP recalculation.
ResetReset is called after loading the data from stream or file.
SaveTemplateToFileSave template to file.
SaveTemplateToStreamSave template to stream.
SaveToStreamSave the component to Dst stream.