diff --git a/ACT_Conveyance_Duty.ipynb b/ACT_Conveyance_Duty.ipynb index 32e7af2..3b53b19 100644 --- a/ACT_Conveyance_Duty.ipynb +++ b/ACT_Conveyance_Duty.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": 2, "outputs": [], "source": [ "%reload_ext jetisu.query_idr_magic" @@ -79,7 +79,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 3, "outputs": [ { "data": { @@ -111,7 +111,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 4, "outputs": [ { "data": { @@ -147,7 +147,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 5, "outputs": [ { "data": { @@ -181,7 +181,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 6, "outputs": [ { "data": { @@ -216,7 +216,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 7, "outputs": [ { "data": { @@ -249,7 +249,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 8, "outputs": [ { "data": { @@ -288,18 +288,19 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 9, "outputs": [ { - "name": "stderr", - "output_type": "stream", - "text": [ - "UsageError: Cell magic `%%sjetisu_show` not found.\n" - ] + "data": { + "text/plain": "", + "text/markdown": "```\n\npredicate units(var int:amount, \n var int:unit_size, \n var bool: round_up, \n var int:units ) = \nlet {\n constraint units = amount div unit_size + if round_up then amount mod unit_size > 0 else 0 endif;\n} in true;\n\n\n\npredicate act_conveyance_duty(var bool: non_commercial, \n var bool: eligible_owner_occupier, \n var int:price, \n var float:duty) = \nlet {\n constraint eligible_owner_occupier -> non_commercial;\n constraint price >= 0;\n constraint duty >= 0;\n var int: num_units;\n int: unit = 100;\n constraint duty = \n if non_commercial then\n if eligible_owner_occupier then\n if price > 0 /\\ price <=260000 \n /\\ units(price, unit, true, num_units) then num_units * 60 else \n if price > 260000 /\\ price <=300000 \n /\\ units(price-260000, unit, true, num_units) then 1560.00 + num_units * 2.20 else \n if price > 300000 /\\ price <=500000 \n /\\ units(price-300000, unit, true, num_units) then 2440.00 + num_units * 3.40 else \n if price > 500000 /\\ price <=750000 \n /\\ units(price-500000, unit, true, num_units) then 9240.00 + num_units * 4.32 else \n if price > 750000 /\\ price <=1000000 \n /\\ units(price-750000, unit, true, num_units) then 20040.00 + num_units * 5.90 else \n if price > 1000000 /\\ price <=1455000 \n /\\ units(price-1000000, unit, true, num_units) then 34790.00 + num_units * 6.40 else \n if price > 1445000 \n /\\ units(price, unit, true, num_units) then num_units * 4.54 \n else -1 endif endif endif endif endif endif endif\n else % not eligible_owner_occupier\n if price > 0 /\\ price <=200000 \n /\\ units(price, unit, true, num_units) then num_units * 120 else \n if price > 200000 /\\ price <=300000 \n /\\ units(price-200000, unit, true, num_units) then 2400.00 + num_units * 2.20 else \n if price > 300000 /\\ price <=500000 \n /\\ units(price-300000, unit, true, num_units) then 4600.00 + num_units * 3.40 else \n if price > 500000 /\\ price <=750000 \n /\\ units(price-500000, unit, true, num_units) then 11400.00 + num_units * 4.32 else \n if price > 750000 /\\ price <=1000000 \n /\\ units(price-750000, unit, true, num_units) then 22200.00 + num_units * 5.90 else \n if price > 1000000 /\\ price <=1455000 \n /\\ units(price-1000000, unit, true, num_units) then 36950.00 + num_units * 6.40 else \n if price > 1445000 \n /\\ units(price, unit, true, num_units) then num_units * 4.54 \n else -1 endif endif endif endif endif endif endif\n endif\n else % commercial\n if price > 0 /\\ price <= 1700000 then 0 else\n if price > 1700000 \n /\\ units(price, unit, true, num_units) then num_units * 5.00 else -1 endif endif\n endif\n} \nin true;\n```" + }, + "metadata": {}, + "output_type": "display_data" } ], "source": [ - "%%sjetisu_show\n", + "%%jetisu_show\n", "ACT_Conveyance_Duty" ], "metadata": { @@ -308,7 +309,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 9, "outputs": [], "source": [], "metadata": {