Introduction to Mascopt: a library for graph manipulation Bruno - - PowerPoint PPT Presentation

introduction to mascopt a library for graph manipulation
SMART_READER_LITE
LIVE PREVIEW

Introduction to Mascopt: a library for graph manipulation Bruno - - PowerPoint PPT Presentation

Introduction to Mascopt: a library for graph manipulation Bruno Bongiovanni, Jean-Fran cois Lalande Michel Syska, Yann Verhoeven Projet Mascotte, I3S-INRIA Sophia-Antipolis, France CRESCCO 6-8 december 2003 History Why Mascopt ? Our


slide-1
SLIDE 1

Introduction to Mascopt: a library for graph manipulation

Bruno Bongiovanni, Jean-Fran¸ cois Lalande Michel Syska, Yann Verhoeven Projet Mascotte, I3S-INRIA Sophia-Antipolis, France CRESCCO 6-8 december 2003

slide-2
SLIDE 2

History

  • Why Mascopt ?
  • Our experience with WDM networks

⋆ Porto project ⋆ Alcatel and France Telecom R&D ⋆ Routing static requests ⋆ Grooming of the traffic ⋆ Protection against failures of cables

  • What we have learnt

⋆ Program dedicated to WDM networks ⋆ C++ code / Java GUI

Introduction to Mascopt - Jean-Fran¸ cois Lalande - CRESCCO 6-8 december 2003 1

slide-3
SLIDE 3

Comments:

Mascopt started just after the end of the RNRT Porto project. Porto was dedicated to solve some problems such as routing, grooming, or protection problems on WDM networks. As the code was very specialized, it was not easily reusable for other kinds of networks. The code was also split between C++ and Java languages which generates interaction and portability problems.

Introduction to Mascopt - Jean-Fran¸ cois Lalande - CRESCCO 6-8 december 2003 2

slide-4
SLIDE 4

The Porto software

Introduction to Mascopt - Jean-Fran¸ cois Lalande - CRESCCO 6-8 december 2003 3

slide-5
SLIDE 5

Introduction to Mascopt - Jean-Fran¸ cois Lalande - CRESCCO 6-8 december 2003 4

slide-6
SLIDE 6

Comments:

These two screenshots show how the data managed by the Porto software is dedicated to WDM networks. The second one shows the lightpaths crossing a node and changing of fibers. The third drawing shows the different types of networks we want to deals with. The mascopt code is designed to be able to represent different kinds of networks, from ATM to IP networks.

Introduction to Mascopt - Jean-Fran¸ cois Lalande - CRESCCO 6-8 december 2003 5

slide-7
SLIDE 7

Networks

Introduction to Mascopt - Jean-Fran¸ cois Lalande - CRESCCO 6-8 december 2003 6

slide-8
SLIDE 8

Mascopt objectives

  • Be a set of tools for network optimization
  • Be a multiplatform tool/library
  • Be as modular as possible
  • Have I/O facilities, Graphical User Interface

Introduction to Mascopt - Jean-Fran¸ cois Lalande - CRESCCO 6-8 december 2003 7

slide-9
SLIDE 9

Mascopt objectives

  • Be a set of tools for network optimization
  • Be a multiplatform tool/library
  • Be as modular as possible
  • Have I/O facilities, Graphical User Interface
  • To have an efficient tool box for our experiments
  • We do not want to restart from scratch for every new numerical

experiment

  • No existing free library fitting these requirements

Introduction to Mascopt - Jean-Fran¸ cois Lalande - CRESCCO 6-8 december 2003 7

slide-10
SLIDE 10

Mascopt Graph package

  • The first step: a working graph package

Introduction to Mascopt - Jean-Fran¸ cois Lalande - CRESCCO 6-8 december 2003 8

slide-11
SLIDE 11

Mascopt Graph package

  • The first step: a working graph package
  • Graph / Directed Graph
  • Set of vertices, Set of edges/arcs
  • Path / Directed Path

Introduction to Mascopt - Jean-Fran¸ cois Lalande - CRESCCO 6-8 december 2003 8

slide-12
SLIDE 12

Mascopt Graph package

  • The first step: a working graph package
  • Graph / Directed Graph
  • Set of vertices, Set of edges/arcs
  • Path / Directed Path
  • Sharing of objects
  • G1=(V,E1), G2=(V,E2)

Introduction to Mascopt - Jean-Fran¸ cois Lalande - CRESCCO 6-8 december 2003 8

slide-13
SLIDE 13

Comments:

The graph package implements the share of objects. The previous example constructs two graphs G1 and G2 with the same nodeset V. The removing of nodes in V affects directly the two graphs G1 and G2.

Introduction to Mascopt - Jean-Fran¸ cois Lalande - CRESCCO 6-8 december 2003 9

slide-14
SLIDE 14

Example

Vertex n1 = new Vertex(); Vertex n2 = new Vertex(); Vertex n3 = new Vertex(); VertexSet vs = new VertexSet(); vs.add(n1); vs.add(n2); vs.add(n3); Edge e1 = new Edge(n1,n2); Edge e2 = new Edge(n1,n3); EdgeSet es1 = new EdgeSet(vs); EdgeSet es2 = new EdgeSet(vs); es1.add(e1); es2.add(e2); Graph g1 = new Graph(vs, es1); Graph g2 = new Graph(vs, es2);

Introduction to Mascopt - Jean-Fran¸ cois Lalande - CRESCCO 6-8 december 2003 10

slide-15
SLIDE 15

AbstractGraph AbstractNodeSet AbstractEdge AbstractEdgeSet AbstractChain AbstractNode AbstractNodeSetFactory Classes Interfaces DiGraphFactory GraphFactory AbstractGraphFactory NodeSet Edge Arc AbstractEdgeSetFactory EdgeSetFactory ArcSetFactory EdgeSet ArcSet DiGraph Graph Chain Path Node 2 1 1 1 1 1 1 1 * * * * 1 1 MascoptObjectInterface Observer Collection Set MascoptSet MascoptObject NodeSetFactory

Introduction to Mascopt - Jean-Fran¸ cois Lalande - CRESCCO 6-8 december 2003 11

slide-16
SLIDE 16

Features

  • Guaranty of valid data
  • Existing Basic algorithms

⋆ (k) Shortest paths ⋆ Minimum spanning tree ⋆ Multicommodity flow ⋆ Breadth/Depth first search ⋆ To be continued ...

  • Valuation System (String, Integer, Double)
  • Interfaced with ILOG Cplex LP solver API
  • We provide services: what is its quality ?

Introduction to Mascopt - Jean-Fran¸ cois Lalande - CRESCCO 6-8 december 2003 12

slide-17
SLIDE 17

Features

  • Time access vs Memory requirement

Introduction to Mascopt - Jean-Fran¸ cois Lalande - CRESCCO 6-8 december 2003 13

slide-18
SLIDE 18

Features

  • Time access vs Memory requirement
  • Time to get the set of neighbors of vertex v1: O(1)
  • A bad case: algorithm adding and removing many edges

Introduction to Mascopt - Jean-Fran¸ cois Lalande - CRESCCO 6-8 december 2003 13

slide-19
SLIDE 19

Features

  • Time access vs Memory requirement
  • Time to get the set of neighbors of vertex v1: O(1)
  • A bad case: algorithm adding and removing many edges
  • Access to a value on an edge or vertex: O(number of graphs)
  • A bad case: algorithm using a lot of graphs

Introduction to Mascopt - Jean-Fran¸ cois Lalande - CRESCCO 6-8 december 2003 13

slide-20
SLIDE 20

Features

  • Time access vs Memory requirement
  • Time to get the set of neighbors of vertex v1: O(1)
  • A bad case: algorithm adding and removing many edges
  • Access to a value on an edge or vertex: O(number of graphs)
  • A bad case: algorithm using a lot of graphs
  • Removing a node from graph G=(V,E): update of E in time O(log|E|)

Introduction to Mascopt - Jean-Fran¸ cois Lalande - CRESCCO 6-8 december 2003 13

slide-21
SLIDE 21

Features

  • Time access vs Memory requirement
  • Time to get the set of neighbors of vertex v1: O(1)
  • A bad case: algorithm adding and removing many edges
  • Access to a value on an edge or vertex: O(number of graphs)
  • A bad case: algorithm using a lot of graphs
  • Removing a node from graph G=(V,E): update of E in time O(log|E|)
  • The implementation implies some choices

Introduction to Mascopt - Jean-Fran¸ cois Lalande - CRESCCO 6-8 december 2003 13

slide-22
SLIDE 22

Comments: The library provides services and information which is built in the main classes. Each data which can be asked, can be constructed at run time or already built and available for the user. The first possibility needs some time when the user needs the data. The second possibility needs more memory requirement to be able to keep all the data in memory. According to the best choices we did to implement each service, some algorithms could run slowly if it exploits the bad cases.

Introduction to Mascopt - Jean-Fran¸ cois Lalande - CRESCCO 6-8 december 2003 14

slide-23
SLIDE 23

XML I/O

<?xml version="1.0" ?> <!DOCTYPE OBJECTS SYSTEM "ftp://ftp-sop.inria.fr/mascotte/mascopt/ dtd/mgl_v1.1.dtd"> <OBJECTS> <VERTICES> <VERTEX id="N11"> <POSITION> <X>74.0</X> <Y>60.0</Y> </POSITION> </VERTEX> <VERTEX id="N10"> <POSITION> <X>47.0</X> <Y>232.0</Y> </POSITION> </VERTEX>

Introduction to Mascopt - Jean-Fran¸ cois Lalande - CRESCCO 6-8 december 2003 15

slide-24
SLIDE 24

Comments: This is a part of an MGL file, the i/o format for storing graphs. This XML file can be extended easily (as adding a Z coordinate) without breaking all the structure of the file.

Introduction to Mascopt - Jean-Fran¸ cois Lalande - CRESCCO 6-8 december 2003 16

slide-25
SLIDE 25

Conclusion

  • http://www-sop.inria.fr/mascotte/mascopt
  • Google + Mascopt
  • GPL
  • Michel Syska, Yann Verhoeven
  • Network packages
  • Experiments
  • Switch to demo ...

Introduction to Mascopt - Jean-Fran¸ cois Lalande - CRESCCO 6-8 december 2003 17