dbgroup-at-ucsc / dbtune

This research project aims to develop tools in order to make index tuning easier and more effective.
http://users.soe.ucsc.edu/~alkis/tuning/
Other
5 stars 3 forks source link

Error with handling binary variables by CPLEX solver #281

Closed tqtrung closed 12 years ago

tqtrung commented 12 years ago

Although we declare variables as boolean (i.e., the domain is either 0 or 1), CPLEX solver sometimes assigns these variables with values very small and close to 0 (e.g., 3.5976098620712736E-12).

The current work-around is to round the value that is very close to 0 by the value 0.

npolyzotis commented 12 years ago

Trung,

What exactly does this issue affect wrt our work?

Cheers,

Alkis

On Apr 24, 2012, at 8:29 PM, tqtrung wrote:

Although we declare variables as boolean (i.e., the domain is either 0 or 1), CPLEX solver sometimes assigns these variables with values very small and close to 0 (e.g., 3.5976098620712736E-12).

The current work-around is to round the value that is very close to 0 by the value 0.


Reply to this email directly or view it on GitHub: https://github.com/dbgroup-at-ucsc/dbtune/issues/281

tqtrung commented 12 years ago

In one experiment of divergent, this issue makes the query execution cost (computed based on the result of CPLEX solver) is very small (e.g., in the order of 10^-7), and thus makes the imbalance query factor very large (e.g., 10^9). The reason is because other query execution is in the order of, for example, 10^2. It takes me some time to debug this issue.

The way to work-around is when the query execution cost (computed based on the value of variables y and x) is very small (less than 0.001), I round it to 0.

Another comment: we can compute the query execution cost using INUM. However, it makes thing quite messy when we need to handle the factor and the weight of the statement again (in the formula of replica). Thus, the way I approach is to use the cost formula formulated in BIP, and evaluate this formula using the assigned values for variables (y, x) by CPLEX solver. This functionality has been tested and passed when we allow the difference between this computed cost and the cost returned by INUM less then some small tolerance due to the approximation of double value (say 1.0).

Trung

On Tue, Apr 24, 2012 at 10:49 PM, Neoklis Polyzotis < reply@reply.github.com

wrote:

Trung,

What exactly does this issue affect wrt our work?

Cheers,

Alkis

On Apr 24, 2012, at 8:29 PM, tqtrung wrote:

Although we declare variables as boolean (i.e., the domain is either 0 or 1), CPLEX solver sometimes assigns these variables with values very small and close to 0 (e.g., 3.5976098620712736E-12).

The current work-around is to round the value that is very close to 0 by the value 0.


Reply to this email directly or view it on GitHub: https://github.com/dbgroup-at-ucsc/dbtune/issues/281


Reply to this email directly or view it on GitHub: https://github.com/dbgroup-at-ucsc/dbtune/issues/281#issuecomment-5324797