Jump to content

Aren't power wires just pipes with charge flowing inside?


Recommended Posts

So if our pipe system is mature now, what about reworking the electricity system with the same mechanism?

The wires are just another kind of pipes, the only difference is the element flowing inside is electric charge.

(element type = voltage, mass = charge, energy = charge * voltage, wrong voltage = damage)

 

Pros:

1. Circuit overloading more easily understood and addressed

The current mechanism is quite confusing. Wire branches can get overloaded with no or low appliances on it. This makes it harder for the fresh players to address the real problem.

 

2. Transformers easier to use.

The mechanism of the transformer is quite confusing. Though I know it's actually a battery that transfer energy in only one direction, because I'm an old player already. What it actually do is actually "transfer" rather than "transform" because it doesn't transform anything into something else.

The new version of transformers transforms electric charge into a different voltage and amount, with the energy (=voltage * charge) unchanged.

And wires overloads if the current is higher than the preset value, despite the voltage or the wattage.

 

3. Fits real world physics better.

I'm not saying everything in a game must realistic. (because a lot of people takes this as a reason against the removal of heat deletion)

If Electricity is taken from the real world, people could learn from the design from real world, such as how electricity is transformed to make it easier transferred.

 

Cons:

1. Too late for the launch.

2. Changes a lot of things.

3. Not exactly same as pipes.

The electric "pipes" is the kind of pipe that never gets empty inside. If it fits real world physics well, it has to be filled with charge immediately whenever connected to a power source. Otherwise there would be a significant latency before the first time a circuit gets connected, because current travels at the speed of light while electrons doesn't travels as fast.

Link to comment
Share on other sites

I think I'm not understanding how you are imagining it would work. Some thoughts.

1. Circuits become overloaded when the total active consumers exceeds the rated wattage. A mechanism that can be summarized by a single concise sentence is probably not very complicated. I think the problem comes from lack of instruction.

2. Adding voltage numbers to the mix seems like it would further confuse people. However, I can imagine this working out if you have two types of electricity: high voltage and low voltage, where high voltage cannot overload but only be consumed and produced by transformers. ("Realistic" transformers.)

By the way, it is not merely a unidirectional battery. It is actually a battery on neither end. On one side, it is a pure 1kw or 4kw consumer and nothing else. On the other end it is a pure 1kw or 4kw generator.

Not knowing this will cause problems. Again, lack of instruction. I think they are gearing up to fix this with the in game video player.

3. Realistic transformers would be realistic. I can actually see them working out. But are you imagining electrical energy packets flowing in one direction over wires? Would we use high/low leads on buildings to complete circuits, doubling the amount of sockets and wiring? That sounds both awful and unrealistic (what I am imagining) so I must be mistaken.

To the question in the title, I don't think so. Real circuits are sort of an all-at-once phenomenon. In this game all equipment is wired in parallel: they all have access to the same high voltage rail at once and they consume in a round robin style (a design choice for the purpose of the simulation). This is already a good representation of parallel circuits, and it makes sense of using one twisted pair to wire everything.

I think you are imagining energy packets flowing in one direction and being partially consumed on the way in serial.

  • This doesn't really make sense of the return path unless you had to lay out twice as much wire to complete the circuit with two sockets on each generator.
  • Even in serial all units will get power regardless of how many consumers there are, they will just get proportionally less power which can't be done for ONI buildings (there is no "partially on" state). This is quite unlike pipes.
  • Power systems are not wired in serial because the voltage seen by each device would constantly be changing depending on whatever else is connected in serial. Anything more complicated than a heating element would be very difficult to design. And even if you could it would perform poorly.
Link to comment
Share on other sites

Some small notes about electricity in ONI: Unlike gas and liquid pipes, the total available charge (from a battery, generator, or transformer) is available at every consumer on the circuit simultaneously.  Lets compare to liquid pipes: You have a pump in water which produces a packet with a specific amount of liquid every second and pushes it down the pipe.  When you come to the first consumer, ALL the water goes to that consumer until that consumer is satisfied.  If your pump continues running, then packets continue on down the pipe once the consumer has been satisfied.  Electricity doesn't work like that.  Its an entirely different beast, even in ONI.

@nakomaru's post is exactly correct.  

 

@DreamApart, lets break down your points one at a time.

  1. Circuit Overloading more easily understood and addressed.  OK, circuit overloading is actually very simple.  Certainly, it would help if the code was robust enough to only melt wires that were somewhere between a producer and a consumer, but the current system is still rather close to how real world wires function.  Electrical engineers and electricians use wire gauge charts to quickly decide what size of wire to use for any given application.  Otherwise Bad Things (tm) happen.  In ONI, we assume that the wires are perfect conductors up to a specific amount of power, at which point they'll fail.  I wish real wires worked as nicely as ONI wires do.
  2. Transformers easier to use.   OK, um.. transformers are really quite simply and straightforward to use.  They don't function the way real transformers do -- they're much more intuitive and straightforward in ONI.  Basically, in ONI, a transformer isolates a circuit.  The "high" side is the source circuit, and the "low" side is your drain circuit.  So the "low" side only sees sources and consumers that are on the low side of the circuit.  Power can only flow from the "high" side to the "low" side, so the "high" side only sees the transformer itself as a consumer, not each individual item.  Since the transformer itself has a limit to the amount of power it provides, it means you can put 2kw of consumers on the "low" side of a small transformer, use regular wire, and as long as there aren't any batteries (or other transformers) on that low side, you'll never burn out your wires.  You may have brown outs, where your circuit loses power temporarily, if too many of your consumers are running at once, but you won't melt wires.  To put it another way: The "transformer" in ONI acts a little bit like a one-way valve: Power can only flow one direction, and it has a limit based on the rating of the transformer.
  3. Fits real world physics better.   Um, no.  I'm an electrical engineer. Electricity does not work like pipes.   First of all, most of our power network is alternating current.  I challenge anyone to plumb a house using alternating water flow. I can't wait to see how that looks when someone turns on the faucet.  Anyway, back to the point:  Even with DC current, unless your run is EXTREMELY long, the difference in time between connecting the power and when every single point along that circuit has full power will appear to be instantaneous.  From the power source's perspective, the load of a circuit is the combined load of every device on that circuit.  At the time you connect power.  If your load doesn't match up well with your power source, you'll have problems. Lots of them.  Treating electric wires like electric pipes is a good way to get someone killed.  Please don't do it.

 

One of the biggest challenges I have with designing logic circuits is that I have to think differently.  When I program a computer, I know that a processor takes a command, does an operation, then gets the next command.  Its iterative and procedural.  One, then the next, then the one after that.  Electric circuits aren't.  Ignoring capacitance and inductance, every point along my logic circuit will be operating simultaneously to every other point.  I can make the circuit behave in an iterative manner, but it isn't. 

You CAN make a comparison between electric power and water pipes, but only to understand some basic concepts about electricity.  Voltage would be the force of the water moving in the pipe, current would be the rate at which the water is flowing, and resistance would be the diameter of the pipe.  This comparison helps build the underlying concepts about how voltage, current, and resistance relate to each other.  It has nothing to do with how electricity ACTUALLY moves through a circuit.  If you design a circuit thinking that electricity behaves like water in a pipe, you're going to have a Hard Time and can get people killed.  Please, don't do it!

Link to comment
Share on other sites

I just wish we had a third "transformer" with multiple outputs to act as a load center. 

 

Not only would this closer resemble the "real world" but it would also cut down on confusion (because it resembles the real world and people are familiar with the concept).

Link to comment
Share on other sites

19 minutes ago, gbhil said:

I just wish we had a third "transformer" with multiple outputs to act as a load center. 

 

Not only would this closer resemble the "real world" but it would also cut down on confusion (because it resembles the real world and people are familiar with the concept).

I think it would confuse people more.  Most people do not understand how transformers work.  At all.  They have some general concept of their function, but it tends to boil down to "there's high power on one side, low power on the other."  Which is not correct, but it IS how the ONI transformers work.

 

Real world transformers have EQUAL power on either side.  One side has high voltage, the other side has high current -- but the available power on either side is the same.  Real transformers also do not isolate a circuit -- they can operate in either direction.  If ONI transformers worked like real transformers, the average player would be constantly blowing up batteries, melting wires, and electrocuting dupes.  .. wait, that actually sounds kinda fun.  Hmmmm.....

Link to comment
Share on other sites

This idea would result in horrible performance and nobody would want the resulting drop in FPS.

Right now the power system is simple. There are power producers, consumers and batteries. They are all connected to the same group and consumers can take power from any generator or battery. They do not check wires, length or wire or anything like that. If they are in the same group, they are connected. End of story. Even just reading the wire layout from memory would be a noteworthy slowdown and that's before making any simulation of currents.

As for where the wire overloads, imagine this real life situation: you have 230 V and a 10 A fuse. That allows 2300 W (those are real numbers in some locations and used here because 10A is easy for calculations). You then want to use 200 W and because that's less than 1 A, you can cut cost and use a 1 A wire, right? NO, by law if the fuse says 10 A, all wires have to survive 10 A. Safety flaws can occur if something is worse than the fuse and nothing can be better than the fuse (sure it can say max 16 A, but the fuse still restrict it to 10 A). Essentially you have created a 2.3 kW wire network and all wires have to be 2.3 kW regardless of how much power you use. The same is true for ONI. If you consume 2 kW, you need a wire, which can handle 2 kW. You can't have a 1 kW in the 2 kW wire network. It's unsafe.

As for player understanding, I would say the same as for automation and possibly other aspects of the game: the ingame introduction is kind of lacking. Most of the game mechanics would be easier to get started using if they were introduced better.

Link to comment
Share on other sites

18 minutes ago, Nightinggale said:

This idea would result in horrible performance and nobody would want the resulting drop in FPS.

I was just going to mention this. Pipes are one of the highest resource hogs, and that alone is a reason not to do this. 

Link to comment
Share on other sites

8 minutes ago, KittenIsAGeek said:

Real world transformers have EQUAL power on either side.  One side has high voltage, the other side has high current -- but the available power on either side is the same.  Real transformers also do not isolate a circuit -- they can operate in either direction.  If ONI transformers worked like real transformers, the average player would be constantly blowing up batteries, melting wires, and electrocuting dupes.  .. wait, that actually sounds kinda fun.  Hmmmm.....

That's not entirely true. They have equal power input and output (if we ignore internal loss), but just like in ONI, it's possible to place 5 transformers all inputting from the same wire, meaning the input wire have 5 times the power as the output.

Transformers might be able to transmit power in both directions, but not all of them are able to do that. The ones you experimented with in school (I did that, I don't know about you) are simple and can send power in both directions. They also have a power loss around 60-70%. Transformers used in the power grid are totally different with a much lower power loss, but the efficiency might result in them being one way only. Allowing power in both directions makes the transformer significantly more expensive and it's not like they are cheap to begin with. This is one of the reasons why you might not be allowed to place solar panels on the roof of your house. If the local transformer is mono-directional, then the power from the solar panels need to be used on your local grid as in the houses on your road needs to consume the power. This means you can locally cause over voltage by producing more than you consume even if the country wide grid is low on power.

I read that this is a big problem on Hawaii and people are really upset if they aren't allowed to put up solar panels. They claim it's the power company forcing people to pay whatever they demand. The power company is concerned about the number of solar panels delivering power to the grid while people are at work (read: lots of sun, no consumers), which can cause local over voltage and if that happens, the power company is financially responsible for anything broken by the wrong voltage regardless of who delivered said voltage.

Link to comment
Share on other sites

40 minutes ago, Nightinggale said:

That's not entirely true. They have equal power input and output (if we ignore internal loss), but just like in ONI, it's possible to place 5 transformers all inputting from the same wire, meaning the input wire have 5 times the power as the output.

 

Yes, I was using the ideal transformer for my statements, ignoring the internal losses which are high.  ONI transformers are ideal -- there is no loss of power.  Also, the average person is unaware that power is always lost when transforming it (no matter the method used).  And certainly putting five transformers in parallel means that each transformer will have a fifth the power on the output compared to what they see from the input. 

Basically, ONI transformers work a lot like the average person believes transformers work.  The argument I was responding to was that "transformers need to be changed to be like real transformers so that people can understand them better."  That isn't the case.

On the other part of your post, some of the problem with the grid in Hawaii is the scale.  Its all in the same timezone and same climate (for the most part), which means that  energy use is fairly homogeneous across the region.  Second, Hawaii probably uses high voltage DC to transmit their power, because running AC under water between the islands would result in a HUGE loss of power due to the parasitic capacitance.  This means that neighborhood transformers aren't the AC transformers everyone is familiar with: They're basically giant buck-converters that use pulsed DC to drop the voltage down to useful levels.  Then, after the voltage is dropped, its run through an inverter to create the alternating current used in the buildings.

So yes, you're entirely correct about people in Hawaii being unable to run solar panels on their houses.  Boosting the DC voltage from household solar panels to the levels necessary to feed back into the grid would be extremely expensive.

Link to comment
Share on other sites

1 hour ago, KittenIsAGeek said:

I think it would confuse people more.  Most people do not understand how transformers work.  At all.  They have some general concept of their function, but it tends to boil down to "there's high power on one side, low power on the other."  Which is not correct, but it IS how the ONI transformers work.

 

Real world transformers have EQUAL power on either side.  One side has high voltage, the other side has high current -- but the available power on either side is the same.  Real transformers also do not isolate a circuit -- they can operate in either direction.  If ONI transformers worked like real transformers, the average player would be constantly blowing up batteries, melting wires, and electrocuting dupes.  .. wait, that actually sounds kinda fun.  Hmmmm.....

Notice I said "transformer" with quotes. People understand the idea of the breaker box in their home: one big wire feeds multiple smaller wires. They have no idea how transformers or electrical load works. i know this because I worked my way through my EE degree wiring houses and have seen everything you can imagine when it comes to people trying to DIY electrical work.

 

Even if it's not how things actually work, it would be how most people **think** it actually works.

Link to comment
Share on other sites

1 minute ago, gbhil said:

Even if it's not how things actually work, it would be how most people **think** it actually works.

OK, your third "Transformer" that you talked about.. already exists.  One wire with multiple outputs:

image.png.0595af4d95ecb8849c890435a2af0ca6.png

Oh, wait.. you said breaker box...

image.png.cc655500bfbbbeb5776aa6df0f06e6f6.png

Or perhaps:

image.png.91837a4013cd5cf5b0151ce3a621fbb5.png

** Addendum: Apparently I quoted the wrong part of your post.  Oh well. Its not like your post isn't directly above mine.  =^.^=

Link to comment
Share on other sites

 
 
 
40 minutes ago, KittenIsAGeek said:

OK, your third "Transformer" that you talked about.. already exists.  One wire with multiple outputs:

 

Close. I'm thinking more along the lines of this

 

ONI-loadcenter.thumb.png.3f31dda4a9cbbb676159cc186f2b16f8.png

 

When you plug 3 XXX into wire A, wire B does not melt. 

Link to comment
Share on other sites

With a single transfomer, I can put 25kw of consumers on a regular 1kw wire by using a transformer and it won't burn out. Ever.  Of course, most of those consumers won't be running most of the time, but the wire won't burn out.  The only way it can burn out is if I have some form of energy storage other than the transformer sitting on the consumer side.  For example, a battery.  This is because the battery can potentially store up enough energy to allow more than 1kw of consumers to run.  If the battery isn't there, the limits of the transformer will prevent the wire from melting.

So I don't see why a "third transformer" would cut down on the confusion, as you stated above ( https://forums.kleientertainment.com/forums/topic/108582-arent-power-wires-just-pipes-with-charge-flowing-inside/?do=findComment&comment=1221888 ), when the current design gives that functionality already.  You can connect any number of transformers to a heavi-watt line and they're all isolated from each other. Need another output? Just build another transformer.  Overloading the circuit on transformer A will not do anything to the circuit on transformer B.

 

Granted, there are currently some bugs that still need to be worked out.  Specifically when you have consumers just slightly over the rating of the wire that are trying to all run at once you can burn it out due to how the code iterates through the consumers.  However, I've only run into that problem a couple of times.  

 

That said, I think what everyone really is looking for is a circuit breaker.  Something that would disconnect the circuit if the power draw becomes too high, which could be built in a dupe-convenient location.  This would allow players to overload a circuit without worrying about the wire melting in an inconvenient location.  We already have the power shutoff -- something similar, using the current power load as a threshold instead of the logic port would probably work.

Link to comment
Share on other sites

29 minutes ago, KittenIsAGeek said:

That said, I think what everyone really is looking for is a circuit breaker.  Something that would disconnect the circuit if the power draw becomes too high, which could be built in a dupe-convenient location.  This would allow players to overload a circuit without worrying about the wire melting in an inconvenient location.  We already have the power shutoff -- something similar, using the current power load as a threshold instead of the logic port would probably work.

Yeah, it looks like the OP is looking for an on-wire wattage sensor that sends an automation signal similar to gas and hydro sensors. Then connecting it to a power shutoff.

Link to comment
Share on other sites

1 minute ago, bleeter6 said:

Yeah, it looks like the OP is looking for an on-wire wattage sensor that sends an automation signal similar to gas and hydro sensors. Then connecting it to a power shutoff.

There is a mod for that sensor (and no I didn't make it). You can use it to shut off power if using more than 1000 W. However you will be using more than 1000 W in order to trigger and when you shut it off, you use less and it enables itself again. This will create an on/off toggle for every power reading and you need logic gates and possibly memory to avoid that.

Link to comment
Share on other sites

What *does* bother me about transformers is that the large transformer outputs 4kW while conductive wire only carries 2kW.  This means that a large transformer can only be connected to a circuit that always draws <2kW (although the rating could be higher if you can expect the loads to stagger).  The only kind of wire that can support 4kW is heavi-watt, but at that point you probably could have just run the heavi-watt without the transformer at all.  The only case where the large transformer benefits from the 4kW output is for connecting multiple drivers to a heavi-watt load wire such that that the heavi-watt doesn't overload.

To power a conductive wire while exceeding the maximum load, it is necessary to use two parallel small transformers, which is just a bit tedious and space-consuming to do.  My preference would be one of two things:

1) Transformers (at least large transformers) have an adjustable maximum power output so that they can be throttled to, eg, 2kW.

2) Transformers have multiple outputs (1 or 2 for normal, 2 or 4 for large) and each output can independently supply 1kW.  This would allow, for example, a 2kW output by connecting two of the outputs to the same circuit or a 4kW output by connecting four outputs to the same circuit.

Link to comment
Share on other sites

4 hours ago, Arq44 said:

What *does* bother me about transformers is that the large transformer outputs 4kW while conductive wire only carries 2kW.  This means that a large transformer can only be connected to a circuit that always draws <2kW

Yes, and no.  The large transformer DOES output 4kW, but that's a very useful feature.  It means that while power is available, you can charge batteries AND run 2kW of consumers at the same time.  Battery charging doesn't calculate towards burning wires, so your circuit is safe.

For example, you have a large transformer connected to a series of batteries and some bunker doors.  Lets say that the 'high' side is unreliable.  Maybe steam or an incomplete solar network.  Anyway.  The doors close while the power is out, running the batteries down quite a bit.   Later, the doors are triggered open around the same time as the power source kicks in.  The doors can open and the batteries can charge simultaneously.  

4 hours ago, Arq44 said:

1) Transformers (at least large transformers) have an adjustable maximum power output so that they can be throttled to, eg, 2kW.

That's an interesting idea.  I suppose if they're buck converters rather than actual transformers, that'd work.  A better idea might be power limiter building based on the concept of the valves for other pipes.   Current and voltage limiting is an integral part of the design of many electronics (modern cellphone chargers, for example, use both).  In ONI, you could just call it a power limiter and call it good.

4 hours ago, Arq44 said:

2) Transformers have multiple outputs (1 or 2 for normal, 2 or 4 for large) and each output can independently supply 1kW.  This would allow, for example, a 2kW output by connecting two of the outputs to the same circuit or a 4kW output by connecting four outputs to the same circuit.

OK, how is this different than simply building another transformer?  You can do EXACTLY this with the tools already there. Why complicate things by adding another building that does exactly what current buildings already do?  I generally build two transformers next to each other and run conductive wire across both outputs to power aquatuners and other high-power devices.  I only use the large transformer if I'm also running batteries on the network.  Or if I'm using heavi-watt wire for something specific.  For example, in a recent world I put two large transformers next to each other and ran heavi-watt wire on the output to send about 7kw to an isolated network..  

Link to comment
Share on other sites

18 hours ago, DreamApart said:

current travels at the speed of light

Sorry but misconception here ! Current results of a collective movement of charges, inside your conductor. It doesn't really have a speed, but if you really want to pair it one, closest one would be the average electron velocity in your conductor, which is, as you said, terribly slow (snail scale). What travels at the speed of light is the electromagnetic wave (or rather its energy), outside of your conductor (in the air/plastic sheath). One happens inside, the other outside, and thus are necessarily quite different phenomenons, although closely related. In fact, if you want to observe only what happens inside the conductor itself, I'm pretty sure that you can run faster than light, since electromagnetic waves inside conductors are very, very slow (probably a few meters per second at best)

Edit : this confusion is probably related to the "electricity pipe" view. While your proposition would be easier to understand for the players who don't know how electricity works and don't really want to care about it, and thus is a good idea by itself, it would also carry an essentially wrong idea about electricity, and as such, it wouldn't be that great I believe. This is the tough compromise between satisfying people who get their enjoyment by having their brain challenged for a (reasonable) amount of time and those who get theirs by playing a game which is immediately accessible and understandable.

Link to comment
Share on other sites

19 hours ago, nakomaru said:

To the question in the title, I don't think so. Real circuits are sort of an all-at-once phenomenon. In this game all equipment is wired in parallel: they all have access to the same high voltage rail at once and they consume in a round robin style (a design choice for the purpose of the simulation). This is already a good representation of parallel circuits, and it makes sense of using one twisted pair to wire everything.

 

17 hours ago, KittenIsAGeek said:

Um, no.  I'm an electrical engineer. Electricity does not work like pipes.   First of all, most of our power network is alternating current.  I challenge anyone to plumb a house using alternating water flow. I can't wait to see how that looks when someone turns on the faucet.  Anyway, back to the point:  Even with DC current, unless your run is EXTREMELY long, the difference in time between connecting the power and when every single point along that circuit has full power will appear to be instantaneous. 

 

1 hour ago, qda said:

this confusion is probably related to the "electricity pipe" view. While your proposition would be easier to understand for the players who don't know how electricity works and don't really want to care about it, and thus is a good idea by itself, it would also carry an essentially wrong idea about electricity, and as such, it wouldn't be that great I believe. This is the tough compromise between satisfying people who get their enjoyment by having their brain challenged for a (reasonable) amount of time and those who get theirs by playing a game which is immediately accessible and understandable.

 

Sorry, seems I didn't get myself well understood. When the pipes are full and the whole consumption of is lower than the max production ( For liquids it's 10kg per pump, and 1kg for gases ), the pipe works different from when some parts of the pipes are empty.

I'll explain in details later (when I can play the game and get some screenshots) why electricity in real world works like pipes in ONI.

 

17 hours ago, Nightinggale said:

This idea would result in horrible performance and nobody would want the resulting drop in FPS.

 

16 hours ago, Yunru said:

I was just going to mention this. Pipes are one of the highest resource hogs, and that alone is a reason not to do this. 

 

3 hours ago, RonEmpire said:

trying to convey "charges" moving as an element will only lag the game further.

I understand your concern, but please let's not be too sure about that:

The case is like, probably, If pipes are costing computation resource, the cost is already paid, and it doesn't change is too much if we have 3 pipe systems rather than 2.

And like they say, "don't try to optimize a program before you have actually profiled it".

 

 

Link to comment
Share on other sites

2 hours ago, DreamApart said:

The case is like, probably, If pipes are costing computation resource, the cost is already paid, and it doesn't change is too much if we have 3 pipe systems rather than 2.

Ummm... no. The pipes cost computation per pipe. That's just how it works. How it has to work.

Link to comment
Share on other sites

2 hours ago, DreamApart said:

The case is like, probably, If pipes are costing computation resource, the cost is already paid, and it doesn't change is too much if we have 3 pipe systems rather than 2.

Think of it this way. Say you build a railroad and you run trains on it. You build another railroad somewhere else, start to run trains and then you argue that you will not increase fuel consumption because they are both railroads.

It's the same with pipes. The performance problem comes from calculating the flow through each cell. Two water pipes will need twice the CPU power than a single pipe will need, assuming they are of identical size and shape. It doesn't matter if you have one liquid pipe and one gas pipe or two liquid pipes.

3 hours ago, DreamApart said:

And like they say, "don't try to optimize a program before you have actually profiled it".

You don't know if you can breath under water unless you have tried it. Sometimes theory alone provides the answer and no test is needed.

Programming can (simplified) be put into the following steps:

  1. plan the code design
  2. consider if it's doable and can work fast enough. If not go back to 1
  3. code what you planned
  4. profile and optimize the slow parts

"don't try to optimize a program before you have actually profiled it" means you shouldn't do 3 and 4 at the same time. It doesn't mean "skip 2".

Link to comment
Share on other sites

51 minutes ago, Nightinggale said:

You don't know if you can breath under water unless you have tried it. Sometimes theory alone provides the answer and no test is needed.

Programming can (simplified) be put into the following steps:

  1. plan the code design
  2. consider if it's doable and can work fast enough. If not go back to 1
  3. code what you planned
  4. profile and optimize the slow parts

"don't try to optimize a program before you have actually profiled it" means you shouldn't do 3 and 4 at the same time. It doesn't mean "skip 2".

If everyone was thinking like this, I don't agree they actually did step 2 well.

Link to comment
Share on other sites

How electricity NOT works like pipe:

1.thumb.png.36c5a17f2b4e7bd69f64c2f9bd329afb.png

The valves are left at the preset 10kg/s. So the pipes are never full. And electricity doesn't work this way.

 

How electricity works like pipe:

2.thumb.png.4d751f9125593797810e0668217f814c.png3.thumb.png.49f385aa4c51644d42d06f9843304dbd.png

 

Once the flow is stable, it's exactly like electricity.

 

Valves set to 1kg/s, 1kg/s and 3kg/s respectively. (So the total consumption 5kg/s is less than the pump's 10kg/s.)

This simulate 3 appliance of 1W, 1W and 3W, working at some same voltage.

(Though the liquid pipe can transport maximum 10kg/s. For wires we can make it something like 1000000kg/s (W) so it's never exceeded, so it never looks like picture 1.)
 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
×
  • Create New...