Description Usage Arguments Value Note Examples

View source: R/computeCumulatedPathLengths.R

Given a grid of points in the search space, along with their corresponding multi-objective gradients, this function will compute (for each point of the grid) the length of the cumulated path from a point towards its attracting local efficient point.

1 2 | ```
computeCumulatedPathLengths(centers, gradients,
prec.vector.length = 0.001, prec.norm = 1e-06, check.data = TRUE)
``` |

`centers` |
[ |

`gradients` |
[ |

`prec.vector.length` |
[ |

`prec.norm` |
[ |

`check.data` |
[ |

[`data.frame`

]

Returns a `data.frame`

, which appends the cumulated path lengths to the points
provided by `centers`

.

ATTENTION: Only turn off the sanity checks (`check.data = FALSE`

),
if you can ensure that all input parameters are provided in the correct format.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ```
# Define two single-objective test problems:
fn1 = function(x) sum((x - c(0.2, 1))^2)
fn2 = function(x) sum((x - c(0.5, 0.5))^2)
# Define a grid of points:
points = as.matrix(expand.grid(x1 = seq(0, 0.7, 0.005), x2 = seq(0, 1.25, 0.005)))
# Compute the corresponding gradients:
gradients = computeGradientField(points, fn1, fn2)
# Now, compute the cumulated path lengths:
x = computeCumulatedPathLengths(points, gradients)
# Finally, we can visualize the resulting multi-objective "landscape":
ggplotHeatmap(x, hide.legend = TRUE)
``` |

kerschke/mogsa documentation built on Oct. 27, 2018, 12:13 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.