Giter Site home page Giter Site logo

ctrace's Introduction

cTrace

System Programming course assignment. Received perfect score (100/100).

Simulates the elimination of a plague by tracing the contacts of infected graph nodes and quarantining them (by cutting-off their edges to other nodes in the graph).

The user chooses a number of contact tracers and viruses, and the starting nodes in the graph for the viruses.

INPUT:

The input should be a JSON file containing:
  • The adjacency-matrix (Wikipedia) for the graph, as an array of int arrays.
  • The agents to use in the simulation (agent = Virus/Contact Tracer), with the starting node for the viruses, as an array of ["V", 3] for creating a virus in node 3, ["C", -1] for creating a contact tracer.
  • The method of contact tracing to use: 'M' for MaxRankTree, 'C' for CycleTree, 'R' for RootTree. // TODO: Add explanations for the tree types.
Input JSON file is available in the Example folder.

USAGE:

1. Compile:
$ make
2. Run:
$ cTrace "input.json"

OUTPUT:

A JSON file named output.json containing the new, modified graph and a list of the infected nodes.

ctrace's People

Contributors

quit3simpl3 avatar assafrbi avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

Forkers

assafrbi

ctrace's Issues

its fucking exception

terminate called after throwing an instance of 'nlohmann::detail::type_error' what(): [json.exception.type_error.304] cannot use at() with discarded ==3053== ==3053== Process terminating with default action of signal 6 (SIGABRT)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.