|
QDpy
|
Joint mixed-integer optimization of high-quality binary portfolios. More...
Go to the source code of this file.
Classes | |
| class | qdpy.algorithms.milp_portfolio.MILPPortfolioResult |
| Verified designs and solver outcomes for a near-optimal portfolio. More... | |
Namespaces | |
| namespace | qdpy |
Functions | |
| qdpy.algorithms.milp_portfolio._joint_model (size, width, rows) | |
| qdpy.algorithms.milp_portfolio.solve_binary_portfolio (objective, size, *, quality_loss=0., maximize=True, constraints=(), time_limit=None, node_limit=None) | |
| Find a joint portfolio of distinct binary designs under a quality tolerance. | |
Joint mixed-integer optimization of high-quality binary portfolios.
Definition in file milp_portfolio.py.
|
protected |
Create sparse independent design rows and exact XOR distance rows.
Definition at line 78 of file milp_portfolio.py.
| qdpy.algorithms.milp_portfolio.solve_binary_portfolio | ( | objective, | |
| size, | |||
| * | , | ||
| quality_loss = 0., | |||
| maximize = True, | |||
| constraints = (), | |||
| time_limit = None, | |||
| node_limit = None ) |
Find a joint portfolio of distinct binary designs under a quality tolerance.
| objective | Finite linear objective coefficients for one binary design. |
| size | Number of distinct designs to return, at least two. |
| quality_loss | Largest absolute loss from the single-design optimum. |
| maximize | Whether higher raw quality is better. |
| constraints | LinearConstraint objects applied independently to each design. |
| time_limit | Optional positive time limit per solver call, in seconds. |
| node_limit | Optional positive HiGHS node limit per solver call. |
First certify the quality reference, then optimize the portfolio jointly. Both solves request zero relative MIP gap. Constraint verification uses absolute tolerance 1e-7. Solver certificates retain the solver's numerical tolerances. Solver calls and their limits apply separately to the reference optimum and the joint problem.
Definition at line 124 of file milp_portfolio.py.