schema: EconSchema
aspectRatio: 1.5
params:
- name: Q
value: 10
min: 10
max: 20
round: 0.1
- name: e
value: 0
min: -5
max: 7
round: 0.1
- name: a
value: 0.5
min: 0.1
max: 1
round: 0.01
calcs:
CMg: ((16.14-(2.4(params.Q))+(0.208(params.Q)^(2))))
DEM: ((80-2(params.Q)+params.e))
CMg2: ((16.14-(2.4(25))+(0.208(25)^(2))))
D: ((80-2(35)+params.e))
RMg: ((80-4(18)+(params.e)))
RT: ((params.Q)*(calcs.DEM))
CT: ((16.14(params.Q))-(1.2(params.Q)^(2))+(0.069333(params.Q)^(3)))
pi: (calcs.RT-calcs.CT)
layout:
OneGraphPlusSidebar:
graph:
xAxis:
min: 0
max: 50
ticks: 4
yAxis:
min: 0
max: 100
ticks: 4
objects:
#Curva de Demanda
- Curve:
fn: "(80-2x+params.e)"
ind: x
color: blue
min: 0
max: 180
lineStyle: solid
strokeWidth: 4
samplePoints: 250
#Curva de Receita Marginal
- Curve:
fn: "(80-4x+params.e)"
ind: x
color: blue
strokeWidth: 2.5
lineStyle: dashed
samplePoints: 300
#Curva de Custo Marginal
- Curve:
fn: "(16.14-2.4x+0.208x^(2))"
ind: x
color: red
strokeWidth: 4
samplePoints: 300
- Segment:
a: [0, 100]
b: [0, 100]
color: black
bgcolor: white
label:
text: P
position: r
- Segment:
a: [50, 0]
b: [50, 0]
color: black
bgcolor: white
label:
text: Q
position: t
- Segment:
a: [0, calcs.CMg]
b: [params.Q, calcs.CMg]
color: green
strokeWidth: 3
lineStyle: dashed
- Segment:
a: [params.Q, calcs.CMg]
b: [params.Q, 0]
color: green
strokeWidth: 3
lineStyle: dashed
- Segment:
a: [params.Q, calcs.CMg]
b: [params.Q, calcs.DEM]
color: supply
strokeWidth: 3
lineStyle: dashed
- Segment:
a: [0, calcs.DEM]
b: [params.Q, calcs.DEM]
color: supply
strokeWidth: 4
lineStyle: solid
- Segment:
a: [0, calcs.DEM]
b: [0, calcs.DEM]
color: black
bgcolor: "'#FFCC90'"
label:
text: "`(\\\\$)\\\\ ${calcs.DEM.toFixed(1)}`"
position: r
- Segment:
a: [0.7,calcs.CMg]
b: [0.7,calcs.DEM]
color: blue
bgcolor: none
strokeWidth: 3
endArrow: true
label:
text: MarkUp
position: r
fontSize: 10
- Segment:
a: [params.Q, 0]
b: [params.Q, 0]
color: black
bgcolor: green
label:
text: params.Q.toFixed(1)
position: t
- Area:
fn1: "((80-2x+params.e))"
fn2: "(16.14-2.4x+0.208x^(2))"
fill: grey
opacity: 0.8
min: params.Q
max: 19
- Area:
fn1: "(16.14-2.4x+0.208x^(2))"
fn2: "((80-2x+params.e))"
fill: red
show: (params.Q>19)
opacity: 0.4
min: 19
max: params.Q
- Area:
fn1: "(calcs.CMg)"
fn2: "(16.14-2.4x+0.208x^(2))"
fill: green
opacity: 0.4
min: 0
max: params.Q
- Area:
fn1: "(calcs.DEM)"
fn2: "calcs.CMg"
fill: supply
opacity: 0.4
min: 0
max: params.Q
- Area:
fn1: "(16.14-2.4x+0.208x^(2))"
fill: red
opacity: 0.4
min: 0
max: params.Q
- Label:
coordinates: [((17+params.Q)/2),(calcs.DEM+calcs.CMg)/2]
text: DWL
bgcolor: grey
color: white
fontSize: 10
position: b4
show: (params.Q < 19)
- Label:
coordinates: [37,50]
text: "`Lucro: \\\\pi=RT-CT\\\\\\\\ \\\\pi=(\\\\$)\\\\ ${calcs.RT.toFixed(2)}- (\\\\$)\\\\ ${calcs.CT.toFixed(2)}\\\\\\\\ \\\\pi=(\\\\$)\\\\ ${calcs.pi.toFixed(2)}`"
bgcolor: "'#1f77b4'"
color: white
fontSize: 10
position: b
- Segment:
a: [36, calcs.D]
b: [36, calcs.D]
color: white
bgcolor: "'#1f77b4'"
label:
text: "`DEM: P(Q)`"
position: l
- Segment:
a: [19, calcs.RMg]
b: [19, calcs.RMg]
color: white
bgcolor: "'#1f77b4'"
label:
text: RMg
position: l
- Segment:
a: [25, calcs.CMg2]
b: [25, calcs.CMg2]
color: white
bgcolor: "'#d62728'"
label:
text: CMg
position: l
- Segment:
a: [0, calcs.CMg]
b: [0, calcs.CMg]
color: black
bgcolor: green
label:
text: "`(\\\\$)\\\\ ${calcs.CMg.toFixed(1)}`"
position: r
- Point:
coordinates: [params.Q, calcs.CMg]
color: black
r: 5
- Point:
coordinates: [params.Q, calcs.DEM]
color: black
r: 5
sidebar:
controls:
- title: Maximização de Lucro Monopólio
sliders:
- param: Q
label: Q
digits: 4
- param: e
label: \\e
digits: 4