Skip to content

Commit

Permalink
Use unsigned ints and prefix increment
Browse files Browse the repository at this point in the history
  • Loading branch information
flomnes committed Jan 9, 2025
1 parent 3a73ec5 commit 22f517e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/solver/optimisation/opt_optimisation_lineaire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void OPT_WriteSolution(const PROBLEME_ANTARES_A_RESOUDRE& pb,
buffer.clear();

filename = createMarginalCostFilename(optPeriodStringGenerator, optimizationNumber);
for (int cont = 0; cont < pb.NombreDeContraintes; cont++)
for (unsigned int cont = 0; cont < pb.NombreDeContraintes; ++cont)
{
buffer.appendFormat("%s\t%11.10e\n",
pb.NomDesContraintes[cont].c_str(),
Expand All @@ -87,7 +87,7 @@ void OPT_WriteSolution(const PROBLEME_ANTARES_A_RESOUDRE& pb,
buffer.clear();

filename = createReducedCostFilename(optPeriodStringGenerator, optimizationNumber);
for (int var = 0; var < pb.NombreDeVariables; var++)
for (unsigned int var = 0; var < pb.NombreDeVariables; ++var)
{
buffer.appendFormat("%s\t%11.10e\n", pb.NomDesVariables[var].c_str(), pb.CoutsReduits[var]);
}
Expand Down

0 comments on commit 22f517e

Please sign in to comment.