class TMtxLP : public 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 TMtxLP::Minimize property to minimize or maximize objective function f(x).
- By setting TMtxLP::Algorithm select which algorithm will be used to solve LP problem.
- Define TMtxLP::A, TMtxLP::b, TMtxLP::c and optionaly TMtxLP::Relations , keeping in mind correct size of matrix, vectors and string.
- Call the TMtxLP::Recalculate method to solve LP problem.
The results of solving LP are returned as:
- Final tableaux TMtxLP::AFinal,
- Legitimate variables, stored in vector TMtxLP::x,
- Indexes of legitimate variables, stored in vector TMtxLP::Indexes IValues,
- Solution type, stored in TMtxLP::SolutionType,
- Objective function TMtxLP::z, evaluated at minimum or maximum.
Constructors
| Name | Description |
|---|---|
| TMtxLP (2) |
Destructors
| Name | Description |
|---|---|
| ~TMtxLP |
Properties
| Name | Type | Description |
|---|---|---|
| A | TMtx* | Defines A in A*x <= b equation. |
| AFinal | TMtx* | Final tableaux. |
| Algorithm | TLPAlgorithm | Defines LP solving algorithm. |
| AutoUpdate | bool | |
| b | TVec* | Defines b in A*x <= b equation. |
| BlockAssign | bool | Block streaming of specific properties when storing only a "template". |
| c | TVec* | Defines c in f=c(T)*x equation. |
| Dirty | bool | Becomes true, after any property has changed. |
| EditorActive | bool | Returns True, if the component editor is displayed. |
| Indexes | TVecInt* | Returns indices (stored in IValues) of basic variables in final tableaux. |
| Minimize | bool | Find minimum or maximum of objective function. |
| Name | DewString | |
| Reference | TReferenceList* | Stores a list of components that have to be notified, when this component is destroyed. |
| Relations | DewString | Defines relations for two phase algorithm. |
| SolutionType | TLPSolution | LP solution type. |
| Verbose | tStrings* | Log optimization algorithm calculation. |
| x | TVec* | Values of the legitimate variables. |
| z | double | Value of the objective function. |
Methods
| Name | Description |
|---|---|
| AllowStreaming | Returns the negatated value of BlockAssign. |
| Assign | Assign values of all published properties from Source. |
| AssignTemplate | Assign values of "template-like" published properties from Source. |
| CheckDimensions | Checks A,b,c and relations dimensions. |
| EditorClass | |
| LoadFromStream | Load the component from Src stream. |
| LoadTemplateFromFile | Load a template from file. |
| LoadTemplateFromStream | Load a template from stream. |
| Recalculate | Triggers TMtxLP recalculation. |
| ReferenceRemoved | |
| Reset | Reset is called after loading the data from stream or file. |
| SaveTemplateToFile | Save template to file. |
| SaveTemplateToStream | Save template to stream. |
| SaveToStream | Save the component to Dst stream. |
| SetA | |
| Setb | |
| Setc |
Fields
| Name | Type | Description |
|---|---|---|
| Tag | intptr_t |