Support weighted maxsat#12
Open
AHartNtkn wants to merge 1 commit into
Open
Conversation
Add support for weighted maxsat and "must have" clauses. * Modify `src/cnf.rs` to handle weighted CNF files and "must have" clauses. - Add `weight` field to `CNFClause` struct. - Add `must_clause_weight` field to `CNFFormula` struct. - Update `parse_dimacs_format` to parse weight lines and assign weights to clauses. - Update `apply_variable_mapping` and `normalize_variables` to handle weights. - Update `to_dimacs_format` to include weight lines if present. * Modify `src/main.rs` to keep track of the best solution found within a specific amount of time. - Add `time_limit` option to `Opts`, `StochOpts`, and `InterhOpts` structs. - Add time limit handling in `solve` and `batch` functions. - Track the best solution and score during the simulation loop. - Return the best solution found within the time limit. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/AHartNtkn/odesat?shareId=XXXX-XXXX-XXXX-XXXX).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add support for weighted maxsat and "must have" clauses.
Modify
src/cnf.rsto handle weighted CNF files and "must have" clauses.weightfield toCNFClausestruct.must_clause_weightfield toCNFFormulastruct.parse_dimacs_formatto parse weight lines and assign weights to clauses.apply_variable_mappingandnormalize_variablesto handle weights.to_dimacs_formatto include weight lines if present.Modify
src/main.rsto keep track of the best solution found within a specific amount of time.time_limitoption toOpts,StochOpts, andInterhOptsstructs.solveandbatchfunctions.For more details, open the Copilot Workspace session.