Class AgentsTasksTimes

java.lang.Object
topics.backtracking.times.AgentsTasksTimes

public class AgentsTasksTimes extends Object
BACKTRACKING PROBLEM: THE PROBLEM OF ASSIGNING N TASK TO AGENTS This program can solve the problem using a backtracking algorithm
Author:
vicegd
  • Constructor Details

    • AgentsTasksTimes

      public AgentsTasksTimes(int n)
      Constructor, sets the size of the problem and makes the array to store the state of the problem
      Parameters:
      n - Number of agents and tasks
  • Method Details

    • main

      public static void main(String[] args)
    • execute

      public void execute()
      Measures execution times for the backtracking assignment problem.
    • generateCostMatrix

      public void generateCostMatrix()
      Random generation of the cost matrix
    • printCosts

      public void printCosts()
      Prints cost matrix
    • backtracking

      public void backtracking(int agent)
      Backtracking that solves the stated problem
      Parameters:
      agent - , number of the agent we are going to work with
    • printBestSol

      public void printBestSol()
      Prints the best solution found