[MOD 0.11.22] Smart Circuit Systems - 0.3.8

Topics and discussion about specific mods
Neotix
Filter Inserter
Filter Inserter
Posts: 599
Joined: Sat Nov 23, 2013 9:56 pm
Contact:

Re: [0.11.x] Smart Circuit Systems - 0.3.2

Post by Neotix »

It could be working like very small smart accumulator with 1 capacity and discharge when we cut off electricity. When he have energy, it generate ghost items.
With that in logic gates we could set condition like Electricy (ghost item) > 0. When it "true", connected logic gates transmit energy to next pole and charge next sensor. In logic system based on gates, speed is crucial and that why we can't use smart chests or actual smart acc.

More complicated version could generate ghost items depends on providing energy. When we have enough energy, sensor will generate 100 items but when we demand more energy and production is less efficient, sensor will contain less ghost items. It's would be like Energy production bar in electricity screen but with possibility to connect it into logic network.

My English is not so good but i hope that you will understand what i wrote.

Kikkers
Fast Inserter
Fast Inserter
Posts: 109
Joined: Sun Jun 22, 2014 8:45 pm
Contact:

Re: [0.11.x] Smart Circuit Systems - 0.3.2

Post by Kikkers »

So basically, you would like a 1-charge-unit accumulator with (almost) instant charge and discharge, with wire connection? Seems doable. Would be nice to have a graphic for it, maybe a pole with a battery hanging from it...

Also, updating to 0.3.3 with a fix for all sensors. Apparently, this bug was present since the beginning, even with the smart tank, but only happened when the sensor was killed or mined.

Kikkers
Fast Inserter
Fast Inserter
Posts: 109
Joined: Sun Jun 22, 2014 8:45 pm
Contact:

Re: [0.11.x] Smart Circuit Systems - 0.3.2

Post by Kikkers »

Kikkers wrote:So basically, you would like a 1-charge-unit accumulator with (almost) instant charge and discharge, with wire connection? Seems doable. Would be nice to have a graphic for it, maybe a pole with a battery hanging from it...
That's in now. Let us know if you're able to make something fancy with it.

Neotix
Filter Inserter
Filter Inserter
Posts: 599
Joined: Sat Nov 23, 2013 9:56 pm
Contact:

Re: [0.11.x] Smart Circuit Systems - 0.3.4

Post by Neotix »

I started to build clock :D
Is it possible to add drain into that pole? Because to discharge sensor i have to put something with drain like inserter.

Kikkers
Fast Inserter
Fast Inserter
Posts: 109
Joined: Sun Jun 22, 2014 8:45 pm
Contact:

Re: [0.11.x] Smart Circuit Systems - 0.3.4

Post by Kikkers »

Priority now is to optimize the code, I seem to be doing stuff in an suboptimal way.

A drain would be useful (also of fluids, dumping oil in lakes seems neat), but that can wait. You can work around not having a good drain without too much hassle (inserter, lamp, radar station).

Degraine
Filter Inserter
Filter Inserter
Posts: 281
Joined: Wed Aug 13, 2014 10:49 am
Contact:

Re: [0.11.x] Smart Circuit Systems - 0.3.4

Post by Degraine »

I promised Kikkers I'd post the tricks I'd used with power switches, so here they are.

Actually, I added them to my Factorio gallery.

Kikkers
Fast Inserter
Fast Inserter
Posts: 109
Joined: Sun Jun 22, 2014 8:45 pm
Contact:

Re: [0.11.x] Smart Circuit Systems - 0.3.4

Post by Kikkers »

Impressive, thanks for sharing!
I was hoping that people would use them in different ways.

The smart accumulator actually stores only half of a basic accumulator, but (dis)charges at half the rate to synchronize them with basic accumulators.

Degraine
Filter Inserter
Filter Inserter
Posts: 281
Joined: Wed Aug 13, 2014 10:49 am
Contact:

Re: [0.11.x] Smart Circuit Systems - 0.3.4

Post by Degraine »

Right, right...I knew it was the rate that was important, because using a smart accumulator in a system with Bob's high capacity accumulators didn't work so well.

fregate84
Fast Inserter
Fast Inserter
Posts: 233
Joined: Sun Jun 22, 2014 10:56 am
Contact:

Re: [0.11.x] Smart Circuit Systems - 0.3.4

Post by fregate84 »

very nice !

Can you add one to put a train signal red on wire condition ? I try to stop my train when all is full :-)

Kikkers
Fast Inserter
Fast Inserter
Posts: 109
Joined: Sun Jun 22, 2014 8:45 pm
Contact:

Re: [0.11.x] Smart Circuit Systems - 0.3.4

Post by Kikkers »

fregate84 wrote:Can you add one to put a train signal red on wire condition ? I try to stop my train when all is full :-)
The current preferred way to manage train behavior is using item sensor (for checking train contents) and omni actuator (to force the train to stop). I'm sure you can figure it out from there ;)

User avatar
MasterBuilder
Filter Inserter
Filter Inserter
Posts: 348
Joined: Sun Nov 23, 2014 1:22 am
Contact:

Re: [0.11.x] Smart Circuit Systems - 0.3.5

Post by MasterBuilder »

So for the past few hours I've been trying to design a power array system where I have multiple lines of generators and they come on as needed to power the base.
All the systems I've tried to build use smart accumulators and thus must cycle at some rate. If the accumulator is discharging then turn on the next line, if it's fully charged turn it off.
This works but essentially flashes on and off constantly. This can be minimized using smart inserters and a buffer. (Turn on generator line at when the charge is at 900 and then off at 1000.)
It works but not ideally. I'd like to have the accumulator fully charged for emergencies. This on/off thing also wreaks havoc one secondary systems using an accumulator as a gap. (Such an accumulator would charge at a slower rate of the ones on the primary grid since they are discharging in two grids. Thus the secondary grids will spend half their time without power.)

I've come to the conclusion that the only way do do this is to have some sort of sensor for power demand.
If I could do something like "if demand > production" then I could use smart inserters to create some AND gates and go from there but I don't think I can compare two dynamic variables within a switch.
I could alternatively calculate the max output of a line of generators manually and compare to that. This would work but would require each new segment trigger at (max output * n).
In order to do this without having to manually calculate each line I'd need a binary sensor for "power demand > power generation" (whilst excluding the accumulators).

I don't even know if sensors or the API is even this complex. If anyone has a better idea/method please let me know.
(If you bothered to read all that thank you.)

Would it be possible to make a smart steam engine capable of providing 'performance' and 'available performance' as inputs (0-100 percentage) for a wire network?

PS: I don't know if running 6 generator at 50% creates more or less pollution than 3 generators at 100%. I just want to do this for personal preference.
Last edited by MasterBuilder on Sun Nov 23, 2014 11:28 am, edited 2 times in total.
Give a man fire and he'll be warm for a day. Set a man on fire and he'll be warm for the rest of his life.

Kikkers
Fast Inserter
Fast Inserter
Posts: 109
Joined: Sun Jun 22, 2014 8:45 pm
Contact:

Re: [0.11.x] Smart Circuit Systems - 0.3.5

Post by Kikkers »

That's an interesting observation. I'm relatively sure we can't poll the connected elecric network for consumption and production, so I won't be able to do anything about that myself.

It does make a good case for the factorio devs, seeing how everyone uses this mod might give them ideas on what is desired once they make an official implementation.
This works but essentially flashes on and off constantly
Isn't it possible to make an RS latch with what we have now? Or do I have to make a 2-input electric switch?

n9103
Smart Inserter
Smart Inserter
Posts: 1067
Joined: Wed Feb 20, 2013 12:09 am
Contact:

Re: [0.11.x] Smart Circuit Systems - 0.3.5

Post by n9103 »

RS Latch:
Smart chest with enough indicator items <i below> (probably means enough items to be stacked from the end of the belt back to the 2nd in inserter.)
Four smart inserters, 2 in 2 out.
1 of both in and out is set to work when i > 0
Other in is set to work when control signal = 1 (set)
Other out is set to work when control signal = 0 (reset)

Set should only be indicated true when i > 1
Reset should only be indicated complete when i < 1
Anything that relies on circuit has to be latency tolerant, as there's going to be a significant (computationally) delay switching between the states.

Setup is a 3/4 circle of belts with the inserters going around in order: always In - controlled in - always out - controlled out
I would recommend at least red belts, to ensure the farthest out can reach the always in without a delay long enough for the belt buffer to empty.
A belt buffer would mitigate or alleviate this (placed between the in and out portions).

All this is mind's eye, but pretty sure it should work as planned.
Colonel Failure wrote:You can lose your Ecologist Badge quite quickly once you get to the point of just being able to murder them willy-nilly without a second care in the world.

Neotix
Filter Inserter
Filter Inserter
Posts: 599
Joined: Sat Nov 23, 2013 9:56 pm
Contact:

Re: [0.11.x] Smart Circuit Systems - 0.3.5

Post by Neotix »

Look in my thread https://forums.factorio.com/forum/vie ... f=8&t=6839
I build T Latch but it's only next step of RS Latch.

n9103
Smart Inserter
Smart Inserter
Posts: 1067
Joined: Wed Feb 20, 2013 12:09 am
Contact:

Re: [0.11.x] Smart Circuit Systems - 0.3.5

Post by n9103 »

I noticed that thread right after I posted.
I also noticed that you're not using stock. :P

I'm pretty sure there's a single-action version of this, but my logic gates usually end up being constant feedback, rather than cyclical.
Then again, I'm not really interested in using them for non-practical purposes, like making a computer within the game. ;)
Colonel Failure wrote:You can lose your Ecologist Badge quite quickly once you get to the point of just being able to murder them willy-nilly without a second care in the world.

User avatar
MasterBuilder
Filter Inserter
Filter Inserter
Posts: 348
Joined: Sun Nov 23, 2014 1:22 am
Contact:

Re: [0.11.x] Smart Circuit Systems - 0.3.5

Post by MasterBuilder »

Kikkers wrote:
This works but essentially flashes on and off constantly
Isn't it possible to make an RS latch with what we have now? Or do I have to make a 2-input electric switch?
I've seen some of the latch designs but I have no idea how to use them to make this system work.
The problem isn't that the power switch goes on/off but that the generators go on/off rapidly as a result. I've set it up the switches as a toggle so if power <800, turn the generators on, if >900 turn them off. (Cascading to each new line with -n*100.)
It'll never keep the accumulators at 100% but it minimizes the on/off switching.

Would an RS latch help? How?
Give a man fire and he'll be warm for a day. Set a man on fire and he'll be warm for the rest of his life.

Kikkers
Fast Inserter
Fast Inserter
Posts: 109
Joined: Sun Jun 22, 2014 8:45 pm
Contact:

Re: [0.11.x] Smart Circuit Systems - 0.3.5

Post by Kikkers »

I've seen people set up logic gates using inserters before, but that always seemed like more of a curiosity without much practical use. With the stuff in this mod, my hope was to make it possible to control more items, and also to detect more conditions. It should already be possible to construct logic gates using the electric switch (to have an extremely low-latency network), and even using just liquids through controlling small pumps with smart tanks (and maybe combine that with the offshore dump mod to quickly dispose of signal water).

I tried creating some pure electric logic gates this way yesterday, and discovered a crashing bug that makes it quite annoying to set up. Besides that, the concept seems to work. This crashing bug should be fixed in the 0.11.4 release, here's hoping nothing else breaks :)

Kikkers
Fast Inserter
Fast Inserter
Posts: 109
Joined: Sun Jun 22, 2014 8:45 pm
Contact:

Re: [0.11.x] Smart Circuit Systems - 0.3.5

Post by Kikkers »

MasterBuilder wrote:Would an RS latch help? How?
A functional RS latch allows you to toggle something on two conditions. Enable it if condition 1 is met, and disable it if condition 2 is met. It sounds to me like you've set up exactly that, actually...

Zeeth_Kyrah
Long Handed Inserter
Long Handed Inserter
Posts: 66
Joined: Tue Jan 21, 2014 10:05 pm
Contact:

Re: [MOD 0.11.x] Smart Circuit Systems - 0.3.5

Post by Zeeth_Kyrah »

Now that I've read the full thread and understand that the power switches should have a smart wire ON the center part, I can go back and set up that control system for keeping my oil processing balanced. I was hoping that I could run some chemical plants using smart tanks, to say that if the storage system for light or heavy oil is > 50% and the petroleum gas tank is < 100%, run oil cracking plants so I can get more plastic and sulfur. If this works out, awesome! It means I can always have some light and heavy oil for other uses, and still have all the petrol gas I need.
Planned projects: Energy Crystals Plus, Minor Fluid Handling, Small electric furnaces
(high-energy materials and assembler, fluid void burner and small tank, tiny and slow furnaces with charcoal)

Degraine
Filter Inserter
Filter Inserter
Posts: 281
Joined: Wed Aug 13, 2014 10:49 am
Contact:

Re: [MOD 0.11.x] Smart Circuit Systems - 0.3.5

Post by Degraine »

I hadn't thought about controlling cracking plants (or refineries for that matter), that's a good idea.

Post Reply

Return to “Mods”