Skip to content

Commit

Permalink
add new statistic ratios for economy entity NBS
Browse files Browse the repository at this point in the history
  • Loading branch information
chenchenplus committed Dec 25, 2024
1 parent 0e4ce68 commit 4a19084
Show file tree
Hide file tree
Showing 80 changed files with 20,661 additions and 4,819 deletions.
13 changes: 13 additions & 0 deletions city/economy/v2/economy.proto
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,19 @@ message Org {
repeated float bracket_cutoffs = 12;
//
repeated float bracket_rates = 13;
// NBS
//
repeated float consumption_currency = 14;
//
repeated float consumption_propensity = 15;
//
repeated float income_currency = 16;
//
repeated float depression = 17;
//
repeated float locus_control = 18;
//
repeated float working_hours = 19;
}

message Agent {
Expand Down
108 changes: 108 additions & 0 deletions city/economy/v2/org_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,30 @@ service OrgService {
rpc SaveEconomyEntities(SaveEconomyEntitiesRequest) returns (SaveEconomyEntitiesResponse);
// Load
rpc LoadEconomyEntities(LoadEconomyEntitiesRequest) returns (LoadEconomyEntitiesResponse);

// Consumption Currency
rpc GetConsumptionCurrency(GetConsumptionCurrencyRequest) returns (GetConsumptionCurrencyResponse);
rpc SetConsumptionCurrency(SetConsumptionCurrencyRequest) returns (SetConsumptionCurrencyResponse);

// Consumption Propensity
rpc GetConsumptionPropensity(GetConsumptionPropensityRequest) returns (GetConsumptionPropensityResponse);
rpc SetConsumptionPropensity(SetConsumptionPropensityRequest) returns (SetConsumptionPropensityResponse);

// Income Currency
rpc GetIncomeCurrency(GetIncomeCurrencyRequest) returns (GetIncomeCurrencyResponse);
rpc SetIncomeCurrency(SetIncomeCurrencyRequest) returns (SetIncomeCurrencyResponse);

// Depression
rpc GetDepressionStatus(GetDepressionStatusRequest) returns (GetDepressionStatusResponse);
rpc SetDepressionStatus(SetDepressionStatusRequest) returns (SetDepressionStatusResponse);

// Locus of Control
rpc GetLocusControl(GetLocusControlRequest) returns (GetLocusControlResponse);
rpc SetLocusControl(SetLocusControlRequest) returns (SetLocusControlResponse);

// Working Hours
rpc GetWorkingHours(GetWorkingHoursRequest) returns (GetWorkingHoursResponse);
rpc SetWorkingHours(SetWorkingHoursRequest) returns (SetWorkingHoursResponse);
}

message AddOrgRequest {
Expand Down Expand Up @@ -305,3 +329,87 @@ message LoadEconomyEntitiesResponse {
repeated int32 agent_ids = 1;
repeated int32 org_ids = 2;
}

// Consumption Currency
message GetConsumptionCurrencyRequest {
int32 org_id = 1;
}
message GetConsumptionCurrencyResponse {
repeated float consumption_currency = 1;
}

message SetConsumptionCurrencyRequest {
int32 org_id = 1;
repeated float consumption_currency = 2;
}
message SetConsumptionCurrencyResponse {}

// Consumption Propensity
message GetConsumptionPropensityRequest {
int32 org_id = 1;
}
message GetConsumptionPropensityResponse {
repeated float consumption_propensity = 1;
}

message SetConsumptionPropensityRequest {
int32 org_id = 1;
repeated float consumption_propensity = 2;
}
message SetConsumptionPropensityResponse {}

// Income Currency
message GetIncomeCurrencyRequest {
int32 org_id = 1;
}
message GetIncomeCurrencyResponse {
repeated float income_currency = 1;
}

message SetIncomeCurrencyRequest {
int32 org_id = 1;
repeated float income_currency = 2;
}
message SetIncomeCurrencyResponse {}

// Depression
message GetDepressionStatusRequest {
int32 org_id = 1;
}
message GetDepressionStatusResponse {
repeated float depression = 1;
}

message SetDepressionStatusRequest {
int32 org_id = 1;
repeated float depression = 2;
}
message SetDepressionStatusResponse {}

// Locus of Control
message GetLocusControlRequest {
int32 org_id = 1;
}
message GetLocusControlResponse {
repeated float locus_control = 1;
}

message SetLocusControlRequest {
int32 org_id = 1;
repeated float locus_control = 2;
}
message SetLocusControlResponse {}

// Working Hours
message GetWorkingHoursRequest {
int32 org_id = 1;
}
message GetWorkingHoursResponse {
repeated float working_hours = 1;
}

message SetWorkingHoursRequest {
int32 org_id = 1;
repeated float working_hours = 2;
}
message SetWorkingHoursResponse {}
Loading

0 comments on commit 4a19084

Please sign in to comment.