dwavesystems / dwavesystems/dimod

fix_variables optimised for fixing large numbers of variables

Open
#1,317 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
143
Forks
91
Avg merge
1h 24m
Merged PRs (30d)
3

Description

**Application**
We should implement a variant of fix_variables that is optimised for fixing a large number of variables. The current implementation iterates over the variables to be fixed first, then finds the constraints the current variable participates in and fixes it in those constraints. This is good for fixing a small number of variables that contribute to a small number of constraints, but inefficient on large number of variables.

It does not complete overnight whe used to extract a solver sized subproblems from a problem 10x the solver limit

**Proposed Solution**
When fixing many/most of the variables of a large model, we want to iterate over all constraints directly and fix all the variables in that constraint in one pass. I have implemented a pure python version of this for pure discrete linear problems that runs in minutes on problems that fix_variables is unble to complete overnight

**Alternatives Considered**

**Additional Context**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.