Opened 8 years ago
Closed 8 years ago
#4686 closed defect (fixed)
Problems with C-code generated from NF regarding boolean variables
| Reported by: | Francesco Casella | Owned by: | Per Östlund |
|---|---|---|---|
| Priority: | high | Milestone: | 2.0.0 |
| Component: | New Instantiation | Version: | |
| Keywords: | Cc: |
Description
The following error is reported:
Modelica_3.2.2_Modelica.Electrical.Analog.Examples.SwitchWithArc_02nls.c:45:94: error: no member named 'nominal' in 'struct BOOLEAN_ATTRIBUTE'
sysData->nominal[i] = data->modelData->booleanVarsData[3].attribute /* switch2.quenched */.nominal;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
Modelica_3.2.2_Modelica.Electrical.Analog.Examples.SwitchWithArc_02nls.c:46:94: error: no member named 'min' in 'struct BOOLEAN_ATTRIBUTE'
sysData->min[i] = data->modelData->booleanVarsData[3].attribute /* switch2.quenched */.min;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
Modelica_3.2.2_Modelica.Electrical.Analog.Examples.SwitchWithArc_02nls.c:47:94: error: no member named 'max' in 'struct BOOLEAN_ATTRIBUTE'
sysData->max[i++] = data->modelData->booleanVarsData[3].attribute /* switch2.quenched */.max;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
3 errors generated.
In fact, switch2.quenched has type Boolean, so it doesn't have max, min, nor nominal attributes. Why is the gnerated code referring to that?
Note:
See TracTickets
for help on using tickets.

Fixed as of 07-02-2018, the reported model simulates and verifies successfully