Skip to content

Sort optimisation parameter numbers#3135

Merged
timothy-nunn merged 1 commit intomainfrom
536-fixed-order-in-iteration-variables-and-constraint-equations-in-mfile
Apr 17, 2024
Merged

Sort optimisation parameter numbers#3135
timothy-nunn merged 1 commit intomainfrom
536-fixed-order-in-iteration-variables-and-constraint-equations-in-mfile

Conversation

@jonmaddock
Copy link
Copy Markdown
Contributor

Ensures consistent order and makes output comparison easier.

Ensures consistent order and makes output comparison easier.
@jonmaddock jonmaddock self-assigned this Apr 12, 2024
@jonmaddock jonmaddock linked an issue Apr 12, 2024 that may be closed by this pull request
@jonmaddock
Copy link
Copy Markdown
Contributor Author

As the optimisation parameters are now sorted immediately after reading in from the input file, this causes the solution vector in the mfile to be re-ordered. The (re-ordered) solution vector is very similar, but not the same; this is likely to be to do with the non-idempotence effect previously observed when running the models multiple times or re-ordering the optimisation parameters. This can be reduced or eliminated by re-running the models until the outputs converge (https://github.com/ukaea/PROCESS-usage/issues/12). I think this effect is separate to this issue, and therefore although the resulting MFILE is (slightly) different, it is no less valid than the current regression reference.

@jonmaddock jonmaddock requested a review from timothy-nunn April 12, 2024 17:30
@timothy-nunn
Copy link
Copy Markdown
Collaborator

timothy-nunn commented Apr 17, 2024

Note that comparing itvar* and xcm* values in the test do not make sense due to the re-ordering of the inputs.

@jonmaddock should we try and do for the inputs what we did for the constraints (#3038)

@timothy-nunn timothy-nunn merged commit 65400a5 into main Apr 17, 2024
@timothy-nunn timothy-nunn deleted the 536-fixed-order-in-iteration-variables-and-constraint-equations-in-mfile branch April 17, 2024 13:38
chris-ashe pushed a commit that referenced this pull request Apr 22, 2024
Ensures consistent order and makes output comparison easier.
chris-ashe pushed a commit that referenced this pull request May 1, 2024
Ensures consistent order and makes output comparison easier.
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.

Fixed order in iteration variables and constraint equations in MFILE

2 participants