Pages: [1] 2 :: one page |
|
Author |
Thread Statistics | Show CCP posts - 1 post(s) |
Aineko Macx
Royal Amarr Institute Amarr Empire
263
|
Posted - 2013.11.03 06:41:00 -
[1] - Quote
I proudly present iveeCore, a PHP library for calculations of EVE Online industrial activities.
FEATURES - Object oriented API to the SDE DB, no manual SQL required - Object oriented model for inventory Types - Classes for representing manufacturing, copying and T2 invention activities, with recursion support - Market data gathering via EMDR and profit calculation - Can use caching provided by Memcached - Extensible via configurable subclassing
Released under the LGPL.
CLASS MODEL Have a look at iveeCore's class diagram.
USAGE Once set up, iveeCore offers a simple but powerful API, as demonstrated by the following example:
Quote://include and initialize iveeCore require_once('iveeCoreConfig.php');
//get SDE object $sde = SDE::instance();
//show the object for 'Damage Control I' print_r($sde->getType(2046));
//manufacture 5 units of 'Damage Control I' with ME 20 and PE 10 $manuData = $sde->getType(2046)->getBlueprint()->manufacture(5, 20, 10);
//show the ManufactureData object print_r($manuData);
//print materials, cost and profits for this process $manuData->printData();
DOWNLOAD The repository and full readme can be found here: https://github.com/aineko-m/iveeCore
Feedback welcome! |
Aineko Macx
Royal Amarr Institute Amarr Empire
313
|
Posted - 2013.11.03 06:41:58 -
[2] - Quote
I proudly present iveeCore, a PHP library for calculations of EVE Online industrial activities.
The goal of this project is to provide its users with a simple but powerful API to get information about industrial activities such as bill of materials, cost and profit or skill requirements. By hiding the complexities of EvE's static data export, iveeCore helps developers to quickly prototype scripts or develop full blown (web) applications.
iveeCore will likely be most useful for developers with at least basic PHP knowledge wanting to create their own industry related tools.
FEATURES - Object oriented API to the SDE DB, no manual SQL required - Object oriented model for inventory items - Classes for representing manufacturing, copying, T2 invention, reverse engineering, research and reaction activities, with recursive component building - Market data gathering via EMDR with realistic price estimation and profit calculation - CREST data fetcher handling system industry indices, market prices, facilities, teams and specialities - Parsers for EFT-style and EvE XML ship fittings descriptions aswell as cargo and ship scanning results - Can use caching provided by Memcached - Extensible via configurable subclassing
Released under the LGPL.
REQUIREMENTS For basic usage, iveeCore requires: - PHP 5.3 CLI (64 bit) or newer - MySQL 5.5 or newer or derivate (MariaDB, Percona Server) - Steve Ronuken's EVE Static Data Export (SDE) in MySQL format with industry tables
However, with just that you won't have access to the EMDR market data feed and thus lack any pricing and cost/profit calculation capabilities, as this requires the ZMQ PHP bindings.
Since ZMQ is a not a standard module you'll need root access to whatever box you plan on running the EMDR client on. Also larger scripts instantiating many objects from the DB can use quite a bit of RAM.
CLASS MODEL Have a look at iveeCore's class diagram.
USAGE Here are a few basic examples of how to use iveeCore:
Quote://initialize iveeCore. Adapt path as required. require_once('/path/to/iveeCore/iveeCoreInit.php');
//show the object for 'Damage Control I' print_r(\iveeCore\Type::getById(2046));
//it's also possible to instantiate type objects by name $type = \iveeCore\Type::getByName('Damage Control I');
//Now lets looks at industry activities. //First we need to get an IndustryModifier object, which aggregates all the things //like system indices, available assembly lines, teams, skills & implants. $iMod = \iveeCore\IndustryModifier::getBySystemIdForAllNpcStations(30000180); //Osmon
//manufacture 5 units of 'Damage Control I' with ME 10 and TE 20 $manuData = $type->getBlueprint()->manufacture($iMod, 5, 10, 20);
//show the ManufactureProcessData object print_r($manuData);
//print materials, cost and profits for this process $manuData->printData();
//get the data for making Damage Control I blueprint copy, inventing from it with a //decryptor and building from the resulting T2 BPC, recursively building the necessary //components $processData = \iveeCore\Type::getByName('Damage Control II Blueprint')->copyInventManufacture($iMod, 21583, true);
//get the raw profit for running an Unrefined Hyperflurite Reaction for 30 days, //taking into account the refining and material feedback steps, //using defaults for refinery efficiency and skills $reactionProcessData = \iveeCore\Type::getByName('Unrefined Hyperflurite Reaction')->react(24 * 30, true, true); echo PHP_EOL . 'Reaction Profit: ' . $reactionProcessData->getProfit() . PHP_EOL;
DOWNLOAD The repository and full readme can be found here: https://github.com/aineko-m/iveeCore
Feedback welcome!
iveeCore: PHP library for calculation of industrial activities, now with Hyperion support
|
Aineko Macx
Royal Amarr Institute Amarr Empire
313
|
Posted - 2013.11.03 06:42:23 -
[3] - Quote
Reserved.
iveeCore: PHP library for calculation of industrial activities, now with Hyperion support
|
Steve Ronuken
Fuzzwork Enterprises Vote Steve Ronuken for CSM
4069
|
Posted - 2013.11.03 14:14:53 -
[4] - Quote
I've not had a chance to dig all the way through the code, so I'm not sure if you're taking this isn't account, but the way you're calculating the waste factor suggests to me that you've missed it.
Materials in Extra materials are affected by production efficiency waste, if they also appear in the base materials. (they're never affected by the ME waste)
If I've missed you handling that correctly, then good
Woo! CSM 9!
http://fuzzwork.enterprises/
Twitter: @fuzzysteve on Twitter
|
Aineko Macx
Royal Amarr Institute Amarr Empire
313
|
Posted - 2013.11.03 14:44:38 -
[5] - Quote
Hi Steve, I was expecting you ;)
Extra material waste should be calculated correctly. Looking at "Improved Cloaking Device II Blueprint" for instance gives identical numbers to what the eve dev wiki states, what EveHQ calculates or the eve client shows. Have a look at the stored procedure iveeGetRequirements() and at Blueprint.php line 279.
iveeCore: PHP library for calculation of industrial activities, now with Hyperion support
|
Steve Ronuken
Fuzzwork Enterprises Vote Steve Ronuken for CSM
4069
|
Posted - 2013.11.03 14:48:18 -
[6] - Quote
Improved Cloaking Device II Blueprint doesn't have anything that would be affected by extra material waste.
Take a look at a Dominix when you have less than Production Efficiency 5 (my site handles it properly, if you don't have a character with less than 5. The Eve client doesn't display it correctly, until it gets to actually producing it, and even then it's a bit messed up. Which is a pain.)
Woo! CSM 9!
http://fuzzwork.enterprises/
Twitter: @fuzzysteve on Twitter
|
Aineko Macx
Royal Amarr Institute Amarr Empire
313
|
Posted - 2013.11.03 15:17:23 -
[7] - Quote
Point taken. Skill support is something very stub-y at the moment (assume level 5; overridable, but no everywhere atm) and I wonder if I should ever provide more than that in the library, as this would soon lead to the need of a character tracker, API link, etc. IMO something to be handled by a different part of the user application or custom extension.
iveeCore: PHP library for calculation of industrial activities, now with Hyperion support
|
Steve Ronuken
Fuzzwork Enterprises Vote Steve Ronuken for CSM
4069
|
Posted - 2013.11.03 16:37:08 -
[8] - Quote
I can see reasons for leaving it out, mostly because any serious manufacturer has Production Efficiency 5. And it's not too uncommon for tools to miss it (Evemon, for example, doesn't handle it right)
It's not /too/ painful to code around, mostly requiring you to pull the data in two chunks, and process in code. I've played at getting complete BOM sql, but it doesn't work quite right when it comes to RAM. Eventually I'll fix it properly, so it doesn't round down things with damage. It's just something I need atm.
Aside from that, good work There's always /something/ that can be picked at. bad habit of mine.
Woo! CSM 9!
http://fuzzwork.enterprises/
Twitter: @fuzzysteve on Twitter
|
Aineko Macx
Royal Amarr Institute Amarr Empire
263
|
Posted - 2013.11.03 18:32:00 -
[9] - Quote
It's fixed. Thanks for pointing out the error and giving a solution |
Aineko Macx
Royal Amarr Institute Amarr Empire
313
|
Posted - 2013.11.03 18:32:01 -
[10] - Quote
It's fixed. Thanks for pointing out the error and giving a solution
Btw, I don't round damage, nor the fractions due to invention chances or (hypothetical) batches of items in non-multiples of portionSize. The library deals with float amounts just fine. The user just needs to keep in mind these values are what he'll see as average over time.
iveeCore: PHP library for calculation of industrial activities, now with Hyperion support
|
|
Aineko Macx
Royal Amarr Institute Amarr Empire
263
|
Posted - 2013.11.10 17:18:00 -
[11] - Quote
Version 1.1 released.
- Added reprocessing calculations for Type objects - Added volume attribute to Type classes and total volume calculation to process classes - Moved material requirements from process class to its own MaterialSet class - Moved skill requirements from process class to its own SkillSet class - Added custom Exceptions - More parameter sanity checks - Note that the file iveeCoreConfig_template.php and the store procedure iveeGetRequirements() were changed |
Aineko Macx
Royal Amarr Institute Amarr Empire
313
|
Posted - 2013.11.10 17:18:27 -
[12] - Quote
Version 1.1 released.
- Added reprocessing calculations for Type objects - Added volume attribute to Type classes and total volume calculation to process classes - Moved material requirements from process class to its own MaterialSet class - Moved skill requirements from process class to its own SkillSet class - Added custom Exceptions - More parameter sanity checks - Note that the file iveeCoreConfig_template.php and the stored procedure iveeGetRequirements() were changed
iveeCore: PHP library for calculation of industrial activities, now with Hyperion support
|
Aineko Macx
Royal Amarr Institute Amarr Empire
313
|
Posted - 2014.02.03 16:29:30 -
[13] - Quote
Bump before close. Currently working on the next release.
iveeCore: PHP library for calculation of industrial activities, now with Hyperion support
|
Dunpeal Hunter
The Executive Branch
46
|
Posted - 2014.02.03 16:55:00 -
[14] - Quote
This sounds like a very useful PHP library. I am kind of new to the whole coding and programming process that is required to make an application work, but i am willing to learn!
With that in mind, can you tell me how this PHP library exactly works, or how i can use it in an application myself? Where should i as an complete noob begin? Do you know any good toturials that i can use and learn from? I dont know if this is important or not, but i have chickens..... |
Dunpeal Hunter
Zervas Aeronautics The Bastion
52
|
Posted - 2014.02.03 16:55:18 -
[15] - Quote
This sounds like a very useful PHP library. I am kind of new to the whole coding and programming process that is required to make an application work, but i am willing to learn!
I have some experience with Ubuntu and installing applications on a headless vps server (i already own an Ubuntu 64bit VPS server that i use with my own version of ruTorrent for seeding torrents to private trackers), but when it comes to making an actual application using custom made code and using the API to receive data from another source i get completely stuck and don't know how to proceed further.
With that in mind, can you tell me how this PHP library exactly works, or how i can use it in an application myself? Where should i as an complete noob begin? Do you know any good toturials that i can use and learn from?
I dont know if this is important or not, but i have chickens.....
|
Aineko Macx
Royal Amarr Institute Amarr Empire
313
|
Posted - 2014.02.03 18:32:53 -
[16] - Quote
Well you will have to learn the basics of PHP coding to use the library, there's no way around that I'm afraid.
The library itself contains the distilled knowledge about how to read and process the data from eves SDE database and present it through a simple but powerful object oriented interface. As an example, by using the library, a two line PHP command line script is enough to give you all materials and data necessary to invent and build a T2 ship plus the expected profits. That's much quicker than opening EveHQ and clicking through the blueprint manager, so I usually just hack together whatever I need. You could use it to make indy web apps or batch scripts that calculate loads of useful bits ;)
iveeCore: PHP library for calculation of industrial activities, now with Hyperion support
|
Aineko Macx
Royal Amarr Institute Amarr Empire
313
|
Posted - 2014.02.08 17:01:52 -
[17] - Quote
Version 1.2 released
- Added reaction calculations - Rewrote type materials and requirements handling. This fixed reprocessing calculations and most off-by-1 errors. The memory use of the type array was reduced by up to 30%. The stored procedure iveeGetRequirements() is obsoleted by this change, which makes for more maintainable code. - Bug fixes and more convenience functions - Renamed MaterialSet to MaterialMap and SkillSet to SkillMap as it better describes the classes purpose - Renamed CopyData to CopyProcessData, InventionData to InventionProcessData and ManufactureData to ManufactureProcessData for consistency - Added some PHPUnit test cases covering different parts of iveeCore - Note that the file iveeCoreConfig_template.php changed, thus adaptation of the configuration file is required
iveeCore: PHP library for calculation of industrial activities, now with Hyperion support
|
Aineko Macx
Royal Amarr Institute Amarr Empire
313
|
Posted - 2014.03.29 12:02:21 -
[18] - Quote
Version 1.3 released
- Added parsers for EFT-style and EvE's XML fitting descriptions as well as cargo and ship scanning results. - Reworked how configuration & defaults and utility methods are organized, for cleaner separation and better consistency. Defaults now reside in IveeCoreDefaults.php and customization is done in the subclass/file MyIveeCoreDefaults.php. As a consequence, iveeCoreConfig_template.php also changed a lot, therefore configuration files will have to be redone. - Adapted README to Rubicon 1.3 release - More bugfixes and unit tests
iveeCore: PHP library for calculation of industrial activities, now with Hyperion support
|
Alyssa Wyatt
Bazinga Labs
4
|
Posted - 2014.03.29 16:49:55 -
[19] - Quote
Don't know if you're aware, but on environments with E_STRICT on, the following errors popup
Quote:Strict standards: Declaration of Manufacturable::getReprocessingMaterialMap() should be compatible with Type::getReprocessingMaterialMap($batchSize, $reprocessingYield = 1, $reprocessingTaxFactor = 1) in \iveeCore-master\Manufacturable.php on line 140
Quote:Strict standards: Declaration of Blueprint::getReprocessingMaterialMap() should be compatible with Type::getReprocessingMaterialMap($batchSize, $reprocessingYield = 1, $reprocessingTaxFactor = 1) in \iveeCore-master\Blueprint.php on line 702
Quote:Strict standards: Declaration of InventableBlueprint::getBuyPrice() should be compatible with Sellable::getBuyPrice($maxPriceDataAge = NULL) in \iveeCore-master\InventableBlueprint.php on line 151
Quote:Strict standards: Declaration of InventableBlueprint::getSellPrice() should be compatible with Sellable::getSellPrice($maxPriceDataAge = NULL) in \iveeCore-master\InventableBlueprint.php on line 151
Quote:Strict standards: Declaration of Decryptor::getReprocessingMaterialMap() should be compatible with Type::getReprocessingMaterialMap($batchSize, $reprocessingYield = 1, $reprocessingTaxFactor = 1) in \iveeCore-master\Decryptor.php on line 150 |
Aineko Macx
Royal Amarr Institute Amarr Empire
313
|
Posted - 2014.03.29 18:38:19 -
[20] - Quote
Well spotted. Fixed
iveeCore: PHP library for calculation of industrial activities, now with Hyperion support
|
|
Aineko Macx
Royal Amarr Institute Amarr Empire
296
|
Posted - 2014.06.08 10:02:00 -
[21] - Quote
v1.3.1 - Minor update for Kronos 1.0 released.
The upcoming, comprehensive changes to industry in EvE will require refactoring some of the basic components in iveeCore. As there will be many more variables to consider to determine cost and profit of activities, some of which might or might not be queryable via API, major architectural changes might become necessary. I'm currently brainstorming and also waiting for more announcements from CCP in this regard... |
Aineko Macx
Royal Amarr Institute Amarr Empire
313
|
Posted - 2014.06.08 10:02:11 -
[22] - Quote
v1.3.1 - Minor update for Kronos 1.0 released.
The upcoming, comprehensive changes to industry in EvE will require refactoring of at least some of the basic components in iveeCore. As there will be many more variables to consider to determine cost and profit of activities, some of which might or might not be queryable via API, major architectural changes might become necessary. I'm currently brainstorming and also waiting for more announcements from CCP in this regard...
iveeCore: PHP library for calculation of industrial activities, now with Hyperion support
|
Yourself4
Future Corps Sleeper Social Club
1
|
Posted - 2014.07.25 18:10:00 -
[23] - Quote
Does this support the new changes to the SDE and new CREST endpoints in Crius?
The git repo seems to only be used to publish new releases with no intermediate commits. Can we submit pull requests? |
Yourself4
The Scope Gallente Federation
1
|
Posted - 2014.07.25 18:10:56 -
[24] - Quote
Thanks for publishing this! It's awesome to be able to do industry calcuations and devolop without having to reinvent the wheel on the whole SDE plus blueprints. I really like how the project is organized with strong object orientation that is more typical of Java than PHP. I do however have some questions regarding this project:
Does this support the new changes to the SDE and new CREST endpoints in Crius?
The git repo seems to only be used to publish new releases with no intermediate commits. Can we submit pull requests? |
Aineko Macx
Royal Amarr Institute Amarr Empire
313
|
Posted - 2014.07.25 18:44:43 -
[25] - Quote
I have been working feverishly on getting iveeCore compatible with Crius. I have been making good progress but I can give no clear ETA. As so much changed it is a major overhaul and the codesize is basically doubling compared to previous versions.
The upcoming release will be able to handle CREST data including system indices, teams & specializations as well as station specific assembly line bonuses. So basically you'll be able to say "I want to manufacture X in Station Y or POS in System Z" and everything else is automagically accounted for.
I have indeed been using the git repo only for releases, but this might change when people interested in contributing show up If you'd like to contribute I'd suggest you wait for the Crius compatible version 2.0 to avoid double work. I'll be happy to look at pull requests or discuss other changes.
iveeCore: PHP library for calculation of industrial activities, now with Hyperion support
|
Aineko Macx
Royal Amarr Institute Amarr Empire
302
|
Posted - 2014.08.01 19:02:00 -
[26] - Quote
Alright, version 2.0 beta is out, with Crius support. Bugs in functionality and correctness are expected. Also the documentation might still contain obsolete bits. iveeCore - PHP library for calculations of industrial activities |
Aineko Macx
Royal Amarr Institute Amarr Empire
313
|
Posted - 2014.08.01 19:02:21 -
[27] - Quote
Alright, version 2.0 beta is out, with Crius support. Bugs in functionality and correctness are expected. Also the documentation might still contain obsolete bits and the unit tests have not all been converted yet.
Since the industry changes required a major rework of the library, I used the opportunity to restructure it and make it a bit more PSR-compliant, with namespaces, class autoloading and style changes.
iveeCore: PHP library for calculation of industrial activities, now with Hyperion support
|
Aineko Macx
316
|
Posted - 2014.09.20 17:09:36 -
[28] - Quote
Since the announcement of the (Crius compatible) version 2.0 beta a lot was done to improve the library and squash bugs. So now it is time to "officially" release version 2.0 (Hyperion compatible). TADA!
Feel free to use & break it. Feedback is always appreciated.
CCP announced reworked invention and reverse engineering activities in an upcoming expansion, but from the looks of it these are moderate changes, which should not be difficult to implement in iveeCore.
iveeCore: PHP library for calculation of industrial activities, now with Phoebe support.
|
Aineko Macx
316
|
Posted - 2014.11.08 09:43:42 -
[29] - Quote
Phoebe support done & pushed.
iveeCore: PHP library for calculation of industrial activities, now with Phoebe support.
|
Aineko Macx
319
|
Posted - 2014.12.14 18:07:00 -
[30] - Quote
Version 2.2 relased.
Apart from Rhea support some notable refactoring was done. See RELEASENOTES for details. Switching from EMDR to authed CREST for market data will be done in an upcoming release.
Note: Calculating Confessor build slot cost is currently not possible as public CREST is not returning the required adjustedPrice of an input material atm.
iveeCore: PHP library for calculation of industrial activities, now with Rhea support
|
|
|
|
|
Pages: [1] 2 :: one page |
First page | Previous page | Next page | Last page |