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.
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.
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
The project is organized around several layers.
src/com/utt/nf20/view/MainWindow.javasrc/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.
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.
src/com/utt/nf20/graph/Graph.javasrc/com/utt/nf20/graph/Vertex.javasrc/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.
src/com/utt/nf20/dataaccess/DataAccess.javasrc/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.
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.
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'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.
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:
SchedulingDataAccessSchedulingAlgorithm
The repository expects text-based .dat instance files.
For shortest-path data, InstanceGraph reads sections such as:
NB_NODESNB_ARCSLIST_OF_ARCSEND
For project scheduling data, SchedulingDataAccess expects a task section followed by:
CONSTRAINTSEND
The exact file syntax is inferred directly from the parsers currently implemented in the source code.
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
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.xmlnbproject/project.propertiesnbproject/project.xml
Open the project in NetBeans and run the configured main class:
com.utt.nf20.view.MainWindow
If Ant and a compatible JDK are installed, the standard NetBeans targets should work, for example:
ant clean
ant compile
ant run- Launch the application.
- Open the
Shortest Pathtab or theProject Schedulingtab. - Choose an appropriate
.datinstance file. - Run the relevant algorithm from the GUI.
- Inspect the generated tables or the computed project duration.
- 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. DataAccessstill 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.
The application credits the following authors in the GUI:
- HALOUI Amine
- JALOUZET Jeremie
- XU Jiahuan
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.