I am using the python connector to call a genetic algorithm (GA) in python. The idea is to evaluate multiple vehicle routing solutions from the GA using a parameter variation. The python script is modelled in the main 'on start-up'. However, with a parameter variation, this implies that the entire python script is rerun. I can generate the solutions manually and insert them in Anylogic, but preferably this is directly performed via the python connector. I have tried it with a function also but there the same happens. Any advice on how I can ensure that the python script is called once and that a parameter variation uses these results? Is this even possible in Anylogic?
Asked
Active
Viewed 138 times
1 Answers
0
You should be able to call your script as part of the experiment setup and then use that value for every simulation run.

Jaco-Ben Vosloo
- 3,770
- 2
- 16
- 33
-
1I have found it, thanks. It is possible to add the python communicator to an experiment https://www.anylogic.com/upload/pdf/q-and-a-with-writeups.pdf) However, this has to be done manually before the python communicator works properly. – Bas Lindeboom Jan 04 '22 at 15:24
-
Awesome. Feel free to answer your own question and accept it! – Jaco-Ben Vosloo Jan 04 '22 at 19:20