瀏覽代碼

optimize the GroupClassify feature and particle stop condition algorithm.

gsp 3 年之前
父節點
當前提交
f076b56725

+ 69 - 3
OTSCPP/OTSClassifyEngine/InclutionEngine/OTSClassifyEng.cpp

@@ -369,14 +369,80 @@ namespace OTSClassifyEngine
 		}
 
 		auto stdName = stdItm->GetName();
+		// sulfide classification
+		for (long i = 0; i < INC_SUL_SUB_ELEMENT_MAX; i++)
+		{
+			if (stdName.CompareNoCase(INC_SULFILSES_NAMES[i]) == 0 )
+			{
 
-		if (stdName.CompareNoCase(_T("MnS"))==0)
+				a_GrpId = IDENTIFIED_INC_GRP_ID::SULFIDE;
+				return true;
+			}
+		}
+		if (stdName.CompareNoCase(SULFIDE_STR) == 0 )
 		{
-		   
+
 			a_GrpId = IDENTIFIED_INC_GRP_ID::SULFIDE;
-		    return true;
+			return true;
 		}
 
+		//oxide classification
+		for (long i = 0; i < INC_OXIDE_SUB_ELEMENT_MAX; i++)
+		{
+			if (stdName.CompareNoCase(INC_OXIDE_NAMES[i]) == 0)
+			{
+
+				a_GrpId = IDENTIFIED_INC_GRP_ID::OXIDE;
+				return true;
+			}
+		}
+		if (stdName.CompareNoCase(SPINEL_STR) == 0)
+		{
+
+			a_GrpId = IDENTIFIED_INC_GRP_ID::OXIDE;
+			return true;
+		}
+
+		if (stdName.CompareNoCase(ALUMINATE12CaO_7Al2O3_STR) == 0)
+		{
+
+			a_GrpId = IDENTIFIED_INC_GRP_ID::OXIDE;
+			return true;
+		}
+
+		if (stdName.CompareNoCase(ALUMINATE3CaO_Al2O3_STR) == 0)
+		{
+
+			a_GrpId = IDENTIFIED_INC_GRP_ID::OXIDE;
+			return true;
+		}
+
+		if (stdName.CompareNoCase(ALUMINATE_STR) == 0)
+		{
+
+			a_GrpId = IDENTIFIED_INC_GRP_ID::OXIDE;
+			return true;
+		}
+
+		if (stdName.CompareNoCase(Ca_ALUMINATE_STR) == 0)
+		{
+
+			a_GrpId = IDENTIFIED_INC_GRP_ID::OXIDE;
+			return true;
+		}
+
+		for (long i = 0; i < INC_NITR_SUB_ELEMENT_MAX; i++)
+		{
+			if (stdName.CompareNoCase(INC_NITR_NAMES[i]) == 0)
+			{
+
+				a_GrpId = IDENTIFIED_INC_GRP_ID::CARBONNITRIDE_NITRIDE;
+				return true;
+			}
+		}
+
+
+
 		for (auto pElChem : a_listElChemsIncNoFe)
 		{
 		

+ 1 - 1
OTSIncAMeasureApp/0-OTSModel/Measure/3-MeasureFlow/CSmplMeasure.cs

@@ -365,7 +365,7 @@ namespace OTSModelSharp
             int nNumParticle = 0;
             foreach (var pResult in listMsrResult)
             {
-                if (pResult.GetTypeId() > (int)OTS_PARTCLE_TYPE.NO_ANALYSIS_X_RAY)//summarize the number of the identified particle in this condition
+                if (pResult.GetTypeId() > (int)OTS_PARTCLE_TYPE.NOT_IDENTIFIED)//summarize the number of the identified particle in this condition
                 {
                     nNumParticle += (int)pResult.GetNumber();
                 }