Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register
  • Index
  • » Users
  • » pmeijer
  • » Profile

Posts

Posts

Of which type is the Runge-Kutta solver?

Hey,

thanks a lot that really helps.

Just to straighten it out... So when I load in a package with env. var. and loadModel, OM looks for the defined dependencies (in the uses-annotation) and tries to load those packages from the paths in OPENMODELICALIBRARY. Whereas when I load a package with loadFile it doesn't care about these dependencies?

cheers,

Patrik

Dear,

I get the following error_msgs;

Code:

Error: Failed to load package Visualization (1.1,default) using MODELICAPATH C:/OpenModelica1.8.1/lib/omlibrary;C:/test

when I try to compile a model with the following mos-script;

Code:

loadModel(Modelica, {"3.2"});

loadModel(PlanarMechanicsForTesting);
cd("C:/ModelicaTests/PendulumTest");
loadFile("package.mo");
translateModel(Pendulum_Sep24.Pendulum_Sep24);
getErrorString();

I'm calling the mos script from python through a subprocess.call(), where I've added "C:\test" to the environment variable OPENMODELICALIBRARY.

(I'm using  OpenModelica version : 1.8.1+ r12060)

Where is this package Visualization located? I can't find it in the OpenModelica folder. Any help is appreciated a lot.

Thanks,

cheers,

Patrik

Oct-01-12 18:54:22
Does OpenModelica make use of such in the symbolic transformations?

Ok great,

thanks a lot!

Out of curiosity, I noticed that tearing is default in 1.9.0beta, does that algorithm also make use of any of the mentioned attributes?

cheers,

Patrik

Sep-29-12 00:43:51
Does OpenModelica make use of such in the symbolic transformations?

Hello,

I was wondering if the OpenModelica make use of attributes such as min, max, nominal during the symbolic transformation of the flat DAE-system?

We're generating Modelica code and I was wondering if it would be worth while to add such attributes.

Thanks a lot,

Patrik

Is this really an error?

Counting the number of evaluations of the system, which you seem to be doing, is not they way to extract your data from the FMU. You'd rather want to match the time series with the variable time.

For more complex FMUs you'll notice that Dymola also will evaluate the system at "intermediate" steps.

/patrik

Sep-11-12 06:57:47
Possible to connect FMUs?

Flavio,

Nah, Attributes isn't really a good name either, I'm sorry. In Modelica terminology they are simply variables, (since they vary over time during the simulation). Parameters can change too, but only before the simulation process start. If you would have referred to those as properties or attributes -  I wouldn't have objected. 
Anyhow...

The reason you cannot treat tau and phi as a Modelica.Mechanics.Rotational.Interfaces.Flange_a is that the order and how the equations are solved is determined by the Modelica translator/compiler and depends on which context, i.e. model, they're in.
A simplified argument goes like;

If you have two flanges, x and y, connecting them yields the following equation;
tau_x + tau_y = 0.
When the acausal Modelica code is translated into sequential/causal (c-code), this equation either becomes;
tau_x := - tau_y or tau_y := -tau_x.

This is exactly what happens when you generate a FMU. The FMU has the advantage of being supported by any IDE that implements the FMI, which in one sense is much simpler (to enable portability between many tools) than translating/compiling Modelica code. But it comes at the cost that the causality (information flow) is decided once and for all for each sub-system that constitutes the FMU. And if you want to connect such together, you, yourself, have to define what is input and what is output between your FMUs.

In your case I realised that you cannot simply measure the torque from the EMF and send it as a signal from your FMU and then connect that signal to a torque source, since the torque generated depends on the load. I'm not saying it's impossible to solve with signals, but I haven't figured out a correct solution. Generally I would, however, recommend you to model as much of the dynamics in Modelica and only split up you models into FMU-subsystems where it makes sense to have only I/O connections. Fiddling around too much with signals can also hinder the Modelica compiler from optimizing the code (which is of essence in larger models).

hope it clears it out somehow,

cheers,

Patrik

Sep-06-12 22:47:57
Possible to connect FMUs?

hey Flavio,

I'm not a OM-developer but you have to make sure that the I/O's of your FMU truly are causal. (Since FMI isn't modelica specific, (it has support in e.g. matlab), there is no such thing as acausal connections, which btw is one of the strength of Modelica.) Since causal connections in Modelica correspond to signals I suggest, in your case, to connect a torque sensor to your flange before you export the FMU.

Or do you already get the phi and  tau as time dependent signals of your FMU (not fully sure what you mean by properties) ? In that case you can connect any of them to its corresponding rotational source at Modelica.Mechanics.Rotational.Sources and then connect that to your rotational system.

cheers,

patrik

Hey,

dymola has a simulation setting called, "Store variables at events" which can be deselected. Is there a similar simulation option in OM?

The main reason I'm asking is that I want to compare simulation results from different tools. Also I've noticed that in some models the number of generated time points add up to about 300'000 (5000 communication points and the rest event points) resulting in huge .mat files and slow post-processing of simulation data.

thanks,

Patrik

Hey again,

so now i can collect the ordinary parameters that are used to modify the parameters of the extended class. However I also need to collect modifications that includes redefinitions of entire types and classes. These have the keyword redeclare in front of the.

I have gotten what looks like an exhaustive list of the different function calls ;


protected function showStatement
protected function selectResultstr
protected function getEcho
protected function evaluateAlgStmt "function: evaluateAlgStmt
protected function evaluateForStmt
protected function evaluateForStmtRangeOpt
protected function evaluateWhileStmt
protected function evaluatePartOfIfStatement
protected function evaluateIfStatementLst
protected function evaluateAlgStmtLst
protected function evaluateExpr
protected function stringRepresOfExpr
protected function evaluateExprToStr
protected function getIdentFromTupleCrefexp
protected function addVarsToSymboltable
protected function deleteVarFromVarlist
protected function addVarToVarlist
protected function addVarsToEnv
protected function matchApiFunction
protected function getApiFunctionArgs
protected function getApiFunctionNamedArgs
protected function evaluateGraphicalApi
protected function evaluateGraphicalApi_dispatch
protected function listClass
protected function extractAllComponentreplacements
protected function isClassReadOnly
protected function renameComponent
protected function renameComponentOnlyInClass
protected function extractRenamedClassesAsStringList
protected function renameComponentFromComponentreplacements
protected function renameComponentVisitor
protected function renameComponentInClass
protected function renameComponentInParts
protected function renameComponentInElements
protected function renameComponentInElementSpec
protected function renameComponentInComponentitems
protected function renameComponentInEquationList
protected function renameComponentInExpEquationitemList
protected function renameComponentInEquation
protected function renameComponentInExpList
protected function renameComponentInExpListList
protected function renameComponentInExpTupleList
protected function renameComponentInElementArgList
protected function renameComponentInElementArg
protected function renameComponentInCode
protected function renameComponentInExp
protected function renameComponentInAlgorithms
protected function renameComponentInAlgorithm
protected function renameComponentInExpAlgoritmsList
protected function renameComponentInFunctionArgs
protected function renameComponentInIterators
protected function renameComponentInNamedArgs
protected function renameComponentInExternalDecl
protected function replaceStartInComponentRef
protected function replaceStartInComponentRef2
protected function getComponentreplacementsrules
protected function getNewComponentreplacementsrulesForEachRule
protected function makeComponentsReplacementRulesFromComponents
protected function emptyComponentReplacementRules
protected function joinComponentReplacementRules
protected function lengthComponentReplacementRules
protected function firstComponentReplacement
protected function restComponentReplacementRules
protected function getDependencyOnClass
protected function getDependencyWithType
protected function getComponentsWithComponentsClass
protected function getComponentsWithComponentsType
protected function getComponentsFromClass
protected function getComponentsWithType
protected function extractAllComponents
protected function extractAllComponentsVisitor
protected function isReadOnly
protected function extractComponentsFromClass
protected function extractComponentsFromClassdef
protected function extractComponentsFromClassparts
protected function extractComponentsFromElements
protected function extractComponentsFromElementspec
protected function extractComponentsFromComponentitems
protected function extractComponentsFromElementargs
protected function extractComponentsFromModificationOption
protected function joinComponents
protected function existsComponentInComponents
protected function emptyComponents
protected function firstComponent
protected function restComponents
protected function lengthComponents
protected function addComponentToComponents
protected function dumpComponentsToString
protected function isParameterElement
protected function getParameterNames
protected function setComponentProperties
protected function setComponentPropertiesInClass
protected function setComponentPropertiesInClassparts
protected function setComponentPropertiesInElementitems
protected function setComponentPropertiesInElement
protected function setReplaceableKeywordAttributes
protected function setInnerOuterAttributes
protected function setComponentPropertiesInElementspec
protected function itemsContainCompname
protected function setElementAttributes
protected function setElementParallelism
protected function setElementVariability
protected function setElementCausality
protected function selectString
protected function getCrefInfo
protected function getImportString
protected function getElementType
protected function getElementInfo
protected function constructElementsInfo
protected function appendNonEmptyStrings
protected function getElementsInfo
protected function setExtendsModifierValue
protected function setExtendsSubmodifierInClass
protected function setExtendsSubmodifierInClassparts
protected function setExtendsSubmodifierInElementitems
protected function setExtendsSubmodifierInElement
protected function getExtendsModifierValue
protected function makeExtendsFullyQualified
protected function getExtendsModifierNames
protected function extendsElementspecNamed
protected function extendsName
protected function getExtendsElementspecInClass
protected function getExtendsElementspecInClassparts
protected function getExtendsElementspecInElementitems
protected function getExtendsElementspecInElement
protected function setComponentModifier
protected function setComponentSubmodifierInClass
protected function setComponentSubmodifierInClassparts
protected function setComponentSubmodifierInElementitems
protected function setComponentSubmodifierInElement
protected function setComponentSubmodifierInCompitems
protected function createOptModificationFromEltargs
protected function setSubmodifierInElementargs
protected function findCrefModification
protected function getComponentModifierValue
protected function getComponentModifierNames
protected function getModificationNames
protected function getComponentBinding
protected function getVariableBindingInComponentitem
protected function setParameterValue
protected function setVariableBindingInClass
protected function setVariableBindingInClassparts
protected function setVariableBindingInElementitems
protected function setVariableBindingInElement
protected function setVariableBindingInCompitems
protected function componentitemNamed
protected function getComponentitemName
protected function getComponentitemsInElement
protected function renameClass
protected function renameClassVisitor
protected function renameClassInClass
protected function renameClassInParts
protected function renameClassInElements
protected function renameClassInElementSpec
protected function renameClassInImport
protected function changeLastIdent
protected function traverseClasses2
protected function classHasLocalClasses
protected function partsHasLocalClass
protected function eltsHasLocalClass
protected function traverseInnerClass
protected function traverseInnerClassParts
protected function traverseInnerClassElements
protected function traverseInnerClassElementspec
protected function deleteClass
protected function deleteClassFromList
protected function setClassCommentInClass
protected function setClassCommentInClassdef
protected function setClassCommentInCommentOpt
protected function getClassInformation
protected function getShortDefinitionBaseClassInformation
protected function getExternalFunctionSpecification
protected function getClassDimensions
protected function getClassAttributes
protected function getClassComment2
protected function isConnector
protected function isRecord
protected function isBlock
protected function isClass
protected function isParameter
protected function isProtected
protected function isConstant
protected function isEnumeration
protected function isReplaceable
protected function isReplaceableInElements
protected function isProtectedClassInElements
protected function getEnumLiterals
protected function getElementitemContainsName
protected function getComponentsContainsName
protected function getElementContainsName
protected function getCompitemNamed
protected function removeAnySubFunctions
protected function removeAnyPartsFunctions
protected function removeVarFromVarlist
protected function getVariableValue
protected function getVariableValueLst
protected function lookupClassdef
protected function deleteComponent
protected function deleteComponentFromClass
protected function deleteComponentFromElementitems
protected function getDefaultPrefixes "Retrieves default prefixes by looking at the defaultComponentPrefixes annotation"
protected function makeReplaceableIfPartial
protected function getDefaultInnerOuter "helper function to getDefaultPrefixes"
protected function getDefaultReplaceable "helper function to getDefaultPrefixes"
protected function getDefaultAttr "helper function to getDefaultPrefixes"
protected function getDefaultComponentPrefixesModStr "Extractor function for defaultComponentPrefixes modifier"
protected function updateComponent
protected function addClassAnnotation
protected function addClassAnnotationToClass
protected function replaceElementAnnotationInElements
protected function replaceElementAnnotationInEquations
protected function replaceElementAnnotationInAlgorithms
protected function getElementAnnotationInElements
protected function getElementAnnotationInEquations
protected function getElementAnnotationInAlgorithms
protected function mergeAnnotations
protected function removeModificationInElementargs
protected function getInheritanceCount
protected function getNthInheritedClass
protected function getNthInheritedClassAnnotationOpt
protected function getMapAnnotationStr
protected function getNthInheritedClassMapAnnotation
protected function getExtendsInClass
protected function getExtendsInParts
protected function getExtendsInElementitems
protected function getNthInheritedClass2
protected function countComponents
protected function countComponentsInElts
protected function getNthComponent "function: getNthComponent
protected function getNthComponent2
protected function useQuotes
protected function getComponents2
protected function getComponentAnnotations "function: getComponentAnnotations
protected function getNthComponentAnnotation "function: getNthComponentAnnotation
protected function getNthComponentModification "function: getNthComponentModification
protected function getNthComponentCondition
protected function getComponentCondition
protected function getComponentitemsCondition
protected function getConnectionCount "function: getConnectionCount
protected function getNthConnection "function: getNthConnection
protected function getStringComment "function: getStringComment
protected function getStringComment2
protected function addConnection "function: addConnection
protected function deleteConnection "function: deleteConnection
protected function deleteEquationInClass
protected function deleteEquationInEqlist
protected function getComponentComment
protected function getComponentCommentInClass
protected function getComponentCommentInParts
protected function getComponentCommentInElementitems
protected function getComponentCommentInElementspec
protected function getComponentCommentInCompitems
protected function getClassCommentInCommentOpt
protected function setComponentComment
protected function setComponentCommentInClass
protected function setComponentCommentInParts
protected function setComponentCommentInElementitems
protected function setComponentCommentInElementspec
protected function setComponentCommentInCompitems
protected function setConnectionComment
protected function setConnectionCommentInClass
protected function setConnectionCommentInParts
protected function setConnectionCommentInEquations
protected function getNthConnectionAnnotation
protected function getConnectorCount
protected function getNthConnector
protected function getNthConnectorIconAnnotation
protected function getDiagramAnnotation
protected function getUsesAnnotationString
protected function getUsesAnnotationString2
protected function getIconAnnotation
protected function getTopPackagesInProgram
protected function getPackagesInClass
protected function getPackagesInParts
protected function getPackagesInElts
protected function getTopQualifiedClassnames
protected function getClassnamesInClass
protected function getBaseClasses
protected function getBaseClassesFromParts
protected function getBaseClassesFromElts
protected function countBaseClasses
protected function countBaseClassesFromParts
protected function countBaseClassesFromElts
protected function getAnnotationInClass
protected function getAnnotationFromParts
protected function getAnnotationFromElts
protected function isAnnotationType
protected function containAnnotation
protected function getAnnotationFromEqns
protected function getAnnotationFromAlgs
protected function getAnnotationStr
protected function getNamedAnnotationInParts
protected function getNamedAnnotationInElItems
protected function getNamedAnnotationInEquItems
protected function getNamedAnnotationInAlgItems
protected function getDefaultComponentName
protected function getDefaultComponentNameModStr
protected function getDefaultComponentPrefixes
protected function getNamedAnnotationStr
protected function getExperimentAnnotationString2
protected function getDocumentationAnnotationInfo
protected function getDocumentationAnnotationRevision
protected function getNthPublicConnectorStr
protected function getNthConnectorStr
protected function getNthCompname
protected function countPublicConnectors
protected function countConnectors
protected function getConnectionAnnotationStrElArgs
protected function getConnectionAnnotationStr
protected function createFuncargsFromElementargs
protected function getNthConnectionitemInClass
protected function getNthConnectionitemInClassparts
protected function getNthConnectionitemInEquations
protected function getConnectionStr
protected function countConnections
protected function countConnectionsInClassparts
protected function countConnectionsInEquations
protected function getComponentAnnotationsFromElts
protected function getComponentitemsAnnotations
protected function getComponentitemsAnnotationsElArgs
protected function getComponentitemsAnnotationsFromItems
protected function getComponentAnnotation
protected function modelicaAnnotationProgram
protected function getComponentitemsAnnotation
protected function getComponentitemsModification
protected function buildEnvForGraphicProgram
protected function getAnnotationString
protected function stripGraphicsAndInteractionModification
protected function getPublicComponentsInClass
protected function getProtectedComponentsInClass
protected function getComponentsInElementitems
protected function getNthComponentInClass
protected function getNthComponentInElementitems
protected function getComponentInfo
protected function arrayDimensionStr
protected function getComponentsInfo
protected function getComponentsInfo2
protected function keywordReplaceable
protected function getComponentInfoOld
protected function innerOuterStr
protected function attrFlowStr
protected function attrStreamStr
protected function attrParallelismStr
protected function attrVariabilityStr
protected function attrDimensionStr
protected function attrDirectionStr
protected function getComponentitemsDimension
protected function suffixInfos
protected function prefixTypename
protected function addToProtected
protected function addToEquation
protected function buildPath
protected function replaceClassInProgram
protected function insertClassInProgram
protected function insertClassInClass "function: insertClassInClass
protected function getFirstIdentFromPath "function: getFirstIdentFromPath
protected function removeInnerClass "function: removeInnerClass
protected function removeClassInElementitemlist
protected function replaceInnerClass
protected function replaceClassInElementitemlist
protected function getInnerClass
protected function replacePublicList
protected function replaceProtectedList "function: replaceProtectedList
protected function replaceEquationList "function: replaceEquationList
protected function replaceInitialEquationList "function: replaceInitialEquationList
protected function replaceAlgorithmList "function: replaceAlgorithmList
protected function replaceInitialAlgorithmList "function: replaceInitialAlgorithmList
protected function deletePublicList "function: deletePublicList
protected function deleteProtectedList "function: deleteProtectedList
protected function getPublicList "function: getPublicList
protected function getProtectedList "function: getProtectedList
protected function getEquationList "function: getEquationList
protected function getInitialEquationList "function: getInitialEquationList
protected function getAlgorithmList "function: getAlgorithmList
protected function getInitialAlgorithmList "function: getInitialAlgorithmList
protected function getClassFromElementitemlist "function: getClassFromElementitemlist
protected function classInProgram
protected function getClassesInClass
protected function getClassesInParts
protected function getClassesInElts
protected function getClassInProgram
protected function modificationToAbsyn
protected function modificationToAbsyn2
protected function selectAnnotation
protected function annotationListToAbsynComment
protected function annotationListToAbsynComment2
protected function commentToAbsyn
protected function annotationListToAbsyn
protected function recordConstructorToModification
protected function namedargToModification
protected function removeInnerDiffFiledClasses
protected function removeInnerDiffFiledClass
protected function removeClassDiffFiledInElementitemlist
protected function getSurroundingPackage
protected function transformFlatClass
protected function transformFlatClassDef
protected function transformFlatElementItem
protected function transformFlatElement
protected function transformFlatElementSpec
protected function transformFlatComponentItem
protected function transformFlatComponent
protected function transformFlatArrayDim
protected function transformFlatSubscript
protected function transformFlatElementArg
protected function transformFlatModificationOption
protected function transformFlatComponentRef
protected function transformFlatEquationItem
protected function transformFlatEquation
protected function transformFlatElseIfPart
protected function transformFlatFunctionArgs
protected function transformFlatNamedArg
protected function transformFlatExpTrav
protected function transformFlatExp
protected function transformFlatAlgorithmItem
protected function transformFlatAlgorithm
protected function transformFlatElseIfAlgorithm
protected function expandUnionTypes
protected function expandUnionTypesInClass
protected function updateLoadedFiles
protected function getLoadedFileInfo
protected function checkLoadedFiles
protected function getDefinitions
protected function getLocalVariables
protected function getLocalVariablesInClassParts
protected function getLocalVariablesInAlgorithmsItems
protected function getLocalVariablesInAlgorithmItem
protected function printWithNewline
protected function getDefinitions2
protected function getDefinitionsClass
protected function getDefinitionsReplaceableClass
protected function getEnumerationLiterals
protected function getDefinitionPathString
protected function getDefinitionDimensions
protected function getDefinitionParts
protected function getDefinitionContent
protected function getDefinitionDirString
protected function getDefinitionComponents
protected function getElementName
protected function getElementTypeName
protected function getDescIfVis ""
protected function getNameFromElementIfVisType
protected function constructVisTypesList
protected function getVisElementNameFromStr
protected function getComponentBindingMapable
protected function getClassnamesInClassList
protected function joinPaths
protected function getComponentInClass
protected function getFunctionsInClasses
protected function getAllClassesInClass

However, some of these do not seem to be implemented. And the list doesn't give me any information about the input arguments. I get the following Error msg when I tried some of them (with arguments I assumed to be valid).

"Error: Class getExtendsElementspecInClass not found in scope <global scope> (looking for a function or record).

Could this be due to me using inappropriate arguments? Or is it, just as the Error msg implies, due to the fact that the function it is not implemented?


Sorry for the long post,

Cheers,

Patrik

Ok thanks,

unfortunately it's not rather complete either.. Couldn't find neither getExtendsModifierNames() nor getExtendsModifierValue() in that list.

/Patrik

Ok, great! Thanks a lot!

In general;
is there a more complete list of these functions than the one provided in the documents of the installer?

cheers,

patrik

Is there any equivalent of getComponentModifierNames() for modified paramters in extended classes, in the OMC_API?
Or is there some other way to retrieve those names and values? 

As an example...

Code:


model master
extends base(p1=10);
end master;

Code:


model base
  parameter Real p1 = 3;
  Real x;
  Real y;
equation
  x = 1;
  y = p1 * x;
end base;

How can I obtain the parameter p1 and the value 10?

Any help appreciated.

cheers,

Patrik

P.S. A last resort would be to "list()" the whole class and parse the code, but figure there might be a simpler way. D.S.

In this model one cannot actually see that the when-clause is activated. I've tried it for other model before and the when clause is activated.

Dear all,

I'm working on in-cooperating a matlab/simulink dependent package into modelica using external objects and external c-function calls. The program makes use of state-events and time-events and my first idea was to write it has an FMU and import it into OpenModelica. I noticed that a lot of errors occurred when OM tried to wrap the FMU's. I can provide a list of errors if that is of interest for the OM community. However, for other reasons as well, the approach of directly using external objects/functions suites better for this case.

The problem I have is in the following code;

Code:


model testForAndPre
  Real x[2];
  Modelica.Blocks.Sources.Sine sine1(freqHz = 1 / 4, phase = 1 / 8) annotation(Placement(visible = true, transformation(origin = {-56.4972,58.3804}, extent = {{-12,-12},{12,12}}, rotation = 0)));
  Modelica.Blocks.Sources.Sine sine2(freqHz = 1 / 2) annotation(Placement(visible = true, transformation(origin = {-53.8606,-2.63653}, extent = {{-12,-12},{12,12}}, rotation = 0)));
  Boolean z[2];
  annotation(experiment(StartTime = 0.0, StopTime = 5, Tolerance = 1e-006));
initial equation
  x[1] = 0;
  x[2] = 0;
equation
  z[1] = sine1.y > 0;
  z[2] = sine2.y > 0;
algorithm
  when z[1] <> pre(z[1]) or z[2] <> pre(z[2]) then
      for i in 1:2 loop
          if z[i] <> pre(z[i]) then
            x[i]:=10;
      else 
      end if;
    end for;
  end when;
end testForAndPre;

What you'll notice when you simulate the model is that the if clause within the when statement are never activated.
Since the when clause is activated at the right time, (compare with the sin1.y and sin2.y), my suspection is that
the error occurs from the varying index, i, used together with the pre() operator. 

Any comments would be highly appreciated.  Hopefully it's an easy fix.


cheers!,


Patrik


PS. this is just a simplified model to show the error. For the finnished implemation I cannot "hard-code" the array-element
accessing, since I need the model to be paramterizable.

I'm not an OpenModelica developer, but I have asked about the tearing (since I've done that part for JModelica.org) and I was told that it's unsafe in OpenModelica. In JModelica.org, the selection of tearing-variables and residual-equations guarantees that no divisions by variables and even parameters are imposed by this selection. I'm not sure if the OpenModelica compiler can guarantee this. It looks like it doesn't.

So to answer your question - don't use tearing in OpenModelica. (Since evidently you get divisions by zero).

The BLT-transformation (which is default) shouldn't introduce any divisions by zero (unless they are inherent in the model itself).

cheers,

patrik

May-03-12 19:17:49
Get compile errors when external C code contains ModelicaMessages

Dear all,

I've been working on importing a set of C-functions using external functions and external objects. I get error-msgs such as;

ttExternal.Loop.o:ttExternal.Loop.ccurrent/sad.text+0x1884): undefined reference to `ModelicaFormatMessage'
ttExternal.Loop.o:ttExternal.Loop.ccurrent/sad.text+0x18cd): undefined reference to `ModelicaMessage'

even though I have included
#include "ModelicaUtilities.h"
in my c-files. In Dymola the ModelicaMessages works fine for the same code. Do I have to provide a path in OM? It's doesn't complain about the include of "ModelicaUtilites.h", rather I get the above error messages, so I'm a bit confuzzled atm.

Thanks for any help!

/patrik

PS. in the same project I have problems with the change operator. It doesn't seem to work for booleans? First I had an array of Booleans, then I tried the single array elements and after that I tried the x <> pre(x) on the whole array, didn't work. Finally I got it to work with x[ i ] <> pre(x[ i ]). As far as I know all of the constructs should work according to the Modelica-specification. Do you have a compliance list for Modelica functions etc?

Oh thanks Willi.

Could you please give an example where these options are set. Is it possible to activate them from the GUI?

thanks,

Patrik

Hey,

I have a couple of questions regarding the structural analysis and some general compiler things.

Does OM apply the BLT equations sorting algorithm by Tarjan? Is this default?

Does OM apply some more structural analysis within the BLT-blocks, e.g. Tearing?

Finally how can I output information about a compiled model? There is a model that gives different simulation results depending on the which order the equations are written. (Both results are wrong).

Thanks Alot!

Best,

patrik

Mar-13-12 11:20:13
Cannot import FMUs generated from OM, Dymola or FMU-SDK

FYI,
the FMU-import does also work in the GUI. The only thing is that you HAVE to provide an extract folder even though it says "optional". I might be a good thing to either make it optional or just to remove that false information.

/Patrik

Feb-23-12 18:59:32
Cannot import FMUs generated from OM, Dymola or FMU-SDK

Never mind, I found out the answer.

/Patrik

Feb-14-12 17:53:47
Cannot import FMUs generated from OM, Dymola or FMU-SDK

Hey,

just noticed that it didn't work for the fmu exported with FMI-SDK. (forgot to invoke clear() last time).

Best,

Patrik

Feb-14-12 13:45:07
Cannot import FMUs generated from OM, Dymola or FMU-SDK

It works now, thanks!

I used the GUI-before, I'm new to OpenModelica and just assumed that this wouldn't imply any unexpected issues.

I was pleased to see that the FMU-import works even without a .lib file included. (Currently this is a demand when importing FMUs in Dymola).

Does there exist any document about the FMI-status for OM? Is it e.g., possible to connect different FMU's together?, can OM handle state-events? etc.

Best,

Patrik

Feb-14-12 12:42:00
Cannot import FMUs generated from OM, Dymola or FMU-SDK

I get the same error message as before current/sad


/patrik

Feb-14-12 12:31:24
Cannot import FMUs generated from OM, Dymola or FMU-SDK

Ok thanks! I'm on it. I'll return with info once it's up and running.

/patrik

Feb-14-12 12:01:23
Cannot import FMUs generated from OM, Dymola or FMU-SDK

Dear all,

I'm running into problems when trying to import (load) FMUs into OM. I get the error message "Could not open file /fmuImport.log."
I've tried to import FMUs generated from OM, Dymola, JM and FMU-SDK. I get the same error in all cases.

(I use r11033, on windows 7 64bit)

thanks!


PS. I posted a similar post under the development thread, it suites better here though. My bad.

Feb-13-12 13:47:29
Importing the .fmu-examples from FMI-SDK
Category: Developer

To be a bit more specific..., it seems to be looking for a logfile during the import.

Feb-13-12 12:25:40
Importing the .fmu-examples from FMI-SDK
Category: Developer

As I have understood the FMU-import is rather limited in the current revision of OM. I'm having problems importing the simple examples that are included in FMI-SDK package from www.modelisar.com.
Have anyone tried to import those fmus? Does it work for you? If not, is this a general problem?, and if so, what is hindering the import? Do I need to include some extra stuff when compiling the models into fmus?

Thanks alot!

  • Index
  • » Users
  • » pmeijer
  • » Profile
You are here: