Provide an API to execute precomputation and solving separately
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Active
- Tech stack
- python
- Domain
- backend-api-design
Research direction
Start with the proposed create_precomputer, precompute, load_solver, and solve entry points, and compare them with the current ch.add_to_control behavior referenced in the issue. The issue is still a draft, so done requires settling the API and its handling of precomputed data, contexts, presets, and solving before implementation can be scoped.
Written by the indexing model from the issue text.
Description
Draft of the API
| ch | The constraint-handler library |
| CHPC | The Precomputer |
| ModelData | This are just CH input facts. It should include information which variables can later be set by presets and which variables have a dynamic domain. |
| Context | This are tables and provided python functions like getPLMTable. |
| Mode | The solve mode: solution/brave/cautious/optimization |
| PCD | This is the precompiled/grounded data that can be serialized/stored. |
| CHS | The Solver |
| Presets | The preset data used to set externals or add new facts. |
| Criteria | The optimization criteria |
| SolveHandle | A clingo SolveHandle |
ch.create_precomputer() -> CHPC # Create a the Precomputer
CHPC.add(ModelData) # Load model data into the Precomputer
CHPC.add_context(Context) # similar to current ch.add_to_control(...)
CHPC.set_mode(Mode) # Set solve mode
CHPC.precompute() -> PCD # Perform precomputation (grounding) and return a PCD
ch.load_solver(PCD) -> CHS # Create a Solver and load it with the PCD data
CHS.preset(Presets) # Load preset data
CHS.add_context(Context) # Load dynamic context (not sure if necessary)
CHS.solve() -> SolveHandle # start solving
# - add new facts new preset values and optimization criteria
# - do additional incremental grounding
# - set presets - externals
# - solve
What do we precompute?
- domain facts
- and fact representation of reified rules
- Dominant language
- Python
- Stars
- 4
- Forks
- 0
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 19
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from potassco/constraint-handler
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
potassco/constraint-handler#276 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
potassco/constraint-handler#216 · 6 comments ·
Maintainers usually reply within 1 day
-
constraint-handler 2
Difficulty 5/5 Over a week Newbie friendliness 25/100
potassco/constraint-handler#491 · 2 comments ·
Maintainers usually reply within 1 day
-
Multiple definitions that agree with each otherPossibly taken @AbdallahS claimed this 1 day ago. Openconstraint-handler 2
potassco/constraint-handler#490 · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
potassco/constraint-handler#489 ·
Maintainers usually reply within 1 day
All issues in potassco/constraint-handler
Similar issues
-
auto-reported bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
stix-atlas.json: the same relationship id is used for several different mitigates relationshipsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
backend bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
nolte/kamerplanter#3193 ·
Maintainers usually reply within 1 day
-
soup prune-prompt exits 1 after writing its output on a file over 100,000 rows, and reports a capped row count otherwisePossibly taken @abdulwaarith0 claimed this today. Openneeds-triage
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
MakazhanAlpamys/Soup#3690 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day