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

Data definitions, instance models, etc. with multiple equations #1174

Open
bmaclach opened this issue Apr 1, 2019 · 8 comments
Open

Data definitions, instance models, etc. with multiple equations #1174

bmaclach opened this issue Apr 1, 2019 · 8 comments
Assignees
Labels
needs-clarification Needs a clear 'state', 'goal', 'analysis', and 'explanation' to reduce solution ambiguities.

Comments

@bmaclach
Copy link
Collaborator

bmaclach commented Apr 1, 2019

The following is an example instance model with multiple equations in the manual version of SSP:

image

SSP also has data definitions defined with multiple equations.

Currently we hack this instance model's equation in Drasil by connecting each equation with "=", like so:

image

This is clearly incorrect.

We need to find a better way to handle these situations in Drasil. Some options:

  • Inline equations into others (i.e. Equations for Cnum and Cden inlined in the equation for lambda)
  • Create separate Data Definitions for each equation
  • Add support for multi-equation definitions in Drasil.
@JacquesCarette
Copy link
Owner

The best way forward is the third option, multi-equation definitions, at least for instance models. I think inlining is not really a solution. In the short term, creating separate DDs would be better than this hack.

@smiths
Copy link
Collaborator

smiths commented Apr 8, 2019

I agree with @JacquesCarette. The short-term fix can be adding separate DDs. This is consistent with how we solved other problems. Capturing small increments of knowledge is also consistent with our overall "philosophy". In the future we will want to provide a presentation (documentation) mechanism that combines the small definitions into something more suitable for human consumption.

@muhammadaliog3
Copy link
Collaborator

muhammadaliog3 commented Jul 10, 2020

Question 1: Options for multiequations:

  • Break the relations into two components: one is the final/true/defining equation, the others are the sub/intermediate relations.
  • Store all relations as list, problem: In order to be an instance of the ExprRelat class you must have a singular equation, hence we should probably refer use the first option.

At what level should we store these multi-relations?
Options:

  • Do we want store singular relationconcepts that have multi equations
  • do we want to store multi-relation-concepts,
  • do we want both.

I can express the above 3 option in more "codelike" terms

  • In RelationConcept change the field _rel from type Relation to [Relation]
  • change the field _rc from type RelationConcept to type [RelationConcept] a IM/TM/GD/DD

I will be working on a branch with option 2 for question 1 and option 3 for question 2.

@JacquesCarette
Copy link
Owner

ExprRelat is bad and should be eliminated. Multi-equations should be stored as a list of QDefinitions. So we first need to fix things so that we can have different 'kinds' of definitions (direction, multi, differential, etc). We do not want to have any of these as 'relations'. We will still needs relations in Drasil, but the vast majority of the ones we have now, should not be. That is the underlying problem that first needs fixed.

@muhammadaliog3
Copy link
Collaborator

When we eventually reach a place where we can begin solving this issue change from singular quantities to multiquantities then we will face problems from class instances.

what is the term, space, symbol, idea, named idea, and defining expr when we have MULTIPLE QDefinitions? They are well defined for singular defintions but how about for multiple definitions.

I will change definingexpr from Expr to [Expr]

For DataDefinitions:
In data definitions I will have the last equation as the "real" representative, from which we derive all the terms, spaces, etc. and all other equations as intermediates used for display purposes.

Genral Definition: Same as data definitions.

TM: Nothing, TM does not have any of its class instances based on equations.

IM: Same as Data Definition.

@JacquesCarette
Copy link
Owner

You have an 'inverted' design in mind. I see this new data-structure living at the "model" level only, so that there would in fact be no term / space / symbol / idea / etc instances. The insides of that structure would, but not the structure itself.

No, don't change definingexpr from Expr to [Expr]. That is the wrong design!

@balacij
Copy link
Collaborator

balacij commented Jun 10, 2021

This is another interesting ticket. I think the discussion of "multi-equations" relate to what I was briefly discussing as an issue in #2587 (comment) -- I think this would be the "StackedModel" I discussed (definitely needs a better name, and MultiEquational sounds better from this discussion).

@balacij
Copy link
Collaborator

balacij commented Apr 26, 2023

At surface-level, this seems related to #3335, #1154, and #787.

@balacij balacij added the needs-clarification Needs a clear 'state', 'goal', 'analysis', and 'explanation' to reduce solution ambiguities. label Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-clarification Needs a clear 'state', 'goal', 'analysis', and 'explanation' to reduce solution ambiguities.
Projects
None yet
Development

No branches or pull requests

5 participants