News:

The Forum Rules and Guidelines
Our forum has Rules and Guidelines. Please, be kind and read them ;).

Pipelines

Started by Banksie_82, February 02, 2009, 03:06:11 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Banksie_82

Wow, I'm quite humbled by the response this is getting.

I'll just expand on my thoughts briefly and throw it back to open discussion.

Pipes can be above or below ground in real life, but just like train tracks, they are cheaper if they are above. However in urban areas we usually put them under ground because they get in the way and it's easier to put them underground than all the roads.

Someone mentioned that the flow in pipes can be assumed to be instant, and in real life this is in fact the case (at least with liquids, not so much gasses) because you can turn on and off the tap at the downstream outlet, 1m^3 in – 1m^3 out. Just think of when you turn your tap on in the kitchen sink, you don't need to wait for the water to arrive from the dam, it's already there. Of course in the first instance you need to fill the pipes, but in the long term this is negligible.

I had in mind that various pipe sizes and pump size/number combinations would influence the maximum flow capacity through the pipes. For example, in the long term running of the pipe, if the capacity is greater than the supply from the producing factory or demand from the consuming factory there won't be a bottle neck. If the capacity is less than both factories, then it only supplies what it is capable of.

Also, I had in mind that they would be used for reasonable distances but would only be cost effective if there was a huge flow rate. Where normally you would need a two way train line, running at capacity with just the one commodity, you could then embark on the construction of a pipe line.

I like the idea of water being used in the same way (for some factories, not all) as electricity is, i.e. it simply increases production rather than being required for production. In this instance I think you should need plenty of water that would warrant a pipe line. How often do you see a "water train" in real life dropping off its load at a power station or farm? However I would still like to see a receiving storage at these factories like any other commodity. To start with, this could be the only thing to be transported in a pipe line, rather than oil, just to see how it goes and how well it is received.

Also, it would be nice to have branch connections coming in and out of the main line but I understand this may be quite hard to code. Although I could be wrong, I know very little about coding.

Fluid flow through pipes is quite a complex science with a lot of variables that need to be considered, but I won't go into them here. My point is, the calculation of capacity can be made to follow some fairly simple rules for the purposes of game play.

jamespetts

Some very interesting ideas! A fair bit of coding and testing would be needed to get it to work, but, if there's anyone willing to do said coding and testing, it'd be an interesting addition to the game :-)
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

isidoro

@Banksie_82:  I think that treating water or other suitable to be transported goods as electricity is treated, is not good.  Pipes should be an alternative to normal transportation.  And also I don't agree with the model in which factories supply anonymous water to pipes and other factories get that water from them.

Goods produced in Simutrans have destinations.  Therefore, if a factory puts some water in the pipe that water has an owner and destination and cannot be taken by any factory  (again this reminds me of the gas crisis, where packets of gas were supposed to disappear in transit :) ).

So, in my view of pipes, pipes are not filled with water or oil.  There is an empty pipe joining Barcelona with Sebastopol.  Sebastopol asks for water.  Barcelona puts the water in the pipe.  Sebastopol will receive it.  It certainly would not be an instant transfer.  All the process involved can be modeled in the program by a packet virtually traveling through the pipe.


Spike

Quote from: Stubbsy on February 03, 2009, 08:51:15 PM
i've started looking into this a little bit today. Would you class water as power? Also would you code it as to be a tunnel?

My plan was to have pipes as a object class of their own. They were also planned to have distinct code, different from both powerlines or any ways like tunnels.

Electric power was meant to be instant, fluids need some time to flow through the pipeline, and pressure will differ depending on the pipe length, also number of forks in the pipeline.

At least that was my plan, and as said previously I had troubles to code the fluid dynamics properly for pipelines.

Ashley

Thinking about this in Simutrans-y terms...

All factories in Simutrans have a certain production rate, so an oil well produces oil at a certain rate. A pipeline has a certain innate capacity, since it's essentially a very long and thin storage tank. Until that pipeline has been filled, transfer of material from one end to the other cannot take place, but after it has been filled, transfer is virtually "instant", since one unit in displaces another unit from the other end.

Thus you could give each section of pipeline a storage capacity, say, 1 unit of liquid. A producing factory produces material at its maximum rate, and this then goes into filling up the pipeline's storage capacity. Once one section fills, the next one does and so on. If there are branches in the pipe then all the branches must fill simultaneously, and at each branch the fill rate will halve, since liquid must flow from one pipe into two.

If a factory has more than one pipeline removing material from it, then its production capacity is split between the pipelines, and if there's also a station to take material by train, then again the production is split between the three (in the same way as production is split currently if more than one player has a station connected to the same factory).

It would likely be a good idea to implement some ability to prioritize production for the various different forms of transport too.

Simiilarly, a factory which consumes the liquid (e.g. an oil power plant) has a set consumption rate, and would thus remove liquid from the pipeline at a constant rate. As it removes a unit from the pipeline that section of pipeline then becomes "empty", and can accept the next unit from the section of pipeline before it. There would be some factor determining how quickly this occurs, which would be a function of pipe diameter and material viscosity. Net result: a big pipe will transfer material more quickly than a small one.

This system means that you can have multiple "sources" and "sinks" in a pipeline network, and that the network itself has an innate storage capacity (which is realistic). Players would need to consider balancing the production and consumption in a pipeline network, or risk undersupply, just as they do with a rail or truck network.

You could have several different sizes of pumping station, at increasing cost, which would boost the flow rate through the pipe (and these could be powered to increase efficiency like factories). The basic pumping stations attached to factories to take away the material would have a certain base pumping capacity, which could be upgraded. As previously stated, a certain bore of pipe would have a set maximum capacity/hour for a certain viscosity of liquid, and the largest bore pipe wouldn't be completely fill-able by only one pumping station/factory, to encourage clustering of producers.

Pipelines IMO should take up a full tile, be buildable underground or over ground, be bridge-able (but only for 1-4 tiles or so, so they can go over roads etc, but not cross long stretches of water) - here tanker ships would be used.

Pumping stations would have to be built at each source location, which would cost more for higher capacity, additionally "receiving stations" would have to be built at the consumer, again with a cost based on capacity approach. All of this could be timelined too, so that better pumping technology and pipe becomes available over time.

That's just the way I'd do it though :) Am kind of tempted to write a simulation to see if this would work.
Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.

jamespetts

Timothy's ideas on how to integrate pipes into Simutrans are very interesting indeed - this seems like a sensible approach. I am not sure about prohibiting long underwater pipelines, though: in reality, there are long under-sea pipelines, for example, in the North Sea, transporting oil and gas to the mainland. They are, of course, very expensive to build, but are more efficient in the long-term than boat transport.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

isidoro

@Timothy: in your view of pipes, when under production happens, there would be "bubbles", let's say it.  The problem I see with your approach is twofold:

  • The dynamics of these bubbles: you suppose there is "upstream" (to producing factories) and "downstream" (to consumers).  But that imposes unrealistic one-way pipes.  Some sections will be bidirectional.  In that case, where should the bubbles go?
  • The problem of ownership: what factory is supposed to take the oil/water?  Any?  Who is to be paid and charged for transportation?

And a final: the behavior in slopes?

Spike

Quote from: isidoro on February 04, 2009, 12:58:03 PM
The problem of ownership: what factory is supposed to take the oil/water?  Any?  Who is to be paid and charged for transportation?

The needed inputs will be specified in the factory dat files. I don't think we need to answer this now and for all factories. It's good if we make it configurable for each factory.

Many factories will need water, some will need gas and/or oil.  maybe there will be more fluids and gases, like hydrogenium, or some sorts of chemicals.

As usual the pipe owner will be payed for the quantity and distance transported.

VS

I would go with KISS for the parts of design interacting with user. If there is no reliable way to know which direction is used, how do I decide where to build pumping stations? -> slopes don't matter or pumping stations are not needed.

Hajo: I can imagine pipes used commonly for water, crude oil and gas (?). So far no other goods present in any of paksets for Simutrans are suitable for such transport or transported so. Milk or beer? Hah :D Maybe gasoline/petrol.

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

Spike

Quote from: VS on February 04, 2009, 01:48:52 PM
Hajo: I can imagine pipes used commonly for water, crude oil and gas (?). So far no other goods present in any of paksets for Simutrans are suitable for such transport or transported so. Milk or beer? Hah :D Maybe gasoline/petrol.

Let's try to make a list

- Water
- Natural gas
- Gasoline/petrol/oil
- Hydrogene (particularly for future oriented paks)
- Chemicals

And more distant ideas:

- Long distance heating/district heating/steam
- Sewage

Pipelines could extend Simutrans a bit more into the Simcity-ish grounds. This is more brainstorming now, though.

sojo

Quote from: Hajo on February 04, 2009, 02:24:37 PM
Pipelines could extend Simutrans a bit more into the Simcity-ish grounds.
Simutrans is not so far from Sim City. Well, it works on an other way. But with the Editor you can make many things what you can do at Sim City.

I think, if Simutrans will played from more Sim City players is this not bad. ;)
"English is a easy language. But not for me." ;) sojo

follow simutrans_de on Twitter
- A home for Simutrans (in german)

KrazyJay

A little off-topic, but imho SimCity died when Societies came out. SC4 Deluxe FTW, after Simutrans then ;) Sim City 4 had a nice game play though, if Simutrans can ever reach that level of game play, it would be perfect.

Can pipelines have a separate underground view like Sim City has? (All other tracks hidden?) And if so, would that be in the best interest of Simutrans (consistency)? I think that would be a convenient way to lay pipes down...
Played Simutrans in:
~ The Netherlands ~ United Kingdom ~ Taiwan ~ Belgium ~


Simutrans player

ij

Quote from: Hajo on February 04, 2009, 02:24:37 PM
And more distant ideas:

- Long distance heating/district heating/steam
- Sewage

Also garbage is transferred using some pipe-like structures in some places (both low pressure and conveyor belts are used) to a joint place where it's easier to pick up than building by building. I think that there's even some rather large city in south-western Europe which has a city-wide garbage collector (I don't remember which it is though). And here in Finland such system is to be used on one area once it gets built in the first place.

And, also airport luggage goes in a form of pipes btw... :-) Such system could be used to increase the airports capacity somehow.

z9999

I don't know in other countries, but we usually don't pay transportation cost as gas fee or water fee. We will pay basic fee and pay for gas or water itself.
We don't pay money for the distance of pipelines. It's not a transport game, I'm afraid.

isidoro

Quote from: Hajo on February 04, 2009, 01:21:43 PM
The needed inputs will be specified in the factory dat files. I don't think we need to answer this now and for all factories. It's good if we make it configurable for each factory. [...]

Perhaps I wasn't able to explain it well.  I didn't mean that.  I meant that if the model is a pipe full of liquid and factories putting liquid in and out the pipes, that is not compatible with factories connections in present simutrans.  Factory A has a contract with Factory B.  Factory A produces water, Factory B consumes it.  But if Factory A just push water to a pipe shared by many factories, how can factory B know if that water in the pipe is for it or not?

My model is when some water from A is to be delivered to B, the whole pipe segment is reserved and cannot be used for other possible connections until the transfer is completed.

@VS:  about SimCity: I think the key is the degree of detail and the focus.  SimCity is focussed on city management, transportation is only a part.  Simutrans foucusses on transportation.  Some factors may affect the quantities to be transported, but it is not the focus.  For instance, I would find very useful that for a certain city population to be mantained some water/food ought to be delivered to the city hall, for instance.   That is not management of the city, that is only a transport requirement.

@ij: we can see pipes from an abstract point of view.  It is a means of transportation but without vehicles.

@z9999: I don't agree fully.  In consumers bills it is not a separate item, but surely we pay for it.  It is hidden under the fee.  Everyone pays the same, but to be fair a distant town costumer should pay more.  When industries are involved, there may be an agreement between producer and consumer.  The cost will include everything: goods and transportation and I guess may depend on distance.

VS

I did not say anything about simcity...

If pipes must make money, they must generate profit in some way.

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

z9999

We are transport company, the owner of goods are not us.
We earn by transporting customer's goods, we never sell goods.

prissi

z9999 has expressed my concerns; although I have to admid that the electricity break this concept already (but then electricity cannot be moved by any vehicle).

DirrrtyDirk

#53
Actually, I had said pretty much the same (before the "incident").

Slowly this really appears to become a discussion not only about pipelines but where simutrans as a whole is going... Should it stay "just" a transportation game or should it move on to be something more like simcity (with the player having to provide all kinds of civil services as well).
  
***** PAK128 Dev Team - semi-retired*****

Spike

#54
Quote from: isidoro link=topic=1413.msg14335#msg14335... that is not compatible with factories connections in present simutrans.  Factory A has a contract with Factory B.  Factory A produces water, Factory B consumes it.  But if Factory A just push water to a pipe shared by many factories, how can factory B know if that water in the pipe is for it or not?

I think this scheme will not work with pipelines anymore. There are "sources" of water/oil/gas, and "drains". The pipelines distribute. In between sources and drains there might be contracts, but the pipeline owner does not know (or need to know).

[Edit] I mean, "drains" just pay "sources" for the amount drained, but the pipeline owner does not need to know these transactions, he needs only take care that the pipeline network can suit the needs.
[/Edit]

Income for pipelines is the "basic fee" that z9999 mentioned. The pipleline owner gets some money for just providing the pipe. I think it'd not be too far off to have this "basic fee" depend on length of the pipe.

Yes, this is something that expands Simutrans. It's different, and needs new rules. But I don't think it will break Simutrans.

Pipelines are still transportation, just different from vehicles. More like powerlines. (Actually the current powerlines were build on my basic pipeline code, which I could not finish.)


Edit 2:

Quote from: DirrrtyDirk on February 04, 2009, 11:45:18 PM
Slowly this really appears to become a discussion not only about pipelines but where simutrans as a whole is going... Should it stay "just" a transportation game or should it move on to be something more like simcity (with the player having to provide all kinds of civil services as well).

I don't want a full SimCity simulation based on Simutrans. But I'd like a bit more of the infrastructure parts that SimCity had.

Fire statiosn, hospitals and police, I don't want in Simutrans. These are definitely not transportation. Pipelines have something like roads, or like powerlines, and therefore were included in my plan.

DirrrtyDirk

I agree with Hajo that pipelines as such should present little to no danger of breaking simutrans at all (especially as they are, by their very nature, limited to a couple of specific goods only).

But I am wondering if they are really worth the effort necessary to implement them, when they return so little "fun" to the gameplay as I fear they do (just my purely personal view and taste of the matter, as I have described earlier). I (still) tend to say "no" on that. But I'm only here to voice my opinions, thoughts and potential problems - not to force any decision in my favor (even I could do that - which is luckily not the case), and certainly not to stop people from voicing (differing) opinions of their own.
  
***** PAK128 Dev Team - semi-retired*****

isidoro

Quote from: VS on February 04, 2009, 09:19:45 PM
I did not say anything about simcity...

Sorry.  My fault.


Quote from: Hajo on February 05, 2009, 02:01:07 PM
I think this scheme will not work with pipelines anymore. There are "sources" of water/oil/gas, and "drains". The pipelines distribute. In between sources and drains there might be contracts, but the pipeline owner does not know (or need to know).

That would certainly be different.  If a pipe is shared by several sources and drains and one factory takes some water, which of the sources would replace that water in the pipe?  How much time will be required for the chosen factory to replace "that bubble"?

Spike

Quote from: DirrrtyDirk on February 05, 2009, 02:34:02 PM

But I am wondering if they are really worth the effort necessary to implement them, when they return so little "fun" to the gameplay as I fear they do

They might - while I was working on them, everything else seemed more important, and that was also a reason why the code never really was finished.

It was a curiosity item mostly. I don't think they are important, but they could be a nice addition. So if someone feels interested, and wants to try, I'd say feel free to do it. I'm sure it's a nice addition, but it's not a top priority. Should be nice work for someone who is interested in the topic anyways, and enjoys the idea of working pipelines.

Sidenote: My original implementation would have made the player owner of the sources, and payment would have been for the pipeline _and_ the delivered goods, very unlike to the other factories and transport in Simutrans.

I even had the idea of let the player prospect for water, gas and oil reserves. Only some spots on the map would yield such resources. But maybe this is really too far flung for Simutrans.

Václav

Where is download? I would like to play with pipes while I think they could have some problems:

1. you can build the first site - for exaple to connecting for example oilrigs with refineries
2. but after if you would need to connect else industries, you would have problem with crossings of both sites

Chybami se člověk učí - ale někteří lidé jsou nepoučitelní

Spike

I don't think we have a working version yet? So far the discussion was about the pros and cons of pipelines, and a few ideas how they could be implemented. A release with pipelines included will need some time, I think.

Václav

With? Why with? I think that for this time add-on is sufficient - but I understand that some problems could be in menuconf.tab and so on.

Still mainly for oil transportation it is very good idea and I am looking forward to available download in add-on version at least.

Chybami se člověk učí - ale někteří lidé jsou nepoučitelní

Spike

I think pipelines need additional code as well.

Dwachs

Quote from: VaclavMacurek on February 09, 2009, 01:25:41 PM
With? Why with? I think that for this time add-on is sufficient - but I understand that some problems could be in menuconf.tab and so on.

Still mainly for oil transportation it is very good idea and I am looking forward to available download in add-on version at least.
If you want to transport the oil by overground pipelines just modify the powerline graphics.
Parsley, sage, rosemary, and maggikraut.

gerw

But then you have to rename 'electric energy -> oil'. That would work ;)

skreyola

I know this has not been discussed in a long time, but I have a couple of ideas for how this idea could be implemented.
I think pipelines are a great idea and would love to see them implemented. I think Timothy's model is a good one.
The problem of ownership has been mentioned a few times. That is, Factory A (oil field) produces a good (oil) but keeps it on-hand until a connected factory, say Factory B (chemical plant) buys it. At that point, it drops the good onto a station that meets the way.
What if a Source_Pump station extension, when it is built, is connected to Factory A (so it can buy the good to fill its capacity, at some significant cost to the player) as a consumer. Once it has filled the connected network, it can then send its internal supply to any attached station extension of type Destination_Drain, limited in speed by the capacities of the smallest pipe section on the route, the need for pumps to get above rises in terrain or other way overpasses, etc. passing on the same good meant for the factory at the destination. Then, having delivered that amount of the good to Factory B, it can collect the good waiting at Factory A meant for Factory B to refill its capacity.
This may not be a viable idea, but at any rate, here's an idea for a vehicle-based approach to go along with it or be used without it:
If a vehicle is needed to do these things, it could be one of the invisible, internal packet launches (1unit of fluid, 1000km/h, reserves the entire route from source to destination, 10 of them are automatically included in the cost of the Source_Pump and dynamically assigned routes to Destination_Drain buildings more or less evenly for sources that feed multiple destinations, but a single source could only route to 10 separate destinations).
Alternately, the 10 vehicles could be manually given destinations by selecting the Source_Pump and creating a fluids line/schedule for each of the ten packet bubbles.
Thoughts?
--Skreyola
You can also help translate for your language with SimuTranslator.

grampybear

Now that we have advance tunnels has any consideration been given to pipe lines? This would allow for direct connection to offshore oil rigs or for the development of offshore oil docking for super tankers, once on land the pipe line could be made similar to power lines direct to oil refinery or oil power stations. It might even spawn new industries depending on the development of natural gas. Just an idea.

Combuijs

Bob Marley: No woman, no cry

Programmer: No user, no bugs



grampybear

Sorry, I missed the earlier discussions. Include me on the positive side for this addition to the game.  Thank you

IgorEliezer

NO FEAR! Igor is here to save the day. :D

Topic merged.

wlindley

If coal (slurry), oil, petrol, and natural gas -- perhaps even water -- "receiving industries" were required for city growth (inside city limits) in appropriate years, as electricity, that could add interest to the game.