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"