-
Notifications
You must be signed in to change notification settings - Fork 0
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
Initial validation test #144
Conversation
Contracted capacity test
2ca905e
to
9f8f651
Compare
@@ -17,7 +17,7 @@ data class GridConnection( | |||
// Is always set when object comes from the database. | |||
val sequence: Int? = null, | |||
|
|||
val electricity: Electricity = Electricity(), | |||
val electricity: Electricity? = Electricity(), |
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.
Better keep it non-nullable because in AnyLogic/Java there is no null-safe navigation operator "?." so the modellers will have to write extra null checks.
val contractedConnectionCapacity = gridConnection.electricity.getContractedConnectionCapacityKw() | ||
val physicalConnectionCapacity = gridConnection.electricity.getPhysicalConnectionCapacityKw() | ||
val contractedConnectionCapacity = gridConnection.electricity?.getContractedConnectionCapacityKw() | ||
val physicalConnectionCapacity = gridConnection.electricity?.grootverbruik?.physicalCapacityKw |
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.
With this code, in the case of kleinverbruik, it will say Status.MISSING_DATA
. But this is not true.
I think the previous version was good.
Part of #137
Contracted capacity test