// File: /workspace/github_cpp_makefile_star2_O2/DivyanshuSaxena[P]green-vrp/Main.cpp
// Function: fillGlobalVariables()
void fillGlobalVariables() {
	// Call certain file from here which will scan .csv(excel) file
	// and fill customerpool accordingly.

	//reading vehicle type below
	ifstream infile;
	infile.open("input_vehicle_type.csv");

		string temp;
		getline(infile,temp,'\n');

	    getline(infile,temp,',');//id
	    getline(infile,temp,',');//type
	    getline(infile,temp,',');//vol max
		capVolType1=stod(temp);
	    getline(infile,temp,',');//max weight
		capVolType1=stod(temp);	

	    getline(infile,temp,',');//driving cnt--unlimited

	    getline(infile,temp,',');//driving range--per full charge
		distanceType1=stod(temp);
		
	    getline(infile,temp,',');//charging time--sae for both
		chargeTime1=stod(temp)*60;
		
	    getline(infile,temp,',');//unit cost--per distance
		unitTransCost1=stod(temp);
		
	    getline(infile,temp,'\n');//fixed cost
		fixedCost1=stod(temp);
		

	    getline(infile,temp,',');
	    getline(infile,temp,',');
	    getline(infile,temp,',');
		capVolType2=stod(temp);
	    getline(infile,temp,',');
		capVolType2=stod(temp);	

	    getline(infile,temp,',');

	    getline(infile,temp,',');
		distanceType2=stod(temp);
		
	    getline(infile,temp,',');
		chargeTime2=stod(temp)*60;
		
	    getline(infile,temp,',');
		unitTransCost2=stod(temp);
		
	    getline(infile,temp,'\n');
		fixedCost2=stod(temp);
		//readingn vehicle info end
		//input of distance_time begins

		std::string file_path= "input_distance-time.txt";
		// std::cout<<"hi"<<std::endl;
		std::ifstream fin(file_path.c_str());
		// std::cout<<"hi"<<std::endl;
		
		getline(fin, temp);//ignoring the first line with heading
		for(long i=0;i<=1211099;i++)
		{
			long fromNode,toNode;
			getline(fin,temp,',');
			fromNode=stoi(temp);
			getline(fin,temp,',');
			toNode=stoi(temp);
			getline(fin,temp,',');

			travelDistance[fromNode][toNode]=stod(temp);
			getline(fin,temp,',');
			travelTimes[fromNode][toNode]=stod(temp);
		}
		//distance-time input end between nodes
		//reading the input_node file below

		numChargingStations=100;
		numCustomers=1000;

		for (int k=1;k<=numCustomers;k++){
			customerPool.push_back(k);
		}//1-1000

		numNodes=1101;
		infile.open("input_vehicle_type.csv");
		string s_temp;
		getline(infile,s_temp,'\n');//enter heading lines
		//importing depot info

		Customer depot;
		getline(infile,s_temp,',');//id
		depot.id=stoi(s_temp);
		getline(infile,s_temp,',');//type
		getline(infile,s_temp,',');//lng
		// depot.lng=stod(s_temp);
		getline(infile,s_temp,',');//lat
		// depot.lat=stod(s_temp);
		getline(infile,s_temp,',');
		getline(infile,s_temp,',');
		getline(infile,s_temp,':');//start time:hour
			double depothour=stod(s_temp)*60;
		getline(infile,s_temp,',');//start time:minute
			depot.timeWindowStarts=stod(s_temp)+depothour;
		getline(infile,s_temp,'\n');//end time
			depot.timeWindowEnds=1440;
		
		customers.push_back(depot);
		
		getline(infile,s_temp,',');
		
		for(int i=1;i<=1000;i++)
		{
			string s_temp;
			Customer tempNode;
			getline(infile,s_temp,',');//id
			tempNode.id=stoi(s_temp);
			getline(infile,s_temp,',');//type
			getline(infile,s_temp,',');//lng
			// tempNode.lng=stod(s_temp);
			getline(infile,s_temp,',');//lat
			// tempNode.lat=stod(s_temp);
			getline(infile,s_temp,',');//weight
			tempNode.demandWeight=stod(s_temp);
			getline(infile,s_temp,',');//volume
			tempNode.demandVol=stod(s_temp);			
			getline(infile,s_temp,':');//start time:hour
					double customerstarthour=stod(s_temp)*60;
			getline(infile,s_temp,',');//start time:minute		
					tempNode.timeWindowStarts=customerstarthour + stod(s_temp);
			getline(infile,s_temp,':');//end time:hour
					double customerendhour=stod(s_temp)*60;
			getline(infile,s_temp,'\n');//end time
					tempNode.timeWindowEnds=customerendhour +stod(s_temp);
			
			customers.push_back(tempNode);
		}
		for(int i=1001;i<=1100;i++)
		{
			string s_temp;
			Customer csNode;
			getline(infile,s_temp,',');//id
			csNode.id=stoi(s_temp);
			getline(infile,s_temp,',');//type
			getline(infile,s_temp,',');//lng
			// csNode.lng=stod(s_temp);
			getline(infile,s_temp,',');//lat
			// csNode.lat=stod(s_temp);
			getline(infile,s_temp,',');//weight
			getline(infile,s_temp,',');//volume
			getline(infile,s_temp,',');//start time
			getline(infile,s_temp,'\n');//end time
			
			customers.push_back(csNode);

		}
//reading input node end




	    // getline(infile,capVolType1,',');

		// getline(infile,capWeightType1,',');
	    // getline(infile,temp,',');
	    // getline(infile,distanceType1,',');
	    // getline(infile,chargeTime1,',');
	    // getline(infile,unitTransCost1,',');
	    // getline(infile,fixedCost1,'\n');

	    // getline(infile,temp,',');
	    // getline(infile,temp,',');
	    // getline(infile,capVolType2,',');
	    // getline(infile,capWeightType2,',');
	    // getline(infile,temp,',');
	    // getline(infile,capVolType2,',');
	    // getline(infile,chargeTime2,',');
	    // getline(infile,unitTransCost2,',');
	    // getline(infile,fixedCost2,'\n');
		


		
		


    // vector<char*> values;
    // const int MAXSIZE = 4;
    // char thisVal[MAXSIZE];
    // while(in.getline(thisVal,MAXSIZE,',')) {
    //     values.resize(values.size() + 1);
    //     values.back() = new char[MAXSIZE];
    //     strcpy(values.back(), thisVal);
    // }
    // in.close();
    // for (char* cp: values) cout<<*cp<<endl;


	
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x508, %rsp            # imm = 0x508
leaq 0xf8(%rsp), %rbx
movq %rbx, %rdi
callq 0x2160
leaq 0x26fc(%rip), %rsi      # 0x6192
pushq $0x8
popq %rdx
movq %rbx, %rdi
callq 0x20e0
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0xf8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
pushq $0xa
popq %rdx
callq 0x2250
leaq 0xf8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
pushq $0x2c
popq %rdx
callq 0x2250
leaq 0xf8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
pushq $0x2c
popq %rdx
callq 0x2250
leaq 0xf8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
pushq $0x2c
popq %rdx
callq 0x2250
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x45b5
movsd %xmm0, 0x56f6(%rip)     # 0x9210
leaq 0xf8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
pushq $0x2c
popq %rdx
callq 0x2250
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x45b5
movsd %xmm0, 0x56cd(%rip)     # 0x9210
leaq 0xf8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
pushq $0x2c
popq %rdx
callq 0x2250
leaq 0xf8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
pushq $0x2c
popq %rdx
callq 0x2250
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x45b5
movsd %xmm0, 0x56af(%rip)     # 0x9230
leaq 0xf8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
pushq $0x2c
popq %rdx
callq 0x2250
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x45b5
mulsd 0x24fe(%rip), %xmm0     # 0x60a8
movsd %xmm0, 0x56ae(%rip)     # 0x9260
leaq 0xf8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
pushq $0x2c
popq %rdx
callq 0x2250
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x45b5
movsd %xmm0, 0x5675(%rip)     # 0x9250
leaq 0xf8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
pushq $0xa
popq %rdx
callq 0x2250
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x45b5
movsd %xmm0, 0x563c(%rip)     # 0x9240
leaq 0xf8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
pushq $0x2c
popq %rdx
callq 0x2250
leaq 0xf8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
pushq $0x2c
popq %rdx
callq 0x2250
leaq 0xf8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
pushq $0x2c
popq %rdx
callq 0x2250
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x45b5
movsd %xmm0, 0x55c1(%rip)     # 0x9218
leaq 0xf8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
pushq $0x2c
popq %rdx
callq 0x2250
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x45b5
movsd %xmm0, 0x5598(%rip)     # 0x9218
leaq 0xf8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
pushq $0x2c
popq %rdx
callq 0x2250
leaq 0xf8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
pushq $0x2c
popq %rdx
callq 0x2250
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x45b5
movsd %xmm0, 0x557a(%rip)     # 0x9238
leaq 0xf8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
pushq $0x2c
popq %rdx
callq 0x2250
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x45b5
mulsd 0x23c1(%rip), %xmm0     # 0x60a8
movsd %xmm0, 0x5579(%rip)     # 0x9268
leaq 0xf8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
pushq $0x2c
popq %rdx
callq 0x2250
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x45b5
movsd %xmm0, 0x5540(%rip)     # 0x9258
leaq 0xf8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
pushq $0xa
popq %rdx
callq 0x2250
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x45b5
movsd %xmm0, 0x5507(%rip)     # 0x9248
leaq 0x2461(%rip), %rsi      # 0x61a9
leaq 0xd8(%rsp), %rdi
leaq 0x300(%rsp), %rdx
callq 0x45ce
movq 0xd8(%rsp), %rsi
leaq 0x300(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0x2240
leaq 0x300(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x2050
movl $0x127adc, %r15d        # imm = 0x127ADC
leaq 0x300(%rsp), %rbx
leaq 0x8(%rsp), %r14
pushq $0x2c
popq %rbp
subq $0x1, %r15
jb 0x3e40
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x2250
movq %r14, %rdi
xorl %esi, %esi
pushq $0xa
popq %rdx
callq 0x4609
movl %eax, %r12d
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x2250
movq %r14, %rdi
xorl %esi, %esi
pushq $0xa
popq %rdx
callq 0x4609
movl %eax, %r13d
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x2250
movq %r14, %rdi
xorl %esi, %esi
callq 0x45b5
movslq %r12d, %rax
movslq %r13d, %r12
movq 0x5393(%rip), %rcx      # 0x9198
imulq $0x18, %rax, %r13
movq (%rcx,%r13), %rax
movsd %xmm0, (%rax,%r12,8)
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x2250
movq %r14, %rdi
xorl %esi, %esi
callq 0x45b5
movq 0x537f(%rip), %rax      # 0x91b0
movq (%rax,%r13), %rax
movsd %xmm0, (%rax,%r12,8)
jmp 0x3d9d
movl $0x64, 0x5312(%rip)     # 0x915c
movl $0x3e8, 0x530c(%rip)    # imm = 0x3E8
pushq $0x1
popq %rax
movl $0x3e8, %ecx            # imm = 0x3E8
leaq 0x5365(%rip), %rbx      # 0x91c8
leaq 0xa0(%rsp), %r14
movl %eax, 0xa0(%rsp)
cmpl %ecx, %eax
jg 0x3e92
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4626
movl 0xa0(%rsp), %eax
incl %eax
movl 0x52d0(%rip), %ecx      # 0x9160
jmp 0x3e6b
movl $0x44d, 0x52c8(%rip)    # imm = 0x44D
leaq 0x22ef(%rip), %rsi      # 0x6192
leaq 0xf8(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0x20e0
leaq 0x38(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0xf8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
pushq $0xa
popq %rdx
callq 0x2250
xorpd %xmm0, %xmm0
movupd %xmm0, 0xa8(%rsp)
leaq 0xf8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
pushq $0x2c
popq %rdx
callq 0x2250
leaq 0x28(%rsp), %rdi
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0x4609
movl %eax, 0xa0(%rsp)
leaq 0xf8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
pushq $0x2c
popq %rdx
callq 0x2250
leaq 0xf8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
pushq $0x2c
popq %rdx
callq 0x2250
leaq 0xf8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
pushq $0x2c
popq %rdx
callq 0x2250
leaq 0xf8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
pushq $0x2c
popq %rdx
callq 0x2250
leaq 0xf8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
pushq $0x2c
popq %rdx
callq 0x2250
leaq 0xf8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
pushq $0x3a
popq %rdx
callq 0x2250
leaq 0x28(%rsp), %rdi
xorl %esi, %esi
callq 0x45b5
movsd %xmm0, (%rsp)
leaq 0xf8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
pushq $0x2c
popq %rdx
callq 0x2250
leaq 0x28(%rsp), %rdi
xorl %esi, %esi
callq 0x45b5
movsd (%rsp), %xmm1
mulsd 0x20da(%rip), %xmm1     # 0x60a8
addsd %xmm0, %xmm1
movsd %xmm1, 0xc8(%rsp)
leaq 0xf8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
pushq $0xa
popq %rdx
callq 0x2250
movabsq $0x4096800000000000, %rax # imm = 0x4096800000000000
leaq 0xa0(%rsp), %rsi
movq %rax, 0x30(%rsi)
leaq 0x51d3(%rip), %rdi      # 0x91e0
callq 0x4644
leaq 0xf8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
pushq $0x2c
popq %rdx
callq 0x2250
movl $0x3e8, %r13d           # imm = 0x3E8
leaq 0xf8(%rsp), %rbx
leaq 0x48(%rsp), %r14
pushq $0x2c
popq %rbp
pushq $0xa
popq %r15
pushq $0x3a
popq %r12
subl $0x1, %r13d
jb 0x41c4
leaq 0x58(%rsp), %rax
movq %rax, 0x48(%rsp)
andq $0x0, 0x50(%rsp)
movb $0x0, 0x58(%rsp)
andl $0x0, 0x68(%rsp)
leaq 0x70(%rsp), %rax
xorpd %xmm0, %xmm0
movupd %xmm0, (%rax)
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x2250
movq %r14, %rdi
xorl %esi, %esi
movl %r15d, %edx
callq 0x4609
movl %eax, 0x68(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x2250
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x2250
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x2250
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x2250
movq %r14, %rdi
xorl %esi, %esi
callq 0x45b5
movsd %xmm0, 0x70(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x2250
movq %r14, %rdi
xorl %esi, %esi
callq 0x45b5
movsd %xmm0, 0x78(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movl %r12d, %edx
callq 0x2250
movq %r14, %rdi
xorl %esi, %esi
callq 0x45b5
movsd %xmm0, (%rsp)
movsd (%rsp), %xmm0
mulsd 0x1f89(%rip), %xmm0     # 0x60a8
movsd %xmm0, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x2250
movq %r14, %rdi
xorl %esi, %esi
callq 0x45b5
movsd (%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x90(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movl %r12d, %edx
callq 0x2250
movq %r14, %rdi
xorl %esi, %esi
callq 0x45b5
movsd %xmm0, (%rsp)
movsd (%rsp), %xmm0
mulsd 0x1f31(%rip), %xmm0     # 0x60a8
movsd %xmm0, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movl %r15d, %edx
callq 0x2250
movq %r14, %rdi
xorl %esi, %esi
callq 0x45b5
movsd (%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x98(%rsp)
leaq 0x5033(%rip), %rdi      # 0x91e0
leaq 0x68(%rsp), %rsi
callq 0x4644
movq %r14, %rdi
callq 0x20b0
jmp 0x4045
pushq $0x64
popq %r12
leaq 0xf8(%rsp), %rbx
leaq 0x48(%rsp), %r14
pushq $0x2c
popq %rbp
pushq $0xa
popq %r15
leaq 0x68(%rsp), %r13
subl $0x1, %r12d
jb 0x42a8
leaq 0x58(%rsp), %rax
movq %rax, 0x48(%rsp)
andq $0x0, 0x50(%rsp)
movb $0x0, 0x58(%rsp)
andl $0x0, 0x68(%rsp)
leaq 0x70(%rsp), %rax
xorpd %xmm0, %xmm0
movupd %xmm0, (%rax)
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x2250
movq %r14, %rdi
xorl %esi, %esi
movl %r15d, %edx
callq 0x4609
movl %eax, 0x68(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x2250
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x2250
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x2250
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x2250
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x2250
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x2250
movq %rbx, %rdi
movq %r14, %rsi
movl %r15d, %edx
callq 0x2250
leaq 0x4f4d(%rip), %rdi      # 0x91e0
movq %r13, %rsi
callq 0x4644
movq %r14, %rdi
callq 0x20b0
jmp 0x41e1
leaq 0x28(%rsp), %rdi
callq 0x20b0
leaq 0x300(%rsp), %rdi
callq 0x2060
leaq 0xd8(%rsp), %rdi
callq 0x20b0
leaq 0x8(%rsp), %rdi
callq 0x20b0
leaq 0xf8(%rsp), %rdi
callq 0x2060
addq $0x508, %rsp            # imm = 0x508
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4307
movq %rax, %rbx
jmp 0x4342
jmp 0x430e
movq %rax, %rbx
jmp 0x4359
jmp 0x4317
jmp 0x4307
movq %rax, %rbx
jmp 0x432b
jmp 0x4317
movq %rax, %rbx
jmp 0x434f
jmp 0x431e
jmp 0x431e
movq %rax, %rbx
jmp 0x4335
jmp 0x431e
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x20b0
leaq 0x28(%rsp), %rdi
callq 0x20b0
leaq 0x300(%rsp), %rdi
callq 0x2060
leaq 0xd8(%rsp), %rdi
callq 0x20b0
leaq 0x8(%rsp), %rdi
callq 0x20b0
leaq 0xf8(%rsp), %rdi
callq 0x2060
movq %rbx, %rdi
callq 0x2220