sswelm / KSP-Interstellar-Extended

continuation of KSP Interstellar
Other
98 stars 103 forks source link

Time Warp affects (heavily) resources production #77

Closed LastStarDust closed 4 years ago

LastStarDust commented 7 years ago

I noticed that time warp affects (unfortunately not always in the same manner) resource production/conversion. I made this little video to show the issue. At about 1000x time warp production ceases altogether, starting again at 100000x time warp. Video on dropbox In other ships I noticed an even stranger behavior, with the production rate decreasing steadily with time warp, making impossible any mass production at all. In conclusion there is something strange going on with time warp and resources conversion. output_log.txt

sswelm commented 7 years ago

exactly what resource production were you doing?

LastStarDust commented 7 years ago

For example the one in the video. Nitrogen and hydrogen into ammonia.

sswelm commented 7 years ago

Notice Ammonia production runs on Hydrogen (Gas) and NItrogen (Gas) , which might first have to be converted from Liquid Nitrogen and Liquid HYdrogen. Did you use any Liquid to Gas transformers? I did see you have a ISRU Refrigeration which should be able converting to Gas and back into liquid.

LastStarDust commented 7 years ago

Yes I noticed that you have to convert to gas before the ammonia production can take place. Yes that's why I included a refrigerator. Is the liquid-gas conversion responsible for the time warp "bug"? That I don't know. Maybe?

2017/08/06 12:01 "sswelm" notifications@github.com:

Notice Ammonia production runs on Hydrogen (Gas) and NItrogen (Gas) , which might first have to be converted from Liquid Nitrogen and Liquid HYdrogen. Did you use any Liquid to Gas transformers? I did see you have a ISRU Refrigeration which should be able converting to Gas and back into liquid.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sswelm/KSP-Interstellar-Extended/issues/77#issuecomment-320497243, or mute the thread https://github.com/notifications/unsubscribe-auth/AIWkyoLQf4E6xZg12tiGq74crh_FKcA3ks5sVY8UgaJpZM4OuYOO .

sswelm commented 7 years ago

the refrigerator is a relatively new part module while the Ammonia production has been around for years. So yes it is the most likely suspect

LastStarDust commented 7 years ago

My humble advice would be to get rid of all this gas-liquid stuff and go back to liquid-only as it was before. Why you may ask ... because I think (but maybe this is only my personal feeling) that this level of realism is excessive for a game like KSP. If you come to think about it, there must be a limit to realism, both in terms of computational power and in terms of complexity. After all you cannot simulate all the elements of the periodic table and all kind of molecules in the universe. Not only because of hardware limitations but also because KSP is not a simulator aimed at chemists ... You have to stop somewhere down the path of realism. And I think that gas liquid conversion is a bit excessive. Even if, like you, I find it fascinating as a game mechanics maybe it adds to much overheads and too many parts. If you want to keep it I understand, but in that case I would get rid of all the ore production chain. It is somewhat a paradox that we have to worry about the difference between liquid and gaseous hydrogen and than we can at the same time convert rock (ore) to any kind of rocket fuel with only a bunch of parts. Don't you think?

2017/08/06 12:26 "sswelm" notifications@github.com:

the refrigerator is a relatively new part module while the Ammonia production has been around for years. So yes it is the most likely suspect

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sswelm/KSP-Interstellar-Extended/issues/77#issuecomment-320498412, or mute the thread https://github.com/notifications/unsubscribe-auth/AIWkypSorThEQ5h8TE2rEDRO2du4qTfLks5sVZTcgaJpZM4OuYOO .

sswelm commented 7 years ago

I understand where you are coming from. To a certain degree I think I can make it simpler by making ISRU processes accept resources both in Gas and Liquid and output in a liquid form if a refrigerator is present and set to refrigeration, that way you have the ease of operating while still being realistic. But what do you mean by ore production chain?

LastStarDust commented 7 years ago

I think that would be a great idea.

By "Ore production chain" I mean that ... if you think about it, in Vanilla KSP you can take a few parts with you (a 'Drill-O-Matic' Mining Excavator and a Convert-O-Tron 250), mine generic rock (Ore) on every planet and from it get every kind of fuel (Hypergolic fuels and Monopropellant) without much effort. Obviously this isn't very realistic. If then you install Interstellar Extended, but you don't disable in some way the Ore->Liquid Fuel+Oxidizer reaction, you have the paradox that it is very difficult to mine and refine off-world any Interstellar fuel while you can produce liquid fuel + oxidizer with no efforts. What I was saying before is: or you make KSP Interstellar ISRU a bit less complex or you make Vanilla KSP ISRU more complex so to have a balance between the two. Since I notice that you like realism you could try to disable the Ore->Fuels chain and replace(?) it with something more realistic.

sswelm commented 7 years ago

I fully agree and My long term plan was to disable the cheaty stock production chain (or at least actively discourage it), but I first wanted a fleshed out KSPI production chain

LastStarDust commented 7 years ago

Yes you are absolutely right. First we need a fully stable mod.

2017/08/07 9:24 "sswelm" notifications@github.com:

I fully agree and My long term plan was to disable the cheaty stock production chain (or at least actively discourage it), but I first wanted a fleshed out KSPI production chain

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sswelm/KSP-Interstellar-Extended/issues/77#issuecomment-320588972, or mute the thread https://github.com/notifications/unsubscribe-auth/AIWkyvbBEQzIq3XpT7ixwWvvbXoZEaDWks5sVrudgaJpZM4OuYOO .

LastStarDust commented 7 years ago

I found a pattern in the conversion problem during time warp. The smaller is the input resource tank (gas), the heavier is the detrimental effect of time warp. Maybe there is some sort of "buffer" issue?

alismatales commented 7 years ago

Any work on this? I've noticed this bug as well and have been doing some digging around, the problem occurs when the input resource gets used up faster than it is replenished.

See these screenshots, notice the hydrazine production rate:

Normal time:

10 times:

100x:

10000x:

100000x:

At normal time hydrazine gets produced with 0.61 units per real time second. You'd expect it to scale up linearly with timewarp, up to 61000/s at 100000x timewarp.

Instead it gets stuck on 18.61 units / s.

Also notice how ammonia usage reverses. First it gets used up, then it quickly fills up again at higher timewarps.

I tried to look into it myself but i'm out of ideas.

sswelm commented 7 years ago

Perhaps you didn't notice but your wasteheat buildup was near it maximum capacity

alismatales commented 7 years ago

wasteheat has nothing to do with it.

sswelm commented 7 years ago

exactly what ISRU processes are active here?

alismatales commented 7 years ago

Regolith Processing Carbon Dioxide Electrolysis Haber Process Anthraquinone Process Peroxide Process

Full chain to produce Hydrazine from Regolith basically.

It looks like in this particular instance the problem is CO2 production, notice how the production rate decreases as timewarp increases:

This problem seems to be brought on by the lack of an additional tank for the resource in question, if i add a CO2 Tank to the vessel everything works as expected. Only when i rely on the

Ah. I think i have an idea what causes this.

As timewarp increases, the requested resource amount per physics tick gets larger. If the requested amount is larger than the size of the maximum available storage on the vessel, production rate crashes?

So basically to reproduce this, build a vessel with very small resource tanks and play around with various ISRU processes, you'll notice some weirdness with the production rates..

arivaldh commented 6 years ago

I'm currently working on this issue, and on overhauling resource manager for a vessel productions/consumptions, what in the future could be plugged for WasteHeat, and other KSPI-E resources (MJ/CP/TP).