You are here: Symbol Reference > Optimization Namespace > Functions > Optimization.SimplexDual Function
MtxVec VCL
ContentsIndex
Example

Solve linear programming problem with 3 equations and 4 positive constraints.

Uses Optimization, MtxExpr, Math387; procedure Example var A,Af: Matrix; b,c,x,indexes: Vector; f: double; sol: TLPSolution; begin A.SetIt(3,4,false,[2,1,5,0,1,2,3,0,1,1,1,1]); b.SetIt(false,[20,25,10]); c.SetIt(false,[1,2,3,-1]); // Find maximum using above system f := SimplexDual(A,b,c,Af,x,indexes,sol,false,nil); end;
#include "MtxExpr.hpp" #include "Math387.hpp" #include "Optimization.hpp" void __fastcall Example; { sMatrix A,Af; sVector b,c,x,indexes; TLPSolution sol; A.SetIt(3,4,false, OPENARRAY(double,(2,1,5,0,1,2,3,0,1,1,1,1))); b.SetIt(OPENARRAY(double,(20,25,10))); c.SetIt(OPENARRAY(double,(1,2,3,-1))); // Find maximum using above system double f = SimplexDual(A,b,c,Af,x,indexes,sol, false, NULL); }
Copyright (c) 1999-2025 by Dew Research. All rights reserved.