Browse Source

Method to buld rewards for arbitrary (explicit) models.

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@3377 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Dave Parker 15 years ago
parent
commit
b55493f943
  1. 19
      prism/src/explicit/rewards/ConstructRewards.java

19
prism/src/explicit/rewards/ConstructRewards.java

@ -51,6 +51,25 @@ public class ConstructRewards
this.mainLog = mainLog;
}
/**
* Construct rewards from a model and reward structure.
* @param model The model
* @param rewStr The reward structure
* @param constantValues Values for any undefined constants needed
*/
public Rewards buildRewardStructure(Model model, RewardStruct rewStr, Values constantValues) throws PrismException
{
switch (model.getModelType()) {
case DTMC:
case CTMC:
return buildMCRewardStructure((DTMC) model, rewStr, constantValues);
case MDP:
return buildMDPRewardStructure((MDP) model, rewStr, constantValues);
default:
throw new PrismException("Cannot build rewards for " + model.getModelType() + "s");
}
}
/**
* Construct the rewards for a Markov chain (DTMC or CTMC) from a model and reward structure.
* @param mc The DTMC or CTMC

Loading…
Cancel
Save