- Index
- » Users
- » eelab
- » Profile
Posts
Posts
Thank you for your hard work last month, last error has been away.
Here comes another problem with this model by using OpenModelica-revision-6881.msi today.
here are the logs, It seems no "ERROR" defined before.
Thank you.
<jtest.log>
g++ -I"C:\OpenModelica1.5.1/include/omc" -msse2 -mfpmath=sse -I. -o jktest.exe jktest.cpp -L"D:/omc/testjk/Modelica" -lsim -L"C:\OpenModelica1.5.1/lib/omc" -lc_runtime -lf2c -linteractive -lsendData -lQtNetwork-mingw -lQtCore-mingw -lQtGui-mingw -luuid -lole32 -lws2_32
jktest.cpp: In function `int functionDAE_output()':
jktest.cpp:1143: error: `ERROR' was not declared in this scope
jktest.cpp:1143: error: expected `;' before "tmp30"
jktest.cpp:1147: warning: converting to `modelica_integer' from `double'
jktest.cpp:1149: error: `$PD$PTables$PNotTable' was not declared in this scope
jktest.cpp:1150: warning: converting to `modelica_integer' from `double'
jktest.cpp:1152: error: `$PD$PTables$PAndTable' was not declared in this scope
jktest.cpp:1152: error: cannot convert `double*' to `integer_array_t*' for argument `1' to `modelica_integer integer_get(integer_array_t*, size_t)'
jktest.cpp:1152: error: cannot convert `double*' to `integer_array_t*' for argument `1' to `modelica_integer integer_get(integer_array_t*, size_t)'
jktest.cpp:1152: error: cannot convert `double*' to `integer_array_t*' for argument `1' to `modelica_integer integer_get(integer_array_t*, size_t)'
jktest.cpp:1152: error: cannot convert `double*' to `integer_array_t*' for argument `1' to `modelica_integer integer_get(integer_array_t*, size_t)'
jktest.cpp:1153: warning: converting to `modelica_integer' from `double'
jktest.cpp:1155: error: cannot convert `double*' to `integer_array_t*' for argument `1' to `modelica_integer integer_get(integer_array_t*, size_t)'
...
<jktest.cpp>
from line 1141
modelica_boolean tmp28;
modelica_boolean tmp29;
expTypeFromExpFlag:ERROR tmp30;
mem_state = get_memory_state();
$Pclock$Pt_width = (($Pclock$Pperiod * $Pclock$Pwidth) / 100.0);
tmp0 = pre($PjKFF$PNot1$Pauxiliary);
$PjKFF$PNot1$Py = tmp0;
$PjKFF$PNot1$Pauxiliary = (*integer_array_element_addr(&(*integer_array_element_addr(&$PD$PTables$PNotTable, 1, $PjKFF$PNot1$Px)), 1, $PjKFF$PNot1$Px));
tmp1 = pre($PjKFF$PAnd4$Pauxiliary$lB2$rB);
$PjKFF$PRS1$Pr = tmp1;
$PjKFF$PAnd4$Pauxiliary$lB2$rB = (*integer_array_element_addr(&(*integer_array_element_addr(&$PD$PTables$PAndTable, 2, integer_get(&$PjKFF$PAnd4$Pauxiliary, 0), integer_get(&$PjKFF$PAnd4$Px, 1))), 2, integer_get(&$PjKFF$PAnd4$Pauxiliary, 0), integer_get(&$PjKFF$PAnd4$Px, 1)));
tmp2 = pre($PjKFF$PAnd3$Pauxiliary$lB2$rB);
$PjKFF$PRS1$Ps = tmp2;
$PjKFF$PAnd3$Pauxiliary$lB2$rB = (*integer_array_element_addr(&(*integer_array_element_addr(&$PD$PTables$PAndTable, 2, integer_get(&$PjKFF$PAnd3$Pauxiliary, 0), integer_get(&$PjKFF$PAnd3$Px, 1))), 2, integer_get(&$PjKFF$PAnd3$Pauxiliary, 0), integer_get(&$PjKFF$PAnd3$Px, 1)));
tmp3 = pre($PjKFF$PAnd2$Pauxiliary$lB3$rB);
$PjKFF$PRS2$Pr = tmp3;
$PjKFF$PAnd2$Pauxiliary$lB3$rB = (*integer_array_element_addr(&(*integer_array_element_addr(&$PD$PTables$PAndTable, 2, integer_get(&$PjKFF$PAnd2$Pauxiliary, 1), integer_get(&$PjKFF$PAnd2$Px, 2))), 2, integer_get(&$PjKFF$PAnd2$Pauxiliary, 1), integer_get(&$PjKFF$PAnd2$Px, 2)));
$PjKFF$PAnd2$Pauxiliary$lB2$rB = (*integer_array_element_addr(&(*integer_array_element_addr(&$PD$PTables$PAndTable, 2, integer_get(&$PjKFF$PAnd2$Pauxiliary, 0), integer_get(&$PjKFF$PAnd2$Px, 1))), 2, integer_get(&$PjKFF$PAnd2$Pauxiliary, 0), integer_get(&$PjKFF$PAnd2$Px, 1)));
tmp4 = pre($PjKFF$PAnd1$Pauxiliary$lB3$rB);
$PjKFF$PRS2$Ps = tmp4;
$PjKFF$PAnd1$Pauxiliary$lB3$rB = (*integer_array_element_addr(&(*integer_array_element_addr(&$PD$PTables$PAndTable, 2, integer_get(&$PjKFF$PAnd1$Pauxiliary, 1), integer_get(&$PjKFF$PAnd1$Px, 2))), 2, integer_get(&$PjKFF$PAnd1$Pauxiliary, 1), integer_get(&$PjKFF$PAnd1$Px, 2)));
$PjKFF$PAnd1$Pauxiliary$lB2$rB = (*integer_array_element_addr(&(*integer_array_element_addr(&$PD$PTables$PAndTable, 2, integer_get(&$PjKFF$PAnd1$Pauxiliary, 0), integer_get(&$PjKFF$PAnd1$Px, 1))), 2, integer_get(&$PjKFF$PAnd1$Pauxiliary, 0), integer_get(&$PjKFF$PAnd1$Px, 1)));
tmp5 = pre((*integer_array_element_addr(&(*integer_array_element_addr(&$PD$PTables$PNotTable, 1, integer_get(&$PjKFF$PRS2$PNor2$Pauxiliary, 1))), 1, integer_get(&$PjKFF$PRS2$PNor2$Pauxiliary, 1))));
$PjKFF$PRS2$Pq = tmp5;
sjoelund.se wrote:
Error: Too few equations, underdetermined system. The model has 4 equation(s) and 12 variable(s)
It flattens without errors using:
$ OPENMODELICAHOME=/usr OPENMODELICALIBRARY=/home/marsj/dev/sjoelund-functiontree/libraries/msl31/ omc a.mo Modelica
What version of OpenModelica are you using? Per recently made some fixes regarding the Digital examples.
Thank you, sjoelund and Adrian !
I got the error now as sjoelund shows after installing the OpenModelica-revision-6464.msi.
But I could simulate the same model in Demola 7.0 which gave the right result, what can i do in OpenModelica?
i am using OpenModelica 1.5.0 with SimForge-0.9.0RC1 on Windows XP
Dear all,
I got the same problem when i use the digital lib in Electrical simulation.
the model is as follows:
model jktest
annotation(Diagram(coordinateSystem(extent = {{ -100, -100},{100,100}})));
annotation(uses(Modelica(version = "3.1")), Diagram(graphics));
Modelica.Electrical.Digital.Examples.Utilities.JKFF jKFF annotation(Placement(transformation(origin = { -36.0,44.0}, extent = {{ -46.0,34.0},{ -26.0,54.0}}), iconTransformation(origin = { -36.0,44.0}, extent = {{ -46.0,34.0},{ -26.0,54.0}})));
Modelica.Electrical.Digital.Sources.Set set(x = Modelica.Electrical.Digital.Interfaces.Logic.'1') annotation(Placement(transformation(origin = { -96.0,50.0}, extent = {{ -106.0,40.0},{ -86.0,60.0}}), iconTransformation(origin = { -96.0,50.0}, extent = {{ -106.0,40.0},{ -86.0,60.0}})));
Modelica.Electrical.Digital.Sources.Clock clock(period = 0.4) annotation(Placement(transformation(origin = { -96.0,20.0}, extent = {{ -106.0,10.0},{ -86.0,30.0}}), iconTransformation(origin = { -96.0,20.0}, extent = {{ -106.0,10.0},{ -86.0,30.0}})));
equation
connect(jKFF.j,set.y) annotation(Line(points = {{ -46.0,51.0},{ -70.0,51.0},{ -70.0,50.0},{ -86.0,50.0}}, color = {127,0,127}));
connect(jKFF.k,set.y) annotation(Line(points = {{ -46.0,37.0},{ -70.0,37.0},{ -70.0,50.0},{ -86.0,50.0}}, color = {127,0,127}));
connect(clock.y,jKFF.clk) annotation(Line(points = {{ -86.0,20.0},{ -68.0,20.0},{ -68.0,44.0},{ -46.0,44.0}}, color = {127,0,127}));
end jktest;
>> checkModel(jktest)
>> "Error: Error occured while flattening model jktest
"
>> instantiateModel(jktest)
>> "# Restriction violation: #getStateName failed# is not a CONNECTOR
# Restriction violation: #getStateName failed# is not a CONNECTOR
- Inst.instClassdef failed
class :Modelica.Electrical.Digital.Interfaces.DigitalSignal
- Inst.instClassdef failed
class :Modelica.Electrical.Digital.Interfaces.DigitalInput
- Inst.instClass: DigitalInput failed
- Inst.instVar2 failed: jKFF.j()
Scope: Modelica.Electrical.Digital.Interfaces
- Inst.instVar failed while instatiating variable: jKFF.j in scope: Modelica.Electrical.Digital.Interfaces
- Inst.instElement failed: COMPONENT(j in/out: mod: tp: D.Interfaces.DigitalInput var :VAR)
Scope: Modelica.Electrical.Digital.Examples.Utilities.JKFF
- Inst.instClassdef failed
class :Modelica.Electrical.Digital.Examples.Utilities.JKFF
- Inst.instClass: JKFF failed
- Inst.instVar2 failed: <Prefix.NOPRE()>.jKFF()
Scope: Modelica.Electrical.Digital.Examples.Utilities
- Inst.instVar failed while instatiating variable: jKFF in scope: Modelica.Electrical.Digital.Examples.Utilities
- Inst.instElement failed: COMPONENT(jKFF in/out: mod: tp: Modelica.Electrical.Digital.Examples.Utilities.JKFF var :VAR)
Scope: jktest
- Inst.instClassdef failed
class :jktest
- Inst.instClass: jktest failed
Inst.instClassInProgram failed
/*- CevalScript.cevalGenerateFunctionDAEs failed( instantiateModel )*/
/*- CevalScript.cevalGenerateFunction failed(instantiateModel)*/
# Restriction violation: #getStateName failed# is not a CONNECTOR
# Restriction violation: #getStateName failed# is not a CONNECTOR
- Inst.instClassdef failed
class :Modelica.Electrical.Digital.Interfaces.DigitalSignal
- Inst.instClassdef failed
class :Modelica.Electrical.Digital.Interfaces.DigitalInput
- Inst.instClass: DigitalInput failed
- Inst.instVar2 failed: jKFF.j()
Scope: Modelica.Electrical.Digital.Interfaces
- Inst.instVar failed while instatiating variable: jKFF.j in scope: Modelica.Electrical.Digital.Interfaces
- Inst.instElement failed: COMPONENT(j in/out: mod: tp: D.Interfaces.DigitalInput var :VAR)
Scope: Modelica.Electrical.Digital.Examples.Utilities.JKFF
- Inst.instClassdef failed
class :Modelica.Electrical.Digital.Examples.Utilities.JKFF
- Inst.instClass: JKFF failed
- Inst.instVar2 failed: <Prefix.NOPRE()>.jKFF()
Scope: Modelica.Electrical.Digital.Examples.Utilities
- Inst.instVar failed while instatiating variable: jKFF in scope: Modelica.Electrical.Digital.Examples.Utilities
- Inst.instElement failed: COMPONENT(jKFF in/out: mod: tp: Modelica.Electrical.Digital.Examples.Utilities.JKFF var :VAR)
Scope: jktest
- Inst.instClassdef failed
class :jktest
- Inst.instClass: jktest failed
Inst.instClassInProgram failed
"
- Index
- » Users
- » eelab
- » Profile