Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Practica 2

Model: Practica 2
Name Value
General
Java Package Name deposito
File Name F:\automatizacion1\Practica 2.alp

Active Object Class: Main


Name Value
Advanced
Additional Code double a=2;
Auto-create Datasets true
Recurrence 1
Dataset Samples To Keep 100
Make Default View Area false

Parameter: q
Name Value
General
Type double
Default Value 100
Editor
Editor Control TEXT_BOX

Page 1 of 7
Practica 2

Parameter: b
Name Value
General
Type double
Default Value 2
Editor
Editor Control TEXT_BOX

Flow Variable: Dy
Name Value
General
Formula q/a-sqrt(2*9.81*y)*b

Stock Variable: y
Name Value
General
Initial Value 20
Expression Dy

Statechart Entry Point: statechart

Transition: transition
Name Value
General
Trigger Type condition
Condition y<50

Transition: transition1
Name Value
General

Page 2 of 7
Practica 2

Name Value
Trigger Type condition
Condition y>100

State: lleno
Name Value
General
Entry Action q=0

State: vacío
Name Value
General
Entry Action q=1000

Time Plot: plot


Name Value
General
Time Window 100
Vertical Scale FIXED
Chart Vertical Scale: From 0
Chart Vertical Scale: To 120
Analysis Auto Update true
Recurrence 1
Dataset Samples To Keep 100
Advanced
x 140
y 360
Width 440
Height 230
Appearance
Show Legend true
Legend Place SOUTH
Label Format MODEL_TIME_UNITS

Plot Items:
Title Type Dataset / Value Point Style Color Line Width Interpolation
Dataset Title dataset dataset NONE green true 1 LINEAR

Data Set: dataset


Name Value
General
Axis Data Freeze X Axis true
Axis Data Vertical Y Axis y
Dataset Samples To Keep 100
Analysis Auto Update true
Recurrence 1

Page 3 of 7
Practica 2

Rectangle: rectangle
Name Value
General
Fill Color cyan
Advanced
x 280
y 340
Width 100
Height 91
Rotation 180.0
Dynamic
Dynamic: Height y

Rectangle: rectangle1
Name Value
General
Line Color gray
Line Width 3
Advanced
x 180
y 170
Width 100
Height 170

Slider: slider1
Name Value
General
Orientation HORIZONTAL
Default Value 0
Action b=value;
Advanced
x 300
y 190
Width 100
Height 30

Slider: slider2
Name Value
General
Orientation HORIZONTAL
Default Value 0
Action a=value
Advanced
x 300
y 250
Width 100

Page 4 of 7
Practica 2

Name Value
Height 30

Simulation Experiment: Simulation


Name Value
General
Active Object Class Main
Random Number Generation Type randomSeed
Advanced
Maximum Available Memory 64
Differention Equations Method EULER
Mixed Equations Method RK45_NEWTON
Algebraic Equations Method MODIFIED_NEWTON
Absolute Accuracy 1.0E-5
Time Accuracy 1.0E-5
Relative Accuracy 1.0E-5
Fixed Time Step 0.0010
Presentation Top Group Persistent true
Model Time
Model Time Units Minute
Stop Option Stop at specified time
Initial Time 0.0
Final Time 100.0
Presentation
CPU Time Balance ratio_1_2
Execution Mode realTimeScaled
Real Time Scale SCALE_1
Window
Title deposito : Simulation

Text: text
Name Value
Advanced
x 40
y 30
General
Alignment LEFT

Page 5 of 7
Practica 2

Name Value
Font Name Serif
Font Size 28
Bold Font Style true
Text Practica 2: DEPOSITO CON CARTA DE ESTADOS

Advanced
x 40
y 30

Text: text1
Name Value
Advanced
x 40
y 63
General
Alignment LEFT
Font Name Serif
Font Size 16
Italic Font Style true
Text Tenemos un deposito de agua de seccion "a" y altura "y" en el cual
se pretende que el nivel (la altura) no este entre 50 y 100.
-En el estado inicial el deposito permanece lleno es que el caudal
q=0
-La condicion de salida (transicion de salida) será que la altura
y<50
-El estado al que se pasa será vacío por lo que la acción de
entrada será que el caudal q=1000
-La condición de salida (transición del estado vacío al lleno) será
que y=100

NOTA: En este caso no tiene sentido utilizar los sliders, ya que el


volumen del depsoito esta controlado por los estados.
Advanced
x 40
y 63

Button: button
Name Value
General
Label Text Iniciar modelo
Action if ( getState() == IDLE )
run();
getEngine().getPresentation().setPresentable(
getEngine().getRoot() );
Advanced
Font Name Dialog
Font Size 11
x 40
y 220
Width 330
Height 30
Dynamic

Page 6 of 7
Practica 2

Name Value
Dynamic: Label getState() == IDLE ?
"Iniciar modelo" :
"Switch to Main view"

Page 7 of 7

You might also like