News:

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

Substation not connecting

Started by zook2, January 30, 2014, 09:36:57 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

zook2

I'm trying to connect a happily producing clay pit (open countryside; demands 2 MW) to a powered net. The substation is next to the industry and the powerlines carry >160 MW. But the substation itself has a different net ID and neither it nor the pit receive power.

jamespetts

Does this happen in every case of trying to connect an industry not in a town, or only in this instance? If the latter, would you be able to upload a saved game in which the issue can be reproduced reliably? I should be most grateful.
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.

zook2

Weird. The Clay Pit at is the original problem and it works now. The substation's network ID has changed, probably when I connected the Quarry at 897,668 to the same net (also has demand, is producing and connected, but shows no boost yet).

http://freakshare.com/files/ficr4y83/1.rar.html

zook2

It seems to work after a long time (several months?). Shouldn't it work immediately?

jamespetts

Yes, it should. I will investigate when I have finished tracking down the bug that is stopping the server from working...
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.

jamespetts

#5
Hmm - this is a very curious one indeed. The substation is actually connecting to the factory, and the factory to the substation, without difficulty. The problem occurs, it seems, because the factory is not regarded as "producing". The code for whether a factory is regarded as producing is unchanged from Standard, and is as follows:


// produce
               if(  ausgang[product].menge < ausgang[product].max  ) {
                  // to find out, if storage changed
                  delta_menge += p;
                  ausgang[product].menge += p;
                  ausgang[product].book_stat(p, FAB_GOODS_PRODUCED);
                  // if less than 3/4 filled we neary always consume power
                  currently_producing |= (ausgang[product].menge*4 < ausgang[product].max*3);
               }


The boolean flag "currently_producing" must be true for the factory to demand any electricity. In this particular quarry, it never seems to be set to true, and it is not currently clear to me why that should be despite the fact that, slowly, production numbers are going up. This is very odd.

Edit: I have established what the issue is: as discussed in this thread, industries do not demand electricity when their output stores are more than 75% full. This seems to me somewhat arbitrary and unrealistic, although it was intentional in Standard. I have now removed this behaviour on the 11.x branch.
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.