dimerazor
dimerazor

Reputation: 41

How can i vary a parameter in function of another parameter in Anylogic?

I want to add a parameter(or a variable) that I would like to vary with a slider before running the simulation. This parameter represents the money spent to launch the ad campaign. This parameter, varying must vary the parameter AdEffectiveness and in consequence the output( shown in the main plot).

Main

Main

Customer

Customer

AdEffectiveness

AdEffectiveness

Upvotes: 0

Views: 173

Answers (2)

mivandev
mivandev

Reputation: 321

Drag a slider object mySlider into your simulation experiment. In the simulation experiment's properties screen, add mySlider.getIntValue() in the AdEffectiveness parameter field.

More generally, if the parameter is an integer then use mySlider.getIntValue(), if the parameter is a double, use mySlider.getValue().

In the slider properties you can set minimal and maximum values for the slider.

Upvotes: 1

Felipe
Felipe

Reputation: 9376

I will give you the link to the AnyLogic tutorial to set up parameters in the experiment page, which seems to be what you want:

https://www.youtube.com/watch?v=pd8QMBL-ri4

Upvotes: 1

Related Questions