public class ProposedSystem extends ReputationModel
| Constructor and Description |
|---|
ProposedSystem() |
| Modifier and Type | Method and Description |
|---|---|
void |
addChartSeries(SimulatorModel simulatorModel,
SimulatorPanel simulatorPanel)
Method, called at the start of the simulation, to add or clear
all the series within the Chart Datasets (XYSeriesCollection),
that are used from the reputation model.
|
float |
halfCeiling(float value) |
void |
initializeUserData(SimUser user)
Method, called at the start of the simulation, for every simulated
user, to initialize all the components and variables from
SimUser,
that the reputation model will be using. |
void |
recalculateReputation(SimUser user,
float[] rating)
Method, called with every rating, to re-estimate the values
from
SimUser, that the reputation model will be using. |
void |
updateReputationSeries(SimUser user,
float[] rating,
SimulatorPanel simulatorPanel)
Method, called with every rating, to update all Series from
SimUser, that the reputation model will be using and call the
ChartController to update the UI charts.
|
getChartByKey, getDataSetByKey, getMainSeriesKey, setMainSeriesKey, updateSeriesBykeypublic void initializeUserData(SimUser user)
ReputationModelSimUser,
that the reputation model will be using.
This method is called for all users involved in a scenario, when the simulation starts.
initializeUserData in class ReputationModeluser - the SimUser to be initialized.public void recalculateReputation(SimUser user, float[] rating)
ReputationModelSimUser, that the reputation model will be using.
This method is called for every SimpleDirectionalRate operation in a scenario to apply the rating.
recalculateReputation in class ReputationModeluser - the SimUser receiving the rating.rating - the ActionSequence record for the rating.public void updateReputationSeries(SimUser user, float[] rating, SimulatorPanel simulatorPanel)
ReputationModel
This method is called for every SimpleDirectionalRate operation in a scenario to update the charts
with the latest reputation values after ReputationModel.recalculateReputation(SimUser, float[]) is invoked.
updateReputationSeries in class ReputationModeluser - the SimUser receiving the rating.rating - the ActionSequence record for the rating.simulatorPanel - the UI's SimulatorPanel that is needed in order to access and update the charts.public void addChartSeries(SimulatorModel simulatorModel, SimulatorPanel simulatorPanel)
ReputationModeladdChartSeries in class ReputationModelsimulatorModel - the SimulatorModel containing the chart dataSets to be added.simulatorPanel - the UI's SimulatorPanel that is needed in order to access the charts.public float halfCeiling(float value)