Framework Example 1: Service Placement — Overview
1. Overview
This example uses Route and Bandwidth bounded contexts to model service placement and network bandwidth allocation. The overview explains collaboration; the child pages define the variables, intermediate expressions, and constraints registered by the Kotlin example.
2. Contexts and Dependencies
| Context | Responsibility | Dependency |
|---|---|---|
| Route | Graph, clients, services, assignments, assignment constraints, and service-cost objective | — |
| Bandwidth | Edge/service/node bandwidth expressions and active bandwidth limits | Route |
3. Concepts, Sets, and Predicates
4. Variables and Intermediate Values
5. Assertions, Constraints, and Objectives
Route limits each normal node to at most one service and each service to at most one placement, and registers service cost. Bandwidth registers edge bandwidth, customer demand, service capacity, and bandwidth cost. The omitted TransferNodeBandwidthConstraint is not part of the registered model. Net-outflow definitions do not imply flow-conservation constraints.
6. Algorithms and Lifecycle
The application initializes Route, passes it to Bandwidth, registers both aggregates, constructs the meta-model, solves with SCIP, and analyzes selected assignments and bandwidth values. No independent flow-conservation equation is introduced by the current application.
7. Register → Construct → Solve → Analyze
init creates contexts and data; register adds variables and pipelines; construct builds the solver model; solve invokes the configured solver; analyze binds results back to domain objects.
8. Source Entry Points
9. Kotlin/Rust Comparison and Design Decisions
Both Kotlin and Rust framework examples have Route and Bandwidth contexts. The links below target framework examples, not the same-numbered simple examples. The context pages use Kotlin registration as their mathematical reference and do not infer additional constraints from the problem name.
10. Context Model Pages
11. Change Log
| Version | Change | Reason |
|---|---|---|
| 1.1 | Aligned bilingual overviews, notation, and source entry points | Keep the overview consistent with its context models |