Page 1 of 18

Foreman 0.1.9 - A factory optimisation tool.

Posted: Thu Aug 28, 2014 1:08 pm
by Nicksaurus
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.

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

Posted: Thu Aug 28, 2014 2:00 pm
by Nirahiel
That's really nice :)

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

Posted: Thu Aug 28, 2014 2:12 pm
by micomico
Very nice stuff. It's a pity it wasn't made using a decent framework.

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

Posted: Thu Aug 28, 2014 2:15 pm
by Nicksaurus
micomico wrote:Very nice stuff. It's a pity it wasn't made using a decent framework.
?
Nirahiel wrote:That's really nice :)
Thanks!

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

Posted: Thu Aug 28, 2014 2:35 pm
by micomico
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.

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

Posted: Thu Aug 28, 2014 2:53 pm
by Nicksaurus
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).

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

Posted: Thu Aug 28, 2014 3:15 pm
by Nirahiel
Mind if I recode it on a website ?

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

Posted: Thu Aug 28, 2014 3:24 pm
by Nicksaurus
Nirahiel wrote:Mind if I recode it on a website ?
I don't really mind what you do with it.

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

Posted: Thu Aug 28, 2014 9:40 pm
by SHiRKiT
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.

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

Posted: Thu Aug 28, 2014 10:37 pm
by Tashen
Nirahiel wrote:Mind if I recode it on a website ?
mind linking the website after you do?

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

Posted: Fri Aug 29, 2014 7:01 am
by Factorian
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!

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

Posted: Fri Aug 29, 2014 7:26 am
by Nirahiel
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 ^^

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

Posted: Mon Sep 01, 2014 12:32 pm
by Mevius
Nice tool! I was looking for something like this!

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

Posted: Tue Sep 02, 2014 10:36 am
by Penrif
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.

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

Posted: Thu Sep 04, 2014 11:53 am
by Nicksaurus
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.

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

Posted: Thu Sep 04, 2014 12:13 pm
by Penrif
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 ;)

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

Posted: Thu Sep 04, 2014 3:45 pm
by hellboy79
Its an amazing tool. Great help to keep things neat!!

I love the presentation too. Many Thanks!

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

Posted: Thu Sep 04, 2014 5:09 pm
by Blackence
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.

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

Posted: Sun Sep 07, 2014 7:17 pm
by mngrif
I grabbed the source and compiled it with exactly zero problems in Visual Studio 2012. Fantastic application. What license is it under?

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

Posted: Mon Sep 08, 2014 11:26 am
by Karosieben
Thanks for this awesome tool!

it really helps me out, balancing my factories.

Maybe i'll do a LP Series :mrgreen: