get_scalemode
Specifies which scaling algorithm is used.
short get_scalemode(lprec *lp);
Return Value
get_scalemode returns which scaling algorithm is used. Can by any of the
following values:
MMSCALING (0) 
numerical rangebased scaling 
GEOSCALING (1) 
geometric mean scaling 
CURTISREIDSCALE (4) 
CurtisReid scaling 
Additionally, the value can be ORed with any combination of one of the
following values:
POWERSCALE (2) 
also do Lagrange scaling 
LAGRANGESCALE (8) 
also do Lagrange scaling 
INTEGERSCALE (16) 
also do Integer scaling 
Parameters
lp
Pointer to previously created lp model. See return value of
make_lp, copy_lp, read_lp,
read_lp_file, read_LP, read_mps, read_MPS
Remarks
The get_scalemode function returns which scaling algorithm is
used. This can influence numerical stability considerably. It is advisable to
always use some sort of scaling.
The default is MMSCALING (0). However, scaling is only applied when
auto_scale is explicitly called. set_scalemode must be called
before auto_scale is called if another scalemode
is required.
MMSCALING, GEOSCALING, CURTISREIDSCALE are the possible scaling algorithms.
POWERSCALE, LAGRANGESCALE, INTEGERSCALE are possible additional scaling
parameters.
POWERSCALE results in creating a scalar of power 2. May improve stability.
LAGRANGESCALE results also in scaling Lagrange columns. Default they are not
scaled.
INTEGERSCALE results also in scaling Integer columns. Default they are not
scaled.
Example
#include <stdio.h>
#include <stdlib.h>
#include "lpkit.h"
int main(void)
{
lprec *lp;
short scalemode;
/* Create a new LP model */
lp = make_lp(0, 0);
if(lp == NULL) {
fprintf(stderr, "Unable to create new LP model\n");
return(1);
}
scalemode = get_scalemode(lp); /* Will return 0 */
delete_lp(lp);
return(0);
}
lp_solve API reference
See Also make_lp, copy_lp,
read_lp, read_lp_file, read_LP, read_mps,
read_MPS, set_scalemode,
auto_scale
