GIPALS32 is a linear programming library provided as a Win32 Dynamic Link Library (DLL). The library is a further development of our successful linear programming environment GIPALS. The maximum size of linear program depends of the license type and can be either Unlimited (Large license) or 15,000 (Normal license) variables and constraints.
GIPALS32 provides an easy and powerful way to solve any kind of liner programs within the user's application. The library can be used in different programming tools such as Microsoft Visual C++, Microsoft Visual Basic, Borland Delphi and others.
There are several examples are provided along with the headers files to demonstrate and simplify the usage of the library.
There are two possible ways to work with the library:
The typical scenario to construct a linear program is the following:
Note. Functions SetVariableCount, SetVariable, AddVariable, SetConstraintCount, SetConstraint, AddConstraint, SetConstraintElement, DirectSelectConstraint and DirectAddConstraintElement return 0 if the number of variables or constraints exceeded the maximum.
After a linear program (LP) is specified or imported from MPS file it is ready for the calculation. There is the function Calculate that performs the following steps:
The Calculate function returns the status of the calculation: positive results indicate successful run, negative - unsuccessful. Zero indicates the calculation has not been provided yet. The only parameter specified for the function is a pointer on a callback function which can control the calculation by returning an appropriate value (res_Abort, res_None or res_Stop). The parameters for callback function are number of the current iteration, primal and dual objective function values and infeasibilities and optimality.
After the calculation is done the results are available. Two functions are provided to get the primal and dual objective functions: PrimalObjective and DualObjective.
The function PrimalValue returns the values of the decision (primal) variables X. The function DualValue returns the values of the dual variables (each dual variable associated with one constraint).
There are several routines to setup the behavior of the calculation engine. They are provided for advanced users and can be used to account some features of the specified linear program.
The routine SetPreprocessor turns the preprocessing On/Off by the combination of the preprocessor flags. The call SetPreprocessor(prep_Disable) turns preprocessing off.
The routine SetTolerances specifies the primal, dual and optimality tolerances for the calculation.
The routine SetMaxIterationCount setups the limit of the iterations (default is 100).
The routine SetScaling takes the parameter 0 or 1 to disable (0) or enable (1) the LP scaling. By default scaling is enabled.
The routine SetRefinement takes the parameter 0 or 1 to disable (0) or enable (1) the iterative refinement of the solution at each iteration. By default refinement is enabled.
The routine SetGondzio takes the parameter 0 or 1 to disable (0) or enable (1) to use high order Gondzio correction to improve the solution quality and reduce the iterations number.