// File: EduBic[P]TSP-MetaheuristicSolvers/solversexecutor.cpp
// Function: SolversExecutor::printResults() const
void SolversExecutor::printResults() const {
    std::cout << "----------------------------------------------------------------------" << std::endl;

    TSPSolution* bestSolutionFound;
    std::vector<TSPSolution*> bestSolutionsFound;
    double bestValue = 1e10;

    for (vector<TSPSolution*>::const_iterator it = mBestSolutions.begin(); it != mBestSolutions.end(); ++it) {
        double value = (*it)->evaluateObjectiveFunction(mTspInstance);

        if (value < bestValue) {
            bestValue = value;
            bestSolutionFound = *it;
        }

        if (value <= bestValue) {
            bestSolutionsFound.push_back(*it);
        }

        std::cout << std::endl << (*it)->solveBy << std::endl;
        std::cout << "(value : " << value << ")\n";
        std::cout << "sec. (user time) " << (*it)->userTime << std::endl;
        std::cout << "sec. (CPU time) " << (*it)->cpuTime << std::endl;
        cout << "Max iterations " << (*it)->iterations << endl;
    }

    if (mBestSolutions.size() > 1) {

        std::cout << "------------------------------- THE WINNER -------------------------------------" << std::endl;

        std::cout << std::endl << bestSolutionFound->solveBy << std::endl;
        std::cout << "(value : " << bestValue << ")\n";
        std::cout << "sec. (user time) " << bestSolutionFound->userTime << std::endl;
        std::cout << "sec. (CPU time) " << bestSolutionFound->cpuTime << std::endl;

        std::cout << "------------------------------- THE WINNERS -------------------------------------" << std::endl;

        for (vector<TSPSolution*>::const_iterator it = bestSolutionsFound.begin(); it != bestSolutionsFound.end(); ++it) {
            double value = (*it)->evaluateObjectiveFunction(mTspInstance);

            std::cout << std::endl << (*it)->solveBy << std::endl;
            std::cout << "(value : " << value << ")\n";
            std::cout << "sec. (user time) " << (*it)->userTime << std::endl;
            std::cout << "sec. (CPU time) " << (*it)->cpuTime << std::endl;
        }
    }

    cout << endl;
}

// Assembly:
subq $0x178, %rsp            # imm = 0x178
movq %rdi, 0x170(%rsp)
movq 0x170(%rsp), %rax
movq %rax, 0xf8(%rsp)
movq 0xf4aa(%rip), %rdi      # 0x13fd0
leaq 0x959b(%rip), %rsi      # 0xe0c8
callq 0x3280
movq %rax, %rdi
movq 0xf474(%rip), %rsi      # 0x13fb0
callq 0x32b0
leaq 0x150(%rsp), %rdi
callq 0x52a0
movq 0xf8(%rsp), %rdi
movsd 0x94aa(%rip), %xmm0     # 0xe008
movsd %xmm0, 0x148(%rsp)
addq $0x48, %rdi
callq 0x5d00
movq %rax, 0x140(%rsp)
movq 0xf8(%rsp), %rdi
addq $0x48, %rdi
callq 0x5d70
movq %rax, 0x138(%rsp)
leaq 0x140(%rsp), %rdi
leaq 0x138(%rsp), %rsi
callq 0x5d30
testb $0x1, %al
jne 0x4baf
jmp 0x4e70
leaq 0x140(%rsp), %rdi
callq 0x5da0
movq 0xf8(%rsp), %rsi
movq (%rax), %rdi
addq $0x8, %rsi
callq 0x5bf0
movsd %xmm0, 0xf0(%rsp)
jmp 0x4bdb
movsd 0xf0(%rsp), %xmm0
movsd %xmm0, 0x130(%rsp)
movsd 0x130(%rsp), %xmm1
movsd 0x148(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x4c57
movsd 0x130(%rsp), %xmm0
movsd %xmm0, 0x148(%rsp)
leaq 0x140(%rsp), %rdi
callq 0x5da0
movq (%rax), %rax
movq %rax, 0x168(%rsp)
jmp 0x4c57
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x128(%rsp)
movl %eax, 0x124(%rsp)
leaq 0x150(%rsp), %rdi
callq 0x5450
jmp 0x5238
movsd 0x130(%rsp), %xmm1
movsd 0x148(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x4c90
leaq 0x140(%rsp), %rdi
callq 0x5da0
movq %rax, %rsi
leaq 0x150(%rsp), %rdi
callq 0x57c0
jmp 0x4c8e
jmp 0x4c90
movq 0xf339(%rip), %rdi      # 0x13fd0
movq 0xf312(%rip), %rsi      # 0x13fb0
callq 0x32b0
movq %rax, 0xe8(%rsp)
jmp 0x4cad
leaq 0x140(%rsp), %rdi
callq 0x5da0
movq 0xe8(%rsp), %rdi
movq (%rax), %rsi
addq $0x18, %rsi
callq 0x3240
movq %rax, 0xe0(%rsp)
jmp 0x4cd8
movq 0xe0(%rsp), %rdi
movq 0xf2c9(%rip), %rsi      # 0x13fb0
callq 0x32b0
jmp 0x4cee
movq 0xf2db(%rip), %rdi      # 0x13fd0
leaq 0x9413(%rip), %rsi      # 0xe10f
callq 0x3280
movq %rax, 0xd8(%rsp)
jmp 0x4d0b
movq 0xd8(%rsp), %rdi
movsd 0x130(%rsp), %xmm0
callq 0x3460
movq %rax, 0xd0(%rsp)
jmp 0x4d2b
movq 0xd0(%rsp), %rdi
leaq 0x9415(%rip), %rsi      # 0xe14f
callq 0x3280
jmp 0x4d41
movq 0xf288(%rip), %rdi      # 0x13fd0
leaq 0x93cd(%rip), %rsi      # 0xe11c
callq 0x3280
movq %rax, 0xc8(%rsp)
jmp 0x4d5e
leaq 0x140(%rsp), %rdi
callq 0x5da0
movq 0xc8(%rsp), %rdi
movq (%rax), %rax
movsd 0x38(%rax), %xmm0
callq 0x3460
movq %rax, 0xc0(%rsp)
jmp 0x4d8a
movq 0xc0(%rsp), %rdi
movq 0xf217(%rip), %rsi      # 0x13fb0
callq 0x32b0
jmp 0x4da0
movq 0xf229(%rip), %rdi      # 0x13fd0
leaq 0x9380(%rip), %rsi      # 0xe12e
callq 0x3280
movq %rax, 0xb8(%rsp)
jmp 0x4dbd
leaq 0x140(%rsp), %rdi
callq 0x5da0
movq 0xb8(%rsp), %rdi
movq (%rax), %rax
movsd 0x40(%rax), %xmm0
callq 0x3460
movq %rax, 0xb0(%rsp)
jmp 0x4de9
movq 0xb0(%rsp), %rdi
movq 0xf1b8(%rip), %rsi      # 0x13fb0
callq 0x32b0
jmp 0x4dff
movq 0xf1ca(%rip), %rdi      # 0x13fd0
leaq 0x9332(%rip), %rsi      # 0xe13f
callq 0x3280
movq %rax, 0xa8(%rsp)
jmp 0x4e1c
leaq 0x140(%rsp), %rdi
callq 0x5da0
movq 0xa8(%rsp), %rdi
movq (%rax), %rax
movl 0x48(%rax), %esi
callq 0x3300
movq %rax, 0xa0(%rsp)
jmp 0x4e46
movq 0xa0(%rsp), %rdi
movq 0xf15b(%rip), %rsi      # 0x13fb0
callq 0x32b0
jmp 0x4e5c
jmp 0x4e5e
leaq 0x140(%rsp), %rdi
callq 0x5db0
jmp 0x4b78
movq 0xf8(%rsp), %rdi
addq $0x48, %rdi
callq 0x5b10
cmpq $0x1, %rax
jbe 0x520e
movq 0xf13e(%rip), %rdi      # 0x13fd0
leaq 0x92b9(%rip), %rsi      # 0xe152
callq 0x3280
movq %rax, 0x98(%rsp)
jmp 0x4ea8
movq 0x98(%rsp), %rdi
movq 0xf0f9(%rip), %rsi      # 0x13fb0
callq 0x32b0
jmp 0x4ebe
movq 0xf10b(%rip), %rdi      # 0x13fd0
movq 0xf0e4(%rip), %rsi      # 0x13fb0
callq 0x32b0
movq %rax, 0x90(%rsp)
jmp 0x4edb
movq 0x90(%rsp), %rdi
movq 0x168(%rsp), %rsi
addq $0x18, %rsi
callq 0x3240
movq %rax, 0x88(%rsp)
jmp 0x4efe
movq 0x88(%rsp), %rdi
movq 0xf0a3(%rip), %rsi      # 0x13fb0
callq 0x32b0
jmp 0x4f14
movq 0xf0b5(%rip), %rdi      # 0x13fd0
leaq 0x91ed(%rip), %rsi      # 0xe10f
callq 0x3280
movq %rax, 0x80(%rsp)
jmp 0x4f31
movq 0x80(%rsp), %rdi
movsd 0x148(%rsp), %xmm0
callq 0x3460
movq %rax, 0x78(%rsp)
jmp 0x4f4e
movq 0x78(%rsp), %rdi
leaq 0x91f5(%rip), %rsi      # 0xe14f
callq 0x3280
jmp 0x4f61
movq 0xf068(%rip), %rdi      # 0x13fd0
leaq 0x91ad(%rip), %rsi      # 0xe11c
callq 0x3280
movq %rax, 0x70(%rsp)
jmp 0x4f7b
movq 0x70(%rsp), %rdi
movq 0x168(%rsp), %rax
movsd 0x38(%rax), %xmm0
callq 0x3460
movq %rax, 0x68(%rsp)
jmp 0x4f99
movq 0x68(%rsp), %rdi
movq 0xf00b(%rip), %rsi      # 0x13fb0
callq 0x32b0
jmp 0x4fac
movq 0xf01d(%rip), %rdi      # 0x13fd0
leaq 0x9174(%rip), %rsi      # 0xe12e
callq 0x3280
movq %rax, 0x60(%rsp)
jmp 0x4fc6
movq 0x60(%rsp), %rdi
movq 0x168(%rsp), %rax
movsd 0x40(%rax), %xmm0
callq 0x3460
movq %rax, 0x58(%rsp)
jmp 0x4fe4
movq 0x58(%rsp), %rdi
movq 0xefc0(%rip), %rsi      # 0x13fb0
callq 0x32b0
jmp 0x4ff7
movq 0xefd2(%rip), %rdi      # 0x13fd0
leaq 0x919e(%rip), %rsi      # 0xe1a3
callq 0x3280
movq %rax, 0x50(%rsp)
jmp 0x5011
movq 0x50(%rsp), %rdi
movq 0xef93(%rip), %rsi      # 0x13fb0
callq 0x32b0
jmp 0x5024
leaq 0x150(%rsp), %rdi
callq 0x5b30
movq %rax, 0x110(%rsp)
leaq 0x118(%rsp), %rdi
leaq 0x110(%rsp), %rsi
callq 0x5dd0
leaq 0x150(%rsp), %rdi
callq 0x5ba0
movq %rax, 0x108(%rsp)
leaq 0x118(%rsp), %rdi
leaq 0x108(%rsp), %rsi
callq 0x5e10
testb $0x1, %al
jne 0x5081
jmp 0x520c
leaq 0x118(%rsp), %rdi
callq 0x5da0
movq 0xf8(%rsp), %rsi
movq (%rax), %rdi
addq $0x8, %rsi
callq 0x5bf0
movsd %xmm0, 0x48(%rsp)
jmp 0x50aa
movsd 0x48(%rsp), %xmm0
movsd %xmm0, 0x100(%rsp)
movq 0xef10(%rip), %rdi      # 0x13fd0
movq 0xeee9(%rip), %rsi      # 0x13fb0
callq 0x32b0
movq %rax, 0x40(%rsp)
jmp 0x50d3
leaq 0x118(%rsp), %rdi
callq 0x5da0
movq 0x40(%rsp), %rdi
movq (%rax), %rsi
addq $0x18, %rsi
callq 0x3240
movq %rax, 0x38(%rsp)
jmp 0x50f8
movq 0x38(%rsp), %rdi
movq 0xeeac(%rip), %rsi      # 0x13fb0
callq 0x32b0
jmp 0x510b
movq 0xeebe(%rip), %rdi      # 0x13fd0
leaq 0x8ff6(%rip), %rsi      # 0xe10f
callq 0x3280
movq %rax, 0x30(%rsp)
jmp 0x5125
movq 0x30(%rsp), %rdi
movsd 0x100(%rsp), %xmm0
callq 0x3460
movq %rax, 0x28(%rsp)
jmp 0x513f
movq 0x28(%rsp), %rdi
leaq 0x9004(%rip), %rsi      # 0xe14f
callq 0x3280
jmp 0x5152
movq 0xee77(%rip), %rdi      # 0x13fd0
leaq 0x8fbc(%rip), %rsi      # 0xe11c
callq 0x3280
movq %rax, 0x20(%rsp)
jmp 0x516c
leaq 0x118(%rsp), %rdi
callq 0x5da0
movq 0x20(%rsp), %rdi
movq (%rax), %rax
movsd 0x38(%rax), %xmm0
callq 0x3460
movq %rax, 0x18(%rsp)
jmp 0x5192
movq 0x18(%rsp), %rdi
movq 0xee12(%rip), %rsi      # 0x13fb0
callq 0x32b0
jmp 0x51a5
movq 0xee24(%rip), %rdi      # 0x13fd0
leaq 0x8f7b(%rip), %rsi      # 0xe12e
callq 0x3280
movq %rax, 0x10(%rsp)
jmp 0x51bf
leaq 0x118(%rsp), %rdi
callq 0x5da0
movq 0x10(%rsp), %rdi
movq (%rax), %rax
movsd 0x40(%rax), %xmm0
callq 0x3460
movq %rax, 0x8(%rsp)
jmp 0x51e5
movq 0x8(%rsp), %rdi
movq 0xedbf(%rip), %rsi      # 0x13fb0
callq 0x32b0
jmp 0x51f8
jmp 0x51fa
leaq 0x118(%rsp), %rdi
callq 0x5db0
jmp 0x504e
jmp 0x520e
movq 0xedbb(%rip), %rdi      # 0x13fd0
movq 0xed94(%rip), %rsi      # 0x13fb0
callq 0x32b0
jmp 0x5223
leaq 0x150(%rsp), %rdi
callq 0x5450
addq $0x178, %rsp            # imm = 0x178
retq
movq 0x128(%rsp), %rdi
callq 0x3420
nopw %cs:(%rax,%rax)
nop