Skip to content

AHI-SQL/DJIT_Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NF20 Project

Overview

NF20 Project is a desktop Java application originally built in a university context to study graph theory and project scheduling. The application provides a Swing-based graphical interface that lets a user load problem instances from data files and then run classical graph-processing routines on them.

The repository currently contains two main functional areas:

  • Shortest-path analysis on weighted directed graphs.
  • Project scheduling analysis based on precedence constraints.

The codebase combines a user-facing GUI, a matrix-based graph model used by the interface, and a second set of legacy graph/domain classes used by the scheduling workflow and by an older Bellman implementation kept in the repository.

What The Application Does

1. Shortest Path Tab

The first tab of the GUI is dedicated to shortest-path computation on a directed weighted graph loaded from an instance file.

Once a file is selected, the application:

  • Parses the number of nodes and arcs.
  • Builds an adjacency matrix representation of the graph.
  • Displays every edge in a table.
  • Lets the user choose a source vertex.
  • Computes minimum costs from that source to every other vertex.
  • Displays the resulting distances in a second table.

Two algorithms are exposed through the interface:

  • Bellman-Ford
  • Dijkstra

Both algorithms are implemented in src/com/utt/nf20/model/InstanceGraph.java.

2. Project Scheduling Tab

The second tab focuses on project scheduling from a precedence-constrained task file. In practice, the application reads tasks and dependencies, builds an internal directed acyclic graph-like structure, performs a depth-first traversal to obtain a topological order, and then computes a maximum-duration path through the scheduling graph.

This is used to estimate the minimum total duration of a project under task precedence constraints.

The main entry point for this workflow is:

  • src/com/utt/nf20/graph/SchedulingAlgorithm.java

The supporting file parser is:

  • src/com/utt/nf20/dataaccess/SchedulingDataAccess.java

Architecture

The project is organized around several layers.

GUI Layer

  • src/com/utt/nf20/view/MainWindow.java
  • src/com/utt/nf20/view/MainWindow.form

This layer contains the Swing window, the NetBeans form definition, file chooser integration, table population, and user actions for running the available algorithms.

Matrix-Based Model For Shortest Path

  • src/com/utt/nf20/model/InstanceGraph.java

This class is the model actually used by the shortest-path GUI. It reads an instance file, stores graph weights in an adjacency matrix, and exposes:

  • runBellmanAlgorithm(int initialNode)
  • runDijkstraAlgorithm(int initialNode)

This implementation is self-contained and does not depend on the legacy graph object model.

Legacy Graph Object Model

  • src/com/utt/nf20/graph/Graph.java
  • src/com/utt/nf20/graph/Vertex.java
  • src/com/utt/nf20/graph/Edge.java

These classes provide a more explicit object-oriented graph representation using vertices, edges, predecessors, neighbors, and connected edges. They are used mainly by the scheduling code and by an older Bellman implementation preserved in the repository.

Data Access Layer

  • src/com/utt/nf20/dataaccess/DataAccess.java
  • src/com/utt/nf20/dataaccess/SchedulingDataAccess.java

DataAccess is a legacy parser for shortest-path data and still uses MultiValueMap from Apache Commons Collections. It is not the primary path used by the GUI today. SchedulingDataAccess is the parser actively used for the project scheduling feature.

Utility Layer

  • src/com/utt/nf20/utility/Utility.java

This helper currently provides lookup logic for retrieving a vertex by its number inside a list of vertices.

Algorithms Included

Bellman-Ford

The GUI shortest-path workflow includes a Bellman-Ford implementation in InstanceGraph. The algorithm iteratively relaxes predecessors until no shorter distance is found.

The repository also contains a separate legacy class:

  • src/com/utt/nf20/graph/BellmanAlgorithm.java

That version relies on the object-based graph model and the legacy DataAccess parser instead of the matrix-based GUI model.

Dijkstra

Dijkstra's algorithm is also implemented in InstanceGraph for the GUI workflow. It tracks visited nodes and repeatedly selects the unvisited node with the current minimum known distance.

Scheduling / Longest Path Style Computation

The scheduling workflow:

  • Reads tasks and constraints.
  • Adds synthetic start and end vertices.
  • Builds predecessor and successor relationships.
  • Performs a depth-first traversal to derive topological ordering.
  • Propagates task weights through the graph to compute the maximum duration.

This logic lives primarily in:

  • SchedulingDataAccess
  • SchedulingAlgorithm

Input File Expectations

The repository expects text-based .dat instance files.

For shortest-path data, InstanceGraph reads sections such as:

  • NB_NODES
  • NB_ARCS
  • LIST_OF_ARCS
  • END

For project scheduling data, SchedulingDataAccess expects a task section followed by:

  • CONSTRAINTS
  • END

The exact file syntax is inferred directly from the parsers currently implemented in the source code.

Project Structure

DJIT_PROJECT/
|-- build.xml
|-- manifest.mf
|-- lib/
|   `-- commons-collections-3.2.1 and related jars
|-- nbproject/
|   `-- NetBeans project metadata
|-- report/
|   |-- nf20_report.docx
|   `-- nf20_report.pdf
|-- src/
|   `-- com/utt/nf20/
|       |-- dataaccess/
|       |-- graph/
|       |-- model/
|       |-- utility/
|       `-- view/
`-- README.md

Build And Runtime Environment

This is a legacy NetBeans/Ant Java project.

Important characteristics from the project configuration:

  • Build system: Apache Ant
  • IDE metadata: NetBeans
  • Main class: com.utt.nf20.view.MainWindow
  • Source/target compatibility: Java 1.6
  • External dependency: Apache Commons Collections 3.2.1

Relevant files:

  • build.xml
  • nbproject/project.properties
  • nbproject/project.xml

How To Run

From NetBeans

Open the project in NetBeans and run the configured main class:

  • com.utt.nf20.view.MainWindow

From Ant

If Ant and a compatible JDK are installed, the standard NetBeans targets should work, for example:

ant clean
ant compile
ant run

Manual Usage Flow

  1. Launch the application.
  2. Open the Shortest Path tab or the Project Scheduling tab.
  3. Choose an appropriate .dat instance file.
  4. Run the relevant algorithm from the GUI.
  5. Inspect the generated tables or the computed project duration.

Notes And Limitations

  • The project is designed around a Swing desktop UI and is not a web application or a library.
  • The shortest-path GUI uses InstanceGraph, while the repository also keeps a separate legacy graph implementation.
  • DataAccess still contains a hard-coded local file path, which makes that legacy class less portable than the GUI-driven file loading path.
  • The project targets Java 6, so modern JDKs may require compatibility adjustments depending on the build environment.
  • No automated tests are currently present in the repository.
  • Because this is a legacy academic codebase, some logic and naming conventions reflect teaching goals and historical evolution rather than a modern production architecture.

Authors

The application credits the following authors in the GUI:

  • HALOUI Amine
  • JALOUZET Jeremie
  • XU Jiahuan

Repository Status

This repository has been translated to English for package names, class names, method names, variables, comments, and user-facing labels so that the codebase is easier to navigate and maintain in an English-speaking context.

About

Dijsktra, Bellman and task scheduling implementation in Java.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages