![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVjyGAkg8_MDpP6msYca2-uOHyvew_JF0Dj6Vf7TvRxfV9RQZSCHZzi6w2MsTrcGJJK4RDRPif6GFTyL8BDV1zlg0P3RpUCISoI4zI_UbvRlbj0eCevEVnpsi6BOqL7OT6F2VzGA/s320/sliderbar.gif)
Slider bars (as in the image above) are a easy way to change model parameters of a simulation. Someone asked how to create a Slider Bar within a Repast model, so I thought I would share it. To create one is relatively straight forward. All you need to do is place this piece of code in the setup method:
RangePropertyDescriptor pdMovement = new RangePropertyDescriptor("Movement", 0, 1000, 200);
descriptors.put("Movement", pdMovement);
String [] initparams = {"PerAgents",
};
return initparams;
}
Further information on PropertyDescriptors can be found on the Repast Website under "How to Create PropertyDescriptors"