Code Monkey home page Code Monkey logo

acs's People

Watchers

 avatar  avatar

acs's Issues

hidden bug: didn't handle empty input file

Current version has a workaround for empty input file but it may not work for other implementation. NCustomers is an memory address is input file is empty but usually memory address is much greater than curr_customer.

incorrect number of lines in input file will lead to unexpected behaviour

If the first number doesn't match number of lines in input file, ACS will read in more customers than expected.

input file:
25
1:20,60
4:7,30
5:7,40
7:10,30
2:4,70
3:5,5
15:2,2

Output:
number of customers: 25
1:20,60
4:7,30
5:7,40
7:10,30
2:4,70
3:5,5
15:2,2
15:2,2
15:2,2
......
15:2,2
15:2,2
........
customer 1's waiting time: 4.604218
customer 4's waiting time: 0.801271
customer 5's waiting time: 1.302752
customer 7's waiting time: 3.701974
customer 2's waiting time: 7.302233
customer 3's waiting time: 0.500808
customer 15's waiting time: 0.000015
customer 15's waiting time: 0.000043
.....
customer 15's waiting time: 0.200043
customer 15's waiting time: 6.203485

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.