From 5ada4f7e97919e4b650dfce80bc3271b977cfe28 Mon Sep 17 00:00:00 2001 From: Abdoulbari ZAKIR Date: Wed, 22 Nov 2023 15:03:58 +0100 Subject: [PATCH] updating spx_calculer_erbmoins1_avec_base_reduite.c --- ...spx_calculer_erbmoins1_avec_base_reduite.c | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/src/SIMPLEXE/spx_calculer_erbmoins1_avec_base_reduite.c b/src/SIMPLEXE/spx_calculer_erbmoins1_avec_base_reduite.c index 2ef5b75..7240750 100644 --- a/src/SIMPLEXE/spx_calculer_erbmoins1_avec_base_reduite.c +++ b/src/SIMPLEXE/spx_calculer_erbmoins1_avec_base_reduite.c @@ -158,11 +158,12 @@ if ( CalculEnHyperCreux == OUI_SPX ) { } # if VERIFICATION_ERBMOINS1 == OUI_SPX -printf("------------- CalculerErBMoins1 Spx->NombreDeChangementsDeBase %d Iteration %d ---\n",Spx->NombreDeChangementsDeBase,Spx->Iteration); -if ( TypeDEntree == VECTEUR_LU ) printf("TypeDEntree = VECTEUR_LU\n"); -if ( TypeDEntree == COMPACT_LU ) printf("TypeDEntree = COMPACT_LU\n"); -if ( TypeDeSortie == VECTEUR_LU ) printf("TypeDeSortie = VECTEUR_LU\n"); -if ( TypeDeSortie == COMPACT_LU ) printf("TypeDeSortie = COMPACT_LU\n"); +snprintf(msg, SIRIUS_CALLBACK_BUFFER_SIZE, "------------- CalculerErBMoins1 Spx->NombreDeChangementsDeBase %d Iteration %d ---\n",Spx->NombreDeChangementsDeBase,Spx->Iteration); +call_back(Spx->something_from_the_caller, msg, 0, SIRIUS_INFO); +if ( TypeDEntree == VECTEUR_LU ) call_back(Spx->something_from_the_caller, "TypeDEntree = VECTEUR_LU\n", 0, SIRIUS_INFO); +if ( TypeDEntree == COMPACT_LU ) call_back(Spx->something_from_the_caller,"TypeDEntree = COMPACT_LU\n", 0, SIRIUS_INFO); +if ( TypeDeSortie == VECTEUR_LU ) call_back(Spx->something_from_the_caller,"TypeDeSortie = VECTEUR_LU\n", 0, SIRIUS_INFO); +if ( TypeDeSortie == COMPACT_LU ) call_back(Spx->something_from_the_caller,"TypeDeSortie = COMPACT_LU\n", 0, SIRIUS_INFO); { double * Buff; int i; int Var; int ic; int icMx; double S; double * Sortie; char Arret; Buff = (double *) malloc( Spx->NombreDeContraintes * sizeof( double ) ); @@ -187,22 +188,26 @@ for ( i = 0 ; i < Spx->NombreDeContraintes ; i++ ) { ic++; } if ( fabs( S - Buff[i] ) > 1.e-7 ) { - printf("i = %d S %e Buff %e ecart %e\n",i,S,Buff[i],fabs( S - Buff[i] )); - printf("Var = %d\n",Var); + snprintf(msg, SIRIUS_CALLBACK_BUFFER_SIZE,"i = %d S %e Buff %e ecart %e\n",i,S,Buff[i],fabs( S - Buff[i] )); + call_back(Spx->something_from_the_caller, msg, 0, SIRIUS_INFO); + snprintf(msg, SIRIUS_CALLBACK_BUFFER_SIZE,"Var = %d\n",Var); + call_back(Spx->something_from_the_caller, msg, 0, SIRIUS_INFO); ic = Spx->Cdeb[Var]; icMx = ic + Spx->CNbTerm[Var]; while ( ic < icMx ) { - printf("NumeroDeContrainte[%d] = %d Sortie = %e ACol = %e\n",ic,Spx->NumeroDeContrainte[ic],Sortie[Spx->NumeroDeContrainte[ic]],Spx->ACol[ic]); - ic++; + snprintf(msg, SIRIUS_CALLBACK_BUFFER_SIZE, "NumeroDeContrainte[%d] = %d Sortie = %e ACol = %e\n",ic,Spx->NumeroDeContrainte[ic],Sortie[Spx->NumeroDeContrainte[ic]],Spx->ACol[ic]); + call_back(Spx->something_from_the_caller, msg, 0, SIRIUS_INFO); + ic++; } Arret = OUI_SPX; } } if ( Arret == OUI_SPX ) { - printf("RangDeLaMatriceFactorisee %d NombreDeContraintes %d\n",Spx->RangDeLaMatriceFactorisee,Spx->NombreDeContraintes); + snprintf(msg, SIRIUS_CALLBACK_BUFFER_SIZE, "RangDeLaMatriceFactorisee %d NombreDeContraintes %d\n",Spx->RangDeLaMatriceFactorisee,Spx->NombreDeContraintes); + call_back(Spx->something_from_the_caller, msg, 0, SIRIUS_FATAL); exit(0); } -printf("Fin verif erbmoins1 OK\n"); +call_back(Spx->something_from_the_caller,"Fin verif erbmoins1 OK\n", 0, SIRIUS_INFO); free( Buff ); free( Sortie );