return new VariantEvaluation(proposedVariantDescription, thisActionEvaluation, predictedCost, predictedCost/knob.getHorizon(), predictedBenefit, transitionTime);
return new VariantEvaluation(proposedVariantDescription, thisActionEvaluation, predictedCost, predictedCost/knob.getHorizon(), predictedBenefit, predictedBenefit/knob.getHorizon(), transitionTime);
    private VariantEvaluation createCompensatoryVariantEvaluation(ActionDescription proposedVariantDescription,                                                                  ActionEvaluation thisActionEvaluation,                                                                  StateDimensionEstimation baseStateEstimation,                                                                   Action action, // so we can find out what we are currently doing                                                                  AssetStateDimension baseStateDimension,                                                                   AssetStateDimension compensatedStateDimension,                                                                  boolean isVariantActive,                                                                  CostBenefitKnob knob) {        double memorySize = 1000.0; // FIX _ needs to be dynamic        double bandwidthSize = 1000.0; // FIX -needs to be dynamic        double predictedCost = 0.0;        double predictedBenefit = 0.0;	Iterator transIter = proposedVariantDescription.getTransitionVector().iterator();        AssetTransitionWithCost atwc = (AssetTransitionWithCost) transIter.next();  // just grab the first transition - this would not be needed if there was wild-carding for TS states        long transitionTime;        if (atwc.getOneTimeCost()!=null) transitionTime = atwc.getOneTimeCost().getTimeCost();            else transitionTime = 0;        ActionCost oneTimeCost = atwc.getOneTimeCost();        ActionCost continuingCost = atwc.getContinuingCost();        String actionName = thisActionEvaluation.getAction().getClass().getName();        String compensatedDimensionName = compensatedStateDimension.getStateName();        String currentVariantName;        if ((action.getValue() != null) && (action.getValue().getAction() != null) && action.getValue().isActive()) {            currentVariantName = (String)action.getValue().getAction();        }        else {            currentVariantName = null;        }        String proposedVariantName = proposedVariantDescription.name();        Vector endStateCompensatedProbs = computeCompensatedStateProbs(actionName, proposedVariantName, baseStateDimension, compensatedStateDimension, baseStateEstimation);        // Vector intermediateStateCompensatedProbs = computeCompensatedStateProbs(actionName, currentVariantName, baseStateDimension, compensatedStateDimension, baseStateEstimation); // assume the intermediate state is the current state (need TS model chnages to accomodate this)                if (logger.isDebugEnabled()) {            logger.debug("BASE state: " + baseStateEstimation.toString());            logger.debug("predicted Compensated END state: " + compensatedDimensionName + " " + endStateCompensatedProbs.toString());           // logger.debug("predicted Compensated INTERMEDIATE state: " + compensatedDimensionName + " " + intermediateStateCompensatedProbs.toString());        }        if (isVariantActive) {            predictedBenefit = knob.horizon * computeBenefit(endStateCompensatedProbs, compensatedStateDimension, knob);            predictedCost = knob.horizon * aggregateCost(continuingCost);        }        else {            predictedBenefit = knob.horizon * computeBenefit(endStateCompensatedProbs, compensatedStateDimension, knob);            predictedCost = transitionTime * aggregateCost(oneTimeCost)                          + (knob.horizon-transitionTime)*aggregateCost(continuingCost);        }        return new VariantEvaluation(proposedVariantDescription, thisActionEvaluation, predictedCost, predictedCost/knob.getHorizon(), predictedBenefit, transitionTime);    }