_uses_implicit_diagnoses = ( diag_ts.getReportingPolicy() == DiagnosisTechSpecInterface.ALWAYS_CURRENT );
    private void setContents( DiagnosisTechSpecInterface diag_ts,                              AssetTypeDimensionModel asset_dim_model )            throws BelievabilityException    {        if (( diag_ts == null )            || ( asset_dim_model == null ))            throw new BelievabilityException                    ( "SensorTypeModel.setContents()",                      "NULL parameter(s) sent in." );        // In case we begin with this model being valid, we want to        // be able to have this be invalid if we only get part way        // through this method before throwing some exception.        //        setValidity( false );        this._diag_ts = diag_ts;        this._asset_dim_model = asset_dim_model;        _name = diag_ts.getName();        _uid = diag_ts.getUID();        _latency = diag_ts.getLatency();        _state_dim_name = asset_dim_model.getStateDimensionName();        Set obs_set = diag_ts.getPossibleValues();        if ( obs_set == null )            throw new BelievabilityException                    ( "SensorTypeModel.setContents(" + _name + ")",                      "NULL found when retrieving diagnosis name set." );                if ( obs_set.size() == 0 )            throw new BelievabilityException                    ( "SensorTypeModel.setContents(" + _name + ")",                      "Empty diagnosis name set." );                _obs_names = new String[obs_set.size()];        Iterator name_iter = obs_set.iterator();        for ( int obs_idx = 0; name_iter.hasNext(); obs_idx++ )        {            _obs_names[obs_idx] = (String) name_iter.next();            logDetail( "Adding observation name: " + _obs_names[obs_idx] );        } // while name_iter        int num_state_values                 = asset_dim_model.getNumStateDimValues( );        _obs_prob = new double[num_state_values][obs_set.size()];        Vector diag_prob_list = _diag_ts.getDiagnosisProbabilities();         if ( diag_prob_list == null )            throw new BelievabilityException                    ( "SensorTypeModel.setContents(" + _name + ")",                      "NULL found for diagnosis probabilities." );                if ( diag_prob_list.size() == 0 )            throw new BelievabilityException                    ( "SensorTypeModel.setContents(" + _name + ")",                      "Empty diagnosis probability vector." );        if ( diag_prob_list.size() != num_state_values )            throw new BelievabilityException                    ( "SensorTypeModel.setContents(" + _name + ")",                      "Too few/many probabilities for state values: "                      + diag_prob_list.size() + " != " +  num_state_values );        Iterator diag_prob_iter = diag_prob_list.iterator();        while( diag_prob_iter.hasNext() )        {            DiagnosisProbability obs_prob                    = (DiagnosisProbability) diag_prob_iter.next();            String actual_state = obs_prob.getActualState().getName();            int state_idx                    = asset_dim_model.getStateDimValueIndex( actual_state );            if ( state_idx < 0 )                throw new BelievabilityException                        ( "SensorTypeModel.setContents(" + _name + ")",                          "Bad asset state value found: "                          + _state_dim_name + ":" + actual_state );            Vector diag_as_list = obs_prob.getProbabilities();            if ( diag_as_list == null )                throw new BelievabilityException                        ( "SensorTypeModel.setContents(" + _name + ")",                          "NULL found for diagnosis probability vector: "                          + _state_dim_name + ":" + actual_state );                        if ( diag_as_list.size() == 0 )                throw new BelievabilityException                        ( "SensorTypeModel.setContents(" + _name + ")",                          "Empty diagnosis probability vector found: "                          + _state_dim_name + ":" + actual_state );            double obs_prob_sum = 0.0;            Iterator diag_as_iter = diag_as_list.iterator();            while( diag_as_iter.hasNext() )            {                DiagnoseAs diag_as = (DiagnoseAs) diag_as_iter.next();                String obs_name = diag_as.getDiagnosisValue();                int obs_idx = getObsNameIndex( obs_name );                if ( obs_idx < 0 )                    throw new BelievabilityException                            ( "SensorTypeModel.setContents(" + _name + ")",                              "Bad diagnosis value found: " + obs_name                               + " for "                               + _state_dim_name + ":" + actual_state );                double prob = diag_as.getProbability();                _obs_prob[state_idx][obs_idx] = prob;                                obs_prob_sum += prob;                            } // while diag_as_iter            if ( ! Precision.isEqual( obs_prob_sum, 1.0 ))                throw new BelievabilityException                        ( "SensorTypeModel.setContents(" + _name + ")",                          "Observation probabilities do not sum to 1.0. (sum="                          + obs_prob_sum + ") for "                          + _state_dim_name + ":" + actual_state );        } // while diag_prob_iter    } // method setContents