Indonesia Cap-Trade-Tax mechanisme
No preview image
Model was written in NetLogo 6.4.0
•
Viewed 95 times
•
Downloaded 1 time
•
Run 0 times
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
Comments and Questions
Click to Run Model
globals [ carbon-price ; ETS carbon price government-penalty ; Penalty value RR ; Rate of carbon reduction delta-output ; Threshold for output changes theta ; Threshold for selling carbon allowances ] turtles-own [ firm-emissions ; Firm emissions specific to each turtle carbon-allowances ; Carbon allowances specific to each turtle mac ; Marginal abatement cost specific to each turtle emission-trade? ; Boolean: True if the firm is trading carbon emission-reduce? ; Boolean: True if the firm is reducing emissions penalty-accepted? ; Boolean: True if the firm accepts the penalty carbon_int ; Emission intensity of the firm (tCO2/MWh) output ; Output value of the firm (MWh) carbon_emi ; Yearly carbon emissions (tCO2) bal ; Carbon balance (carbon emissions minus allowances) pro ; Current profit Cat ; Industry category (A, B, C, or D) Tec_D ; Decision to invest in carbon reduction technology Trade_D ; Decision to trade, store, or accept penalty A_next ; Allowance for the next year ] to setup-world clear-all ;; Create market zones: e.g., green = buy zone, red = penalty zone, blue = sell zone ask patches [ if pxcor < -5 [ set pcolor green ; Buy zone ] if pxcor > 5 [ set pcolor blue ; Sell zone ] if pxcor >= -5 and pxcor <= 5 [ set pcolor red ; Penalty zone ] ] end to setup clear-all setup-world set-default-shape turtles "circle" set theta 0.1 ; Example threshold for selling allowances ;; Create 50 firms (turtles) create-turtles 50 [ set color one-of [green blue red] ; Random color for now set shape "circle" ; Set the shape of the firms set size 2 ; Make turtles bigger so they are visible setxy random-xcor random-ycor ; Randomly position turtles set Cat one-of ["A" "B" "C" "D"] ; Set random industry category industry-values ; Set initial values based on industry category set firm-emissions initial-firm-emissions ; Using slider value set carbon-allowances initial-carbon-allowances ; Using slider value set carbon_emi output * carbon_int ; Initial carbon emissions set carbon-allowances (carbon_emi * RR) ; Allowance is based on reduction target set bal carbon_emi - carbon-allowances ; Initial carbon balance set pro random 1000 ; Placeholder for profit set A_next carbon-allowances ; Initial next year's allowance set emission-trade? false set emission-reduce? false set penalty-accepted? false set Tec_D false ; Initially no investment in carbon reduction set Trade_D "none" ; No trading decision at the start ;; Set initial RR (for example, starting at 1.0, or 100%) set RR 1.0 ] ;; Set default values for carbon price and penalty set carbon-price slider-carbon-price ; Example default carbon price set government-penalty slider-government-penalty ; Example penalty for exceeding allowances reset-ticks end to industry-values ; Set the firm-specific values based on the industry category if Cat = "A" [ set mac 392.7 * (5 / 6.6) ; MAC for Type A set carbon_int 0.911 ; Emission intensity for Type A set output random 2000000 + 400000 ; Random output for Type A ] if Cat = "B" [ set mac 392.7 * (10 / 11.06) ; MAC for Type B set carbon_int 1.011 ; Emission intensity for Type B set output random 1500000 + 300000 ; Random output for Type B ] if Cat = "C" [ set mac 392.7 * (15 / 15.61) ; MAC for Type C set carbon_int 1.089 ; Emission intensity for Type C set output random 1000000 + 200000 ; Random output for Type C ] if Cat = "D" [ set mac 392.7 * (20 / 19.25) ; MAC for Type D set carbon_int 1.297 ; Emission intensity for Type D set output random 1000000 + 100000 ; Random output for Type D ] end to go ;; Firms make decisions and interact in the market ask turtles [ make-decisions calculate-carbon-balance make-trade-or-penalty-decisions ] ;; Reduce RR by 2% every tick set RR RR * 0.98 ; Decrease RR by 2% ;; Update the movement and visualization based on decisions move-firms update-firm-visualization ;; Gradually adjust emissions (simulate production and reduction over time) ask turtles [ if emission-reduce? [ set firm-emissions firm-emissions * 0.98 ; Decrease emissions by 2% if reducing emissions ] set firm-emissions firm-emissions * 1.01 ; Increase emissions by 1% due to production ] ;; Plot and other updates update-carbon-price update-decision-plot tick end ; Calculate the carbon emissions and decide whether to reduce emissions to make-decisions let predicted-emissions output * carbon_int ; Calculate emissions based on output and intensity ;; Condition 1: Reduce emissions if MAC is less than carbon price and firm is not already reducing if (mac < carbon-price) and (not emission-reduce?) [ set Tec_D true ; Invest in technology to reduce emissions set emission-reduce? true ; Mark that the firm is reducing emissions reduce-emissions ] if (emission-reduce? and firm-emissions <= carbon-allowances) [ set emission-reduce? false ; Stop reducing emissions when under allowance ] end to reduce-emissions set firm-emissions (firm-emissions - random-float 2) ; Reduce emissions by a random factor end ; Calculate carbon balance (Eq. 4) to calculate-carbon-balance set carbon_emi output * carbon_int ; Calculate actual carbon emissions set carbon-allowances carbon_emi * RR ; Allowances decrease based on RR set bal carbon_emi - carbon-allowances ; Calculate carbon balance end ; Make decisions on trading or accepting penalties based on carbon balance to make-trade-or-penalty-decisions ;; Check if emissions exceed allowance if (bal > 0) [ ;; Calculate purchase cost and penalty cost let purchase-cost bal * carbon-price let penalty-cost bal * government-penalty ; Penalty is proportional to excess emissions ;; Print the costs for debugging purposes print (word "Turtle " who " - Purchase Cost: " purchase-cost " vs Penalty Cost: " penalty-cost) ;; Condition 3: Buy allowances if it's cheaper than the penalty ifelse (purchase-cost < penalty-cost) [ set Trade_D "buy" trade-carbon set penalty-accepted? false print (word "Turtle " who " is buying allowances.") ] [ ;; Condition 4: Accept penalty if buying allowances is more expensive set penalty-accepted? true set Trade_D "none" print (word "Turtle " who " is accepting penalty.") ] ] ;; Condition 5 & 6: Sell or store extra allowances if emissions are below allowance ifelse ((abs(bal) > (A_next - carbon-allowances)) and (abs(bal) * carbon-price > pro * theta)) [ set Trade_D "sell" sell-allowances print (word "Turtle " who " is selling allowances.") ] [ ;; Condition 6: Store allowances for the next period if selling is not profitable set Trade_D "store" print (word "Turtle " who " is storing allowances.") ] end ; Procedure to trade allowances (buy or sell) to trade-carbon if (Trade_D = "buy") [ set carbon-allowances (carbon-allowances + random-float 1) ; Buy allowances set pro (pro - carbon-price * bal) ; Decrease profit by the cost of allowances ] end to sell-allowances set carbon-allowances (carbon-allowances - random-float 1) ; Sell extra allowances set pro (pro + carbon-price * abs(bal)) ; Increase profit by selling allowances end to trade-between-firms ask turtles with [Trade_D = "buy"] [ let seller one-of turtles with [Trade_D = "sell"] if seller != nobody [ ; Execute trade (exchange allowances and update profit) ask seller [ set carbon-allowances carbon-allowances - 1 set pro pro + carbon-price ] set carbon-allowances carbon-allowances + 1 set pro pro - carbon-price ] ] end ; Apply penalty to firms that exceed their carbon allowances to apply-penalty if (penalty-accepted?) [ set pro (pro - government-penalty) ] end ; Procedure to update carbon price based on trading activity to update-carbon-price ; Carbon price influenced by trading decisions, emissions, and supply-demand dynamics ;; Calculate the number of firms buying and selling allowances let total-buyers count turtles with [Trade_D = "buy"] let total-sellers count turtles with [Trade_D = "sell"] let total-traded total-buyers + total-sellers ; Total market activity (both buying and selling) ;; Adjust carbon price based on market supply and demand (buyers increase, sellers decrease) let price-adjustment (total-buyers - total-sellers) * 0.1 ; Small adjustment factor ;; Calculate total emissions (sum of all firm emissions) let total-emissions sum [firm-emissions] of turtles ;; Add random fluctuation to simulate market volatility let random-fluctuation (random-float 0.05) - 0.025 ; Random fluctuation between -0.025 and +0.025 ;; Update the carbon price based on trading, emissions, and market fluctuation set carbon-price (carbon-price + price-adjustment + (total-traded * 0.1) + (total-emissions * 0.001) + random-fluctuation) ;; Ensure the carbon price stays above a minimum value (e.g., 1.0) if carbon-price < 1.0 [ set carbon-price 1.0 ] ;; Print the new carbon price for debugging (optional) print (word "New carbon price: " carbon-price) end to update-visualization ask turtles [ ; Color and shape based on emissions status and decision to reduce emissions ifelse (firm-emissions > carbon-allowances) [ set shape "triangle" ; Firms with excess emissions become triangles set color red ; Indicating high emissions ] [ set shape "circle" ; Firms with low emissions stay as circles set color green ] ; Change color if the firm is trading carbon if (emission-trade?) [ set color yellow ; Firms that are actively trading become yellow ] ; Indicate if the firm has accepted a penalty if (penalty-accepted?) [ set color gray ; Firms that have accepted penalties become gray ] ] end to move-firms ask turtles [ ;; Move to buy zone if trading if Trade_D = "buy" [ let target-patch one-of patches with [pcolor = green] if target-patch != nobody [ move-to target-patch ] ] ;; Move to sell zone if selling if Trade_D = "sell" [ let target-patch one-of patches with [pcolor = blue] if target-patch != nobody [ move-to target-patch ] ] ;; Move to penalty zone if accepting penalty if penalty-accepted? [ let target-patch one-of patches with [pcolor = red] if target-patch != nobody [ move-to target-patch ] ] ] end to update-firm-visualization ask turtles [ ;; If firm is buying, turn blue and make it a square if Trade_D = "buy" [ set shape "square" set color blue ] ;; If firm is selling, turn green and make it a triangle if Trade_D = "sell" [ set shape "triangle" set color green ] ;; If firm accepts penalty, turn red and make it a circle if penalty-accepted? [ set shape "circle" set color red ] ;; If firm is compliant and not trading, keep it a gray circle if not penalty-accepted? and Trade_D = "none" [ set shape "circle" set color gray ] ] end to update-decision-plot set-current-plot "Firm Decisions" ; Select the plot ; Pen 1: Plot number of firms trading set-current-plot-pen "trade" ; Set the current pen to "trade" let num-trade count turtles with [Trade_D = "buy" or Trade_D = "sell"] plot num-trade ; Plot the number of firms trading ; Pen 2: Plot number of firms reducing emissions set-current-plot-pen "reduce" ; Set the current pen to "reduce" let num-reduce count turtles with [emission-reduce? = true] plot num-reduce ; Plot the number of firms reducing emissions ; Pen 3: Plot number of firms accepting penalties set-current-plot-pen "penalty" ; Set the current pen to "penalty" let num-penalty count turtles with [penalty-accepted? = true] plot num-penalty ; Plot the number of firms accepting penalties set-current-plot "Carbon Price Over Time" plot carbon-price ; Plot the carbon price over time end to update-profit ; Profit influenced by emissions, penalties, and trading if (emission-trade?) [ set pro (pro + random-float 100 - (carbon-price * firm-emissions)) ] end
There is only one version of this model, created 29 days ago by Anjar Adhiyoso.
Attached files
No files
This model does not have any ancestors.
This model does not have any descendants.
Anjar Adhiyoso
Market Mechanisme (Question)
Hi people!, this is my alpha build for system thinking project. i will be happy if someone can give me advice how turtle naturally moves in carbon markets. Thanks!
Posted 28 days ago