minor modifications for GCC 4.3.0 compatibility
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1239 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
b6798df567
commit
33f3b82974
14 changed files with 40 additions and 5 deletions
|
|
@ -106,7 +106,8 @@ void FlowShopBenchmarkParser::init(const std::string _benchmarkFileName)
|
|||
// initial and current seeds (not used)
|
||||
getline(inputFile, buffer, '\n');
|
||||
// processing times and due-dates
|
||||
p = std::vector< std::vector<unsigned int> > (M,N);
|
||||
//p = std::vector< std::vector<unsigned int> > (M,N);
|
||||
p.resize(N);
|
||||
d = std::vector<unsigned int> (N);
|
||||
// for each job...
|
||||
for (unsigned int j=0 ; j<N ; j++)
|
||||
|
|
@ -119,6 +120,7 @@ void FlowShopBenchmarkParser::init(const std::string _benchmarkFileName)
|
|||
// processing times of the job j on each machine
|
||||
getline(inputFile, buffer, '\n');
|
||||
start = buffer.find_first_not_of(" ");
|
||||
p[j].resize(M);
|
||||
for (unsigned int i=0 ; i<M ; i++)
|
||||
{
|
||||
end = buffer.find_first_of(" ", start);
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@
|
|||
#ifndef FLOWSHOPBENCHMARKPARSER_H_
|
||||
#define FLOWSHOPBENCHMARKPARSER_H_
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
|
|
|||
|
|
@ -77,7 +77,14 @@ double FlowShopEval::tardiness(const FlowShop & _flowshop)
|
|||
|
||||
std::vector< std::vector<unsigned int> > FlowShopEval::completionTime(const FlowShop & _flowshop)
|
||||
{
|
||||
std::vector< std::vector<unsigned int> > C(M,N);
|
||||
//std::vector< std::vector<unsigned int> > C(M,N);
|
||||
std::vector< std::vector<unsigned int> > C;
|
||||
C.resize(M);
|
||||
for(unsigned int i=0;i<N;i++)
|
||||
{
|
||||
C[i].resize(N);
|
||||
}
|
||||
|
||||
C[0][_flowshop[0]] = p[0][_flowshop[0]];
|
||||
for (unsigned int j=1; j<N; j++)
|
||||
C[0][_flowshop[j]] = C[0][_flowshop[j-1]] + p[0][_flowshop[j]];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue