-
Notifications
You must be signed in to change notification settings - Fork 71
Position implementation change #1510
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
base: main
Are you sure you want to change the base?
Conversation
A better way to streamline this without forcing every agent to have a
|
src/toolkit/position.cycpp
Outdated
@@ -0,0 +1,19 @@ | |||
#pragma cyclus var { \ |
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.
Is this file really intended to be part of the PR?
@katyhuff thx for your review !
so adding position on an archetype, one will only have to:
|
you can see the related PR draft on cyclus/cycamore#502 |
@bam241 Are we concerned about the cymetric failures? It seems like the tests are returning larger tables than expected. |
@FlanFlanagan I did not investigate this yet, but this is just showing that Cyclus has evolve to something that |
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.
A few requests
@@ -0,0 +1,32 @@ | |||
|
|||
// This includes the required header to add geographic coordinates to a | |||
// archetypes. |
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.
I thinks we need a longer message here that explains how it all works, since it is a brand new concept,
Also, can we use one of the archetypes that’s in cyclus/cyclus
to demonstrate?
src/toolkit/position.cycpp.h
Outdated
} | ||
double latitude; | ||
// required for compilation but not added by the cycpp preprocessor... | ||
std::vector<int> cycpp_shape_latitude; |
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.
What is this for?
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.
this is because cycpp
is not run on the file generate by the cpp
see
Line 122 in 279a758
SET(ORIG "--pass3-use-orig") |
and
Lines 2328 to 2335 in 279a758
parser.add_argument('--pass3-use-pp', action="store_true", default=True, | |
help=("On pass 3, use the preproccessed version of the " | |
"original file. This options is mutually exclusive" | |
"with --pass3-use-orig."), dest="pass3_use_pp") | |
parser.add_argument('--pass3-use-orig', action="store_false", | |
help=("On pass 3, use the preproccessed version of the " | |
"original file. This options is mutually exclusive" | |
"with --pass3-use-pp."), dest="pass3_use_pp") |
so when using this snippet method we miss generated code for the additional included variables...
I try to change the --pass3-use-orig
to --pass3-use-pp
and cyclus
is not compiling :(
I don't know what the best solution is...
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.
cc @gonuke this is a follow-up on the conversation we had this morning...
This needs a news file |
will merge with news file! |
shall we not wait for the CEP27 to be ready ? |
This was paused waiting for CEP27 to be accepted. That did happen in March 2021, so this should be reconsidered. A similar approach, based on CEP27, would be very valuable for @nuclearkatie's #1634 |
…inate when reccording
Co-Authored-By: Paul Wilson <paul.wilson@wisc.edu>
@gonuke just rebased this. This does not break any new things :) |
Pull Request Test Coverage Report for Build 14419088324Details
💛 - Coveralls |
Downstream Build Status Report - 35cfa7d - 2025-04-12 11:16:31 +0000Build
|
For some reason, this update will cause cymetric to fail, but only on Ubuntu 22.04 and only those that build with apt and not conda. This usually means that there is some dependency version conflict in the python stack that we don't have enough control over.... Note: such failures are not marked as blocking because when we have intentional changes that break a downstream tool and we have expected updates to that downstream tool, we need to be able to merge under such conditions. This condition is not pathological, but probably deserves a little attention. |
Position
change:The way the
Position
is working now, each agent have to define theircoordinates
(all thecycamore
have them) and have there own method toRecord
them (all have the same), what I did, is add thecoordinates
and the RecordPosition at the Agent level (each cycamore agent still have to get latitude and longitude on their own), each agent calling theRecordPosition
at theCyclus::Agent::EnterNotify()
level, avoiding copy/pasting the RecordPosition method over and over...I also added a
RecordPosition(Agent* agent)
method in Position, so thePosition
knows how to register itself in the database. (this add agent and context include in the Position, if we don't like it, it will be as easy to add theRecordPosition
in the agent itself...)I think this last change make sense, as it allows to keep the
Agent
class fairly simple and will allow each attribute (Position) to know how to Record himself...This is redondant with #1508 , but @gonuke advised me to do a separate PR for this change.