Skip to content

perf: Changes to ULTC and correct syntax fixes for OCT#265

Merged
dietmarw merged 13 commits intoOpenIPSL:masterfrom
hubertus65:master
Jan 12, 2023
Merged

perf: Changes to ULTC and correct syntax fixes for OCT#265
dietmarw merged 13 commits intoOpenIPSL:masterfrom
hubertus65:master

Conversation

@hubertus65
Copy link

Added Boolean variables y2l0 and y3l0 and wrapped pre() around them in when-clasue condition. Result differs slightly for x2, m, y2, y3 after time = 300s. and looks more "logical" to me than the previous result in Dymola (Note: orginal version is rejected in OCT). Will attach plots in PR.

@hubertus65
Copy link
Author

Check of ULTC in Dymola before and after changes by HT, comparison:

ULTC1

Conclusion: I don’t know how this should look, but it looks “more correct” to me after my changes, i.e. wrapping a pre around y2 < 0 and y3 < 0. Please check! With pre is after my changes.

ULTC2

@hubertus65 hubertus65 changed the title Changes to ULTC Changes to ULTC and this time correct syntax fixes to make Examples.Machines.PSSE.GENROE work in OCT Dec 30, 2020
@hubertus65 hubertus65 mentioned this pull request Dec 30, 2020
3 tasks
@hubertus65 hubertus65 changed the title Changes to ULTC and this time correct syntax fixes to make Examples.Machines.PSSE.GENROE work in OCT Changes to ULTC and this time correct syntax fixes to make Examples.Machines.PSSE.GENROE work in OCT & Additional syntax fixes for OCT. Dec 31, 2020
t1=3,
t2=3.1) annotation (Placement(transformation(
origin={20.0,-57.3},
origin={25,-57.3},
Copy link
Member

Choose a reason for hiding this comment

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

This origin annotation should be removed completely (since no rotation, there is no point in keeping the origin)

origin={-87.9874,22.9501},
extent={{-3.3987,-3.3987},{3.3987,3.3987}})));
origin={0.0,0.0},
extent={{-100.04368118521606,39.95631881478396},{-79.95631881478394,60.04368118521604}},rotation = 0.0)));
Copy link
Member

Choose a reason for hiding this comment

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

These new annotations make it unfortunately worse and should not be added. In general it should be decided to maybe remove these Solar examples all together since it is not really clear what the purpose is of those. So rather then kind of fixing these it should be looked at removing them.

Copy link
Author

Choose a reason for hiding this comment

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

I actually did this change with Dymola, and did not start from scratch with graphics (Which I maybe should have). I think the odd "origin" annotations are from OpenModelica. That said: I would be in favor of removing the examples, they don't look well thought out, several look rather like unit tests than examples.

Copy link
Author

Choose a reason for hiding this comment

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

@lvanfretti: what is your take on this?

Copy link
Member

@lvanfretti lvanfretti Jan 4, 2021

Choose a reason for hiding this comment

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

@hubertus65 yes, they are unit test examples for the solar models.

@dietmarw we don't have other PV models in the library, and we need to have unit tests at least for the existing ones. They are pretty good w.r.t. to models used in standard tools. They were developed at a time when the tools did not incorporate their own (in this case this was implemented both in PowerFactory, the reference is here).

Instead of removing them, we should actually move them under ./Examples/UnitTests as planned for v2 release.

Since the problem is only in the annotations, it should be easy enough for one of us to do it, we just have to assign someone. @GiuseppeLaera can help.

Copy link
Author

Choose a reason for hiding this comment

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

@GiuseppeLaera, I think the easiest way to fix this is to rebuild all PV examples in your favorite tool, but probably not in OpenModelica.

Copy link
Member

Choose a reason for hiding this comment

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

Actually, you do not need to rebuild but simply move the blocks back and forth and redo the connections that you should have clean annotations again. That's at least my experience when using Dymola 2020 onwards.

Choose a reason for hiding this comment

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

Just to add to this discussion, I have developed the PVD1 model according to PowerFactory.

Now I am working now on their own implementation of a PV model, which is I guess the one @dietmarw was referring to . I will also be adding some examples with those modes. A PR should follow soon.

Copy link
Member

Choose a reason for hiding this comment

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

@tinrabuzin I don't know exactly what Dietmar was referring too, but the only solar models we have is the ones from PSAT and the one from Farhan that I mentioned above. So, it will be great if you can commit the "official" PowerFactory one and even better if you can provide the reference trajectories from PF. Please get in touch with @marcelofcastro for examples on how we are doing the regression testing, which you can also see here:
here

Choose a reason for hiding this comment

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

@lvanfretti Yes, sorry it was you mentioning the model not Dietmar.

@lvanfretti lvanfretti added this to the 2.1 milestone Jan 4, 2021
@lvanfretti lvanfretti linked an issue Jan 4, 2021 that may be closed by this pull request
3 tasks
@dietmarw
Copy link
Member

@hubertus65 I've now removed the modifications to the Solar stuff since they will be completely rewritten in #266 and also removed the docx. Btw, it helps when you create your PRs from a topic branch rather than your master-branch since it could well take some time until your PR gets merged and until then your master is kind of locked to a PR.

@dietmarw dietmarw dismissed their stale review January 28, 2021 15:34

Fine for now but I suggest that @GiuseppeLaera does the final technical review.

@dietmarw
Copy link
Member

I think it would be OK to include this for the 2.0.0 release

Hubertus Tummescheit and others added 11 commits June 9, 2022 10:05
Added Boolean variables y2l0 and y3l0 and wrapped pre() around them in when-clasue condition. Result differs slightly for x2, m, y2, y3 after time = 300s. and looks more "logical" to  me than the previous result in Dymola (Note: orginal version is rejected in OCT). Will attach plots in PR.
Changes all instances for initializing complex numbers from a + jb to Complex(a,b). This makes results look visually identical to the Dymla results, and corrects 2 sign-errors that were present in the zip-file attached to OpenIPSL#263.
changed to Boolean tc = m > 1.0 or m < 1.0, which makes it leagal Modelica. Coorresponding test model now works in OCT
Syntax changes from a + j*b to Complex(a,b). All Examples.Machines.PSSE models run in OCT and gie visually the same results as Dymola.
Accidental commit.
Co-authored-by: Marcelo de C. Fernandes <decasm3@rpi.edu>
@github-actions
Copy link

github-actions bot commented Jun 9, 2022

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@dietmarw
Copy link
Member

dietmarw commented Jun 9, 2022

I've rebased this PR now. @hubertus65 just a heads up that you did this PR based on your master branch and not on a topic branch. This is not ideal in case you want to work on something else from the OpenIPSL. So your master branch is basically now locked to this PR until it is finally merged.
@hubertus65 @GiuseppeLaera you both need still to accept the CLA in order that this PR can get merged.

@hubertus65
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Jun 9, 2022
@hubertus65
Copy link
Author

I hope that did it for signing? FWIW: I'd like to sign the entity CLA for Modelon (I have read both), and am not sure if this fixes even that.

@GiuseppeLaera
Copy link
Collaborator

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Jun 9, 2022
@dietmarw
Copy link
Member

dietmarw commented Jun 9, 2022

I hope that did it for signing? FWIW: I'd like to sign the entity CLA for Modelon (I have read both), and am not sure if this fixes even that.

Yes CLA check is passed now. Not sure what you mean with CLA for Modelon here.

@marcelofcastro
Copy link
Member

I hope that did it for signing? FWIW: I'd like to sign the entity CLA for Modelon (I have read both), and am not sure if this fixes even that.

Yes CLA check is passed now. Not sure what you mean with CLA for Modelon here.

@dietmarw I think he meant the CLA-entity which is different from the individual CLA. This is because the CLA for an entity (Modelon in this case) helps people that act on the behalf of a legal entity that cannot be considered a person.

So I guess @hubertus65 was interested in signing the entity CLA. I believe that, for what we have now, if you sign the CLA, you will be signing the appropriate one for your case. In this case, since you mentioned it here in this PR, you are signing both the individual and the entity one and that sentence you wrote above will be already enough. Does that work for you, @hubertus65 ?

@marcelofcastro
Copy link
Member

The CLA instructions may help you with that @hubertus65 and @dietmarw. I think @hubertus65's concerns are clarified in item 3.

@hubertus65
Copy link
Author

I meant to sign both the individual and the entity CLA. If other's from Modelon with a modelon.com email address commit in the future, they should be covered and can sign the individual CLA. That works for me. regarding this PR: I think that @GiuseppeLaera has this plus a lot of other fixes on this side, so I think it is better if he comes with a PR that has the full Monty of compatibility changes.

@dietmarw dietmarw removed the request for review from GiuseppeLaera January 12, 2023 15:00
@dietmarw dietmarw assigned dietmarw and unassigned GiuseppeLaera Jan 12, 2023
Copy link
Member

@dietmarw dietmarw left a comment

Choose a reason for hiding this comment

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

I got finally around to approve and merge this for the upcoming release.

@dietmarw dietmarw changed the title Changes to ULTC and this time correct syntax fixes to make Examples.Machines.PSSE.GENROE work in OCT & Additional syntax fixes for OCT. Changes to ULTC and correct syntax fixes for OCT. Jan 12, 2023
@dietmarw dietmarw changed the title Changes to ULTC and correct syntax fixes for OCT. Changes to ULTC and correct syntax fixes for OCT Jan 12, 2023
@dietmarw dietmarw merged commit 11f2ca2 into OpenIPSL:master Jan 12, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jan 12, 2023
@dietmarw dietmarw added Tool specific Tool specific issues performance and removed octcompliance labels Jan 29, 2026
@dietmarw dietmarw changed the title Changes to ULTC and correct syntax fixes for OCT perf: Changes to ULTC and correct syntax fixes for OCT Jan 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

performance Tool specific Tool specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OCT Compliance

6 participants