-
Notifications
You must be signed in to change notification settings - Fork 26
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
reasonable value improvements #2614
Conversation
After resetting the branch and introducting one at a time ( |
When i went through the code and changed the class |
Sorry for not responding earlier, many other tasks on my plate. Part of the point is to get rid of those |
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 change on its own seems fine. Might be better to fix the comments now.
Do you want this merged now, before this is 'plugged in', or wait until it sees some use in an example?
I'll uncomment the new definition after i have checked all the places with the existing constructors, and do the same for |
I have now put two of the new chunk types in. The major error i'm trying to deal with is the Expr/ Maybe Expr issue. I guess the major question is what should my objective be whilst looking at the use of the constructors in the examples? |
The code for the new chunk types looks good to me. To deal with the
About changing the use of constructors: your description is correct. Hmm, I see that the simplest examples are actually for constrainedNRV' q cs = ConstrConcept (dqdWr q) cs Nothing would be a prime candidate to change, because of that explicit In this case, one to consider is cuc i t s u space cs rv = ConstrainedChunk (qw (unitary i t s u space)) cs (Just rv) which has an explicit |
So I think your 'next step' would be to change |
Thank you. |
Seems like one is expecting a |
Since i changed the constructors to match the new chunk types i was going through the examples to change those as well. in my most recent commit i changes |
It certainly is not wrong. Out of curiosity, why is the change needed? Why is |
when i was editing the constructor definitions from ConstrainedChunk to the new chunk types:
for cuc i took out the reasonable value so it fit And in the unitals file |
Great explanation - and yes, it makes perfect sense. |
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.
The changes as they are now are good. Is this ready to go?
Yes it can be merged, I am still going through the constructors to make changes but i can just push them after though |
Should i go ahead and change wherever |
Change them to There is a conflict, so can you merge master first? |
Okay |
is it okay if I make |
Yes. |
UncertainChunk used ConstrainedChunk originally but now that ConstrainedChunk has been split into 3 different chunk types do we want to split UncertainChunk into 3 as well? or do we want to make 3 new constructors. |
Take a look at what kinds of |
UncertainChunk:Reasonable value onlyDrasil.GlassBr.Unitals:
Drasil.SWHS.Unitals:
Both constraint and reasonable valueDrasil.GlassBr.Unitals:
I am a bit unsure about where to place absTol & relTol,
I see they're labeled as unconstrained even though their definitions are in this format:
and physc is If they count as being constrained then everywhere UncertainChunk is used in the examples has both reasonable value and constraint. |
Yes If all of them have constraints, that simplifies things a lot, since it means we only need a single |
Okay great. Should i create a ticket so calling them Also this is the current definition for data UncertainChunk = UCh { _conc :: ConstrReasQDef , _unc' :: Uncertainty } |
Yes on the ticket (but you might want to just do it here). So it looks like the current definition of |
yes okay, it seems like it already does what it's suppose to do so instead would we need to make more constructors? i'm trying to figure out what the next step should be to fix the error occuring right now |
Put the details of the error (i.e. where it occurs and what's the error) in the issue here. Hopefully @balacij can help, as I'll be offline for the next hour. |
Okay.
|
The error message is quite good: you have |
So should i just change that back then? |
Let the types tell you what to do. I think you require a reasonable value, so |
Perhaps you're missing an instance? That seems to be what the error indicates. |
Perhaps if you could push what you think is something reasonable, I can take a deeper look. |
Thanks, looking now. |
In digging deeper, it seemed that this exact design was destined to fail. A new design will have to be drawn up. |
contributes to #1808