Skip to content

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 ​

ContextResponsibilityDependency
RouteGraph, clients, services, assignments, assignment constraints, and service-cost objective—
BandwidthEdge/service/node bandwidth expressions and active bandwidth limitsRoute

3. Concepts, Sets, and Predicates ​

N is the node set, E the directed edge set, and S the service set. Nnormal and Nclient denote normal and client nodes; Enormal contains edges with a normal source. These symbols match the context pages.

4. Variables and Intermediate Values ​

xn,s is binary service assignment, with client rows fixed to zero. ye,s is bounded nonnegative integer bandwidth. Service assignment count As, node assignment count An, edge bandwidth Be, and node incoming bandwidth In are linear intermediate expressions; customer demand is input data.

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 ​

VersionChangeReason
1.1Aligned bilingual overviews, notation, and source entry pointsKeep the overview consistent with its context models