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

Add type property to constant, design parameter and state variable arrays #25

Open
1fifoto opened this issue Jun 22, 2018 · 5 comments
Open

Comments

@1fifoto
Copy link
Contributor

1fifoto commented Jun 22, 2018

Consider adding type: "string", "integer" and "float" to each constant, design parameter and state variable entry.

@1fifoto
Copy link
Contributor Author

1fifoto commented Jun 22, 2018

For example,

global.constants = [
    { name: 'pi', type: "float", value : 0.0, units : '_' }
];

@1fifoto 1fifoto changed the title Investigate changing single constant float array to have a type Add type property to constant, design parameter and state variable arrays Jun 22, 2018
@1fifoto
Copy link
Contributor Author

1fifoto commented Jun 22, 2018

Although adding a 'type' property is not a very object-oriented way to do things, it will help us from having three different constant arrays for string, integer and float. In other words, checking and branching on type is a no-no in the OO world.

@1fifoto 1fifoto added this to the 0.4 milestone Jun 22, 2018
@1fifoto 1fifoto self-assigned this Jun 22, 2018
@1fifoto
Copy link
Contributor Author

1fifoto commented Jun 22, 2018

Nothing uses this, so I don't know if we need this.

@1fifoto 1fifoto removed this from the 0.4 milestone Jun 22, 2018
@grumpyinca
Copy link
Collaborator

Having an integer type for design parameters and state variables might be a match for a search algorithm that implements integer programming technology. However, I am having trouble getting my mind around string values for DP & SV. Perhaps this is not an issue. The change might be worthwhile simply to clean up how constants are handled.

@1fifoto
Copy link
Contributor Author

1fifoto commented Jun 24, 2018

In my opinion, a 'design' is a set of values that are the instances of 'design definition' variables. They need not have anything to do with the computational aspects of the design. That is, they need not be used in or be the result from the equation set. Instead, they are carried with the design to specify it. I feel that all types (for example, float, integer, and string) should be possible.

@1fifoto 1fifoto removed their assignment Jun 28, 2018
@1fifoto 1fifoto added this to the pcyl-web milestone Jul 4, 2018
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

No branches or pull requests

2 participants