soarlab/gelpia

Unused variables

Closed this issue · 1 comments

We currently use all given input variables whether or not they appear in the cost function. This causes wasted search time.

The query

var:
[4.0, 6.3504] x1;
[4.0, 6.3504] x2;
[4.0, 6.3504] x3;
[-40000, 40000] unused;

cost:
atan(x2*x3 / sqrt(4 * x1));

Runs giving

./bin/dop_gelpia unused.dop
[[1.4719316334589239, 1.471931994344534], {'unused': [-0.125, 2.225073858507202e-308], 'x3': [6.2035, 6.350400000000001], 'x2': [6.2035, 6.350400000000001], 'x1': [4, 4.073450000000001]}]
Parsing time: 0.0024487972259521484
Solver time: 10.822314977645874

If the unused variable is removed it runs giving

./bin/dop_gelpia used.dop
[[1.4710343816861349, 1.471931994344534], {'x2': [6.2035, 6.350400000000001], 'x3': [6.2035, 6.350400000000001], 'x1': [4, 4.073450000000001]}]
Parsing time: 0.0023336410522460938
Solver time: 0.10143351554870605

Once FPTaylorCompat becomes master, this issue will be automatically closed. I'm closing it now regardless.