-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Revamp Time Cost Feature #4840
Revamp Time Cost Feature #4840
Conversation
Re add electric_cost to print_statistics Add total_filament_cost & electric_cost to PrintStatistics in Print.hpp
Note to self, most likely will need to replace c_str with something
Renamed electric_cost, in most areas, to kWh_cost to fix a bug Created a formula for calculating the total cost
If the user enters both the electric consumption and kWh price then separate costs will be shown.
@@ -2564,10 +2564,10 @@ static std::vector<MonotonicRegionLink> chain_monotonic_regions( | |||
} | |||
|
|||
// Reinforce the path pheromones with the best path. | |||
float total_cost = best_path_length + float(EPSILON); | |||
float total_filament_cost = best_path_length + float(EPSILON); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you revert the changes here?
for (size_t i = 0; i + 1 < path.size(); ++ i) { | ||
MonotonicRegionLink &link = path[i]; | ||
link.next->pheromone = (1.f - pheromone_evaporation) * link.next->pheromone + pheromone_evaporation / total_cost; | ||
link.next->pheromone = (1.f - pheromone_evaporation) * link.next->pheromone + pheromone_evaporation / total_filament_cost; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you revert the changes here?
@cochcoder I'm not very sure about how useful it is, especially since the electricity cost largely depends on the type of filament used. The electricity consumption varies significantly between printing ABS and printing PLA. It's probably more practical to consider the cost within the filament expenses instead. It seems a bit like over-engineering to further break down the costs and clutter the UI. Hence, I'm inclined not to include the changes. |
Previously, there was a function for calculating the price depending on the amount of plastic used and the operating time of the printer. Now it does not take into account the operating time of the printer. The field where you can specify the price remains in the printer settings, but it does not affect anything. |
I see where you're coming from, I'm going to mark this as a draft for now, as I want to look into possibly making a more accurate electricity cost calculator, and see how useful this PR would be in the future. |
I'm confused on what you mean as the cost calculator in place right now does take the time of the print into account. |
It used to work, but not now. I can specify any printing cost in the printer settings, even 1000000, but this is not added to the price of plastic in the final calculation. |
I'm not having this issue, can you send a screen recording of you replicating this issue? |
The built-in screen recording in Windows records only the active window. I had to record it from my phone. I hope it's clear what's going on there) |
For whatever reason GitHub decided to close the original PR which was #4392, that's why I reopened it here
EDIT: Forgot to add this: closes #3502