Skip to content

unit checking #35

Open
Open

Description

@bpowers

There are a few parts to unit checking:

  • basic checking -- given a model with units specified, typecheck them.
  • type inference -- this is (a) helpful for users so that we can suggest units, but is also necessary for modules like smth1 where we really want the smth1 units to be generic
  • UI to edit units on variables. somewhat complicated by there not being much space in the sidebar, so we are going to have to be better at scrolling or rearrange things
  • UI to edit project unit relations (e.g. people person and persons are all interchangable units). This should probably be tied in to the general "control panel" view for a project we need.
  • (maybe) a classic frustration is that constants are unitless: a variable with equation 3 * n_homes is expected to have the same unit as n_homes, so if 3 is a constant designed to help convert from one unit to another, you have to pull it out into its own aux to give it its own unit. It would be nice if we could say 3 { units: people/home } * n_homes inline in the equation, but this will require lexing and parsing changes.

Activity

  1. bpowers commented on Aug 12, 2021

    @bpowers
    OwnerAuthor

    basic checking:

    • add "standard" unit equivalences
    • add support for "time" units
    • add support for simple modules
    • unit check inflows + outflows of stocks
  2. added
    engine
    frontend
    on Aug 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    engineepicfrontend

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions