Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function: Use BitSet for used_vars #38

Closed
gchabert opened this issue Aug 19, 2014 · 1 comment
Closed

Function: Use BitSet for used_vars #38

gchabert opened this issue Aug 19, 2014 · 1 comment
Assignees
Labels

Comments

@gchabert
Copy link
Contributor

No description provided.

@gchabert gchabert added the todo label Aug 19, 2014
@gchabert gchabert self-assigned this Aug 19, 2014
gchabert pushed a commit that referenced this issue Jul 29, 2018
@gchabert gchabert closed this as completed Oct 3, 2018
@gchabert
Copy link
Contributor Author

Unfortunately this has introduced a loss of efficiency.

Between commit da73630 and commit 6feec93, we see more than 10% loss. This has been tested on Bertrand's optimizer04 as follows:

./optimizer04 ../plugins/optim/benchs/coconutbenchmark-library2/hs099.nl acidhc4 compo lsmearmg bs 1 1.e-7 1.e-6 7200 1

with the initial domain restricted as follows

double _sol[]={0.541993 , 0.530903 , 0.508103 , 0.480116 , 0.451103 , 0.409231 , 0.35281 , -1939.93 , -7908.68 , -18412.6 , -20003.9 , -17422.7 , 
20342.1 , -155.195 , -322.304 , -97.854 , 34.2024 , 69.0438 , 770.176 };
Vector sol(19,_sol);
sys->box = sol + Interval(-1,1)*abs(sol);

Output is:

 best bound in: [-831080315.4147157,-831079484.3352315]
 relative precision obtained on objective function: 9.999999998665447e-07  [passed]
 absolute precision obtained on objective function: 831.0794842243195  [failed]
 best feasible point: (0.5412766277476286 ; 0.5294559925796978 ; 0.5088739226806065 ; 0.4805469809611225 ; 0.4499308972695276 ; 0.4097497484257161 ; 0.3525770351404032 ; -1949.522701654927 ; -7956.944777032146 ; -18514.08979270156 ; -20059.50647496983 ; -17495.46201687364 ; 20253.57237668331 ; -155.9618161241145 ; -324.6319498977834 ; -97.65385072035226 ; 35.83718343826147 ; 66.72459489422636 ; 772.1428360825062)
 number of cells: 2054

Time with da73630 is around 21.3s.
Time with 6feec93 is around 19.3s.

The new version however makes use of vector instead of raw arrays.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant