Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow unsetting target technology #115

Merged
merged 1 commit into from
May 9, 2024
Merged

Conversation

exyi
Copy link

@exyi exyi commented May 8, 2024

AFAIK, target technology option could not be set to null from GUI - to all researches.

Copy link
Collaborator

@veger veger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your PR!

I have no idea what target technology does ( 😊 ), but I tried this PR and can confirm this change allows to unset it.

Yafc/Windows/PreferencesScreen.cs Outdated Show resolved Hide resolved
@shpaass
Copy link
Owner

shpaass commented May 8, 2024

Hi @exyi! Thank you for the contribution!
Could you please explain what happens with cost analysis if the target is set to null? It would be awesome if you added your understanding as a message to your commit and as documentation to the CostAnalysis class.

Target technology sets the objective for the CostAnalysis solver
in terms of the required number of science packs.
Setting it to null means to aim for all finite technologies
@exyi
Copy link
Author

exyi commented May 9, 2024

Sure! The setting sets the resource objectives for the linear programming solver. Most importantly, YAFC then shows the estimated required resource amounts to something I'll actually need soon-ish, rather than in 1000 hours 😅. But it also affects the costs slightly, in this case it's probably that more aluminium processing byproducts will be needed after logi, making aluminium itself cheaper. EDIT: it's the other way

image
image

@shpaass
Copy link
Owner

shpaass commented May 9, 2024

Could you please describe the behavior before and after the change?
On my side, I always get Estimated amount for all researches no matter if I select nothing or not.

@exyi
Copy link
Author

exyi commented May 9, 2024

You have to save project and restart YAFC (or also change mining productivity...). That's another glitch that YAFC doesn't update the cost analysis when preferences change, only when settings change (same thing as Dorus encountered with the pollution cost flag Dorus#1). Now, the option is to also enable change event for preferences (see the linked commit), or move this into settings. Do you know the difference between the two?

@shpaass shpaass merged commit 39ab06a into shpaass:master May 9, 2024
1 check passed
@exyi exyi deleted the target-tech-unset branch May 9, 2024 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants