View full-text article in PMC Sensors (Basel). 2022 Nov 22;22(23):9034. doi: 10.3390/s22239034 Search in PMC Search in PubMed View in NLM Catalog Add to search Copyright and License information © 2022 by the author. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/). PMC Copyright notice Algorithm 1 Single-Contract Resource Reservation Policy Input: Demand vector D1,…,T, contract k. (1) Ds←sort(D); (2) lastsum≜Rkα from Theorem 1; i=0; sum=0; while (sum<lastsum) do i=i+1; sum=sum+Ds(T−i+1); endwhile (3) Number of reserved instances ←Ds(T−i+1)×T;