Parameter optimization with heuristiclab for Anylogic simulation model

54 views
Skip to first unread message

Ali Koç

unread,
Feb 2, 2022, 1:59:06 AM2/2/22
to HeuristicLab
Dear HL developers and experts,

I'm quite to new to HeuristicLab, so I have a question related to the parameter variation experiment with Anylogic for simulation-optimization. My model is a single objective minimization problem that includes two parameters. My two targeted parameters are restricted by two different constraints. Furthermore, I have one other constraint as named requirement in Optquest model. In fact, my model resembles "supply chain model" example that has been made a tutorial for Anylogic application. I just wonder that how can I reflect these constraints to Anylogicmodel (for example parameter1<1000) ?

In your Anylogic tutorial, while the constraint about histWaitingTime.max was reflected to Anylogic in box of "After simulation run", this constraint was defined as requirement in supply chain optquest model,
by the same logic can I write my related constraints in box of "before simulation run" in Anylogic, whereas they were defined in constraints section in the my Optquest model.

maybe the solution is different, really I am little confused about it.

Thanks for your help.

Andreas Beham

unread,
Feb 2, 2022, 2:16:56 AM2/2/22
to HeuristicLab
Hi,

If it's just a box constraint of course you want to define the appropriate bounds in the encoding in HeuristicLab (when you configure the encoding). For more complex constraints between parameters, I suppose you can do it in Before simulation run as you described, but maybe better even in before experiment run and right after getMessage() when the parameters get set. Of course, you don't just have to specify the constraint, but also repair the solution to enforce them. The downside is of course, that HeuristicLab doesn't know that you repaired the solution. You can also repair the solution on the HeuristicLab side, but then you'd have to implement the problem on the HeuristicLab side a bit differently. Here's a post that shows you an example of how that looks like: https://dev.heuristiclab.com/trac.fcgi/blog/programmable-external-evaluation. In that way you have access to the Evaluate methode and you can do any repairs therein.

The difference to OptQuest, is due to the fact that OptQuest is integrated tightly into AnyLogic and has a dedicated simulation experiment, while for HeuristicLab we're just using a parameter variation experiment for our purposes. Still, it's totally fine to do it that way.

Best,
Andreas
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
0 new messages