Beforehands
This presentation is the property of its rightful owner.
Sponsored Links
1 / 29

Beforehands PowerPoint PPT Presentation


  • 87 Views
  • Uploaded on
  • Presentation posted in: General

Beforehands. OMOptim. C++ code Stored on subversion solver Using Qt libraries (GUI, Model/ View , Containers, Threads, XML…). Subversion repository. Main classes. Class Project. The Core of the program One project at a time Contains main items

Download Presentation

Beforehands

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Beforehands


OMOptim

  • C++ code

  • Stored on subversion solver

  • UsingQtlibraries (GUI, Model/View, Containers, Threads, XML…)


Subversion repository

Plateforme CERES


Main classes


Class Project

  • The Core of the program

  • One projectat a time

  • Contains main items

    • Modelicatree of models, package… (ModClassTree)

    • List of problems and results

    • List of ModModelPlus

    • Misc. Informations : save files, files loaded

  • Main functions

    • Problemsshouldbelaunchedfrom Project

    • Threads management


Class Project


OMOptim


ModelicA - Models


ModClass

  • Basic class, corresponding to an item in modelica

    • Each instance stores name and children

Inheritancediagram


ModClassTree

  • Containsmodelicamodels, packages, classes names


ModModelPlus

  • ModModelPlusallows to store information about a modelica model (ModModel*).

  • Especially :

  • Input variables

  • Connections between components

  • It alsoprovidescompiling and readingfunctions. Still, thosefunctionsrequireModPlusCtrl.


ModPlusCtrl

  • Simulation software controler :

    • Specific for each simulation software

    • Provide interface functions :

      • Set simulation parameters

      • Writing / Reading variables

      • Compiling model

      • Simulating model

    • Set Parameters :

      • Simulation time

      • Solver

      • Tolerances


ModReader& MOOmc

  • Offeringmodelicareadingfunctions

  • MOOmc : linkbetweenOpenModelica & OMOptim (use Corbaprotocol)

    • QStringgetFlattenedModel (const QString &modelName)

    • booladdConnection (QString org, QStringdest)

    • voidgetInheritedComponents (QStringparentClass, QStringList &names, QStringList &classes)


Model management

MOOMC

Reading model

Corba communication withOpenModelica

MyFile.mo

ModClassTree

OMOptim

Model A

Model B

  • Compiling

  • Simulating

  • Reading/Writing variables


Problems


Launching a problem

User

Separate

thread


Problem

An abstract class defining basic functions.

InheritsOMCasewhichcontains more basic virtualfunctions.


One Simulation

Project

ModModelPlus

ModModelPlus


One Simulation

OneSimResult


Problems’ plugin

Plugin loading :

dynamic or static

  • SharedOMOptim :

    • OneSimulation

    • Optimization

  • EnergyIntegration

  • PluginEI.dll

MySensitivityanalysis

Method: implement new inheritances of following abstract classes

- ProblemInterface

- Problem

- Result


Energyintegration


Energyintegration

  • EI is a plugin offering new problems

    • EIMER : Minimum energyrequirement

    • EITarget : Utilities targetting

    • EIHEN1 : HeatExchanger Network


Energyintegration

ModPlusCtrl

Modelica model

MOOmc

EIProblem

-MER

-Target

-HEN

MILP optimizationproblem


GUI


GUI – Core links

  • Often use Qt model-viewprogramming

    • Data / GUI more independent


Conventions used in code

  • Class namealwaysstartwith an uppercase : MyClass

  • Membersalwaysstartwith _ + lowercase

    _myInstance

  • Local variables startwithlowercase

    myLocalVariable

  • Documentation generatedthroughDoxygen


PluginEI

OMOptim

PluginEI

OMOptim

Modelica

OMOptimBasis

Variables, Problems, Settings, GUI


Source code storage


Documentation


  • Login