add sections
[optf/osdf.git] / docs / sections / architecture.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2
3 Architecture
4 =============================================
5
6 Technology Choices
7 ------------------
8 Minizinc provides an open source constraint modeling language/platform for specifying optimization applications. 
9 It contains direct interfaces to COIN-OR CBC, Gurobi and IBM ILOG CPLEX. Additionally, many optimization projects 
10 support minizinc via FlatZinc interfaces. The Minizinc standard library provides a subset of constraints form the  
11 global constraint catalogue as a high-level abstraction that have efficient algorithms implemented by several solvers.
12
13 Components of the Core Framework
14 --------------------------------------------
15
16 .. image:: ./diagrams/OSDF-components.png
17
18 An overview of the components of the core optimization framework. The OOF utilizes the open source project Minizinc, 
19 which has a solver-independent modeling language and has interfaces to various open source and commercial solvers. 
20 One of the additional benefits of this approach is that by developing a focused set of ONAP-related components, 
21 we can utilize ongoing advances in optimization technologies, as well as adapt other currently available extensions to 
22 Minizinc and related projects. The OOF project aims to build these components with a focus on minimal viable product 
23 for Beijing Release in order to support initial applications and use cases, with subsequent focus on expanding the 
24 platform.
25
26 Data Adapter Library
27 ----------------------
28
29 The OOF will provide a library of adapters for common ONAP systems. These can be directly used in data specification 
30 templates of the applications. In the initial release, these will include adapters to Policy, A&AI, Multi-Cloud, and 
31 SDC (additional "stretch goals" for this release include SDN-C, Microservice Bus). As new use cases are implemented, 
32 this library will be augmented by new adapters to other services. 
33
34 Translation Modules
35 --------------------------------------------
36
37 The OOF will provide modules for translating policies into constraints for the optimization environment. When an 
38 underlying minizinc model is used for optimization, it is translated into a minizinc constraint (either via a data 
39 specification template or directly from policy). For custom optimizers, these constraints will be translated to the 
40 input format expected by the optimizer via the data specification template. The Homing and Allocation Service (HAS; 
41 described in the next section) uses a custom optimization module and hence uses the data specification template approach.
42
43 Modeling Support
44 ----------------------
45
46 The OOF provides simple templating system through which users can specify links to different ONAP components, including policy, 
47 A&AI, SDC, etc.
48
49
50 Execution Environment
51 ------------------------------------------------------------------------
52
53 The OOF execution environment contains the minizinc system, along with data/template rendering system that leverages 
54 the adapters to various systems. The flow of execution can be configured via the configuration file for the application 
55 and supports a choice of specific solver or invocations to custom/external solvers.