if (actionName.equals("org.cougaar.robustness.dos.coordinator.CompressionAction")) { Vector v = new Vector(4); if (baseStateName.equals("Low") && actionSettingName.equals("Compress")) { v.add(new StateProb("Normal", 0.0)); v.add(new StateProb("Degraded-1", 1.0)); v.add(new StateProb("Degraded-2", 0.0)); v.add(new StateProb("Degraded-3", 0.0)); return v; } else if (baseStateName.equals("Low") && actionSettingName.equals("NoCompress")) { v.add(new StateProb("Normal", 0.0)); v.add(new StateProb("Degraded-1", 0.0)); v.add(new StateProb("Degraded-2", 0.0)); v.add(new StateProb("Degraded-3", 1.0)); return v; } else if (baseStateName.equals("Low") && actionSettingName.equals("AutoCompress")) { v.add(new StateProb("Normal", 0.0)); v.add(new StateProb("Degraded-1", 0.0)); v.add(new StateProb("Degraded-2", 1.0)); v.add(new StateProb("Degraded-3", 0.0)); return v; } if (baseStateName.equals("Moderate") && actionSettingName.equals("Compress")) { v.add(new StateProb("Normal", 1.0)); v.add(new StateProb("Degraded-1", 0.0)); v.add(new StateProb("Degraded-2", 0.0)); v.add(new StateProb("Degraded-3", 0.0)); return v; } else if (baseStateName.equals("Moderate") && actionSettingName.equals("NoCompress")) { v.add(new StateProb("Normal", 0.0)); v.add(new StateProb("Degraded-1", 0.0)); v.add(new StateProb("Degraded-2", 1.0)); v.add(new StateProb("Degraded-3", 0.0)); return v; } else if (baseStateName.equals("Moderate") && actionSettingName.equals("AutoCompress")) { v.add(new StateProb("Normal", 0.0)); v.add(new StateProb("Degraded-1", 1.0)); v.add(new StateProb("Degraded-2", 0.0)); v.add(new StateProb("Degraded-3", 0.0)); return v; } if (baseStateName.equals("High") && actionSettingName.equals("Compress")) { v.add(new StateProb("Normal", 1.0)); v.add(new StateProb("Degraded-1", 0.0)); v.add(new StateProb("Degraded-2", 0.0)); v.add(new StateProb("Degraded-3", 0.0)); return v; } else if (baseStateName.equals("High") && actionSettingName.equals("NoCompress")) { v.add(new StateProb("Normal", 0.0)); v.add(new StateProb("Degraded-1", 1.0)); v.add(new StateProb("Degraded-2", 0.0)); v.add(new StateProb("Degraded-3", 0.0)); return v; } else if (baseStateName.equals("High") && actionSettingName.equals("AutoCompress")) { v.add(new StateProb("Normal", 1.0)); v.add(new StateProb("Degraded-1", 0.0)); v.add(new StateProb("Degraded-2", 0.0)); v.add(new StateProb("Degraded-3", 0.0)); return v; } } if (logger.isErrorEnabled()) logger.error("Could not map" + baseStateName + " : " + actionSettingName);
    public Vector mapCompensation(String actionName, String baseStateName, String actionSettingName) {        if (actionName.equals("org.cougaar.mts.std.LinksEnablingAction")) {            Vector v = new Vector(5);            if (baseStateName.equals("DirectPathExists") && actionSettingName.equals("Normal")) {                v.add(new StateProb("Excellent", 0.8));                v.add(new StateProb("Good", 0.1));                v.add(new StateProb("Fair", 0.1));                v.add(new StateProb("Poor", 0.0));                v.add(new StateProb("None", 0.0));                return v;            }            else if (baseStateName.equals("DirectPathExists") && actionSettingName.equals("AlternateDirect")) {                v.add(new StateProb("Excellent", 0.7));                v.add(new StateProb("Good", 0.1));                v.add(new StateProb("Fair", 0.1));                v.add(new StateProb("Poor", 0.1));                v.add(new StateProb("None", 0.0));                return v;            }            else if (baseStateName.equals("DirectPathExists") && actionSettingName.equals("StoreAndForward")) {                v.add(new StateProb("Excellent", 0.1));                v.add(new StateProb("Good", 0.6));                v.add(new StateProb("Fair", 0.2));                v.add(new StateProb("Poor", 0.1));                v.add(new StateProb("None", 0.0));                return v;            }            else if (baseStateName.equals("DirectPathExists") && actionSettingName.equals("Disable")) {                v.add(new StateProb("Excellent", 0.0));                v.add(new StateProb("Good", 0.0));                v.add(new StateProb("Fair", 0.0));                v.add(new StateProb("Poor", 0.0));                v.add(new StateProb("None", 1.0));                return v;            }            else if (baseStateName.equals("OnlyIndirectPathExists") && actionSettingName.equals("Normal")) {                v.add(new StateProb("Excellent", 0.0));                v.add(new StateProb("Good", 0.0));                v.add(new StateProb("Fair", 0.0));                v.add(new StateProb("Poor", 0.0));                v.add(new StateProb("None", 1.0));                return v;            }            else if (baseStateName.equals("OnlyIndirectPathExists") && actionSettingName.equals("AlternateDirect")) {                v.add(new StateProb("Excellent", 0.0));                v.add(new StateProb("Good", 0.0));                v.add(new StateProb("Fair", 0.2));                v.add(new StateProb("Poor", 0.3));                v.add(new StateProb("None", 0.5));                return v;            }            else if (baseStateName.equals("OnlyIndirectPathExists") && actionSettingName.equals("StoreAndForward")) {                v.add(new StateProb("Excellent", 0.1));                v.add(new StateProb("Good", 0.7));                v.add(new StateProb("Fair", 0.1));                v.add(new StateProb("Poor", 0.1));                v.add(new StateProb("None", 0.0));                return v;            }            else if (baseStateName.equals("OnlyIndirectPathExists") && actionSettingName.equals("Disable")) {                v.add(new StateProb("Excellent", 0.0));                v.add(new StateProb("Good", 0.0));                v.add(new StateProb("Fair", 0.0));                v.add(new StateProb("Poor", 0.0));                v.add(new StateProb("None", 1.0));                return v;            }            else if (baseStateName.equals("NoPathExists") && actionSettingName.equals("Normal")) {                v.add(new StateProb("Excellent", 0.0));                v.add(new StateProb("Good", 0.0));                v.add(new StateProb("Fair", 0.0));                v.add(new StateProb("Poor", 0.0));                v.add(new StateProb("None", 1.0));                return v;            }            else if (baseStateName.equals("NoPathExists") && actionSettingName.equals("AlternateDirect")) {                v.add(new StateProb("Excellent", 0.0));                v.add(new StateProb("Good", 0.0));                v.add(new StateProb("Fair", 0.0));                v.add(new StateProb("Poor", 0.0));                v.add(new StateProb("None", 1.0));                return v;            }            else if (baseStateName.equals("NoPathExists") && actionSettingName.equals("StoreAndForward")) {                v.add(new StateProb("Excellent", 0.0));                v.add(new StateProb("Good", 0.0));                v.add(new StateProb("Fair", 0.0));                v.add(new StateProb("Poor", 0.0));                v.add(new StateProb("None", 1.0));                return v;            }            else if (baseStateName.equals("NoPathExists") && actionSettingName.equals("Disable")) {                v.add(new StateProb("Excellent", 0.0));                v.add(new StateProb("Good", 0.0));                v.add(new StateProb("Fair", 0.0));                v.add(new StateProb("Poor", 0.0));                v.add(new StateProb("None", 1.0));                return v;            }            else return null;        }        if (actionName.equals("org.cougaar.core.security.coordinator.SecurityLevelAction")) {        }        return null;    }