|
|
@ -2251,11 +2251,20 @@ public class GUISimulator extends GUIPlugin implements MouseListener, ListSelect |
|
|
private Double stateReward; |
|
|
private Double stateReward; |
|
|
private Double transitionReward; |
|
|
private Double transitionReward; |
|
|
|
|
|
|
|
|
|
|
|
private boolean transitionRewardUnknown; |
|
|
|
|
|
|
|
|
|
|
|
private boolean stateRewardVisible; |
|
|
|
|
|
private boolean transitionRewardVisible; |
|
|
|
|
|
|
|
|
public RewardStructureValue(RewardStructure rewardStructure, Double stateReward, Double transitionReward) |
|
|
public RewardStructureValue(RewardStructure rewardStructure, Double stateReward, Double transitionReward) |
|
|
{ |
|
|
{ |
|
|
this.rewardStructure = rewardStructure; |
|
|
this.rewardStructure = rewardStructure; |
|
|
this.stateReward = stateReward; |
|
|
this.stateReward = stateReward; |
|
|
this.transitionReward = transitionReward; |
|
|
this.transitionReward = transitionReward; |
|
|
|
|
|
this.transitionRewardUnknown = false; |
|
|
|
|
|
|
|
|
|
|
|
this.stateRewardVisible = true; |
|
|
|
|
|
this.transitionRewardVisible = true; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public RewardStructure getRewardStructure() |
|
|
public RewardStructure getRewardStructure() |
|
|
@ -2278,6 +2287,36 @@ public class GUISimulator extends GUIPlugin implements MouseListener, ListSelect |
|
|
public void setTransitionReward(Double transitionReward) { |
|
|
public void setTransitionReward(Double transitionReward) { |
|
|
this.transitionReward = transitionReward; |
|
|
this.transitionReward = transitionReward; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setStateRewardVisible(boolean b) |
|
|
|
|
|
{ |
|
|
|
|
|
this.stateRewardVisible = b; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public boolean isStateRewardVisible() |
|
|
|
|
|
{ |
|
|
|
|
|
return this.stateRewardVisible; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setTransitionRewardVisible(boolean b) |
|
|
|
|
|
{ |
|
|
|
|
|
this.transitionRewardVisible = b; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public boolean isTransitionRewardVisible() |
|
|
|
|
|
{ |
|
|
|
|
|
return this.transitionRewardVisible; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setTransitionRewardUnknown() |
|
|
|
|
|
{ |
|
|
|
|
|
this.transitionRewardUnknown = true; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public boolean isTransitionRewardUnknown() |
|
|
|
|
|
{ |
|
|
|
|
|
return this.transitionRewardUnknown; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public class SimulationView extends Observable |
|
|
public class SimulationView extends Observable |
|
|
@ -2693,21 +2732,22 @@ public class GUISimulator extends GUIPlugin implements MouseListener, ListSelect |
|
|
else if (rewardStart <= columnIndex) |
|
|
else if (rewardStart <= columnIndex) |
|
|
{ |
|
|
{ |
|
|
RewardStructure reward = (RewardStructure)view.getVisibleRewards().get(columnIndex - rewardStart); |
|
|
RewardStructure reward = (RewardStructure)view.getVisibleRewards().get(columnIndex - rewardStart); |
|
|
if (rowIndex < SimulatorEngine.getPathSize() - 1) |
|
|
|
|
|
|
|
|
if (rowIndex == SimulatorEngine.getPathSize() - 1) |
|
|
{ |
|
|
{ |
|
|
RewardStructureValue value = new RewardStructureValue(reward, SimulatorEngine.getStateRewardOfPathState(rowIndex, reward.getIndex()), SimulatorEngine.getTransitionRewardOfPathState(rowIndex, reward.getIndex())); |
|
|
RewardStructureValue value = new RewardStructureValue(reward, SimulatorEngine.getStateRewardOfPathState(rowIndex, reward.getIndex()), SimulatorEngine.getTransitionRewardOfPathState(rowIndex, reward.getIndex())); |
|
|
|
|
|
|
|
|
if (reward.isStateEmpty() && view.hideEmptyRewards()) |
|
|
|
|
|
{ value.setStateReward(null); } |
|
|
|
|
|
|
|
|
|
|
|
if (reward.isTransitionEmpty() && view.hideEmptyRewards()) |
|
|
|
|
|
{ value.setTransitionReward(null); } |
|
|
|
|
|
|
|
|
value.setTransitionRewardUnknown(); |
|
|
|
|
|
value.setStateRewardVisible(!(reward.isStateEmpty() && view.hideEmptyRewards())); |
|
|
|
|
|
value.setTransitionRewardVisible(!(reward.isTransitionEmpty() && view.hideEmptyRewards())); |
|
|
|
|
|
|
|
|
return value; |
|
|
return value; |
|
|
} |
|
|
} |
|
|
else |
|
|
|
|
|
|
|
|
else if (rowIndex < SimulatorEngine.getPathSize() - 1) |
|
|
{ |
|
|
{ |
|
|
return "..."; |
|
|
|
|
|
|
|
|
RewardStructureValue value = new RewardStructureValue(reward, SimulatorEngine.getStateRewardOfPathState(rowIndex, reward.getIndex()), SimulatorEngine.getTransitionRewardOfPathState(rowIndex, reward.getIndex())); |
|
|
|
|
|
value.setStateRewardVisible(!(reward.isStateEmpty() && view.hideEmptyRewards())); |
|
|
|
|
|
value.setTransitionRewardVisible(!(reward.isTransitionEmpty() && view.hideEmptyRewards())); |
|
|
|
|
|
|
|
|
|
|
|
return value; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|