zoukankan      html  css  js  c++  java
  • OpenModelica中simulate的用法

    先把官网上的说明文档放上来:

    simulate

    simulates a modelica model by generating c code, build it and run the simulation executable.
    The only required argument is the className, while all others have some default values.
    simulate(className, [startTime], [stopTime], [numberOfIntervals], [tolerance], [method], [fileNamePrefix], [options], [outputFormat], [variableFilter], [cflags], [simflags])
    Example command:
    simulate(A);
    
    function simulate
      input TypeName className "the class that should simulated";
      input Real startTime = "<default>" "the start time of the simulation. <default> = 0.0";
      input Real stopTime = 1.0 "the stop time of the simulation. <default> = 1.0";
      input Real numberOfIntervals = 500 "number of intervals in the result file. <default> = 500";
      input Real tolerance = 1e-6 "tolerance used by the integration method. <default> = 1e-6";
      input String method = "<default>" "integration method used for simulation. <default> = dassl";
      input String fileNamePrefix = "<default>" "fileNamePrefix. <default> = """;
      input String options = "<default>" "options. <default> = """;
      input String outputFormat = "mat" "Format for the result file. <default> = "mat"";
      input String variableFilter = ".*" "Filter for variables that should store in result file. <default> = ".*"";
      input String cflags = "<default>" "cflags. <default> = """;
      input String simflags = "<default>" "simflags. <default> = """;
      output SimulationResult simulationResults;
      record SimulationResult
        String resultFile;
        String simulationOptions;
        String messages;
        Real timeFrontend;
        Real timeBackend;
        Real timeSimCode;
        Real timeTemplates;
        Real timeCompile;
        Real timeSimulation;
        Real timeTotal;
      end SimulationResult;
    end simulate;

    numberOfIntervals根据我的理解,这个参数是指每秒仿真多少次(每秒间隔数),我将其设置为50,发现在csv文件中每秒也就存放4,5条数据,不太清楚OpenModelica究竟是怎样的运行机制。
     
  • 相关阅读:
    图论知识补全
    字符串
    Yii2安装搭建和将入口文件移到根目录
    yii2史上最简单式安装教程,没有之一
    如何在IIS 7.5中部署Asp.Net MVC 5的网站
    Yii2.0中文开发向导——Yii2中多表关联查询(join、joinwith)
    Yii2 AR find用法 (2016-05-18 12:06:01)
    DedeCMS织梦动态分页类,datalist标签使用实例
    dedecms为后台自定义菜单的完整方法
    php和js一起实现倒计时功能
  • 原文地址:https://www.cnblogs.com/Pusteblume/p/10205565.html
Copyright © 2011-2022 走看看