Targeted Properties

Understand how targeted properties work and get started with writing targeted properties and how they work with simulated annealing.

How targeted properties work

Understanding the mechanism under which targeted properties operate will help make the right choices about how to use them, and will also help with customized strategies to help PropEr maximize or minimize values.

Historically, researchers tried a few mechanisms when first developing targeted properties, but the most flexible one turned out to be simulated annealing.

Simulated annealing

Simulated annealing is a complex method to probabilistically find good approximations of the possible maximal value of a function.

Let’s say we’re looking for the best way to optimize data throughput for packet-based communication. We have to juggle factors such as packet size, path cost, latency, bandwidth, and so on. There are multiple things that can impact the end result, but we worry about one principal metric: how many bytes per second can make it through.

All the solutions and parameters can be represented something like this:

There’s one optimal solution, but trying all possibilities has a prohibitive cost. When we are only trying to solve what we think is wrong, it’s impossible to know if we’re stuck in local maxima, which is a point that looks best at the moment but is not necessarily the correct solution. We simply don’t have enough info to decide. This results in searches looking like this:

Initial experiments for targeted properties exposed this hill-climbing mechanism. Experiments however showed that targeted properties using simulated annealing had great results. Rather than always picking the best option for the next improved solution (called next neighbor), simulated ...