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

[Issue-155] User setting of NULLCOST parameter #159

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

marifunf
Copy link
Contributor

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Does this PR already have an issue describing the problem?

Fixes #155

What changes might users need to make in their application due to this PR? (migration steps)

Other information:

@marifunf marifunf requested a review from rolnico July 12, 2024 16:14
Copy link

sonarcloud bot commented Jul 12, 2024

Copy link
Member

@rolnico rolnico left a comment

Choose a reason for hiding this comment

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

As requested in #155, the default value of the NULLCOST parameter should probably rather be set to negative infinity.
It could be done in configuration.cpp where the value is set to 0.5 (line 317)

However we might want to check the effect of this change on the computations, especially since it prevented having costs set to 0.

Would it be possible to add tests with uses of Metrix and where costs and NULLCOST are set to different values?

@rolnico
Copy link
Member

rolnico commented Jul 17, 2024

@klorel @nicolaslhuillier
What do you think of this?

It seems that the costs used in the C++ part are defined as costs = max(costs, NULLCOST) + ADEQUAOF, like for example:

pbCoutLineaire_[numVar] = std::max(grp->coutHausseHR_, config::configuration().noiseCost())
                                              + config::configuration().adequacyCostOffset();

Would it not be better to define the costs as costs = max(costs + ADEQUAOF, NULLCOST) so that NULLCOST is used for its purpose of avoiding costs at 0, without forbidding users to choose negative costs?

@nicolaslhuillier
Copy link

nicolaslhuillier commented Jul 29, 2024 via email

Signed-off-by: Nicolas Rol <[email protected]>
Signed-off-by: Nicolas Rol <[email protected]>
Signed-off-by: Nicolas Rol <[email protected]>
Copy link

sonarcloud bot commented Jul 31, 2024

@klorel
Copy link

klorel commented Jul 31, 2024

I agree that it would be clearer. However, could we wait September to be able to test it for all users ?

# Conflicts:
#	metrix-integration/src/test/java/com/powsybl/metrix/integration/MetrixParametersTest.java
Copy link

sonarcloud bot commented Nov 14, 2024

Copy link

sonarcloud bot commented Nov 14, 2024

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.

User setting of NULLCOST parameter
4 participants