X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FPLA.git;a=blobdiff_plain;f=osm_pla%2Fplacement%2Fosm_pla_dynamic_template.j2;fp=osm_pla%2Fplacement%2Fosm_pla_dynamic_template.j2;h=e95be0cb3bc945d8c0ce8c345f21c5f9ea8e5017;hp=0000000000000000000000000000000000000000;hb=2b0e2d72595a5e25bd8f785138416d12829fbd64;hpb=bc50b79b8fdcbf1c1665011ed04d85df6efcddf8 diff --git a/osm_pla/placement/osm_pla_dynamic_template.j2 b/osm_pla/placement/osm_pla_dynamic_template.j2 new file mode 100644 index 0000000..e95be0c --- /dev/null +++ b/osm_pla/placement/osm_pla_dynamic_template.j2 @@ -0,0 +1,40 @@ +% Copyright 2020 ArctosLabs Scandinavia AB +% +% Licensed under the Apache License, Version 2.0 (the "License"); +% you may not use this file except in compliance with the License. +% You may obtain a copy of the License at +% +% http://www.apache.org/licenses/LICENSE-2.0 +% +% Unless required by applicable law or agreed to in writing, software +% distributed under the License is distributed on an "AS IS" BASIS, +% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +% implied. +% See the License for the specific language governing permissions and +% limitations under the License. +% This minizinc model is generated using {{generator_data.file}} +% at {{generator_data.time}}. + +{% import 'macros.j2' as macros -%} +%This is the NETWORK RESOURCE MODEL +{{ macros.vim_accounts(vim_accounts) }} +{{ macros.trp_link_latency(trp_link_latency) }} +{{ macros.trp_link_jitter(trp_link_jitter) }} +{{ macros.trp_link_price_list(trp_link_price_list) }} +{{ macros.vnf_price_list_per_vim(ns_desc) }} + +% This is the NETWORK BASIC LOAD MODEL (CONSUMED) +% NOTE. This is not applicable in OSM Release 7 + +% This is the SERVICE CONSUMPTION MODEL +% These are the variables, i.e. which DC to select for each VNF +{{ macros.variables_vnf(ns_desc)}} + +% These are the set of rules for selecting DCs to VNFs +{{ macros.vld_constraints(vld_desc) }} +% Calculate the cost for VNFs and cost for transport link and total cost +{{ macros.transport_cost(vld_desc) }} +{{ macros.used_vim_cost(ns_desc) }} +var int: total_cost = used_transport_cost + used_vim_cost; + +solve minimize total_cost; \ No newline at end of file