1 % Copyright 2020 ArctosLabs Scandinavia AB
3 % Licensed under the Apache License, Version 2.0 (the "License");
4 % you may not use this file except in compliance with the License.
5 % You may obtain a copy of the License at
7 % http://www.apache.org/licenses/LICENSE-2.0
9 % Unless required by applicable law or agreed to in writing, software
10 % distributed under the License is distributed on an "AS IS" BASIS,
11 % WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 % See the License for the specific language governing permissions and
14 % limitations under the License.
15 % This minizinc model is generated using {{generator_data.file}}
16 % at {{generator_data.time}}.
18 {% import 'macros.j2' as macros -%}
19 %This is the NETWORK RESOURCE MODEL
20 {{ macros.vim_accounts(vim_accounts) }}
21 {{ macros.trp_link_latency(trp_link_latency) }}
22 {{ macros.trp_link_jitter(trp_link_jitter) }}
23 {{ macros.trp_link_price_list(trp_link_price_list) }}
24 {{ macros.vnf_price_list_per_vim(ns_desc) }}
26 % This is the NETWORK BASIC LOAD MODEL (CONSUMED)
27 % NOTE. This is not applicable in OSM Release 7
29 % This is the SERVICE CONSUMPTION MODEL
30 % These are the variables, i.e. which DC to select for each VNF
31 {{ macros.variables_vnf(ns_desc)}}
33 % These are the set of rules for selecting DCs to VNFs
34 {{ macros.vld_constraints(vld_desc) }}
35 % Calculate the cost for VNFs and cost for transport link and total cost
36 {{ macros.transport_cost(vld_desc) }}
37 {{ macros.used_vim_cost(ns_desc) }}
38 var int: total_cost = used_transport_cost + used_vim_cost;
40 solve minimize total_cost;