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, updateSeriesBykey
public void initializeUserData(SimUser user)
ReputationModel
SimUser
,
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 ReputationModel
user
- the SimUser
to be initialized.public void recalculateReputation(SimUser user, float[] rating)
ReputationModel
SimUser
, 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 ReputationModel
user
- 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 ReputationModel
user
- 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)
ReputationModel
addChartSeries
in class ReputationModel
simulatorModel
- 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)