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

Feature: ECCO Algorithm #783

Open
wants to merge 35 commits into
base: master
Choose a base branch
from
Open

Feature: ECCO Algorithm #783

wants to merge 35 commits into from

Conversation

restenb
Copy link
Member

@restenb restenb commented Feb 7, 2025

At long last, a working implementation of ECCO that also supports configuring powerbonds from the system structure.

Some choices had to be made to allow this, but here are the most relevant changes:

  • <Algorithm> in OspSystemStructure now accepts either ecco or fixedStep.
  • The configuration for the Ecco algorithm can be added to the root of OspSystemStructure as follows:
    <EccoConfiguration>
        <SafetyFactor>0.99</SafetyFactor>
        <StepSize>0.0001</StepSize>
        <MinimumStepSize>0.00001</MinimumStepSize>
        <MaximumStepSize>0.01</MaximumStepSize>
        <MinimumChangeRate>0.2</MinimumChangeRate>
        <MaximumChangeRate>1.5</MaximumChangeRate>
        <ProportionalGain>0.2</ProportionalGain>
        <IntegralGain>0.15</IntegralGain>   
        <RelativeTolerance>1e-6</RelativeTolerance>
        <AbsoluteTolerance>1e-6</AbsoluteTolerance>
    </EccoConfiguration>
  • To describe a powerbond, add the attribute powerbond="mypowerbond" to either a VariableConnection or VariableGroupConnection element. This defines a name for the powerbond that the parsing uses to group correctly.
  • To define the individual variables, the attribute port has been added to the Variable element. Here the user must specify whether the variable is the input or output port of it's side of the bond. So, if we are coupling for instance a force <-> velocity bond, this results in a tuple with one input and one output port for each VariableConnection that is used in the bond.
  • This information is then parsed by osp_config_parser, which results in a power_bond_map available through the system_structure object.
  • Finally, the power_bond_map is iterated and power bonds added to the algorithm by execution::inject_system_structure. The test ecco_algorithm_from_system_structure_test.cpp has been added to showcase this.

This PR is on the larger side, and while there aren't any breaking changes to worry about, input on improvements to the code and usability are very welcome.

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.

3 participants