-1

I am building a simulation model in AnyLogic 8.0 which consists of more than 255 parameters. But, an error appears because the number of parameters exceeds the limit of java (which is 255 parameters). Then, I try to handle this issue by creating a "java array" on the parameters. Unfortunately, I have another issue when running "Parameter Variation" with an array parameter. It gives a null or even string value on the parameter.

Is there a way to deal with a high number of parameters or with an array in the "Parameter Variation" in AnyLogic?

Thomy
  • 1
  • 1
    please share the code – Ruslan Feb 06 '19 at 19:25
  • Hi Thomy, out of curiosity: why on earth would you need more than 255 parameters? You should only use parameters for characteristics that you actually wish to vary (during ParamVariation or optimization). If you have even more than 50, your solution space is likely larger than the number of atoms in the universe. Are you sure you need 255? Else, turn those you do not want to vary into simple variables... – Benjamin Feb 07 '19 at 07:33
  • @Benjamin Thank you very much for your reply. My problem consists of determining quantities that buyers will place to suppliers. So, if I have only 20 buyers and 20 suppliers, there will be 400 parameters to optimize, which apparently is not possible. This seems to be a huge limitation of AnyLogic, as any optimization problem has hundreds or even thousands of variables. Is there any way to solve this issue? – Thomy Feb 08 '19 at 17:28
  • interesting. Remember that you are doing simulation-based optimization with AnyLogic. Sure, with mathematical optimization you can have 400 variables easily and probably still solve in a few seconds, depending on your setup. But with a simulation, even the simplest model runs for a second or 2. Now if each of your 400 parameters would only be a choice between 2 numbers, have you thought about total runtime? Likely ,your simulation has some randomness so you need to replicate each unique parameter setup several times. We might be talking months or years of runtime, no? – Benjamin Feb 08 '19 at 19:34
  • What I am saying is this: you might be using the wrong tool for your problem. Use a normal optimization approach to get those optimal numbers, then plug them into a simulation model to see how the results behaves in "reality" with uncertainty. You can even build a back-forth juggling between the mathematical optimization and the simulation. Or you go full thrust and use AnyLogistix, which is doing that in a nutshell :-) – Benjamin Feb 08 '19 at 19:36
  • Yes, it is run for in years. It seems to be clear for me now :) I've heard about AnyLogistix, I think I should take a look it then. Thank you very much once again for your feedback – Thomy Feb 12 '19 at 12:34

1 Answers1

0

What I know is that this is:

The maximum number of parameters in java method declaration

Check this link for further information: Maximum number of parameters in Java method declaration

Altuwariki
  • 29
  • 9
  • Thank you very much for this useful information. I realized now that there is a limitation. – Thomy Feb 07 '19 at 14:50
  • I have tried to avoid that limitation by using java arrays, so that instead of having 400 parameters, I would have 1 array with 400 positions. However, the Parameter Variation in AnyLogic apparently is not able to deal with this. – Thomy Feb 08 '19 at 17:32