Pareto Frontier generation for multi-objective prob. using openMDAO 1.x? - openmdao

I am new to the OpenMDAO framework and currently using the 1.5.0 version. I'm interested in generating a Pareto front for Zitzler–Deb–Thiele's functions using the same.
I found a solution for the legacy version here which uses 'pareto_filter' but was unable to locate the same in the new version.
So, how do I set up a multi-objective problem to generate pareto front in 1.x version?
Thanks to all.

You should be able to us NSGA2 from pyopt-sparse directly in OpenMDAO. You just install the pyopt-sparse package and OpenMDAO has a driver already built in that will let you use it. Then you pick NSGA2 as your optimizer.
The only issue is that, if you look at the source, that driver is currently labeled as single-objective. So you should change that line to True, so that you can specify multiple objectives.
We haven't tested NSGA2 via the pyopt-sparse. So it might take a little bit of hacking around to get it to work. If you'd prefer to us the regular pyopt package, you should be able to start with our current pyopt-sparse wrapper and make some small changes to get it to work.

Related

Using ConsRank in R Studio

Installed both R studio and ConsRank package but i have little R and Math knowledge.
I need to understand how to calculate and reach the result of the formula in attached files.
To solve this problem, correlation coefficient τx used which is intruduced by Emond and Mason (2002)
I tried to use ConsRank functions but my R knowledge was not enough.
FormulaFormula
MatrixMatrix
ResultResult
The first step is to install and load the package ConsRank using the following codes:
install.packages('ConsRank', dependencies=T)
library(ConsRank)
If you successfully load the package, you are good to go. The next step is to read the documentation of the package (Click Here) in which you will learn about what functions you will need and there are some different examples that help you understand the input and outputs.
Let me know if you needed any help running your scripts. Good Luck.

R: Updating my package for the upcoming ggplot2 version 2.3.0

I have previously created an R-package called seqCAT for variant analysis of high throughput sequencing data, which is available at Bioconductor (or GitHub for the development version). I was just informed by an automatic mail from the guys working on the tidyverse, notifying my that my package breaks with the planned changes for the ggplot2 package (current devel 2.2.1.9000, planned release 2.3.0). I made the necessary changes in my local git repo, and my package now works with the new ggplot2 version. However...
One of the required changes is not backwards compatible. Several of my previous tests used the data from ggplot_build(<plot object>)$layout$panel_ranges, in order to check that test plots were built correctly. The panel_ranges part has been changed to panel_params in the upcoming ggplot2 version (which does make more sense).
While easily fixed, I'm now unsure how to deploy this change. The seqCAT package is my first (and only) package, and I've never had to do something like this before. I can't simply deploy the changes directly, as it breaks under the currently released ggplot2 version. Do I just wait until June 25th (when the next ggplot is scheduled to release) and deploy it then? What about the overlapping time from ggplot2's release and seqCAT's build? How should I deal with future compatibility, i.e. should I add some maximum allowed ggplot2 version to my current release branch?
I have a fairly small number of users, at least by the download statistics, but I'd prefer to make the transition as simple as possible for them. I don't really know how to approach these kind of things, given my non-CS background in biology/biotech. Any tips on how to think around this and how to solve it? Maybe I'm just overthinking it?

How to calculate in R with variables

I'm a R newbie.
is there a way i can calculate
(x+x^2+x^3)^2
in R?
so i will get the result:
x^6+2 x^5+3 x^4+2 x^3+x^2
I get an Error: object 'x' not found.
Thanks!
R isn't well suited for this. Some interface packages to languages and libraries that are better at this do exist, such as rSymPy, which allows you to access the SymPy Python library for symbolic mathematics (you'll need to install both). In a similar vein, Ryacas links to the yacas algebra system.
Those interfaces are useful if you need symbolic manipulation as part of an R workflow. Otherwise, consider using the original tools. The ones above are open source and freely available, while other free use alternatives also exist, such as the proprietary web based Wolfram Alpha (for limited use).

"Standard" R benchmarking code?

I am recompiling/upgrading my R install and I want to measure performance pre/post upgrade. Is there possibly a standard script to run to time some commonly used functions and libraries? I have already installed rbenchmark, but I am just not enough of an R user to know what type of code to write to properly benchmark the new installation.
I've seen people use R-benchmark-25 as on overall test of R.
When I compile BLAS's, I use something like what I post here to benchmark matrix operations from various packages.

Downloading Package "Cart" in R

Does anybody know where I can download the R package "cart" that can help create Gastner's
"Mapping with Diffusion-based Cartograms" ? I tried a install.package on R and says it's not available
for R 2.15. There is a page on R-forge about it but it doesn't explain how to download the package.
Thanks.
Way late to the game, but from what I can tell there's not much happening for the cart package; my recent efforts with cartogramming in R have pushed me towards two alternatives: Rcartogram within R (available from the GitHub repository) and ScapeToad, a program written in JS.
Advantage of the former is that you don't have to leave R (better for long-term project management), however it's a bit arcane to use (requires converting your shapefile to a density grid & then figuring out how to use an interpolation method, etc.).
Advantage of the latter is that it's got a very simple point-and-click GUI--add shapefile, create cartogram wizard, export shapefile, voila.
Both are based on the Gastner-Newman diffusion-based algorithm.
If you check the build page you'll see that at the moment the package fails to build. I thought it might be something minor but I've put in a little bit of work so far and it's still failing to build on my machine.
You might want to email the authors and ask them. You could also try their forum but it looks like it hasn't seen much activity lately.

Resources