Skip to content

Adding code generation code - #1711

Open
staudtMarius wants to merge 18 commits into
devfrom
ms/#1710-add-code-gen-code
Open

staudtMarius wants to merge 18 commits into
devfrom
ms/#1710-add-code-gen-code

Conversation

@staudtMarius

@staudtMarius staudtMarius commented Aug 25, 2026

Copy link
Copy Markdown
Member

Resolves #1710

@staudtMarius staudtMarius added this to the Version 9.2 milestone Aug 25, 2026
@staudtMarius staudtMarius self-assigned this Aug 25, 2026
@staudtMarius staudtMarius added the enhancement New feature or request label Aug 25, 2026
@staudtMarius staudtMarius added code quality Code readability or structure is improved java Pull requests that update Java code labels Aug 25, 2026
@danielfeismann
danielfeismann marked this pull request as draft September 15, 2026 14:26
@staudtMarius
staudtMarius marked this pull request as ready for review September 16, 2026 13:53

@danielfeismann danielfeismann left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Had a first glimpse into this. Need to check still the most of the changes but some first aspects from my side.

@@ -1,5 +1,5 @@
/*
* © 2021. TU Dortmund University,
* © 2026. TU Dortmund University,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

original year should be kept, same for others

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Since th file is newly generated this information is overwritten.

Comment on lines +141 to 147
return QuantityUtils.equals(b, that.b)
&& QuantityUtils.equals(g, that.g)
&& QuantityUtils.equals(r, that.r)
&& QuantityUtils.equals(x, that.x)
&& QuantityUtils.equals(iMax, that.iMax)
&& QuantityUtils.equals(vRated, that.vRated);
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

the way this has been done before is no longer possible?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

With this method we check if two quantities are equivalent to each other. If not false would be returned for 1000 V == 1 kV. Before we explicitly converted the quantites to a specific unit. I wanted to remove this.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not sure on this, but aren't there cases where we require the right prefix of the unit (e.g. kV) and thus this can cause problems?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We only need this in SIMONA and for writing the information to the file. The part in SIMONA is not a problem, because we explicitly convert to the correct unit there. As for writing the model to file, I will add an explicit conversion to prevent possible bugs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code quality Code readability or structure is improved enhancement New feature or request java Pull requests that update Java code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add code generation code

2 participants