Skip to content

Commit

Permalink
updating spx_calculer_erbmoins1_avec_base_reduite.c
Browse files Browse the repository at this point in the history
  • Loading branch information
a-zakir committed Nov 22, 2023
1 parent ec08c07 commit 5ada4f7
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions src/SIMPLEXE/spx_calculer_erbmoins1_avec_base_reduite.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) );
Expand All @@ -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 );

Expand Down

0 comments on commit 5ada4f7

Please sign in to comment.