Coder Social home page Coder Social logo

aibarbetta / migration-office Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 570 KB

Trabajo Práctico 1 - 75.59 Técnicas de Programación Concurrente I (FIUBA)

License: GNU General Public License v3.0

CMake 3.53% C++ 95.79% Shell 0.17% C 0.13% Python 0.36%
system-v c-plus-plus catch travis-ci concurrency

migration-office's Introduction

Migration Office Build Status

Build

To build the project you can use the script

$ ./build.sh

This will create a build directory with the migration_office executable.

Command line parameters

  • -p, --people people_file
    People file
  • -a, --alerts alerts_file
    Alerts file
  • -f, --fugitives fugitives_file
    Fugitive ids file
  • -s, --stampers stampers_number
    (Optional) Default stampers quantity is 5
  • -b, --booths booths_number
    (Optional) Default booths quantity is 10
  • -d, --debug
    (Optional) Debug mode
  • -l, --log log_file
    (Optional) Choose a file to log, default log file is log located in the same dir as the office's executable

Execution examples

Using defaults without log

$ ./migration_office -p ../resources/people.txt\
                     -a ../resources/alerts.txt\
                     -f ../resources/fugitives.txt

Using defaults with log

$ ./migration_office -p ../resources/people.txt\
                     -a ../resources/alerts.txt\
                     -f ../resources/fugitives.txt\
                     -d

Customizing everything

$ ./migration_office -p ../resources/people.txt\
                     -a ../resources/alerts.txt\
                     -f ../resources/fugitives.txt\
                     -b 4 -s 1\
                     -d -l logex3

Usage

Ask for statistics (allowed residents, detained residents, allowed foreigners, deported foreigners) or just exit.
> allowed residents
1
> allowed foreigners
0
> deported
Invalid command, try again
> exit

Configuration files examples

  • People file
timestamp,resident,id,passport_id,features
5,1,38464269,,tez blanca,ojos oscuros
2,0,1234567,PORTOÑOL123,tez blanca,ojos verdes,barbudo
  • Alerts file
timestamp,del_timestamp,features
1,8,petiso,orejudo
4,9,gatuno
0,5,sombrero cónico
  • Fugitives file
id
13641107
38464269

License

GNU General Public License v3.0

migration-office's People

Contributors

aibarbetta avatar miporto avatar

Watchers

 avatar  avatar

migration-office's Issues

Separate files by process

Additionally if some files do not belong to any process but they are required by several processes move them to a common folder and set them up as a library.

Statistics process

Create the process that answers user's queries about the number of allowed residents and foreigners, the detained residents and the expelled foreigners

People/alert spawner

Spawner has a list of T, each T with a timestamp ts. When the process reaches time ts it should place all instances of T with timestamp ts on a dedicated structure. e.g.: People queue.

MinisterOfSecurity is a spawner.

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.