Name | factoriocalc JSON |
Version |
0.2.0
JSON |
| download |
home_page | |
Summary | A python module to help you plan your factory for Factorio. |
upload_time | 2024-01-10 03:03:09 |
maintainer | |
docs_url | None |
author | Kevin Atkinson |
requires_python | >=3.7 |
license | |
keywords |
factorio
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
.. default-role:: literal
FactorioCalc Readme
===================
FactorioCalc is a Python module to help you symbolically plan your factory for
Factorio.
With FactorioCalc you can:
* Symbolically express your exact machine configuration and ask it what the
resulting inputs and outputs is.
* Import a blueprint and determine what it produces.
* Specify the recipes you want to use and let FactorioCalc determine the exact
number of machines needed.
* Specify what you want, and let FactorioCalc determine both the recipes and
the number of machines required.
* Combine factories, which were created using any of the above methods, to
create a larger factory.
FactorioCalc has supports for using custom recipe data and mods. The
companion mod, `Recipe Exporter
<https://mods.factorio.com/mod/RecipeExporter>`_, provides the recipe data.
FactorioCalc contains a custom simplex solver so it can easily handle complex
cases that involve recipes with more than one output, such as oil and uranium
processing.
I, the author, find designing my factory symbolically more natural than
using a spreadsheet and tools like FactorioLab.
Read the docs at https://factoriocalc.readthedocs.io/en/stable/
Examples
--------
::
>>> from factoriocalc import itm, rcp, mch, presets, config, produce
Create a simple factory that creates electronic circuits from copper and iron plates::
>>> config.machinePrefs.set(presets.MP_LATE_GAME)
>>> circuits = 2*rcp.electronic_circuit() + 3*rcp.copper_cable()
>>> circuits.summary()
2x electronic_circuit: AssemblingMachine3:
electronic_circuit 5/s, iron_plate -5/s, copper_cable -15/s, electricity -0.775 MW
3x copper_cable: AssemblingMachine3:
copper_cable 15/s, copper_plate -7.5/s, electricity -1.1625 MW
>>> circuits.flows().print()
electronic_circuit 5/s
copper_cable 0/s (15/s - 15/s)
iron_plate -5/s
copper_plate -7.5/s
electricity -1.9375 MW
Use `produce` to create a factory that produces rocket fuel::
>>> config.machinePrefs.set(presets.MP_MAX_PROD().withBeacons(presets.SPEED_BEACON,
{mch.AssemblingMachine3:8, mch.ChemicalPlant:8, mch.OilRefinery:12}))
>>> rocketFuel = produce([itm.rocket_fuel@6], using=[rcp.advanced_oil_processing]).factory
>>> rocketFuel.summary()
b-rocket-fuel:
23.4x rocket_fuel: AssemblingMachine3 +340% speed +40% prod. +880% energy +40% pollution
9.84x solid_fuel_from_light_oil: ChemicalPlant +355% speed +30% prod. +800% energy +30% pollution
4.65x solid_fuel_from_petroleum_gas: ChemicalPlant +355% speed +30% prod. +800% energy +30% pollution
2.26x advanced_oil_processing: OilRefinery +555% speed +30% prod. +1080% energy +30% pollution
1.06x heavy_oil_cracking: ChemicalPlant +355% speed +30% prod. +800% energy +30% pollution
Outputs: rocket_fuel 6/s
Inputs: water -220.004/s, crude_oil -295.803/s
Installation
------------
FactorioCalc is available on PyPI so you can install it using pip::
pip3 install factoriocalc
Status
------
FactorioCalc has been used by the author to help produce a factory that
produces around 2k science packs per minute. It has also been used to help
beat both Space Exploration and Krastorio 2. The calculations, in terms of
the rate of items produced and consumed, should be accurate (which includes
tricky cases such as the Kovarex enrichment process). The solver, in nearly
all cases, should produce optimal results in terms of materials used. The API
is subject to change but the core functionality *should be* stable.
Possible Bugs
.............
FactorioCalc uses a custom simplex solver written in pure python. The solver
has no provisions to prevent cycling, so calls to `solve` could theoretical
loop and need to be killed with `control-c`; however, so far this has not
happened.
Raw data
{
"_id": null,
"home_page": "",
"name": "factoriocalc",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "Factorio",
"author": "Kevin Atkinson",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/41/4b/59f8cde2c61739d477a23d55d8ab72f37c1101c9d1c30eb60271084a9f0a/factoriocalc-0.2.0.tar.gz",
"platform": null,
"description": ".. default-role:: literal\n\nFactorioCalc Readme\n===================\n\nFactorioCalc is a Python module to help you symbolically plan your factory for\nFactorio.\n\nWith FactorioCalc you can:\n\n* Symbolically express your exact machine configuration and ask it what the\n resulting inputs and outputs is.\n\n* Import a blueprint and determine what it produces.\n\n* Specify the recipes you want to use and let FactorioCalc determine the exact\n number of machines needed.\n\n* Specify what you want, and let FactorioCalc determine both the recipes and\n the number of machines required.\n\n* Combine factories, which were created using any of the above methods, to\n create a larger factory.\n\nFactorioCalc has supports for using custom recipe data and mods. The\ncompanion mod, `Recipe Exporter\n<https://mods.factorio.com/mod/RecipeExporter>`_, provides the recipe data.\n\nFactorioCalc contains a custom simplex solver so it can easily handle complex\ncases that involve recipes with more than one output, such as oil and uranium\nprocessing.\n\nI, the author, find designing my factory symbolically more natural than\nusing a spreadsheet and tools like FactorioLab.\n\nRead the docs at https://factoriocalc.readthedocs.io/en/stable/\n\nExamples\n--------\n\n::\n\n >>> from factoriocalc import itm, rcp, mch, presets, config, produce\n\nCreate a simple factory that creates electronic circuits from copper and iron plates::\n\n >>> config.machinePrefs.set(presets.MP_LATE_GAME)\n >>> circuits = 2*rcp.electronic_circuit() + 3*rcp.copper_cable()\n >>> circuits.summary()\n 2x electronic_circuit: AssemblingMachine3:\n electronic_circuit 5/s, iron_plate -5/s, copper_cable -15/s, electricity -0.775 MW\n 3x copper_cable: AssemblingMachine3:\n copper_cable 15/s, copper_plate -7.5/s, electricity -1.1625 MW\n >>> circuits.flows().print()\n electronic_circuit 5/s\n copper_cable 0/s (15/s - 15/s)\n iron_plate -5/s\n copper_plate -7.5/s\n electricity -1.9375 MW\n\n\nUse `produce` to create a factory that produces rocket fuel::\n\n >>> config.machinePrefs.set(presets.MP_MAX_PROD().withBeacons(presets.SPEED_BEACON,\n {mch.AssemblingMachine3:8, mch.ChemicalPlant:8, mch.OilRefinery:12}))\n >>> rocketFuel = produce([itm.rocket_fuel@6], using=[rcp.advanced_oil_processing]).factory\n >>> rocketFuel.summary()\n b-rocket-fuel:\n 23.4x rocket_fuel: AssemblingMachine3 +340% speed +40% prod. +880% energy +40% pollution\n 9.84x solid_fuel_from_light_oil: ChemicalPlant +355% speed +30% prod. +800% energy +30% pollution\n 4.65x solid_fuel_from_petroleum_gas: ChemicalPlant +355% speed +30% prod. +800% energy +30% pollution\n 2.26x advanced_oil_processing: OilRefinery +555% speed +30% prod. +1080% energy +30% pollution\n 1.06x heavy_oil_cracking: ChemicalPlant +355% speed +30% prod. +800% energy +30% pollution\n Outputs: rocket_fuel 6/s\n Inputs: water -220.004/s, crude_oil -295.803/s\n\n\n\nInstallation\n------------\n\nFactorioCalc is available on PyPI so you can install it using pip::\n\n pip3 install factoriocalc\n\nStatus\n------\n\nFactorioCalc has been used by the author to help produce a factory that\nproduces around 2k science packs per minute. It has also been used to help\nbeat both Space Exploration and Krastorio 2. The calculations, in terms of\nthe rate of items produced and consumed, should be accurate (which includes\ntricky cases such as the Kovarex enrichment process). The solver, in nearly\nall cases, should produce optimal results in terms of materials used. The API\nis subject to change but the core functionality *should be* stable.\n\nPossible Bugs\n.............\n\nFactorioCalc uses a custom simplex solver written in pure python. The solver\nhas no provisions to prevent cycling, so calls to `solve` could theoretical\nloop and need to be killed with `control-c`; however, so far this has not\nhappened.\n\n",
"bugtrack_url": null,
"license": "",
"summary": "A python module to help you plan your factory for Factorio.",
"version": "0.2.0",
"project_urls": {
"Bug Tracker": "https://github.com/FactorioCalc/FactorioCalc/issues",
"Homepage": "https://github.com/FactorioCalc/FactorioCalc"
},
"split_keywords": [
"factorio"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "814c4a9b05c5021b85a1b1f82ef9eb08b6cc1f55201191d70292e2ca2e5a8690",
"md5": "2d62ac0087556511518f8960895a0173",
"sha256": "67021912562139617e18a7ef18bd8b8b20e9bd88ca10cb063015589a716458fb"
},
"downloads": -1,
"filename": "factoriocalc-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2d62ac0087556511518f8960895a0173",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 120001,
"upload_time": "2024-01-10T03:03:07",
"upload_time_iso_8601": "2024-01-10T03:03:07.976218Z",
"url": "https://files.pythonhosted.org/packages/81/4c/4a9b05c5021b85a1b1f82ef9eb08b6cc1f55201191d70292e2ca2e5a8690/factoriocalc-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "414b59f8cde2c61739d477a23d55d8ab72f37c1101c9d1c30eb60271084a9f0a",
"md5": "e78f89d26de1b67ed3c913f4568d9a0f",
"sha256": "2c1d53b2b040b47adc1d314ec302d754ec83d264d581ab76fe2cae3fdd6e399a"
},
"downloads": -1,
"filename": "factoriocalc-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "e78f89d26de1b67ed3c913f4568d9a0f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 1427772,
"upload_time": "2024-01-10T03:03:09",
"upload_time_iso_8601": "2024-01-10T03:03:09.936922Z",
"url": "https://files.pythonhosted.org/packages/41/4b/59f8cde2c61739d477a23d55d8ab72f37c1101c9d1c30eb60271084a9f0a/factoriocalc-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-10 03:03:09",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "FactorioCalc",
"github_project": "FactorioCalc",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "factoriocalc"
}