Hi, I have a optimization problem to solve using cplex concert technology in c++ I have data in csv file format the data look like:
PR;tie0(0);tie0(1);tie0(2);tie0(3);tie1(0);tie1(1);tie1(2);tie1(3)
1,4;5;10000000;10000000;4;10000000;10000000;10000000;10000000
2,6;10;7;8;10000000;7;10000000;10000000;10000000
3,9;10000000;10000000;10000000;10000000;13;10000000;10000000;10000000
4,5;5;10000000;10000000;10000000;3;10000000;10000000;10000000
5,6;6;10000000;10000000;10000000;10000000;10000000;10000000;10000000
6,7;8;6;10000000;6;10000000;10000000;10000000;10000000
7,8;7;10000000;10000000;10000000;10000000;10000000;10000000;10000000
7,9;4;10000000;10000000;3;10000000;10000000;10000000;10000000
9,10;10000000;10000000;10000000;10000000;5;10000000;10000000;10000000
;13;10000000;10000000;10000000;10000000;10000000;10000000;10000000
I have to use PR(precedence relation of tasks) and tie(Time data on conditions
Below is my code to read this file.My code is able to read display content of this file perfecly but I want to use this in my code how to do it or store it arrays like
PR[][], t0[][],t1[][]
#include<iostream.h>
#include<fstream.h>
#include<conio.h>
#include<string>
#include<stdio.h>
using namespace std;
int main()
{
string filename;
int PR[10][2];
cout << "\nDrag input file here: ";
getline(cin , filename);
ifstream instream;
instream.open(filename.c_str());
if (instream.fail())
{
cout<< "Input file opening failed.\n";
}
getline( instream,filename, '\n' );
instream >> PR[0][0];
getch();
return 0;
}