15
DSE using Alloy Project part

DSE using Alloy Project part. 1 Contents Assignment Meta-modeling using Alloy Creating solutions using Alloy Exporting solutions to Modelica Simulation

Embed Size (px)

Citation preview

Page 1: DSE using Alloy Project part. 1 Contents Assignment Meta-modeling using Alloy Creating solutions using Alloy Exporting solutions to Modelica Simulation

DSE using AlloyProject part

Page 2: DSE using Alloy Project part. 1 Contents Assignment Meta-modeling using Alloy Creating solutions using Alloy Exporting solutions to Modelica Simulation

2

Contents

• Assignment

• Meta-modeling using Alloy

• Creating solutions using Alloy

• Exporting solutions to Modelica

• Simulation

Page 3: DSE using Alloy Project part. 1 Contents Assignment Meta-modeling using Alloy Creating solutions using Alloy Exporting solutions to Modelica Simulation

3

Assignment

Page 4: DSE using Alloy Project part. 1 Contents Assignment Meta-modeling using Alloy Creating solutions using Alloy Exporting solutions to Modelica Simulation

4

Assignment

Page 5: DSE using Alloy Project part. 1 Contents Assignment Meta-modeling using Alloy Creating solutions using Alloy Exporting solutions to Modelica Simulation

5

Meta-modeling using Alloyone sig Filter{

input : InputNode,

output : OutputNode,

mass : MassNode,

circuit : set Component

}some sig CompLink {

fromC : NegNode,

toC : PosNode

}

abstract sig Component {

pos : one PosNode,

neg : one NegNode

}

abstract sig Resistor, Capacitor extends Component {

value : Int

}

//Resistor of 12 Ohm

sig Resistor12 extends Resistor {

}

{ //Appended fact => constraint: value of the resistor

value = 12

}

Page 6: DSE using Alloy Project part. 1 Contents Assignment Meta-modeling using Alloy Creating solutions using Alloy Exporting solutions to Modelica Simulation

6

Meta-modeling using Alloy

• Constrain by using facts:- Floating components- Floating nodes- Self links- Duplicate links- Not linked nodes

Page 7: DSE using Alloy Project part. 1 Contents Assignment Meta-modeling using Alloy Creating solutions using Alloy Exporting solutions to Modelica Simulation

7

Work flow

Page 8: DSE using Alloy Project part. 1 Contents Assignment Meta-modeling using Alloy Creating solutions using Alloy Exporting solutions to Modelica Simulation

8

Creating solutions using Alloy

Page 9: DSE using Alloy Project part. 1 Contents Assignment Meta-modeling using Alloy Creating solutions using Alloy Exporting solutions to Modelica Simulation

9

Work flow

Page 10: DSE using Alloy Project part. 1 Contents Assignment Meta-modeling using Alloy Creating solutions using Alloy Exporting solutions to Modelica Simulation

10

Exporting solutions to Modelica

• Parser1. Retrieve the filters2. For each filter, retrieve its components3. For each filter, retrieve the links

=> Stored in multi-dimensional arrays

Page 11: DSE using Alloy Project part. 1 Contents Assignment Meta-modeling using Alloy Creating solutions using Alloy Exporting solutions to Modelica Simulation

11

Exporting solutions to Modelica

• Creation of the Modelica-file1. Look-up table

[‘Resistor100$0', '100', `PosNode$1', 'NegNode$0']

[‘R1', '100', `R1.p', ‘R1.n']

2. Creation of the dynamic part 3. Creation of the static part

Page 12: DSE using Alloy Project part. 1 Contents Assignment Meta-modeling using Alloy Creating solutions using Alloy Exporting solutions to Modelica Simulation

12

Work flow

Page 13: DSE using Alloy Project part. 1 Contents Assignment Meta-modeling using Alloy Creating solutions using Alloy Exporting solutions to Modelica Simulation

13

Simulation

Vsource = 220V @ 10 Hz Vsource = 220V @ 100 Hz

Page 14: DSE using Alloy Project part. 1 Contents Assignment Meta-modeling using Alloy Creating solutions using Alloy Exporting solutions to Modelica Simulation

14

Future work

• Reduce the human interaction- Alloy API- Jmodelica Python Interpreter

• Integrate performance measurement

Page 15: DSE using Alloy Project part. 1 Contents Assignment Meta-modeling using Alloy Creating solutions using Alloy Exporting solutions to Modelica Simulation

15