Skip to content
This repository was archived by the owner on Mar 27, 2022. It is now read-only.
This repository was archived by the owner on Mar 27, 2022. It is now read-only.

I try to execute TinyModia but not work ... #9

Description

@abassign

I installed TinyModia ModiaBase and ModiaPlot on Julia 1.6.1 in Linux Ubuntu.
I tried running this example, but it crashes on "Var" ... I can't figure out where I'm going wrong.

ulia> using TinyModia

julia> using ModiaBase

julia> using ModiaPlot

julia> # Cartesian pendulum model. 
       CPendulum = Model(
           L = Var(1.0, parameter=true),
           m = Var(1.0, parameter=true),
           g_n = Var(9.80665, parameter=true),

           x = Var(init=1/sqrt(2)),
           y = Var(init=-1/sqrt(2)),
           vx = Var(),
           vy = Var(),
           F = Var(),
           
           equation = :[  
               der(x) = vx
               der(y) = vy
         
               m*der(vx) = (F/L)*x
               m*der(vy) = (F/L)*y - m*g_n
         
               x^2 + y^2 = L^2]
       )
ERROR: UndefVarError: Var not defined
Stacktrace:
 [1] top-level scope
   @ REPL[54]:2

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions