Untitled
unknown
plain_text
2 years ago
2.1 kB
8
Indexable
# Adjusted parameters for more pronounced simulation
adjusted_investment_multiplier = 8 # Increased investment multiplier
minimum_investment = 2 # Increased minimum investment
demand_growth_factor = 0.3 # Increased demand growth factor
extended_simulation_time = np.arange(0, 20, dt) # Longer simulation time
# Re-initialize lists for the adjusted simulation
adjusted_capacity = [initial_capacity]
adjusted_demand = [initial_demand]
adjusted_performance = []
adjusted_investment = []
# Perform the adjusted simulation
for time in extended_simulation_time:
current_capacity = adjusted_capacity[-1]
current_demand = adjusted_demand[-1]
# Calculate performance
current_performance = current_capacity - current_demand
adjusted_performance.append(current_performance)
# Adjusted investment strategy
if current_performance < performance_standard:
invest_amount = adjusted_investment_multiplier * (performance_standard - current_performance)
else:
invest_amount = minimum_investment
adjusted_investment.append(invest_amount)
# Update capacity and demand with adjusted factors
new_capacity = current_capacity + dt * invest_amount
growing_action = 0.01 * current_demand
new_demand = current_demand + dt * demand_growth_factor * growing_action * current_performance
adjusted_capacity.append(new_capacity)
adjusted_demand.append(new_demand)
# Plotting the adjusted results
plt.figure(figsize=(12, 6))
plt.plot(extended_simulation_time, adjusted_capacity[:-1], 'bv', label='Adjusted Capacity')
plt.plot(extended_simulation_time, adjusted_investment, 'ro', label='Adjusted Investment')
plt.plot(extended_simulation_time, adjusted_performance, 'g.', label='Adjusted Performance')
plt.xlabel('Time')
plt.ylabel('Value')
plt.title('Adjusted Simulation of Growth and Underinvestment')
plt.legend()
plt.show()
# Output the final performance for the adjusted model
final_adjusted_performance = adjusted_performance[-1]
final_adjusted_performance
Editor is loading...
Leave a Comment