Commit fbd2c1a8 authored by Sebastian Hörl's avatar Sebastian Hörl
Browse files

Add new values for AV ownership

parent c21c10f2
......@@ -48,7 +48,7 @@ public class AssignPrivatAVs {
if(carAvailability.equals(string1)|| carAvailability.equals(string2)){
double r = random.nextDouble();
if (r <= 0.68500) {//produces "true" 68.50% of the time
if (r <= 0.6868) {//produces "true" 68.50% of the time
person.getAttributes().putAttribute(AV_AVAILABILITY_ATTRIBUTE,"car");
person.getAttributes().putAttribute("carAvail", carAvailability);
......@@ -78,7 +78,7 @@ public class AssignPrivatAVs {
if(carAvailability.equals(string1)|| carAvailability.equals(string2)){
double r = random.nextDouble();
if (r <= 0.94300) {//produces "true" 94.30% of the time
if (r <= 0.9435) {//produces "true" 94.30% of the time
person.getAttributes().putAttribute(AV_AVAILABILITY_ATTRIBUTE,"car");
person.getAttributes().putAttribute("carAvail", carAvailability);
......@@ -108,7 +108,7 @@ public class AssignPrivatAVs {
if(carAvailability.equals(string1)|| carAvailability.equals(string2)){
double r = random.nextDouble();
if (r <= 0.99500) {//produces "true" 99.50% of the time
if (r <= 0.9954) {//produces "true" 99.50% of the time
person.getAttributes().putAttribute(AV_AVAILABILITY_ATTRIBUTE,"car");
person.getAttributes().putAttribute("carAvail", carAvailability);
......@@ -153,7 +153,7 @@ public class AssignPrivatAVs {
// in accordance with what TP5 gives us! So change at which value of r the first condition will be true.
if(carAvailability.equals(string1)|| carAvailability.equals(string2)){
double r = random.nextDouble();
if (r <= 0.81500) {//produces "true" 81.50% of the time
if (r <= 0.8191) {//produces "true" 81.50% of the time
//if they are part of this lucky percentage, they have "decided" to keep their/purchase a car, else...
person.getAttributes().putAttribute("carAvail", carAvailability);
} else { //...else they have "decided" to give up their/not purchase a car! They've converted to the sharing economy!
......@@ -168,7 +168,7 @@ public class AssignPrivatAVs {
//TODO change percentages to match what TP5 gives us for ASTRA Scenario B!
// these agents still have good ol' conventional cars....
if (r <= 0.61400) {//produces "true" 61.40% of the time
if (r <= 0.6176) {//produces "true" 61.40% of the time
person.getAttributes().putAttribute(AV_AVAILABILITY_ATTRIBUTE,"car");
person.getAttributes().putAttribute("carAvail", carAvailability);
......@@ -203,7 +203,7 @@ public class AssignPrivatAVs {
// in accordance with what TP5 gives us! So change at which value of r the first condition will be true.
if(carAvailability.equals(string1)|| carAvailability.equals(string2)){
double r = random.nextDouble();
if (r <= 0.84700) {//produces "true" 84.70% of the time
if (r <= 0.88770) {//produces "true" 84.70% of the time
//if they are part of this lucky percentage, they have "decided" to keep their/purchase a car, else...
person.getAttributes().putAttribute("carAvail", carAvailability);
} else { //...else they have "decided" to give up their/not purchase a car! They've converted to the sharing economy!
......@@ -218,7 +218,7 @@ public class AssignPrivatAVs {
//TODO change percentages to match what TP5 gives us for ASTRA Scenario B!
// these agents still have good ol' conventional cars....
if (r <= 0.93300) {//produces "true" 93.30% of the time
if (r <= 0.9364) {//produces "true" 93.30% of the time
person.getAttributes().putAttribute(AV_AVAILABILITY_ATTRIBUTE,"car");
person.getAttributes().putAttribute("carAvail", carAvailability);
......@@ -253,7 +253,7 @@ public class AssignPrivatAVs {
// in accordance with what TP5 gives us! So change at which value of r the first condition will be true.
if(carAvailability.equals(string1)|| carAvailability.equals(string2)){
double r = random.nextDouble();
if (r <= 0.94700) {//produces "true" 94.70% of the time
if (r <= 0.9886) {//produces "true" 94.70% of the time
//if they are part of this lucky percentage, they have "decided" to keep their/purchase a car, else...
person.getAttributes().putAttribute("carAvail", carAvailability);
} else { //...else they have "decided" to give up their/not purchase a car! They've converted to the sharing economy!
......@@ -268,7 +268,7 @@ public class AssignPrivatAVs {
//TODO change percentages to match what TP5 gives us for ASTRA Scenario B!
// these agents still have good ol' conventional cars....
if (r <= 0.99500) {//produces "true" 99.50% of the time
if (r <= 0.9954) {//produces "true" 99.50% of the time
person.getAttributes().putAttribute(AV_AVAILABILITY_ATTRIBUTE,"car");
person.getAttributes().putAttribute("carAvail", carAvailability);
......@@ -345,7 +345,7 @@ public class AssignPrivatAVs {
//TODO put the values that TP5 gives us as conditions for freight av market penetration 2050
double r = random.nextDouble();
if (r <= 0.6000) {
if (r <= 0.6092) {
person.getAttributes().putAttribute(FREIGHT_AV,false);
......@@ -356,7 +356,7 @@ public class AssignPrivatAVs {
//TODO put the values that TP5 gives us as conditions for freight av market penetration 2040
double r = random.nextDouble();
if (r <= 0.7500) {
if (r <= 0.9268) {
person.getAttributes().putAttribute(FREIGHT_AV,false);
......@@ -367,7 +367,7 @@ public class AssignPrivatAVs {
//TODO put the values that TP5 gives us as conditions for freight av market penetration 2030
double r = random.nextDouble();
if (r <= 0.9000) {
if (r <= 0.9940) {
person.getAttributes().putAttribute(FREIGHT_AV,false);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment