<calculator> <utility>
            <id><![CDATA[24]]></id>
                    <layout_preference><![CDATA[0]]></layout_preference>
                    <reset_button><![CDATA[0]]></reset_button>
                    <info_img><![CDATA[0]]></info_img>
                    <pdf_orientation><![CDATA[0]]></pdf_orientation>
                    <front_email><![CDATA[0]]></front_email>
                    <front_excel><![CDATA[0]]></front_excel>
                    <front_pdf><![CDATA[1]]></front_pdf>
                    <calculateonfly><![CDATA[0]]></calculateonfly>
                    <resultpopup><![CDATA[0]]></resultpopup>
                    <up_prefix><![CDATA[0]]></up_prefix>
                    <vm_product_type><![CDATA[0]]></vm_product_type>
                    <up_maxuploadfiles><![CDATA[100]]></up_maxuploadfiles>
                    <up_filesize><![CDATA[8]]></up_filesize>
                    <popupwidth><![CDATA[250]]></popupwidth>
                    <name><![CDATA[Electric vs Petrol Car Cost]]></name>
                    <thousand_number_format><![CDATA[,]]></thousand_number_format>
                    <decimal_number_format><![CDATA[.]]></decimal_number_format>
                    <date_frontend_format><![CDATA[%d-%m-%Y]]></date_frontend_format>
                    <sendemailform><![CDATA[]]></sendemailform>
                    <up_extensions><![CDATA[]]></up_extensions>
                    <up_mimetypes><![CDATA[]]></up_mimetypes>
                    <up_folder><![CDATA[]]></up_folder>
                    <info><![CDATA[]]></info>
                    <code><![CDATA[// Typical figures per car size: purchase price, consumption and yearly maintenance
$catalogue = [
    'compact' => ['p' => [22000, 6.2, 650], 'e' => [28000, 15.5, 380]],
    'family'  => ['p' => [30000, 7.1, 800], 'e' => [37000, 17.5, 460]],
    'suv'     => ['p' => [36000, 8.4, 950], 'e' => [45000, 20.5, 540]],
];
$car   = $catalogue[$segment] ?? $catalogue['compact'];
$n     = max(1, min(15, (int) $years));
$dist  = max(0, (float) $km);
$share = (float) $home_share / 100;
$kwh_price = $share * (float) $home_price + (1 - $share) * (float) $public_price;

[$pBuy, $pUse, $pMnt] = $car['p'];   // litres per 100 km
[$eBuy, $eUse, $eMnt] = $car['e'];   // kWh per 100 km
$pEnergy = $dist / 100 * $pUse * (float) $fuel;
$eEnergy = $dist / 100 * $eUse * $kwh_price;

// Chart 1: cumulative cost, one value per year (starting with the purchase)
$timeline = $cum_petrol = $cum_ev = [];
$breakeven = '';
for ($y = 0; $y <= $n; $y++) {
    $timeline[]   = $y === 0 ? 'Purchase' : 'Year ' . $y;
    $cum_petrol[] = round($pBuy + $y * ($pEnergy + $pMnt));
    $cum_ev[]     = round($eBuy + $y * ($eEnergy + $eMnt));
    if ($breakeven === '' && $y > 0 && end($cum_ev) <= end($cum_petrol)) {
        $breakeven = 'Year ' . $y;
    }
}

// Chart 2: cost breakdown. The resale value (45% minus 3 points per extra year) is deducted
$resale = max(0.15, 0.45 - 0.03 * max(0, $n - 5));
$cars           = ['Petrol', 'Electric'];
$cost_purchase  = [round($pBuy * (1 - $resale)), round($eBuy * (1 - $resale))];
$cost_energy    = [round($pEnergy * $n), round($eEnergy * $n)];
$cost_service   = [round($pMnt * $n), round($eMnt * $n)];

// Chart 3: CO2 in tonnes (2.31 kg per litre, 0.20 kg per kWh)
$co2 = [round($dist / 100 * $pUse * 2.31 * $n / 1000, 1), round($dist / 100 * $eUse * 0.20 * $n / 1000, 1)];

$tp = $cost_purchase[0] + $cost_energy[0] + $cost_service[0];
$te = $cost_purchase[1] + $cost_energy[1] + $cost_service[1];
$winner     = $te <= $tp ? 'Electric' : 'Petrol';
$saving     = number_format(abs($tp - $te), 0, '.', ',');
$total_p    = number_format($tp, 0, '.', ',');
$total_e    = number_format($te, 0, '.', ',');
$breakeven  = $breakeven === '' ? 'Not within ' . $n . ' years' : $breakeven;
$co2_saved  = number_format($co2[0] - $co2[1], 1, '.', ',');
$years      = $n;
]]></code>
                    <preformhtml><![CDATA[]]></preformhtml>
                    <precalcprint><![CDATA[]]></precalcprint>
                    <poscalcprint><![CDATA[]]></poscalcprint>
                    <layout><![CDATA[<style>
.cbx-evc{--a:#4338ca;--a2:#818cf8;--soft:#eef2ff;--ink:#0f172a;--muted:#64748b;--line:#e2e8f0;color:var(--ink)}
.cbx-evc *{box-sizing:border-box}
.cbx-evc .cbx-grid{display:grid;grid-template-columns:repeat(12,1fr);gap:1rem}
.cbx-evc .cbx-c12{grid-column:span 12}.cbx-evc .cbx-c6{grid-column:span 6}.cbx-evc .cbx-c4{grid-column:span 4}.cbx-evc .cbx-c3{grid-column:span 3}
@media(max-width:768px){.cbx-evc .cbx-c6,.cbx-evc .cbx-c4,.cbx-evc .cbx-c3{grid-column:span 12}}
.cbx-evc .cbx-sec{grid-column:span 12;display:flex;align-items:center;gap:.6rem;margin:.6rem 0 -.2rem;font-weight:700;font-size:.78rem;letter-spacing:.09em;text-transform:uppercase;color:var(--a)}
.cbx-evc .cbx-sec:after{content:"";flex:1;height:1px;background:var(--line)}
.cbx-evc .cbx-card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:1rem 1.15rem;box-shadow:0 1px 2px rgba(15,23,42,.05);height:100%}
.cbx-evc .cbx-card label.cbx-l{display:block;font-weight:600;font-size:.92rem;margin-bottom:.4rem;color:var(--ink)}
.cbx-evc .cbx-card .cbx-h{font-size:.8rem;color:var(--muted);margin-top:.4rem;line-height:1.35}
.cbx-evc .cbx-card .form-control,.cbx-evc .cbx-card select{border:1px solid #cbd5e1;border-radius:10px;padding:.6rem .8rem;font-size:1rem;width:100%;background-color:#fff;height:auto}
.cbx-evc .cbx-card .form-control:focus,.cbx-evc .cbx-card select:focus{border-color:var(--a);box-shadow:0 0 0 .2rem #4338ca33;outline:0}
.cbx-evc .cbx-card .form-check{display:flex;align-items:center;gap:.55rem;margin:.25rem 0;padding-left:0}
.cbx-evc .cbx-card .form-check-input{float:none;margin:0;width:1.15rem;height:1.15rem;accent-color:var(--a);flex:0 0 auto}
.cbx-evc .cbx-card textarea.form-control{min-height:90px}
.cbx-evc .cbx-card .radio,.cbx-evc .cbx-card .checkbox{margin:0}
.cbx-evc .cbx-card .radgroup{display:flex;flex-wrap:wrap;gap:.35rem 1.6rem}
.cbx-evc .cbx-card div[style*="float"]{float:none!important}
.cbx-evc .cbx-card input[data-type=yesno]{width:1.45rem;height:1.45rem;margin:0}
.cbx-evc .cbx-card label.radio,.cbx-evc .cbx-card label.form-check-label{margin:0;font-weight:500;cursor:pointer}
.cb_bootstrap .btcalctoolbar{float:none!important;width:100%!important;margin:1.4rem 0 1.6rem!important;text-align:center;padding:0}
.cb_bootstrap .row-fluid{width:100%}
.cb_bootstrap .btcalctoolbar input.btn.btn-primary{background:linear-gradient(135deg,#4338ca,#818cf8);border:0;color:#fff;font-weight:700;font-size:1.05rem;padding:.8rem 2.4rem;border-radius:999px;box-shadow:0 6px 16px #4338ca44;transition:transform .15s,box-shadow .15s;cursor:pointer}
.cb_bootstrap .btcalctoolbar input.btn.btn-primary:hover{transform:translateY(-1px);box-shadow:0 10px 22px #4338ca55}
.cb_bootstrap .btcalctoolbar input.btn.btn-primary:focus-visible{outline:3px solid #4338ca66;outline-offset:2px}
.cbx-evc-res{--a:#4338ca;--a2:#818cf8;--soft:#eef2ff;--ink:#0f172a;--muted:#64748b;--line:#e2e8f0;color:var(--ink)}
.cbx-evc-res .cbx-hero{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:1rem;margin-bottom:1rem}
.cbx-evc-res .cbx-hero-card{position:relative;overflow:hidden;color:#fff;border-radius:16px;padding:1.4rem 1.5rem;background:linear-gradient(135deg,var(--a),var(--a2));box-shadow:0 8px 20px #4338ca33}
.cbx-evc-res .cbx-hero-card:nth-child(2){background:linear-gradient(135deg,#0f172a,#334155);box-shadow:0 8px 20px rgba(15,23,42,.25)}
.cbx-evc-res .cbx-hero-card:nth-child(3){background:linear-gradient(135deg,var(--a2),var(--a))}
.cbx-evc-res .cbx-hero-card .cbx-ic{font-size:1.35rem;opacity:.9;margin-bottom:.6rem}
.cbx-evc-res .cbx-hero-card .cbx-lab{font-size:.78rem;letter-spacing:.09em;text-transform:uppercase;opacity:.92;font-weight:600}
.cbx-evc-res .cbx-hero-card .cbx-val{font-size:2.35rem;font-weight:800;line-height:1.15;margin:.2rem 0 .3rem;letter-spacing:-.01em}
.cbx-evc-res .cbx-hero-card .cbx-sub{font-size:.88rem;opacity:.92}
.cbx-evc-res .cbx-hero-card:after{content:"";position:absolute;right:-30px;top:-30px;width:120px;height:120px;border-radius:50%;background:rgba(255,255,255,.1)}
.cbx-evc-res .cbx-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:.9rem;margin-bottom:1rem}
.cbx-evc-res .cbx-metric{background:#fff;border:1px solid var(--line);border-radius:14px;padding:1rem 1.1rem;box-shadow:0 1px 2px rgba(15,23,42,.05)}
.cbx-evc-res .cbx-metric .cbx-ic{color:var(--a);font-size:1.15rem;margin-bottom:.45rem}
.cbx-evc-res .cbx-metric .cbx-lab{font-size:.72rem;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-weight:600}
.cbx-evc-res .cbx-metric .cbx-val{font-size:1.45rem;font-weight:800;margin-top:.15rem;line-height:1.2}
.cbx-evc-res .cbx-panel{background:var(--soft);border:1px solid var(--line);border-radius:14px;padding:1.1rem 1.25rem;margin-bottom:1rem}
.cbx-evc-res .cbx-panel h4{font-size:.95rem;font-weight:700;margin:0 0 .7rem;color:var(--a)}
.cbx-evc-res .cbx-bar{height:12px;border-radius:999px;background:#e2e8f0;overflow:hidden;position:relative}
.cbx-evc-res .cbx-bar>span{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,var(--a2),var(--a))}
.cbx-evc-res .cbx-row{display:flex;justify-content:space-between;gap:1rem;padding:.45rem 0;border-bottom:1px dashed var(--line);font-size:.95rem}
.cbx-evc-res .cbx-row:last-child{border-bottom:0}
.cbx-evc-res .cbx-row b{font-weight:700}
.cbx-evc-res .cbx-table{width:100%;border-collapse:collapse;font-size:.92rem}
.cbx-evc-res .cbx-table th{text-align:left;font-size:.72rem;letter-spacing:.07em;text-transform:uppercase;color:var(--muted);padding:.5rem .6rem;border-bottom:2px solid var(--line)}
.cbx-evc-res .cbx-table td{padding:.5rem .6rem;border-bottom:1px solid var(--line)}
.cbx-evc-res .cbx-table .r{text-align:right}
.cbx-evc-res .cbx-gaugewrap{position:relative;padding-top:8px}
.cbx-evc-res .cbx-gauge{display:flex;height:14px;border-radius:999px;overflow:hidden}
.cbx-evc-res .cbx-gauge i{display:block;height:100%}
.cbx-evc-res .cbx-pin{position:absolute;top:0;width:5px;height:30px;background:#0f172a;border-radius:3px;transform:translateX(-50%);box-shadow:0 0 0 2px #fff}
.cbx-evc-res .cbx-ticks{position:relative;height:1.3rem;margin:.4rem 12px 0;font-size:.78rem;color:var(--muted)}
.cbx-evc-res .cbx-ticks span{position:absolute;transform:translateX(-50%);white-space:nowrap}
.cbx-evc-res .cbx-chart{display:flex;align-items:flex-end;gap:3px;height:190px;padding-top:6px;border-bottom:2px solid var(--line)}
.cbx-evc-res .cbx-col{flex:1;display:flex;flex-direction:column;justify-content:flex-end;height:100%;min-width:0}
.cbx-evc-res .cbx-col .sa{background:var(--a)}
.cbx-evc-res .cbx-col .sb{background:var(--a2);border-radius:4px 4px 0 0}
.cbx-evc-res .cbx-xl{display:flex;gap:3px;font-size:.7rem;color:var(--muted);margin-top:.3rem}
.cbx-evc-res .cbx-xl span{flex:1;text-align:center;min-width:0;overflow:visible;white-space:nowrap}
.cbx-evc-res .cbx-legend{display:flex;gap:1.2rem;font-size:.82rem;color:var(--muted);margin-top:.7rem;flex-wrap:wrap}
.cbx-evc-res .cbx-legend i{display:inline-block;width:.7rem;height:.7rem;border-radius:3px;margin-right:.4rem;vertical-align:-1px}
.cbx-evc-res .cbx-note{font-size:.85rem;color:var(--muted);border-top:1px dashed #cbd5e1;padding-top:.8rem;margin:.4rem 0 0}
.cbx-evc-res .cbx-badge{display:inline-block;border-radius:999px;padding:.2rem .7rem;font-size:.78rem;font-weight:700;background:var(--soft);color:var(--a);border:1px solid var(--a)}
</style>
<div class="cbx-evc"><div class="cbx-grid">
<div class="cbx-sec">Car and usage</div>
<div class="cbx-c12"><div class="cbx-card"><label class="cbx-l">Car size</label>##segment##<div class="cbx-h">Sets purchase price, consumption and maintenance.</div></div></div>
<div class="cbx-c6"><div class="cbx-card"><label class="cbx-l">Kilometres per year</label>##km##<div class="cbx-h">Average driver: 12,000 to 20,000.</div></div></div>
<div class="cbx-c6"><div class="cbx-card"><label class="cbx-l">Years you keep the car</label>##years##<div class="cbx-h">From 3 to 12.</div></div></div>
<div class="cbx-sec">Energy</div>
<div class="cbx-c6"><div class="cbx-card"><label class="cbx-l">Petrol ($ per litre)</label>##fuel##</div></div>
<div class="cbx-c6"><div class="cbx-card"><label class="cbx-l">Home electricity ($ per kWh)</label>##home_price##</div></div>
<div class="cbx-c6"><div class="cbx-card"><label class="cbx-l">Public charging ($ per kWh)</label>##public_price##</div></div>
<div class="cbx-c6"><div class="cbx-card"><label class="cbx-l">Charging at home</label>##home_share##<div class="cbx-h">The rest is charged in public points.</div></div></div>
</div></div><style>.cbchart{max-width:100%;overflow-x:auto}@media(max-width:480px){.cbchart-table{font-size:.78rem}.cbchart-table th,.cbchart-table td{padding:3px 5px!important}}</style>]]></layout>
                    <exitlayout><![CDATA[<div class="cbx-evc-res">
<div class="cbx-hero">
<div class="cbx-hero-card"><div class="cbx-ic"><i class="fa fa-award" aria-hidden="true"></i></div><div class="cbx-lab">Cheaper over ##years## years</div><div class="cbx-val">##winner##</div><div class="cbx-sub">You save $##saving##</div></div>
<div class="cbx-hero-card"><div class="cbx-ic"><i class="fa fa-flag-checkered" aria-hidden="true"></i></div><div class="cbx-lab">Break-even point</div><div class="cbx-val">##breakeven##</div><div class="cbx-sub">When the electric car's cumulative spend drops below petrol</div></div>
</div>
<div class="cbx-metrics">
<div class="cbx-metric"><div class="cbx-ic"><i class="fa fa-gas-pump" aria-hidden="true"></i></div><div class="cbx-lab">Petrol: net cost</div><div class="cbx-val">$##total_p##</div></div>
<div class="cbx-metric"><div class="cbx-ic"><i class="fa fa-charging-station" aria-hidden="true"></i></div><div class="cbx-lab">Electric: net cost</div><div class="cbx-val">$##total_e##</div></div>
<div class="cbx-metric"><div class="cbx-ic"><i class="fa fa-leaf" aria-hidden="true"></i></div><div class="cbx-lab">CO2 avoided</div><div class="cbx-val">##co2_saved## t</div></div>
</div>
<div class="cbx-panel" style="background:#fff"><h4>Cumulative spending (before resale)</h4>##chart_cumulative##</div><div class="cbx-panel" style="background:#fff"><h4>Net cost breakdown (resale value deducted)</h4>##chart_breakdown##</div><div class="cbx-panel" style="background:#fff"><h4>CO2 emissions</h4>##chart_emissions##</div>
<p class="cbx-note">Illustrative figures: prices, consumption and resale values change by model and country. Edit them in the PHP Code.</p>
</div>]]></exitlayout>
                    <js_functions><![CDATA[]]></js_functions>
                    <js_pre_calc_button><![CDATA[]]></js_pre_calc_button>
                    <js_reset_button><![CDATA[]]></js_reset_button>
                    <js_post_calc_button><![CDATA[]]></js_post_calc_button>
                    <js_event_code><![CDATA[]]></js_event_code>
                    <import_bootstrap><![CDATA[1]]></import_bootstrap>
                    <import_jquery><![CDATA[1]]></import_jquery>
                    <datasave><![CDATA[-1]]></datasave>
                    <calculate_button_text><![CDATA[Compare both cars]]></calculate_button_text>
                    <include_input><![CDATA[0]]></include_input>
                    <include_result><![CDATA[1]]></include_result>
                    <mail_subject><![CDATA[]]></mail_subject>
                    <calc_on_init><![CDATA[1]]></calc_on_init>
                    <layout_position><![CDATA[0]]></layout_position>
                    <form_layout_width><![CDATA[100%]]></form_layout_width>
                    <sendemailcc><![CDATA[]]></sendemailcc>
                    <sendemailbcc><![CDATA[]]></sendemailbcc>
                    <mc_api><![CDATA[]]></mc_api>
                    <mc_email><![CDATA[]]></mc_email>
                    <mc_list><![CDATA[]]></mc_list>
                    <mc_apply><![CDATA[0]]></mc_apply>
                    <mc_email_name><![CDATA[]]></mc_email_name>
                    <mc_email_lastname><![CDATA[]]></mc_email_lastname>
                    <sectionaddposition><![CDATA[0]]></sectionaddposition>
                    <precalcprintpdf><![CDATA[]]></precalcprintpdf>
                    <poscalcprintpdf><![CDATA[]]></poscalcprintpdf>
                    <include_input_pdf><![CDATA[0]]></include_input_pdf>
                    <include_result_pdf><![CDATA[0]]></include_result_pdf>
                    <emailaddpdf><![CDATA[0]]></emailaddpdf>
                    <sectionposition><![CDATA[0]]></sectionposition>
                    <emailfile><![CDATA[]]></emailfile>
                    <save_pdf_folder><![CDATA[/media/com_calcbuilder]]></save_pdf_folder>
            </utility> <fields>
                    <field>
                                <id><![CDATA[118]]></id>
                                    <class><![CDATA[]]></class>
                                    <mandatory><![CDATA[0]]></mandatory>
                                    <idobj><![CDATA[24]]></idobj>
                                    <type><![CDATA[12]]></type>
                                    <decimal><![CDATA[0]]></decimal>
                                    <order><![CDATA[0]]></order>
                                    <css><![CDATA[]]></css>
                                    <var><![CDATA[segment]]></var>
                                    <name><![CDATA[Car size]]></name>
                                    <limit0><![CDATA[]]></limit0>
                                    <limit1><![CDATA[]]></limit1>
                                    <placeholder><![CDATA[]]></placeholder>
                                    <mask><![CDATA[]]></mask>
                                    <combodependantfield><![CDATA[]]></combodependantfield>
                                    <multivalue><![CDATA[]]></multivalue>
                                    <defaulttext><![CDATA[compact]]></defaulttext>
                                    <sqltext><![CDATA[]]></sqltext>
                                    <combodependantsql><![CDATA[]]></combodependantsql>
                                    <inlineevent><![CDATA[0]]></inlineevent>
                                    <sqlhost><![CDATA[]]></sqlhost>
                                    <sqldb><![CDATA[]]></sqldb>
                                    <sqluser><![CDATA[]]></sqluser>
                                    <sqlpass><![CDATA[]]></sqlpass>
                                    <combodependanthost><![CDATA[]]></combodependanthost>
                                    <combodependantdb><![CDATA[]]></combodependantdb>
                                    <combodependantuser><![CDATA[]]></combodependantuser>
                                    <combodependantpass><![CDATA[]]></combodependantpass>
                                <multivalues>
                                        <multivalue> <name><![CDATA[Compact]]></name>
                            <value><![CDATA[compact]]></value> </multivalue>
                                            <multivalue> <name><![CDATA[Family]]></name>
                            <value><![CDATA[family]]></value> </multivalue>
                                            <multivalue> <name><![CDATA[SUV]]></name>
                            <value><![CDATA[suv]]></value> </multivalue>
                                    </multivalues> </field>
                            <field>
                                <id><![CDATA[119]]></id>
                                    <class><![CDATA[]]></class>
                                    <mandatory><![CDATA[0]]></mandatory>
                                    <idobj><![CDATA[24]]></idobj>
                                    <type><![CDATA[0]]></type>
                                    <decimal><![CDATA[0]]></decimal>
                                    <order><![CDATA[1]]></order>
                                    <css><![CDATA[]]></css>
                                    <var><![CDATA[km]]></var>
                                    <name><![CDATA[Kilometres per year]]></name>
                                    <limit0><![CDATA[]]></limit0>
                                    <limit1><![CDATA[]]></limit1>
                                    <placeholder><![CDATA[]]></placeholder>
                                    <mask><![CDATA[]]></mask>
                                    <combodependantfield><![CDATA[]]></combodependantfield>
                                    <multivalue><![CDATA[]]></multivalue>
                                    <defaulttext><![CDATA[18000]]></defaulttext>
                                    <sqltext><![CDATA[]]></sqltext>
                                    <combodependantsql><![CDATA[]]></combodependantsql>
                                    <inlineevent><![CDATA[0]]></inlineevent>
                                    <sqlhost><![CDATA[]]></sqlhost>
                                    <sqldb><![CDATA[]]></sqldb>
                                    <sqluser><![CDATA[]]></sqluser>
                                    <sqlpass><![CDATA[]]></sqlpass>
                                    <combodependanthost><![CDATA[]]></combodependanthost>
                                    <combodependantdb><![CDATA[]]></combodependantdb>
                                    <combodependantuser><![CDATA[]]></combodependantuser>
                                    <combodependantpass><![CDATA[]]></combodependantpass>
                                <multivalues>
                                </multivalues> </field>
                            <field>
                                <id><![CDATA[120]]></id>
                                    <class><![CDATA[]]></class>
                                    <mandatory><![CDATA[0]]></mandatory>
                                    <idobj><![CDATA[24]]></idobj>
                                    <type><![CDATA[2]]></type>
                                    <decimal><![CDATA[0]]></decimal>
                                    <order><![CDATA[2]]></order>
                                    <css><![CDATA[]]></css>
                                    <var><![CDATA[years]]></var>
                                    <name><![CDATA[Years you keep the car]]></name>
                                    <limit0><![CDATA[]]></limit0>
                                    <limit1><![CDATA[]]></limit1>
                                    <placeholder><![CDATA[]]></placeholder>
                                    <mask><![CDATA[]]></mask>
                                    <combodependantfield><![CDATA[]]></combodependantfield>
                                    <multivalue><![CDATA[]]></multivalue>
                                    <defaulttext><![CDATA[8]]></defaulttext>
                                    <sqltext><![CDATA[]]></sqltext>
                                    <combodependantsql><![CDATA[]]></combodependantsql>
                                    <inlineevent><![CDATA[0]]></inlineevent>
                                    <sqlhost><![CDATA[]]></sqlhost>
                                    <sqldb><![CDATA[]]></sqldb>
                                    <sqluser><![CDATA[]]></sqluser>
                                    <sqlpass><![CDATA[]]></sqlpass>
                                    <combodependanthost><![CDATA[]]></combodependanthost>
                                    <combodependantdb><![CDATA[]]></combodependantdb>
                                    <combodependantuser><![CDATA[]]></combodependantuser>
                                    <combodependantpass><![CDATA[]]></combodependantpass>
                                <multivalues>
                                        <multivalue> <name><![CDATA[3]]></name>
                            <value><![CDATA[3]]></value> </multivalue>
                                            <multivalue> <name><![CDATA[4]]></name>
                            <value><![CDATA[4]]></value> </multivalue>
                                            <multivalue> <name><![CDATA[5]]></name>
                            <value><![CDATA[5]]></value> </multivalue>
                                            <multivalue> <name><![CDATA[6]]></name>
                            <value><![CDATA[6]]></value> </multivalue>
                                            <multivalue> <name><![CDATA[7]]></name>
                            <value><![CDATA[7]]></value> </multivalue>
                                            <multivalue> <name><![CDATA[8]]></name>
                            <value><![CDATA[8]]></value> </multivalue>
                                            <multivalue> <name><![CDATA[9]]></name>
                            <value><![CDATA[9]]></value> </multivalue>
                                            <multivalue> <name><![CDATA[10]]></name>
                            <value><![CDATA[10]]></value> </multivalue>
                                            <multivalue> <name><![CDATA[11]]></name>
                            <value><![CDATA[11]]></value> </multivalue>
                                            <multivalue> <name><![CDATA[12]]></name>
                            <value><![CDATA[12]]></value> </multivalue>
                                    </multivalues> </field>
                            <field>
                                <id><![CDATA[121]]></id>
                                    <class><![CDATA[]]></class>
                                    <mandatory><![CDATA[0]]></mandatory>
                                    <idobj><![CDATA[24]]></idobj>
                                    <type><![CDATA[0]]></type>
                                    <decimal><![CDATA[3]]></decimal>
                                    <order><![CDATA[3]]></order>
                                    <css><![CDATA[]]></css>
                                    <var><![CDATA[fuel]]></var>
                                    <name><![CDATA[Petrol price per litre]]></name>
                                    <limit0><![CDATA[]]></limit0>
                                    <limit1><![CDATA[]]></limit1>
                                    <placeholder><![CDATA[]]></placeholder>
                                    <mask><![CDATA[]]></mask>
                                    <combodependantfield><![CDATA[]]></combodependantfield>
                                    <multivalue><![CDATA[]]></multivalue>
                                    <defaulttext><![CDATA[1.65]]></defaulttext>
                                    <sqltext><![CDATA[]]></sqltext>
                                    <combodependantsql><![CDATA[]]></combodependantsql>
                                    <inlineevent><![CDATA[0]]></inlineevent>
                                    <sqlhost><![CDATA[]]></sqlhost>
                                    <sqldb><![CDATA[]]></sqldb>
                                    <sqluser><![CDATA[]]></sqluser>
                                    <sqlpass><![CDATA[]]></sqlpass>
                                    <combodependanthost><![CDATA[]]></combodependanthost>
                                    <combodependantdb><![CDATA[]]></combodependantdb>
                                    <combodependantuser><![CDATA[]]></combodependantuser>
                                    <combodependantpass><![CDATA[]]></combodependantpass>
                                <multivalues>
                                </multivalues> </field>
                            <field>
                                <id><![CDATA[122]]></id>
                                    <class><![CDATA[]]></class>
                                    <mandatory><![CDATA[0]]></mandatory>
                                    <idobj><![CDATA[24]]></idobj>
                                    <type><![CDATA[0]]></type>
                                    <decimal><![CDATA[3]]></decimal>
                                    <order><![CDATA[4]]></order>
                                    <css><![CDATA[]]></css>
                                    <var><![CDATA[home_price]]></var>
                                    <name><![CDATA[Home electricity price]]></name>
                                    <limit0><![CDATA[]]></limit0>
                                    <limit1><![CDATA[]]></limit1>
                                    <placeholder><![CDATA[]]></placeholder>
                                    <mask><![CDATA[]]></mask>
                                    <combodependantfield><![CDATA[]]></combodependantfield>
                                    <multivalue><![CDATA[]]></multivalue>
                                    <defaulttext><![CDATA[0.18]]></defaulttext>
                                    <sqltext><![CDATA[]]></sqltext>
                                    <combodependantsql><![CDATA[]]></combodependantsql>
                                    <inlineevent><![CDATA[0]]></inlineevent>
                                    <sqlhost><![CDATA[]]></sqlhost>
                                    <sqldb><![CDATA[]]></sqldb>
                                    <sqluser><![CDATA[]]></sqluser>
                                    <sqlpass><![CDATA[]]></sqlpass>
                                    <combodependanthost><![CDATA[]]></combodependanthost>
                                    <combodependantdb><![CDATA[]]></combodependantdb>
                                    <combodependantuser><![CDATA[]]></combodependantuser>
                                    <combodependantpass><![CDATA[]]></combodependantpass>
                                <multivalues>
                                </multivalues> </field>
                            <field>
                                <id><![CDATA[123]]></id>
                                    <class><![CDATA[]]></class>
                                    <mandatory><![CDATA[0]]></mandatory>
                                    <idobj><![CDATA[24]]></idobj>
                                    <type><![CDATA[0]]></type>
                                    <decimal><![CDATA[3]]></decimal>
                                    <order><![CDATA[5]]></order>
                                    <css><![CDATA[]]></css>
                                    <var><![CDATA[public_price]]></var>
                                    <name><![CDATA[Public charging price]]></name>
                                    <limit0><![CDATA[]]></limit0>
                                    <limit1><![CDATA[]]></limit1>
                                    <placeholder><![CDATA[]]></placeholder>
                                    <mask><![CDATA[]]></mask>
                                    <combodependantfield><![CDATA[]]></combodependantfield>
                                    <multivalue><![CDATA[]]></multivalue>
                                    <defaulttext><![CDATA[0.55]]></defaulttext>
                                    <sqltext><![CDATA[]]></sqltext>
                                    <combodependantsql><![CDATA[]]></combodependantsql>
                                    <inlineevent><![CDATA[0]]></inlineevent>
                                    <sqlhost><![CDATA[]]></sqlhost>
                                    <sqldb><![CDATA[]]></sqldb>
                                    <sqluser><![CDATA[]]></sqluser>
                                    <sqlpass><![CDATA[]]></sqlpass>
                                    <combodependanthost><![CDATA[]]></combodependanthost>
                                    <combodependantdb><![CDATA[]]></combodependantdb>
                                    <combodependantuser><![CDATA[]]></combodependantuser>
                                    <combodependantpass><![CDATA[]]></combodependantpass>
                                <multivalues>
                                </multivalues> </field>
                            <field>
                                <id><![CDATA[124]]></id>
                                    <class><![CDATA[]]></class>
                                    <mandatory><![CDATA[0]]></mandatory>
                                    <idobj><![CDATA[24]]></idobj>
                                    <type><![CDATA[2]]></type>
                                    <decimal><![CDATA[0]]></decimal>
                                    <order><![CDATA[6]]></order>
                                    <css><![CDATA[]]></css>
                                    <var><![CDATA[home_share]]></var>
                                    <name><![CDATA[Charging at home]]></name>
                                    <limit0><![CDATA[]]></limit0>
                                    <limit1><![CDATA[]]></limit1>
                                    <placeholder><![CDATA[]]></placeholder>
                                    <mask><![CDATA[]]></mask>
                                    <combodependantfield><![CDATA[]]></combodependantfield>
                                    <multivalue><![CDATA[]]></multivalue>
                                    <defaulttext><![CDATA[80]]></defaulttext>
                                    <sqltext><![CDATA[]]></sqltext>
                                    <combodependantsql><![CDATA[]]></combodependantsql>
                                    <inlineevent><![CDATA[0]]></inlineevent>
                                    <sqlhost><![CDATA[]]></sqlhost>
                                    <sqldb><![CDATA[]]></sqldb>
                                    <sqluser><![CDATA[]]></sqluser>
                                    <sqlpass><![CDATA[]]></sqlpass>
                                    <combodependanthost><![CDATA[]]></combodependanthost>
                                    <combodependantdb><![CDATA[]]></combodependantdb>
                                    <combodependantuser><![CDATA[]]></combodependantuser>
                                    <combodependantpass><![CDATA[]]></combodependantpass>
                                <multivalues>
                                        <multivalue> <name><![CDATA[Never (0%)]]></name>
                            <value><![CDATA[0]]></value> </multivalue>
                                            <multivalue> <name><![CDATA[Sometimes (30%)]]></name>
                            <value><![CDATA[30]]></value> </multivalue>
                                            <multivalue> <name><![CDATA[Half of the time (50%)]]></name>
                            <value><![CDATA[50]]></value> </multivalue>
                                            <multivalue> <name><![CDATA[Mostly (80%)]]></name>
                            <value><![CDATA[80]]></value> </multivalue>
                                            <multivalue> <name><![CDATA[Always (100%)]]></name>
                            <value><![CDATA[100]]></value> </multivalue>
                                    </multivalues> </field>
                    </fields> <matrices>
            </matrices> <sections>
            </sections>
                        <charts>
                            <chart>
                                                                                                    <ord><![CDATA[0]]></ord>
                                                                <name><![CDATA[cumulative]]></name>
                                                                <title><![CDATA[Cumulative spending ($)]]></title>
                                                                <type><![CDATA[line]]></type>
                                                                <stacked><![CDATA[0]]></stacked>
                                                                <show_table><![CDATA[0]]></show_table>
                                                                <source><![CDATA[php]]></source>
                                                                <labels><![CDATA[timeline]]></labels>
                                                                <series><![CDATA[[{"name":"Petrol","ref":"cum_petrol","color":"#e34948"},{"name":"Electric","ref":"cum_ev","color":"#4338ca"}]]]></series>
                                    </chart>
                                <chart>
                                                                                                    <ord><![CDATA[1]]></ord>
                                                                <name><![CDATA[breakdown]]></name>
                                                                <title><![CDATA[Net cost by concept ($)]]></title>
                                                                <type><![CDATA[bar]]></type>
                                                                <stacked><![CDATA[1]]></stacked>
                                                                <show_table><![CDATA[1]]></show_table>
                                                                <source><![CDATA[php]]></source>
                                                                <labels><![CDATA[cars]]></labels>
                                                                <series><![CDATA[[{"name":"Depreciation","ref":"cost_purchase","color":"#4338ca"},{"name":"Energy","ref":"cost_energy","color":"#eda100"},{"name":"Maintenance","ref":"cost_service","color":"#1baf7a"}]]]></series>
                                    </chart>
                                <chart>
                                                                                                    <ord><![CDATA[2]]></ord>
                                                                <name><![CDATA[emissions]]></name>
                                                                <title><![CDATA[Tonnes of CO2]]></title>
                                                                <type><![CDATA[bar]]></type>
                                                                <stacked><![CDATA[0]]></stacked>
                                                                <show_table><![CDATA[0]]></show_table>
                                                                <source><![CDATA[php]]></source>
                                                                <labels><![CDATA[cars]]></labels>
                                                                <series><![CDATA[[{"name":"Tonnes of CO2","ref":"co2","color":"#008300"}]]]></series>
                                    </chart>
                        </charts>
        </calculator>
