Foreman 0.1.9 - A factory optimisation tool.

Calculate optimal ratios for feeding recipes, search through the research-tree, specialized tools to view game-information.
Post Reply
Nicksaurus
Inserter
Inserter
Posts: 46
Joined: Thu Aug 28, 2014 12:56 pm

Foreman 0.1.9 - A factory optimisation tool.

Post by Nicksaurus » Thu Aug 28, 2014 1:08 pm

Update - Version 0.1.9 is here! Get it here!

Requirements:
.Net 4.0 or higher
Visual C++ 2012 x86

I felt like making something to help optimise my factory layouts, so here it is. It generates flowcharts for the item amounts/assembler numbers you need to create specific items at specific rates.

Here's an example flowchart:
http://i.imgur.com/cWYtJhL.png

Here's another example:
http://i.imgur.com/gi33Maf.png

Here's a screenshot of the program:
http://i.imgur.com/Il1hGq4.png

Try it:

- Download link! - https://bitbucket.org/Nicksaurus/foreman/downloads
- Source code! - https://bitbucket.org/Nicksaurus/foreman/src

It should be compatible with any mods you have installed too!

Finally, if you have any suggestions, bugs, untempered vitriol etc. post it here or on the issues page.
Last edited by Nicksaurus on Sun Jul 05, 2015 4:31 pm, edited 5 times in total.

Nirahiel
Filter Inserter
Filter Inserter
Posts: 350
Joined: Mon Sep 23, 2013 2:18 pm

Re: A tool to help you optimise your production lines.

Post by Nirahiel » Thu Aug 28, 2014 2:00 pm

That's really nice :)

User avatar
micomico
Long Handed Inserter
Long Handed Inserter
Posts: 94
Joined: Thu Jul 24, 2014 10:55 pm

Re: A tool to help you optimise your production lines.

Post by micomico » Thu Aug 28, 2014 2:12 pm

Very nice stuff. It's a pity it wasn't made using a decent framework.

Nicksaurus
Inserter
Inserter
Posts: 46
Joined: Thu Aug 28, 2014 12:56 pm

Re: A tool to help you optimise your production lines.

Post by Nicksaurus » Thu Aug 28, 2014 2:15 pm

micomico wrote:Very nice stuff. It's a pity it wasn't made using a decent framework.
?
Nirahiel wrote:That's really nice :)
Thanks!

User avatar
micomico
Long Handed Inserter
Long Handed Inserter
Posts: 94
Joined: Thu Jul 24, 2014 10:55 pm

Re: A tool to help you optimise your production lines.

Post by micomico » Thu Aug 28, 2014 2:35 pm

Nicksaurus wrote:?
My post falls on your 'untempered vitriol' category.

Why would I try to install something made in a framework, whose developer doesn't even try to cater to the platform I use? Surely I'm not expected to install a 3rd party framework implementation that may or may not be able to run the stuff. 20th century called, it wants all its non-cross-platform stuff back.

That being said, the resulting flowcharts look nice and the application has a useful purpose.

Nicksaurus
Inserter
Inserter
Posts: 46
Joined: Thu Aug 28, 2014 12:56 pm

Re: A tool to help you optimise your production lines.

Post by Nicksaurus » Thu Aug 28, 2014 2:53 pm

micomico wrote:
Nicksaurus wrote:?
My post falls on your 'untempered vitriol' category.

Why would I try to install something made in a framework, whose developer doesn't even try to cater to the platform I use? Surely I'm not expected to install a 3rd party framework implementation that may or may not be able to run the stuff. 20th century called, it wants all its non-cross-platform stuff back.

That being said, the resulting flowcharts look nice and the application has a useful purpose.
Well... fair enough. I personally think Mono's fine as long as it works (which is something I plan to add later on).

Nirahiel
Filter Inserter
Filter Inserter
Posts: 350
Joined: Mon Sep 23, 2013 2:18 pm

Re: A tool to help you optimise your production lines.

Post by Nirahiel » Thu Aug 28, 2014 3:15 pm

Mind if I recode it on a website ?

Nicksaurus
Inserter
Inserter
Posts: 46
Joined: Thu Aug 28, 2014 12:56 pm

Re: A tool to help you optimise your production lines.

Post by Nicksaurus » Thu Aug 28, 2014 3:24 pm

Nirahiel wrote:Mind if I recode it on a website ?
I don't really mind what you do with it.

User avatar
SHiRKiT
Filter Inserter
Filter Inserter
Posts: 679
Joined: Mon Jul 14, 2014 11:52 pm

Re: A tool to help you optimise your production lines.

Post by SHiRKiT » Thu Aug 28, 2014 9:40 pm

Great tool! Congratulations!

Do it wherever you want, Mono is out there to solve this issue. I normally have two approaches: do on the most confortable framework you know, or experiment a new one. Whatever you pick, thanks.

Tashen
Burner Inserter
Burner Inserter
Posts: 19
Joined: Thu Aug 28, 2014 10:29 pm

Re: A tool to help you optimise your production lines.

Post by Tashen » Thu Aug 28, 2014 10:37 pm

Nirahiel wrote:Mind if I recode it on a website ?
mind linking the website after you do?

Factorian
Inserter
Inserter
Posts: 26
Joined: Fri Jul 25, 2014 7:12 am

Re: A tool to help you optimise your production lines.

Post by Factorian » Fri Aug 29, 2014 7:01 am

Nice Tool! I was planning on making something similar but nothing with as nice a UI as yours has. I gave this a whirl last night whilst building my latest factory and i have to say im quite happy with it!

Nirahiel
Filter Inserter
Filter Inserter
Posts: 350
Joined: Mon Sep 23, 2013 2:18 pm

Re: A tool to help you optimise your production lines.

Post by Nirahiel » Fri Aug 29, 2014 7:26 am

Tashen wrote:
Nirahiel wrote:Mind if I recode it on a website ?
mind linking the website after you do?
Obviously i'll give the URL, I'm not doing this for me ^^

User avatar
Mevius
Manual Inserter
Manual Inserter
Posts: 3
Joined: Mon Aug 25, 2014 8:36 am

Re: A tool to help you optimise your production lines.

Post by Mevius » Mon Sep 01, 2014 12:32 pm

Nice tool! I was looking for something like this!
Een goeie tukker is geen motherfucker!

User avatar
Penrif
Burner Inserter
Burner Inserter
Posts: 15
Joined: Mon Aug 25, 2014 7:22 pm

Re: A tool to help you optimise your production lines.

Post by Penrif » Tue Sep 02, 2014 10:36 am

Excellent tool, very useful!

Have you given any thought to how to balance petrochemical products with cracking recipes? It appears that currently the program tries to draw from each source of a thing equally, meaning that if you have a plastic plant drawing from a light oil cracker and from refineries directly, it'll try to get equal amounts of gas from both, which is way out of balance on the supply side.

Nicksaurus
Inserter
Inserter
Posts: 46
Joined: Thu Aug 28, 2014 12:56 pm

Re: A tool to help you optimise your production lines.

Post by Nicksaurus » Thu Sep 04, 2014 11:53 am

Penrif wrote:Excellent tool, very useful!

Have you given any thought to how to balance petrochemical products with cracking recipes? It appears that currently the program tries to draw from each source of a thing equally, meaning that if you have a plastic plant drawing from a light oil cracker and from refineries directly, it'll try to get equal amounts of gas from both, which is way out of balance on the supply side.
I agree, the optimisation is very basic at the moment. The best way I can think of to sort it out is to express the entire graph (with all possible recipes in it) as a linear programming problem, then solving it to minimise the inputs and removing any nodes that have a rate of 0 after that.

To be honest it's not something I have any real experience with though. I'm putting it off until I've sorted out some of the immediate problems people are having.

User avatar
Penrif
Burner Inserter
Burner Inserter
Posts: 15
Joined: Mon Aug 25, 2014 7:22 pm

Re: A tool to help you optimise your production lines.

Post by Penrif » Thu Sep 04, 2014 12:13 pm

Nicksaurus wrote:The best way I can think of to sort it out is to express the entire graph (with all possible recipes in it) as a linear programming problem, then solving it to minimise the inputs and removing any nodes that have a rate of 0 after that.
Precisely the conclusion I came to as well. I'll take a crack at it - watch for more pull requests ;)

hellboy79
Manual Inserter
Manual Inserter
Posts: 1
Joined: Thu Sep 04, 2014 3:41 pm

Re: A tool to help you optimise your production lines.

Post by hellboy79 » Thu Sep 04, 2014 3:45 pm

Its an amazing tool. Great help to keep things neat!!

I love the presentation too. Many Thanks!

Blackence
Fast Inserter
Fast Inserter
Posts: 109
Joined: Thu Jun 05, 2014 4:03 pm

Re: A tool to help you optimise your production lines.

Post by Blackence » Thu Sep 04, 2014 5:09 pm

Nice tool. And it actually supports Ubuntu. I swapped the two conditions near DataCache.cs:184 because it complained about "/home/…/.config/Factorio" which doesn't exist.

Code: Select all

if (Directory.Exists(FactorioDataPath))
I think it makes sense to swap them so the if condition matches what is passed to GetDirectories, but I haven't tried to understand what these are good for.

I had to compile NLua for Ubuntu, which is not that hard. If everything related to this tool including the tool itself was officially under a free license, it should be possible to set up a PPA so it's easier for others to install. Of course, Winforms using mono look a little ugly, but I can certainly live with that :D

Edit: Just noticed that Assemblers are not displayed in my flowcharts. Or maybe I'm doing it wrong. :?

Edit 2: So this is why:

Code: Select all

					try
					{
						Console.Out.WriteLine("loading file "+f);
						lua.DoFile(f);
					}
					catch (NLua.Exceptions.LuaScriptException e)
					{
						Console.Out.WriteLine("file failed");
						failedFiles[f] = e;
					}
loading file /home/…/factorio/data/base/prototypes/entity/entities.lua
file failed
Maybe I can debug this more, but now I'm out of time.

Edit 3: No need to tell my user name :P

Edit 4: I sent a pull request.

User avatar
mngrif
Fast Inserter
Fast Inserter
Posts: 171
Joined: Wed Feb 13, 2013 10:44 am

Re: A tool to help you optimise your production lines.

Post by mngrif » Sun Sep 07, 2014 7:17 pm

I grabbed the source and compiled it with exactly zero problems in Visual Studio 2012. Fantastic application. What license is it under?
Some Stuff About Stuff And Things || My Silly Factorian Tricks
<_aD> OBSERVE SIGNAL ASPECT BEFORE CROSSING TRACK

User avatar
Karosieben
Long Handed Inserter
Long Handed Inserter
Posts: 52
Joined: Sun Aug 31, 2014 9:21 pm

Re: A tool to help you optimise your production lines.

Post by Karosieben » Mon Sep 08, 2014 11:26 am

Thanks for this awesome tool!

it really helps me out, balancing my factories.

Maybe i'll do a LP Series :mrgreen:
My german YouTube Channel: Karosieben
My Factorio Let's Plays: Singleplayer, Multiplayer and Tutorials

Post Reply

Return to “Cheatsheets / Calculators / Viewers”