命令列介面
principle-viz 指令在命令列執行本手冊中的計算,並以 JSON 印出結果;--output 會另外寫成檔案。此指令不繪圖。可將其安裝為工具(詳見安裝命令列工具),或在專案中於指令前加上 uv run。
principle-viz equilibrium \
--demand-intercept 10 --demand-slope -1 \
--supply-intercept 2 --supply-slope 1
市場參數
多數指令以反函數形式 \(p = a + b Q\) 的兩條直線描述市場:
需求的價格截距 \(a\)。
需求的斜率 \(b\)。
供給的價格截距 \(a\)。
供給的斜率 \(b\)。
另將 JSON 寫入此檔案,並建立所需目錄。
指令
各指令對應的計算與選項如命令列指令;每個指令的計算說明見對應章節。
計算與其他選項 — 線性均衡
章節 — 線性市場
計算與其他選項 — 比較靜態:--demand-delta-intercept、--demand-delta-slope、--supply-delta-intercept、--supply-delta-slope
章節 — 比較靜態
計算與其他選項 — 離散市場:--demand-values、--supply-values、--price-rule {midpoint,lower,upper}
章節 — 離散市場
計算與其他選項 — 點彈性:--intercept、--slope、--quantity;加上 --q1、--p1 計算弧彈性
章節 — 彈性與總收益
計算與其他選項 — 彈性與總收益表:--samples
章節 — 彈性與總收益
計算與其他選項 — 剩餘:--policy {baseline,tax,subsidy,control} 與該政策的選項
章節 — 福利
計算與其他選項 — 單列無謂損失報表:--policy {tax,subsidy,control}、--csv
章節 — 福利
計算與其他選項 — --tax-type {fixed,per_unit,ad_valorem}、--amount、--tax-on {consumer,producer}
章節 — 租稅與補貼
計算與其他選項 — --amount、--subsidy-to {consumer,producer}
章節 — 租稅與補貼
計算與其他選項 — --control-type {ceiling,floor}、--control-price
章節 — 價格管制
計算與其他選項 — --world-price、--tariff、--import-quota、--quota-rent-recipient
章節 — 國際貿易
計算與其他選項 — --external-cost、--external-benefit
章節 — 市場失靈
計算與其他選項 — --congestion-cost
章節 — 市場失靈
計算與其他選項 — --benefit-intercepts、--benefit-slopes、--cost-intercept、--cost-slope、--samples
章節 — 市場失靈
計算與其他選項 — --labor-demand-*、--labor-supply-*、--minimum-wage
章節 — 勞動與可貸資金
計算與其他選項 — --savings-*、--investment-*、--savings-shift、--investment-shift、--government-borrowing
章節 — 勞動與可貸資金
計算與其他選項 — --x-intercept、--y-intercept、--curvature、--x-good、--y-good、--x-growth、--y-growth、--samples
章節 — 生產可能曲線
principle-viz <command> --help 列出指令的所有選項。
principle-viz tax \
--demand-intercept 10 --demand-slope -1 \
--supply-intercept 2 --supply-slope 1 \
--tax-type per_unit --amount 1 --tax-on producer
輸出包含未課稅的均衡(baseline_equilibrium)、課稅後的均衡(post_tax)與各項變動,與 compare_tax_scenario() 的回傳值相同:本例數量為 3.5,消費者價格 6.5,生產者價格 5.5。