Skip to content

This program calculates the cost of setting up a network based on the given specifications and rate cards. Gigaclear focuses on putting cables in the ground, connecting pots to a central cabinet via cables buried in trenches and chambers. The cost of setting up the network is based on predefined rate cards.

Notifications You must be signed in to change notification settings

islas104/Gigaclear-Cost-Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Gigaclear Cost Calculator

This program calculates the cost of setting up a network based on the given specifications and rate cards. Gigaclear focuses on putting cables in the ground, connecting pots to a central cabinet via cables buried in trenches and chambers. The cost of setting up the network is based on predefined rate cards.

Prerequisites

  • Python 3.x
  • NetworkX library (for handling and processing graphs)

To install NetworkX:

pip install networkx

Usage

  1. Navigate to the src directory:
cd path/to/src
  1. Run the program:
python3 gigaclear_calculator.py
  1. You'll be prompted to enter the path to the .graphml file containing the network specifications. Provide the relative or absolute path to the file:
Enter the path to the graphml file: ../data/problem.graphml
  1. The program will display the calculated cost for the network setup based on the two rate cards.

Functionality

  1. RateCard Class: This class represents a rate card and has methods to calculate costs based on the given parameters.
  2. load_graphml Function: Reads a .graphml file and returns a graph.
  3. extract_data Function: Extracts necessary data from the graph, such as total cable lengths, number of chambers, and pots.
  4. main Function: Main driver function that integrates the above functions and calculates costs.

Testing

The program includes a basic test to ensure the calculate_cost method works correctly. More tests can be added to validate other functionalities and edge cases.

Future Improvements

  1. Handling of more edge cases, e.g., missing attributes in the .graphml file.
  2. Support for more file formats beyond .graphml.
  3. A more interactive UI/CLI for enhanced user experience.
  4. Expansion of test cases for robust validation.

About

This program calculates the cost of setting up a network based on the given specifications and rate cards. Gigaclear focuses on putting cables in the ground, connecting pots to a central cabinet via cables buried in trenches and chambers. The cost of setting up the network is based on predefined rate cards.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages