Coder Social home page Coder Social logo

fseconomy's People

Contributors

blackcelebrant avatar postalservice14 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

fseconomy's Issues

'DataFrame' object has no attribute 'RentalDry'

$ python main.py --ukey=*** --local
/home/maletin/git/github/FSEconomy/fseconomy.py:37: FutureWarning: sort(columns=....) is deprecated, use sort_values(by=.....)
  return aggregated.sort('Pay', ascending=False)
Searching for the best aircraft from NGTA
--Searching for the best aircraft from NGTA
Traceback (most recent call last):
  File "main.py", line 79, in <module>
    main()
  File "main.py", line 75, in main
    do_work(args)
  File "main.py", line 27, in do_work
    best_aircraft = fse.get_best_craft(row['FromIcao'], args.radius)
  File "/home/maletin/git/github/FSEconomy/fseconomy.py", line 81, in get_best_craft
    aircrafts = self.get_aircrafts_by_icao(near_icao)
  File "/home/maletin/git/github/FSEconomy/fseconomy.py", line 42, in get_aircrafts_by_icao
    aircrafts.RentalDry = aircrafts.RentalDry.astype(float)
  File "/home/maletin/git/github/FSEconomy/.venv/local/lib/python2.7/site-packages/pandas/core/generic.py", line 2744, in __getattr__
    return object.__getattribute__(self, name)
AttributeError: 'DataFrame' object has no attribute 'RentalDry'

Incorrect earnings calculation

Current algorythm was written for PtAssignments. Need to reimplement it to find the best way of filling aircraft.
For example, we have total 188 pax from FQMA to FBFT. Total pay for all assigments is $89,374. Best aircraft option is Martin 404, located in FQMA (luck!). Number of seats is 42.
Current version just devides pay by amount of pax (89374 / 188). And multiply it by number of seats. So, it's about $19,967. Actually, there are 4 assignments:

$5,377   FQMA     FBFT  8 Passengers
$27,832  FQMA     FBFT  57 Passengers   
$17,923  FQMA     FBFT  40 Passengers       
$30,180  FQMA     FBFT  61 Passengers   
$13,439  FQMA     FBFT  30 Passengers

So, the best option is to assign 2 assignments with 8 and 30pax. It's only $18,816.

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.