Planning Solutions
The top-level container that holds entities, problem facts, value ranges, and the score.
SolverForge uses derive macros to turn your Rust structs into a planning domain. There are three key concepts:
| Concept | Macro | Purpose |
|---|---|---|
| Planning Solution | #[planning_solution] | The top-level container — holds entities, facts, and the score |
| Planning Entity | #[planning_entity] | Something the solver changes (assigns variables to) |
| Problem Fact | #[problem_fact] | Immutable input data the solver reads but doesn’t modify |
Planning Solution
├── problem_fact_collection → Vec<ProblemFact> (inputs)
├── planning_entity_collection → Vec<Entity> (solver changes these)
├── value_range_provider → Vec<Value> (possible values)
└── planning_score → Option<ScoreType> (current quality)
The derive macros generate implementations of PlanningSolution, PlanningEntity, and ProblemFact traits automatically — you never implement these traits by hand.
The top-level container that holds entities, problem facts, value ranges, and the score.
Structs with planning variables that the solver assigns during optimization.
Immutable input data that constraints reference but the solver doesn’t modify.
Ordered sequence variables for routing, sequencing, and scheduling problems.
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.