-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* -Added a Makie GUI -test3.jl to run the gui -added GLMakie to the project's dependencies * -Added a Makie GUI -test3.jl to run the gui -added GLMakie to the project's dependencies * Added MINDFulMakie Plots Added Fullscreen Button, refining still WIP * Added Fullscreen support More features still WIP, as well as a general rewrite of functions and control flow * Updated .gitignore * Delete .idea directory * Delete .vscode directory * Delete data directory * Delete test.jl * Delete test2.jl * Delete test3.jl * Delete test/data directory * Delete Manifest.toml * Delete Project.toml * Delete MINDFulMakieApp.iml * modified: .gitignore * Added colors to the buttons * Fixed Fullscreen * Automatic .graphml file detection (Menu gets updated) Automatic detection of the number of available IBN Indexes per .graphml (Menu gets updated) Added struct with nested dicts for much used variables (WIP) Code cleanup (WIP) * updated README.md * Update README.md
- Loading branch information
Showing
9 changed files
with
660 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,11 @@ | ||
/Manifest.toml | ||
/.idea | ||
/.vscode | ||
/data | ||
/src/test.jl | ||
/src/test2.jl | ||
/src/test3.jl | ||
/test/data | ||
/test/Manifest.toml | ||
/test/Project.toml | ||
/MINDFulMakieApp.iml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,38 @@ | ||
# MINDFulGLMakieApp | ||
|
||
[![Build Status](https://github.com/filchristou/MINDFulGLMakieApp.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/filchristou/MINDFulGLMakieApp.jl/actions/workflows/CI.yml?query=branch%3Amain) | ||
# Graphical User Interface for [MINDFulMakie.jl](https://github.com/UniStuttgart-IKR/MINDFulMakie.jl) | ||
|
||
This project aims to interactively visualize [MINDFulMakie.jl](https://github.com/UniStuttgart-IKR/MINDFulMakie.jl) graphs while being lightweight, trivial and flexible to use. | ||
|
||
It is still in a very early state, so there is much more to come. This only shows a small set of current features. | ||
|
||
|
||
## Features | ||
|
||
- Visualize graphs from [simplenotebook](https://unistuttgart-ikr.github.io/MINDFulNotebookExamples.jl/simplenotebookexample.html). | ||
- Add any compatible .graphml topologies, they get detected automatically! | ||
- Choose between different IBNs, they get dynamically updated when switching topologies. | ||
- You can zoom, stretch and move all graphs. Or even make it fullscreen. | ||
|
||
|
||
## Screenshots | ||
|
||
![App Screenshot](https://i.imgur.com/561Cu5J.png) | ||
Draw graphs with topologies of your choice. | ||
|
||
![App Screenshot](https://i.imgur.com/xU1wWht.png) | ||
Compare the different parts of a graph to each other. | ||
|
||
![App Screenshot](https://i.imgur.com/7oVSTz7.png) | ||
Or make it fullscreen. | ||
|
||
|
||
## Authors | ||
|
||
- [@Niels1006](https://www.github.com/niels1006) | ||
|
||
|
||
## Credits | ||
|
||
- [MINDFul.jl](https://github.com/UniStuttgart-IKR/MINDFul.jl) | ||
- [MINDFulMakie.jl](https://github.com/UniStuttgart-IKR/MINDFulMakie.jl) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
|
||
function get_graph_names() | ||
files = readdir("data/") | ||
println("Available topologies: " * join(files, ", ")) | ||
|
||
|
||
files_wo_ending = [replace(files[i], ".graphml" => "") for i in 1:length(files)] | ||
print(files_wo_ending) | ||
|
||
return files_wo_ending | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,19 @@ | ||
#= | ||
MINDFulGLMakieApp: | ||
- Julia version: 1.9.1 | ||
- Author: Niels | ||
- Date: 2023-07-8 | ||
=# | ||
|
||
|
||
export MINDFulGLMakieApp | ||
|
||
module MINDFulGLMakieApp | ||
using GLMakie | ||
|
||
include("MINDFulGraphs.jl") | ||
include("functions.jl") | ||
include("HelpFunctions.jl") | ||
|
||
# Write your package code here. | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
#= | ||
MINDFulGraphs: | ||
- Julia version: 1.9.1 | ||
- Author: Niels | ||
- Date: 2023-07-11 | ||
=# | ||
|
||
#module MINDFulGraphs | ||
|
||
using MINDFul, GraphIO, NestedGraphsIO, NestedGraphs, Graphs, MetaGraphs | ||
|
||
using MINDFulMakie, GLMakie, Unitful | ||
|
||
function get_ibn_size(topology) | ||
topology *= ".graphml" | ||
|
||
MINDF = MINDFul | ||
defaultlinecards() = [MINDF.LineCardDummy(10, 100, 26.72), MINDF.LineCardDummy(2, 400, 29.36), MINDF.LineCardDummy(1, 1000, 31.99)] | ||
|
||
defaultlinecardchassis() = [MINDF.LineCardChassisDummy(Vector{MINDF.LineCardDummy}(), 4.7, 16)] | ||
|
||
defaulttransmissionmodules() = [MINDF.TransmissionModuleView("DummyFlexibleTransponder", | ||
MINDF.TransmissionModuleDummy([MINDF.TransmissionProps(5080.0u"km", 300, 8), | ||
MINDF.TransmissionProps(4400.0u"km", 400, 8), | ||
MINDF.TransmissionProps(2800.0u"km", 500, 8), | ||
MINDF.TransmissionProps(1200.0u"km", 600, 8), | ||
MINDF.TransmissionProps(700.0u"km", 700, 10), | ||
MINDF.TransmissionProps(400.0u"km", 800, 10)], 0, 20)), | ||
MINDF.TransmissionModuleView("DummyFlexiblePluggables", | ||
MINDF.TransmissionModuleDummy([MINDF.TransmissionProps(5840.0u"km", 100, 4), | ||
MINDF.TransmissionProps(2880.0u"km", 200, 6), | ||
MINDF.TransmissionProps(1600.0u"km", 300, 6), | ||
MINDF.TransmissionProps(480.0u"km", 400, 6)], 0, 8)) | ||
] | ||
|
||
myibns = | ||
let | ||
# read in the NestedGraph | ||
globalnet = open(joinpath("data/" * topology)) do io | ||
loadgraph(io, "main", GraphIO.GraphML.GraphMLFormat(), NestedGraphs.NestedGraphFormat()) | ||
end | ||
|
||
# convert it to a NestedGraph compliant with the simulation specifications | ||
simgraph = MINDF.simgraph(globalnet; | ||
distance_method=MINDF.euclidean_dist, | ||
router_lcpool=defaultlinecards(), | ||
router_lccpool=defaultlinecardchassis(), | ||
router_lcccap=3, | ||
transponderset=defaulttransmissionmodules()) | ||
|
||
# convert it to IBNs | ||
myibns = MINDFul.nestedGraph2IBNs!(simgraph) | ||
end | ||
|
||
return size(myibns) | ||
end | ||
|
||
function generate_ibns(axis, topology; pos=0) | ||
topology *= ".graphml" | ||
|
||
|
||
MINDF = MINDFul | ||
defaultlinecards() = [MINDF.LineCardDummy(10, 100, 26.72), MINDF.LineCardDummy(2, 400, 29.36), MINDF.LineCardDummy(1, 1000, 31.99)] | ||
|
||
defaultlinecardchassis() = [MINDF.LineCardChassisDummy(Vector{MINDF.LineCardDummy}(), 4.7, 16)] | ||
|
||
defaulttransmissionmodules() = [MINDF.TransmissionModuleView("DummyFlexibleTransponder", | ||
MINDF.TransmissionModuleDummy([MINDF.TransmissionProps(5080.0u"km", 300, 8), | ||
MINDF.TransmissionProps(4400.0u"km", 400, 8), | ||
MINDF.TransmissionProps(2800.0u"km", 500, 8), | ||
MINDF.TransmissionProps(1200.0u"km", 600, 8), | ||
MINDF.TransmissionProps(700.0u"km", 700, 10), | ||
MINDF.TransmissionProps(400.0u"km", 800, 10)], 0, 20)), | ||
MINDF.TransmissionModuleView("DummyFlexiblePluggables", | ||
MINDF.TransmissionModuleDummy([MINDF.TransmissionProps(5840.0u"km", 100, 4), | ||
MINDF.TransmissionProps(2880.0u"km", 200, 6), | ||
MINDF.TransmissionProps(1600.0u"km", 300, 6), | ||
MINDF.TransmissionProps(480.0u"km", 400, 6)], 0, 8)) | ||
] | ||
|
||
myibns = | ||
let | ||
# read in the NestedGraph | ||
globalnet = open(joinpath("data/" * topology)) do io | ||
loadgraph(io, "main", GraphIO.GraphML.GraphMLFormat(), NestedGraphs.NestedGraphFormat()) | ||
end | ||
|
||
# convert it to a NestedGraph compliant with the simulation specifications | ||
simgraph = MINDF.simgraph(globalnet; | ||
distance_method=MINDF.euclidean_dist, | ||
router_lcpool=defaultlinecards(), | ||
router_lccpool=defaultlinecardchassis(), | ||
router_lcccap=3, | ||
transponderset=defaulttransmissionmodules()) | ||
|
||
# convert it to IBNs | ||
myibns = MINDFul.nestedGraph2IBNs!(simgraph) | ||
|
||
|
||
end | ||
|
||
|
||
#println(length(myibns)) | ||
|
||
if pos == 0 | ||
let | ||
p = ibnplot!(axis, myibns) | ||
#hidedecorations!(a) | ||
return p, length(myibns) | ||
end | ||
else | ||
#println(pos) | ||
p = ibnplot!(axis, myibns[pos]) | ||
return p, length(myibns) | ||
|
||
|
||
end | ||
|
||
|
||
#= let | ||
f = Figure() | ||
a,p = ibnplot(f[1,1], myibns[1]; axis=(title="myibns[1]",)) | ||
hidedecorations!(a) | ||
a,p = ibnplot(f[1,2], myibns[2]; axis=(title="myibns[2]",)) | ||
hidedecorations!(a) | ||
a,p = ibnplot(f[2,2], myibns[3]; axis=(title="myibns[3]",)) | ||
hidedecorations!(a) | ||
a,p = ibnplot(f[2,1], myibns[4]; axis=(title="myibns[4]",)) | ||
hidedecorations!(a) | ||
f | ||
end =# | ||
|
||
|
||
end | ||
|
||
#end | ||
|
||
|
||
#export generate_ibns | ||
|
||
|
Oops, something went wrong.