Multiobjective optimization with Anylogic

53 views
Skip to first unread message

Lukas Preusser

unread,
May 10, 2021, 8:08:54 AM5/10/21
to HeuristicLab
Hello everybody,

I'm trying to set up a multiobjective optimization experiment with Anylogic (similar to this single objective experiment: https://dev.heuristiclab.com/trac.fcgi/wiki/Documentation/Howto/OptimizeAnyLogicModels) and I'm having some troubles regarding the implementation in Anylogic in the parameter variation experiment.

My current changes in the code in Anylogic to adjust the problem to multiobjective:
- in Additional class code: double[] quality = new double[2];
- in Before each experiment run: quality[0] = 0; quality[1] = 0;
- in After simulation run: quality[0] += root.KPI1(); quality[0] += root.KPI2();
- in After iteration: quality[0] = 0; quality[1] = 0;

Is this implementation with the double array the correct way to implement the multiobjective qualities?

Futhermore I'm not sure how to change the following code in "After iteration":

try {
  commDriver.sendQuality(currentSolution, quality / replications);
}

How should I add the two qualities to the code?

Thanks and all the best,
Lukas

Lukas Preusser

unread,
May 10, 2021, 8:12:39 AM5/10/21
to HeuristicLab
In After simulation run it should be of course: quality[0] += root.KPI1(); quality[1] += root.KPI2();

Lukas Preusser

unread,
May 12, 2021, 3:41:30 PM5/12/21
to HeuristicLab
If anyone wonders, I found out that commDriver.sendQualities(....); does the trick.

HeuristicLab

unread,
May 12, 2021, 8:52:18 PM5/12/21
to HeuristicLab
Sorry Lukas I got too much on my hands right now to reply in time, glad you figured it out!

Andreas
Reply all
Reply to author
Forward
0 new messages