I was able to successfully create a sensitivty analysis, but unfortunately, as can be seen in the picture, the legend has a random arrangement. But I would like to have an ascending order.
Sensitivity Analysis with random legend order
After Simulation Run:
Color color = lerpColor( (getCurrentIteration() - 1) / (double) (getMaximumIterations() - 1), blue, red );
chart0.addDataSet( root.childDS, format( root.childgoal ), color, true, Chart.INTERPOLATION_LINEAR, 1, Chart.POINT_NONE );
The input dataset is in ascending order. I tried it with sortAscending. Unfortunately it did not work.
Thank you very much for suggestions on how I can solve this problem.
Your runs finish quasi-randomly and you simply add datasets when a run is finished.
To overcome this, either run in sequential mode (turn off "parallel evaluations" in the experiment settings).
Or do this:
LinkedHashMap
with key as Integer
, value as DataSet
, name it myCol
myCol.put(getCurrentIteration(), root.childDS);
chart0.removeAll(); // maybe use .clearAll(), cant remember
for (int currIt : myCol.keySet()) {
chart0.addDataSet(myCol.get(currIt), ...); // add other args as usual
}
You may need to wiggle with the code itself, just writing from memory here, use the API and help if you get stuck