Skip to content
Snippets Groups Projects

WIP: added possibility to explicitly define non-intelligent prosumers

Closed Sonja Happ requested to merge mixed_behavior_prosumers into master
1 unresolved thread
1 file
+ 21
2
Compare changes
  • Side-by-side
  • Inline
@@ -149,8 +149,27 @@ Prosumer_agent::Prosumer_agent(repast::AgentId &id,
break;
}
case CTRL_INTELLIGENT: {
behavior = new Swarm_prosumer_behavior(id_.id(), prosumer_data->type, prosumer_data->subtype,
t_step, _d_props, prosumer_data);
// check if agent is meant to be explicitly non-intelligent
std::vector<int> non_int_agents {49,50,51,52,53,54,55};
bool non_int = false;
for(auto const& id: non_int_agents) {
if (id_.id() == id){
non_int = true;
}
}
// assign behavior
if (non_int){
behavior = new Ref_prosumer_behavior(id_.id(), prosumer_data->type, prosumer_data->subtype,
t_step, _d_props, prosumer_data);
IO->log_info("Non-Intelligent Agent...");
}
else {
behavior = new Swarm_prosumer_behavior(id_.id(), prosumer_data->type, prosumer_data->subtype,
t_step, _d_props, prosumer_data);
IO->log_info("Intelligent Agent!");
}
break;
}
case CTRL_MQTT_TEST:{
Loading