diff --git a/docs/src/format.md b/docs/src/format.md index a337fa9..02512b3 100644 --- a/docs/src/format.md +++ b/docs/src/format.md @@ -152,6 +152,7 @@ detail. | `disposal cost ($/tonne)` | Dictionary mapping the name of each output product to the cost of disposing it at the plant. | | `disposal limit (tonne)` | Dictionary mapping the name of each output product to the maximum amount allowed to be disposed of at the plant. May be `null` if unlimited. | | `capacities` | List describing what plant sizes are allowed, and their characteristics. | +| `initial capacity (tonne)` | Capacity already available. If the plant has not been built yet, this should be `0`. | The entries in the `capacities` list should be dictionaries with the following keys: @@ -160,9 +161,8 @@ keys: | :---------------------------------- | :-------------------------------------------------------------------------------------------------- | | `size (tonne)` | The size of the plant. | | `opening cost ($)` | The cost to open a plant of this size. | -| `fixed operating cost ($)` | The cost to keep the plant open, even if the plant doesn't process anything. Must be a time series. | -| `variable operating cost ($/tonne)` | The cost that the plant incurs to process each tonne of input. Must be a time series. | -| `initial capacity (tonne)` | Capacity already available. If the plant has not been built yet, this should be `0`. | +| `fixed operating cost ($)` | The cost to keep the plant open, even if the plant doesn't process anything. | +| `variable operating cost ($/tonne)` | The cost that the plant incurs to process each tonne of input. Must be the same for all capacities. | ```json { diff --git a/docs/src/problem.md b/docs/src/problem.md index 4bef680..0e74bdc 100644 --- a/docs/src/problem.md +++ b/docs/src/problem.md @@ -5,7 +5,7 @@ The mathematical model employed by RELOG is based on three main components: 1. **Products and Materials:** Inputs and outputs for both manufacturing and - recycling plants. This include raw materials, whether virgin or recovered, + recycling plants. This includes raw materials, whether virgin or recovered, and final products, whether new or at their end-of-life. Each product has associated transportation parameters, such as costs, energy and emissions. @@ -52,22 +52,27 @@ The mathematical model employed by RELOG is based on three main components: | Symbol | Description | Unit | | :-------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------- | | $K^{\text{dist}}_{uv}$ | Distance between plants/centers $u$ and $v$ | km | -| $K^\text{cap}_{p}$ | Capacity of plant $p$, if the plant is open | tonne | +| $K^\text{cap-init}_p$ | Initial capacity of plant $p$ | tonne | +| $K^\text{cap-max}_p$ | Maximum capacity of plant $p$ | tonne | +| $K^\text{cap-min}_p$ | Minimum capacity of plant $p$ | tonne | | $K^\text{disp-limit}_{mt}$ | Maximum amount of material $m$ that can be disposed of (globally) at time $t$ | tonne | | $K^\text{disp-limit}_{mut}$ | Maximum amount of material $m$ that can be disposed of at plant/center $u$ at time $t$ | tonne | | $K^\text{em-limit}_{gt}$ | Maximum amount of greenhouse gas $g$ allowed to be emitted (globally) at time $t$ | tonne | | $K^\text{em-plant}_{gpt}$ | Amount of greenhouse gas $g$ released by plant $p$ at time $t$ for each tonne of input material processed | tonne/tonne | | $K^\text{em-tr}_{gmt}$ | Amount of greenhouse gas $g$ released by transporting 1 tonne of material $m$ over one km at time $t$ | tonne/km-tonne | | $K^\text{mix}_{pmt}$ | If plant $p$ receives one tonne of input material at time $t$, then $K^\text{mix}_{pmt}$ is the amount of product $m$ in this mix. Must be between zero and one, and the sum of these amounts must equal to one. | tonne | -| $K^\text{out-fix}_{cmt}$ | Fixed amount of material $m$ collected at center $m$ at time $t$ | \$/tonne | +| $K^\text{out-fix}_{cmt}$ | Fixed amount of material $m$ collected at center $c$ at time $t$ | tonne | | $K^\text{out-var-len}_{cm}$ | Length of the $K^\text{out-var}_{c,m,*}$ vector. | -- | -| $K^\text{out-var}_{c,m,i}$ | Factor used to calculate variable amount of material $m$ collected at center $m$. See `eq_z_collected` for more details. | -- | +| $K^\text{out-var}_{cmi}$ | Factor used to calculate variable amount of material $m$ collected at center $c$. See `eq_z_collected` for more details. | -- | | $K^\text{output}_{pmt}$ | Amount of material $m$ produced by plant $p$ at time $t$ for each tonne of input material processed | tonne | | $R^\text{collect}_{cmt}$ | Cost of collecting material $m$ at center $c$ at time $t$ | \$/tonne | | $R^\text{disp}_{umt}$ | Cost to dispose of material at plant/center $u$ at time $t$ | \$/tonne | | $R^\text{em}_{gt}$ | Penalty cost per tonne of greenhouse gas $g$ emitted at time $t$ | \$/tonne | -| $R^\text{fix}_{ut}$ | Fixed operating cost for plant/center $u$ at time $t$ | \$ | -| $R^\text{open}_{pt}$ | Cost to open plant $p$ at time $t$ | \$ | +| $R^\text{expand}_{pt}$ | Cost to increase capacity of plant $p$ at time $t$ | \$/tonne | +| $R^\text{fix}_{ct}$ | Fixed operating cost for center $c$ at time $t$ | \$ | +| $R^\text{fix-min}_{pt}$ | Fixed operating cost for plant $p$ at time $t$ at minimum capacity | \$ | +| $R^\text{fix-exp}_{pt}$ | Increase in fixed operational cost for plant $p$ at time $t$ for every additional tonne of capacity | \$/tonne | +| $R^\text{open}_{pt}$ | Cost to open plant $p$ at time $t$, at minimum capacity | \$ | | $R^\text{rev}_{ct}$ | Revenue for selling the input product of center $c$ at this center at time $t$ | \$/tonne | | $R^\text{tr}_{mt}$ | Cost to send material $m$ at time $t$ | \$/km-tonne | | $R^\text{var}_{pt}$ | Cost to process one tonne of input material at plant $p$ at time $t$ | \$/tonne | @@ -78,16 +83,17 @@ The mathematical model employed by RELOG is based on three main components: | :--------------------------- | :------------------------------------------- | :------------------------------------------------------------------------------------------------------ | :----- | | $x_{pt}$ | `x[p.name, t]` | One if plant $p$ is operational at time $t$ | binary | | $y_{uvmt}$ | `y[u.name, v.name, m.name, t]` | Amount of product $m$ sent from plant/center $u$ to plant/center $v$ at time $t$ | tonne | +| $z^{\text{exp}}_{pt}$ | `z_exp[p.name, t]` | Extra capacity installed at plant $p$ at time $t$ above the minimum capacity | tonne | | $z^{\text{collected}}_{cmt}$ | `z_collected[c.name, m.name, t]` | Amount of material $m$ collected by center $c$ at time $t$ | tonne | | $z^{\text{disp}}_{umt}$ | `z_disp[u.name, m.name, t]` | Amount of product $m$ disposed of at plant/center $u$ at time $t$ | tonne | +| $z^{\text{em-plant}}_{gpt}$ | `z_em_plant[g.name, p.name, t]` | Amount of greenhouse gas $g$ released by plant $p$ at time $t$ | tonne | +| $z^{\text{em-tr}}_{guvmt}$ | `z_em_tr[g.name, u.name, v.name, m.name, t]` | Amount of greenhouse gas $g$ released at time $t$ due to transportation of material $m$ from $u$ to $v$ | tonne | | $z^{\text{input}}_{ut}$ | `z_input[u.name, t]` | Total plant/center input at time $t$ | tonne | | $z^{\text{prod}}_{umt}$ | `z_prod[u.name, m.name, t]` | Amount of product $m$ produced by plant/center $u$ at time $t$ | tonne | -| $z^{\text{em-tr}}_{guvmt}$ | `z_em_tr[g.name, u.name, v.name, m.name, t]` | Amount of greenhouse gas $g$ released at time $t$ due to transportation of material $m$ from $u$ to $v$ | tonne | -| $z^{\text{em-plant}}_{gpt}$ | `z_em_plant[g.name, p.name, t]` | Amount of greenhouse gas $g$ released by plant $p$ at time $t$ | tonne | ## Objective function -The goals is to minimize a linear objective function with the following terms: +The goal is to minimize a linear objective function with the following terms: - Transportation costs, which depend on transportation distance $K^{\text{dist}}_{uv}$ and product-specific factor $R^\text{tr}_{mt}$: @@ -131,7 +137,9 @@ The goals is to minimize a linear objective function with the following terms: \sum_{p \in P} \sum_{m \in M^+_p} \sum_{t \in T} R^\text{disp}_{pmt} z^\text{disp}_{pmt} ``` -- Plant opening cost: +- Plant opening cost, incurred when the plant goes from non-operational at time + $t-1$ to operational at time $t$. Never incurred if the plant is initially + open: ```math \sum_{p \in P} \sum_{t \in T} R^\text{open}_{pt} \left( @@ -140,10 +148,20 @@ The goals is to minimize a linear objective function with the following terms: ``` - Plant fixed operating cost, incurred for every time period, regardless of - input or output amounts, as long as the plant is operational: + input or output amounts, as long as the plant is operational. Depends on the + size of the plant: ```math -\sum_{p \in P} \sum_{t \in T} R^\text{fix}_{pt} x_{pt} +\sum_{p \in P} \sum_{t \in T} \left( + R^\text{fix-min}_{pt} x_{pt} + + R^\text{fix-exp}_{pt} z^\text{exp}_{pt} +\right) +``` + +- Plant expansion cost, incurred whenever plant capacity increases: + +```math +\sum_{p \in P} \sum_{t \in T} R^\text{expand}_{pt} \left(z^\text{exp}_{pt} - z^\text{exp}_{p,t-1} \right) ``` - Plant variable operating cost, incurred for each tonne of input material @@ -160,6 +178,7 @@ The goals is to minimize a linear objective function with the following terms: \sum_{p \in P} z^{\text{em-plant}}_{gpt} + \sum_{(u,v,m) \in E} z^{\text{em-tr}}_{guvmt} \right) ``` + ## Constraints - Definition of plant input (`eq_z_input[p.name, t]`): @@ -201,12 +220,42 @@ The goals is to minimize a linear objective function with the following terms: \end{align*} ``` -- Plants have a maximum capacity; furthermore, if the plant is not open, its - capacity is zero (`eq_capacity[p.name,t]`) +- Plant can only be expanded if the plant is open, and up to a certain amount (`eq_exp_ub[p.name, t]`): + +```math +\begin{align*} +& z^\text{exp}_{pt} \leq \left(K^\text{cap-max}_p - K^\text{cap-min}_p) x_{pt} +& \forall p \in P, t \in T +\end{align*} +``` + +- Plant is initially open if initial capacity is positive: + +```math +\begin{align*} +& x_{p,0} = \begin{cases} + 0 & \text{ if } K^\text{cap-init}_p = 0 \\ + 1 & \text{otherwise} +\end{cases} +& \forall p \in P +\end{align*} +``` + +- Calculation of initial plant expansion: + +```math +\begin{align*} +& z^\text{exp}_{p,0} = K^\text{cap-init}_p - K^\text{cap-min}_p +& \forall p \in P +\end{align*} +``` + +- Plants cannot process more than their current capacity + (`eq_input_limit[p.name,t]`) ```math \begin{align*} -& z^\text{input}_{pt} \leq K^\text{cap}_p x_{pt} +& z^\text{input}_{pt} \leq K^\text{cap-min}_p x_{pt} + z^\text{exp}_{pt} & \forall p \in P, t \in T \end{align*} ``` @@ -280,7 +329,8 @@ The goals is to minimize a linear objective function with the following terms: \end{align*} ``` -- Computation of transportation emissions (`eq_emission_tr[g.name, u.name, v.name, m.name, t`): +- Computation of transportation emissions + (`eq_emission_tr[g.name, u.name, v.name, m.name, t]`): ```math \begin{align*} @@ -293,7 +343,7 @@ The goals is to minimize a linear objective function with the following terms: ```math \begin{align*} -& z^{\text{em-plant}}_{gpt} = \sum_{(u,m) \in E^-(p)} K^\text{em-plant}_{gpt} y_{upmt} +& z^{\text{em-plant}}_{gpt} = K^\text{em-plant}_{gpt} z^{\text{input}}_{pt} & \forall g \in G, p \in P, t \in T \end{align*} ``` diff --git a/src/instance/parse.jl b/src/instance/parse.jl index 945d8e5..28f91d7 100644 --- a/src/instance/parse.jl +++ b/src/instance/parse.jl @@ -110,6 +110,32 @@ function parse(json)::Instance ) end + # Validate capacity count and duplicate if needed + if length(capacities) == 0 + error("Plant '$name' must have at least one capacity defined") + elseif length(capacities) == 1 + # Duplicate the single capacity + push!(capacities, capacities[1]) + elseif length(capacities) > 2 + error( + "Plant '$name' cannot have more than 2 capacities, got $(length(capacities))", + ) + end + + # Validate capacity sizes are non-decreasing + if capacities[1].size > capacities[2].size + error( + "Plant '$name' capacity sizes must be non-decreasing: $(capacities[1].size) > $(capacities[2].size)", + ) + end + + # Validate variable operating costs are the same + if capacities[1].var_operating_cost != capacities[2].var_operating_cost + error( + "Plant '$name' variable operating costs must be the same across all capacities", + ) + end + plant = Plant(; name, latitude, diff --git a/src/model/build.jl b/src/model/build.jl index 30b7fe4..9106ed5 100644 --- a/src/model/build.jl +++ b/src/model/build.jl @@ -1,5 +1,17 @@ +# RELOG: Reverse Logistics Optimization +# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved. +# Released under the modified BSD license. See COPYING.md for more details. + using JuMP +R_expand(p::Plant, t::Int) = + (p.capacities[2].opening_cost[t] - p.capacities[1].opening_cost[t]) / + (p.capacities[2].size - p.capacities[1].size) + +R_fix_exp(p::Plant, t::Int) = + (p.capacities[2].fix_operating_cost[t] - p.capacities[1].fix_operating_cost[t]) / + (p.capacities[2].size - p.capacities[1].size) + function build_model(instance::Instance; optimizer, variable_names::Bool = false) model = JuMP.Model(optimizer) centers = instance.centers @@ -8,6 +20,15 @@ function build_model(instance::Instance; optimizer, variable_names::Bool = false T = 1:instance.time_horizon model.ext[:instance] = instance + # Constants + # ------------------------------------------------------------------------- + K_cap_min = Dict(p => p.capacities[1].size for p in plants) + K_cap_max = Dict(p => p.capacities[2].size for p in plants) + R_open = Dict((p, t) => p.capacities[1].opening_cost[t] for p in plants for t in T) + R_fix_min = + Dict((p, t) => p.capacities[1].fix_operating_cost[t] for p in plants for t in T) + + # Transportation edges # ------------------------------------------------------------------------- @@ -112,6 +133,15 @@ function build_model(instance::Instance; optimizer, variable_names::Bool = false z_input[c.name, t] = @variable(model, lower_bound = 0) end + # Plant expansion + z_exp = _init(model, :z_exp) + for p in plants + z_exp[p.name, 0] = max(0, p.initial_capacity - K_cap_min[p]) + end + for p in plants, t in T + z_exp[p.name, t] = @variable(model, lower_bound = 0) + end + # Total amount collected by the center z_collected = _init(model, :z_collected) for c in centers, m in c.outputs, t in T @@ -171,16 +201,18 @@ function build_model(instance::Instance; optimizer, variable_names::Bool = false # Plants: Opening cost for p in plants, t in T - add_to_expression!( - obj, - p.capacities[1].opening_cost[t], - (x[p.name, t] - x[p.name, t-1]), - ) + add_to_expression!(obj, R_open[p, t], (x[p.name, t] - x[p.name, t-1])) end # Plants: Fixed operating cost for p in plants, t in T - add_to_expression!(obj, p.capacities[1].fix_operating_cost[t], x[p.name, t]) + add_to_expression!(obj, R_fix_min[p, t], x[p.name, t]) + add_to_expression!(obj, R_fix_exp(p, t), z_exp[p.name, t]) + end + + # Plants: Expansion cost + for p in plants, t in T + add_to_expression!(obj, R_expand(p, t), z_exp[p.name, t] - z_exp[p.name, t-1]) end # Plants: Variable operating cost @@ -261,11 +293,22 @@ function build_model(instance::Instance; optimizer, variable_names::Bool = false ) end - # Plants: Capacity limit - eq_capacity = _init(model, :eq_capacity) + # Plants: Expansion upper bound + eq_exp_ub = _init(model, :eq_exp_ub) + for p in plants, t in T + eq_exp_ub[p.name, t] = @constraint( + model, + z_exp[p.name, t] <= (K_cap_max[p] - K_cap_min[p]) * x[p.name, t] + ) + end + + # Plants: Input limit + eq_input_limit = _init(model, :eq_input_limit) for p in plants, t in T - eq_capacity[p.name, t] = - @constraint(model, z_input[p.name, t] <= p.capacities[1].size * x[p.name, t]) + eq_input_limit[p.name, t] = @constraint( + model, + z_input[p.name, t] <= K_cap_min[p] * x[p.name, t] + z_exp[p.name, t] + ) end # Plants: Disposal limit @@ -361,8 +404,7 @@ function build_model(instance::Instance; optimizer, variable_names::Bool = false for p in plants, t in T, g in keys(p.emissions) eq_emission_plant[g, p.name, t] = @constraint( model, - z_em_plant[g, p.name, t] == - p.emissions[g][t] * sum(y[src.name, p.name, m.name, t] for (src, m) in E_in[p]) + z_em_plant[g, p.name, t] == p.emissions[g][t] * z_input[p.name, t] ) end diff --git a/src/reports/plants.jl b/src/reports/plants.jl index 47d063c..9039b77 100644 --- a/src/reports/plants.jl +++ b/src/reports/plants.jl @@ -18,6 +18,7 @@ function plants_report(model)::DataFrame df."opening cost (\$)" = Float64[] df."fixed operating cost (\$)" = Float64[] df."variable operating cost (\$)" = Float64[] + df."expansion cost (\$)" = Float64[] plants = model.ext[:instance].plants T = 1:model.ext[:instance].time_horizon @@ -25,21 +26,25 @@ function plants_report(model)::DataFrame for p in plants, t in T operational = JuMP.value(model[:x][p.name, t]) > 0.5 input = value(model[:z_input][p.name, t]) - - # Opening cost + var_operating_cost = input * p.capacities[1].var_operating_cost[t] opening_cost = 0 + curr_capacity = 0 + expansion_cost = 0 + fix_operating_cost = 0 + if value(model[:x][p.name, t]) > 0.5 && value(model[:x][p.name, t-1]) < 0.5 opening_cost = p.capacities[1].opening_cost[t] end - # Plant size - curr_capacity = 0 if operational - curr_capacity = p.capacities[1].size + curr_expansion = JuMP.value(model[:z_exp][p.name, t]) + prev_expansion = JuMP.value(model[:z_exp][p.name, t-1]) + curr_capacity = p.capacities[1].size + curr_expansion + expansion_cost = R_expand(p, t) * (curr_expansion - prev_expansion) + fix_operating_cost = + p.capacities[1].fix_operating_cost[t] + R_fix_exp(p, t) * curr_expansion end - fix_operating_cost = (operational ? p.capacities[1].fix_operating_cost[t] : 0) - var_operating_cost = input * p.capacities[1].var_operating_cost[t] push!( df, Dict( @@ -54,6 +59,7 @@ function plants_report(model)::DataFrame "opening cost (\$)" => _round(opening_cost), "fixed operating cost (\$)" => _round(fix_operating_cost), "variable operating cost (\$)" => _round(var_operating_cost), + "expansion cost (\$)" => _round(expansion_cost), ), ) end @@ -114,7 +120,7 @@ function plant_emissions_report(model)::DataFrame for p in plants, t in T, g in keys(p.emissions) input_amount = JuMP.value(model[:z_input][p.name, t]) input_amount > 1e-3 || continue - emissions = JuMP.value(model[:z_plant_em][g, p.name, t]) + emissions = JuMP.value(model[:z_em_plant][g, p.name, t]) emission_factor = p.emissions[g][t] push!( df, diff --git a/src/reports/transportation.jl b/src/reports/transportation.jl index 4b041e1..840a96e 100644 --- a/src/reports/transportation.jl +++ b/src/reports/transportation.jl @@ -73,7 +73,7 @@ function transportation_emissions_report(model)::DataFrame amount > 1e-3 || continue distance = distances[p1, p2, m] emission_factor = m.tr_emissions[g][t] - emissions = value(model[:z_tr_em][g, p1.name, p2.name, m.name, t]) + emissions = value(model[:z_em_tr][g, p1.name, p2.name, m.name, t]) push!( df, Dict( diff --git a/test/fixtures/boat_example/center_outputs.csv b/test/fixtures/boat_example/center_outputs.csv index e92873b..b13d9cf 100644 --- a/test/fixtures/boat_example/center_outputs.csv +++ b/test/fixtures/boat_example/center_outputs.csv @@ -1,27 +1,27 @@ center,latitude,longitude,output product,year,amount collected (tonne),amount disposed (tonne),disposal limit (tonne),collection cost ($),disposal cost ($) -NailFactory (Chicago),41.881832,-87.623177,Nail,1,1.0,-0.0,Inf,1000.0,-0.0 +NailFactory (Chicago),41.881832,-87.623177,Nail,1,1.0,0.0,Inf,1000.0,0.0 NailFactory (Chicago),41.881832,-87.623177,Nail,2,1.0,0.0,Inf,1000.0,0.0 NailFactory (Chicago),41.881832,-87.623177,Nail,3,1.0,0.0,Inf,1000.0,0.0 NailFactory (Chicago),41.881832,-87.623177,Nail,4,1.0,0.0,Inf,1000.0,0.0 -NailFactory (Chicago),41.881832,-87.623177,Nail,5,1.0,-0.0,Inf,1000.0,-0.0 +NailFactory (Chicago),41.881832,-87.623177,Nail,5,1.0,0.0,Inf,1000.0,0.0 NailFactory (Phoenix),33.448376,-112.074036,Nail,1,1.0,0.0,Inf,1000.0,0.0 NailFactory (Phoenix),33.448376,-112.074036,Nail,2,1.0,0.0,Inf,1000.0,0.0 NailFactory (Phoenix),33.448376,-112.074036,Nail,3,1.0,0.0,Inf,1000.0,0.0 NailFactory (Phoenix),33.448376,-112.074036,Nail,4,1.0,0.0,Inf,1000.0,0.0 -NailFactory (Phoenix),33.448376,-112.074036,Nail,5,1.0,-0.0,Inf,1000.0,-0.0 +NailFactory (Phoenix),33.448376,-112.074036,Nail,5,1.0,0.0,Inf,1000.0,0.0 NailFactory (Dallas),32.776664,-96.796988,Nail,1,1.0,0.0,Inf,1000.0,0.0 NailFactory (Dallas),32.776664,-96.796988,Nail,2,1.0,0.0,Inf,1000.0,0.0 NailFactory (Dallas),32.776664,-96.796988,Nail,3,1.0,0.0,Inf,1000.0,0.0 NailFactory (Dallas),32.776664,-96.796988,Nail,4,1.0,0.0,Inf,1000.0,0.0 -NailFactory (Dallas),32.776664,-96.796988,Nail,5,1.0,-0.0,Inf,1000.0,-0.0 +NailFactory (Dallas),32.776664,-96.796988,Nail,5,1.0,0.0,Inf,1000.0,0.0 Forest (Chicago),41.881832,-87.623177,Wood,1,100.0,100.0,Inf,0.0,0.0 -Forest (Chicago),41.881832,-87.623177,Wood,2,100.0,100.0,Inf,-0.0,0.0 -Forest (Chicago),41.881832,-87.623177,Wood,3,100.0,100.0,Inf,-0.0,0.0 -Forest (Chicago),41.881832,-87.623177,Wood,4,100.0,100.0,Inf,-0.0,0.0 +Forest (Chicago),41.881832,-87.623177,Wood,2,100.0,100.0,Inf,0.0,0.0 +Forest (Chicago),41.881832,-87.623177,Wood,3,100.0,100.0,Inf,0.0,0.0 +Forest (Chicago),41.881832,-87.623177,Wood,4,100.0,100.0,Inf,0.0,0.0 Forest (Chicago),41.881832,-87.623177,Wood,5,100.0,100.0,Inf,0.0,0.0 Forest (Phoenix),33.448376,-112.074036,Wood,1,100.0,100.0,Inf,0.0,0.0 -Forest (Phoenix),33.448376,-112.074036,Wood,2,100.0,100.0,Inf,-0.0,0.0 -Forest (Phoenix),33.448376,-112.074036,Wood,3,100.0,100.0,Inf,-0.0,0.0 +Forest (Phoenix),33.448376,-112.074036,Wood,2,100.0,100.0,Inf,0.0,0.0 +Forest (Phoenix),33.448376,-112.074036,Wood,3,100.0,100.0,Inf,0.0,0.0 Forest (Phoenix),33.448376,-112.074036,Wood,4,100.0,100.0,Inf,0.0,0.0 Forest (Phoenix),33.448376,-112.074036,Wood,5,100.0,100.0,Inf,0.0,0.0 Forest (Dallas),32.776664,-96.796988,Wood,1,100.0,43.0,Inf,14250.0,0.0 @@ -33,7 +33,7 @@ Retail (Chicago),41.881832,-87.623177,UsedBoat,1,0.0,0.0,0.0,0.0,0.0 Retail (Chicago),41.881832,-87.623177,UsedBoat,2,0.0,0.0,0.0,0.0,0.0 Retail (Chicago),41.881832,-87.623177,UsedBoat,3,0.0,0.0,0.0,0.0,0.0 Retail (Chicago),41.881832,-87.623177,UsedBoat,4,0.0,0.0,0.0,0.0,0.0 -Retail (Chicago),41.881832,-87.623177,UsedBoat,5,0.0,0.0,0.0,-0.0,0.0 +Retail (Chicago),41.881832,-87.623177,UsedBoat,5,0.0,0.0,0.0,0.0,0.0 Retail (New York City),40.712776,-74.005974,UsedBoat,1,0.0,0.0,0.0,0.0,0.0 Retail (New York City),40.712776,-74.005974,UsedBoat,2,0.0,0.0,0.0,0.0,0.0 Retail (New York City),40.712776,-74.005974,UsedBoat,3,0.0,0.0,0.0,0.0,0.0 @@ -44,31 +44,31 @@ Retail (Los Angeles),34.052235,-118.243683,UsedBoat,2,0.0,0.0,0.0,0.0,0.0 Retail (Los Angeles),34.052235,-118.243683,UsedBoat,3,0.0,0.0,0.0,0.0,0.0 Retail (Los Angeles),34.052235,-118.243683,UsedBoat,4,0.0,0.0,0.0,0.0,0.0 Retail (Los Angeles),34.052235,-118.243683,UsedBoat,5,0.0,0.0,0.0,0.0,0.0 -Retail (Houston),29.760427,-95.369804,UsedBoat,1,-0.0,0.0,0.0,0.0,0.0 +Retail (Houston),29.760427,-95.369804,UsedBoat,1,0.0,0.0,0.0,0.0,0.0 Retail (Houston),29.760427,-95.369804,UsedBoat,2,-0.0,0.0,0.0,-0.0,0.0 Retail (Houston),29.760427,-95.369804,UsedBoat,3,-0.0,0.0,0.0,-0.0,0.0 -Retail (Houston),29.760427,-95.369804,UsedBoat,4,0.0,0.0,0.0,0.0,0.0 +Retail (Houston),29.760427,-95.369804,UsedBoat,4,-0.0,0.0,0.0,-0.0,0.0 Retail (Houston),29.760427,-95.369804,UsedBoat,5,0.0,0.0,0.0,0.0,0.0 Retail (Phoenix),33.448376,-112.074036,UsedBoat,1,0.0,0.0,0.0,0.0,0.0 -Retail (Phoenix),33.448376,-112.074036,UsedBoat,2,-0.0,0.0,0.0,-0.0,0.0 -Retail (Phoenix),33.448376,-112.074036,UsedBoat,3,-0.0,0.0,0.0,-0.0,0.0 -Retail (Phoenix),33.448376,-112.074036,UsedBoat,4,-0.0,0.0,0.0,-0.0,0.0 +Retail (Phoenix),33.448376,-112.074036,UsedBoat,2,0.0,0.0,0.0,0.0,0.0 +Retail (Phoenix),33.448376,-112.074036,UsedBoat,3,0.0,0.0,0.0,0.0,0.0 +Retail (Phoenix),33.448376,-112.074036,UsedBoat,4,0.0,0.0,0.0,0.0,0.0 Retail (Phoenix),33.448376,-112.074036,UsedBoat,5,0.0,0.0,0.0,0.0,0.0 Retail (Philadelphia),39.952583,-75.165222,UsedBoat,1,0.0,0.0,0.0,0.0,0.0 Retail (Philadelphia),39.952583,-75.165222,UsedBoat,2,0.0,0.0,0.0,0.0,0.0 Retail (Philadelphia),39.952583,-75.165222,UsedBoat,3,0.0,0.0,0.0,0.0,0.0 Retail (Philadelphia),39.952583,-75.165222,UsedBoat,4,0.0,0.0,0.0,0.0,0.0 Retail (Philadelphia),39.952583,-75.165222,UsedBoat,5,0.0,0.0,0.0,0.0,0.0 -Retail (San Antonio),29.424122,-98.493629,UsedBoat,1,-0.0,0.0,0.0,-0.0,0.0 -Retail (San Antonio),29.424122,-98.493629,UsedBoat,2,-0.0,0.0,0.0,-0.0,0.0 +Retail (San Antonio),29.424122,-98.493629,UsedBoat,1,0.0,0.0,0.0,0.0,0.0 +Retail (San Antonio),29.424122,-98.493629,UsedBoat,2,0.0,0.0,0.0,0.0,0.0 Retail (San Antonio),29.424122,-98.493629,UsedBoat,3,0.0,0.0,0.0,0.0,0.0 Retail (San Antonio),29.424122,-98.493629,UsedBoat,4,0.0,0.0,0.0,0.0,0.0 -Retail (San Antonio),29.424122,-98.493629,UsedBoat,5,-0.0,0.0,0.0,-0.0,0.0 +Retail (San Antonio),29.424122,-98.493629,UsedBoat,5,0.0,0.0,0.0,0.0,0.0 Retail (San Diego),32.715736,-117.161087,UsedBoat,1,0.0,0.0,0.0,0.0,0.0 Retail (San Diego),32.715736,-117.161087,UsedBoat,2,0.0,0.0,0.0,0.0,0.0 Retail (San Diego),32.715736,-117.161087,UsedBoat,3,0.0,0.0,0.0,0.0,0.0 Retail (San Diego),32.715736,-117.161087,UsedBoat,4,0.0,0.0,0.0,0.0,0.0 -Retail (San Diego),32.715736,-117.161087,UsedBoat,5,-0.0,0.0,0.0,-0.0,0.0 +Retail (San Diego),32.715736,-117.161087,UsedBoat,5,0.0,0.0,0.0,0.0,0.0 Retail (Dallas),32.776664,-96.796988,UsedBoat,1,6.31579,0.0,0.0,631.57895,0.0 Retail (Dallas),32.776664,-96.796988,UsedBoat,2,22.93629,0.0,0.0,2293.62881,0.0 Retail (Dallas),32.776664,-96.796988,UsedBoat,3,31.7714,0.0,0.0,3177.13952,0.0 diff --git a/test/fixtures/boat_example/centers.csv b/test/fixtures/boat_example/centers.csv index 78d5a77..7373458 100644 --- a/test/fixtures/boat_example/centers.csv +++ b/test/fixtures/boat_example/centers.csv @@ -29,53 +29,53 @@ Forest (Dallas),32.776664,-96.796988,2,,0.0,0.0,0.0 Forest (Dallas),32.776664,-96.796988,3,,0.0,0.0,0.0 Forest (Dallas),32.776664,-96.796988,4,,0.0,0.0,0.0 Forest (Dallas),32.776664,-96.796988,5,,0.0,0.0,0.0 -Retail (Chicago),41.881832,-87.623177,1,NewBoat,-0.0,0.0,125000.0 -Retail (Chicago),41.881832,-87.623177,2,NewBoat,-0.0,0.0,125000.0 +Retail (Chicago),41.881832,-87.623177,1,NewBoat,0.0,0.0,125000.0 +Retail (Chicago),41.881832,-87.623177,2,NewBoat,0.0,0.0,125000.0 Retail (Chicago),41.881832,-87.623177,3,NewBoat,0.0,0.0,125000.0 Retail (Chicago),41.881832,-87.623177,4,NewBoat,0.0,0.0,125000.0 Retail (Chicago),41.881832,-87.623177,5,NewBoat,0.0,0.0,125000.0 -Retail (New York City),40.712776,-74.005974,1,NewBoat,-0.0,0.0,125000.0 -Retail (New York City),40.712776,-74.005974,2,NewBoat,-0.0,0.0,125000.0 -Retail (New York City),40.712776,-74.005974,3,NewBoat,-0.0,0.0,125000.0 +Retail (New York City),40.712776,-74.005974,1,NewBoat,0.0,0.0,125000.0 +Retail (New York City),40.712776,-74.005974,2,NewBoat,0.0,0.0,125000.0 +Retail (New York City),40.712776,-74.005974,3,NewBoat,0.0,0.0,125000.0 Retail (New York City),40.712776,-74.005974,4,NewBoat,0.0,0.0,125000.0 Retail (New York City),40.712776,-74.005974,5,NewBoat,0.0,0.0,125000.0 -Retail (Los Angeles),34.052235,-118.243683,1,NewBoat,-0.0,0.0,125000.0 -Retail (Los Angeles),34.052235,-118.243683,2,NewBoat,-0.0,0.0,125000.0 -Retail (Los Angeles),34.052235,-118.243683,3,NewBoat,-0.0,0.0,125000.0 +Retail (Los Angeles),34.052235,-118.243683,1,NewBoat,0.0,0.0,125000.0 +Retail (Los Angeles),34.052235,-118.243683,2,NewBoat,0.0,0.0,125000.0 +Retail (Los Angeles),34.052235,-118.243683,3,NewBoat,0.0,0.0,125000.0 Retail (Los Angeles),34.052235,-118.243683,4,NewBoat,0.0,0.0,125000.0 Retail (Los Angeles),34.052235,-118.243683,5,NewBoat,0.0,0.0,125000.0 -Retail (Houston),29.760427,-95.369804,1,NewBoat,-0.0,-0.0,125000.0 -Retail (Houston),29.760427,-95.369804,2,NewBoat,-0.0,0.0,125000.0 -Retail (Houston),29.760427,-95.369804,3,NewBoat,-0.0,0.0,125000.0 +Retail (Houston),29.760427,-95.369804,1,NewBoat,0.0,0.0,125000.0 +Retail (Houston),29.760427,-95.369804,2,NewBoat,-0.0,-0.0,125000.0 +Retail (Houston),29.760427,-95.369804,3,NewBoat,0.0,0.0,125000.0 Retail (Houston),29.760427,-95.369804,4,NewBoat,0.0,0.0,125000.0 Retail (Houston),29.760427,-95.369804,5,NewBoat,0.0,0.0,125000.0 -Retail (Phoenix),33.448376,-112.074036,1,NewBoat,-0.0,0.0,125000.0 -Retail (Phoenix),33.448376,-112.074036,2,NewBoat,-0.0,-0.0,125000.0 -Retail (Phoenix),33.448376,-112.074036,3,NewBoat,-0.0,0.0,125000.0 +Retail (Phoenix),33.448376,-112.074036,1,NewBoat,0.0,0.0,125000.0 +Retail (Phoenix),33.448376,-112.074036,2,NewBoat,0.0,0.0,125000.0 +Retail (Phoenix),33.448376,-112.074036,3,NewBoat,0.0,0.0,125000.0 Retail (Phoenix),33.448376,-112.074036,4,NewBoat,0.0,0.0,125000.0 Retail (Phoenix),33.448376,-112.074036,5,NewBoat,0.0,0.0,125000.0 -Retail (Philadelphia),39.952583,-75.165222,1,NewBoat,-0.0,0.0,125000.0 -Retail (Philadelphia),39.952583,-75.165222,2,NewBoat,-0.0,0.0,125000.0 -Retail (Philadelphia),39.952583,-75.165222,3,NewBoat,-0.0,0.0,125000.0 +Retail (Philadelphia),39.952583,-75.165222,1,NewBoat,0.0,0.0,125000.0 +Retail (Philadelphia),39.952583,-75.165222,2,NewBoat,0.0,0.0,125000.0 +Retail (Philadelphia),39.952583,-75.165222,3,NewBoat,0.0,0.0,125000.0 Retail (Philadelphia),39.952583,-75.165222,4,NewBoat,0.0,0.0,125000.0 Retail (Philadelphia),39.952583,-75.165222,5,NewBoat,0.0,0.0,125000.0 -Retail (San Antonio),29.424122,-98.493629,1,NewBoat,-0.0,-0.0,125000.0 -Retail (San Antonio),29.424122,-98.493629,2,NewBoat,-0.0,0.0,125000.0 +Retail (San Antonio),29.424122,-98.493629,1,NewBoat,0.0,0.0,125000.0 +Retail (San Antonio),29.424122,-98.493629,2,NewBoat,0.0,0.0,125000.0 Retail (San Antonio),29.424122,-98.493629,3,NewBoat,0.0,0.0,125000.0 Retail (San Antonio),29.424122,-98.493629,4,NewBoat,0.0,0.0,125000.0 -Retail (San Antonio),29.424122,-98.493629,5,NewBoat,-0.0,0.0,125000.0 -Retail (San Diego),32.715736,-117.161087,1,NewBoat,-0.0,0.0,125000.0 -Retail (San Diego),32.715736,-117.161087,2,NewBoat,-0.0,0.0,125000.0 -Retail (San Diego),32.715736,-117.161087,3,NewBoat,-0.0,0.0,125000.0 +Retail (San Antonio),29.424122,-98.493629,5,NewBoat,0.0,0.0,125000.0 +Retail (San Diego),32.715736,-117.161087,1,NewBoat,0.0,0.0,125000.0 +Retail (San Diego),32.715736,-117.161087,2,NewBoat,0.0,0.0,125000.0 +Retail (San Diego),32.715736,-117.161087,3,NewBoat,0.0,0.0,125000.0 Retail (San Diego),32.715736,-117.161087,4,NewBoat,0.0,0.0,125000.0 -Retail (San Diego),32.715736,-117.161087,5,NewBoat,-0.0,0.0,125000.0 +Retail (San Diego),32.715736,-117.161087,5,NewBoat,0.0,0.0,125000.0 Retail (Dallas),32.776664,-96.796988,1,NewBoat,63.15789,757894.73684,125000.0 Retail (Dallas),32.776664,-96.796988,2,NewBoat,71.46814,857617.72853,125000.0 Retail (Dallas),32.776664,-96.796988,3,NewBoat,75.8857,910628.37148,125000.0 Retail (Dallas),32.776664,-96.796988,4,NewBoat,76.90434,922852.03459,125000.0 Retail (Dallas),32.776664,-96.796988,5,NewBoat,77.27087,927250.44516,125000.0 -Retail (San Jose),37.338208,-121.886329,1,NewBoat,-0.0,0.0,125000.0 -Retail (San Jose),37.338208,-121.886329,2,NewBoat,-0.0,0.0,125000.0 -Retail (San Jose),37.338208,-121.886329,3,NewBoat,-0.0,0.0,125000.0 +Retail (San Jose),37.338208,-121.886329,1,NewBoat,0.0,0.0,125000.0 +Retail (San Jose),37.338208,-121.886329,2,NewBoat,0.0,0.0,125000.0 +Retail (San Jose),37.338208,-121.886329,3,NewBoat,0.0,0.0,125000.0 Retail (San Jose),37.338208,-121.886329,4,NewBoat,0.0,0.0,125000.0 Retail (San Jose),37.338208,-121.886329,5,NewBoat,0.0,0.0,125000.0 diff --git a/test/fixtures/boat_example/plant_outputs.csv b/test/fixtures/boat_example/plant_outputs.csv index 99c1429..ca72e97 100644 --- a/test/fixtures/boat_example/plant_outputs.csv +++ b/test/fixtures/boat_example/plant_outputs.csv @@ -20,7 +20,7 @@ BoatFactory (Houston),29.760427,-95.369804,NewBoat,3,0.0,0.0,0.0,0.0 BoatFactory (Houston),29.760427,-95.369804,NewBoat,4,0.0,0.0,0.0,0.0 BoatFactory (Houston),29.760427,-95.369804,NewBoat,5,0.0,0.0,0.0,0.0 BoatFactory (Phoenix),33.448376,-112.074036,NewBoat,1,0.0,0.0,0.0,0.0 -BoatFactory (Phoenix),33.448376,-112.074036,NewBoat,2,-0.0,0.0,0.0,0.0 +BoatFactory (Phoenix),33.448376,-112.074036,NewBoat,2,0.0,0.0,0.0,0.0 BoatFactory (Phoenix),33.448376,-112.074036,NewBoat,3,0.0,0.0,0.0,0.0 BoatFactory (Phoenix),33.448376,-112.074036,NewBoat,4,0.0,0.0,0.0,0.0 BoatFactory (Phoenix),33.448376,-112.074036,NewBoat,5,0.0,0.0,0.0,0.0 @@ -60,15 +60,15 @@ RecyclingPlant (Chicago),41.881832,-87.623177,Wood,3,0.0,0.0,0.0,0.0 RecyclingPlant (Chicago),41.881832,-87.623177,Wood,4,0.0,0.0,0.0,0.0 RecyclingPlant (Chicago),41.881832,-87.623177,Wood,5,0.0,0.0,0.0,0.0 RecyclingPlant (New York City),40.712776,-74.005974,Nail,1,0.0,0.0,0.0,0.0 -RecyclingPlant (New York City),40.712776,-74.005974,Nail,2,-0.0,0.0,0.0,0.0 +RecyclingPlant (New York City),40.712776,-74.005974,Nail,2,0.0,0.0,0.0,0.0 RecyclingPlant (New York City),40.712776,-74.005974,Nail,3,0.0,0.0,0.0,0.0 -RecyclingPlant (New York City),40.712776,-74.005974,Nail,4,-0.0,0.0,0.0,0.0 -RecyclingPlant (New York City),40.712776,-74.005974,Nail,5,-0.0,0.0,0.0,0.0 +RecyclingPlant (New York City),40.712776,-74.005974,Nail,4,0.0,0.0,0.0,0.0 +RecyclingPlant (New York City),40.712776,-74.005974,Nail,5,0.0,0.0,0.0,0.0 RecyclingPlant (New York City),40.712776,-74.005974,Wood,1,0.0,0.0,0.0,0.0 -RecyclingPlant (New York City),40.712776,-74.005974,Wood,2,-0.0,0.0,0.0,0.0 +RecyclingPlant (New York City),40.712776,-74.005974,Wood,2,0.0,0.0,0.0,0.0 RecyclingPlant (New York City),40.712776,-74.005974,Wood,3,0.0,0.0,0.0,0.0 -RecyclingPlant (New York City),40.712776,-74.005974,Wood,4,-0.0,0.0,0.0,0.0 -RecyclingPlant (New York City),40.712776,-74.005974,Wood,5,-0.0,0.0,0.0,0.0 +RecyclingPlant (New York City),40.712776,-74.005974,Wood,4,0.0,0.0,0.0,0.0 +RecyclingPlant (New York City),40.712776,-74.005974,Wood,5,0.0,0.0,0.0,0.0 RecyclingPlant (Los Angeles),34.052235,-118.243683,Nail,1,0.0,0.0,0.0,0.0 RecyclingPlant (Los Angeles),34.052235,-118.243683,Nail,2,0.0,0.0,0.0,0.0 RecyclingPlant (Los Angeles),34.052235,-118.243683,Nail,3,0.0,0.0,0.0,0.0 @@ -90,14 +90,14 @@ RecyclingPlant (Houston),29.760427,-95.369804,Wood,3,0.0,0.0,0.0,0.0 RecyclingPlant (Houston),29.760427,-95.369804,Wood,4,0.0,0.0,0.0,0.0 RecyclingPlant (Houston),29.760427,-95.369804,Wood,5,0.0,0.0,0.0,0.0 RecyclingPlant (Phoenix),33.448376,-112.074036,Nail,1,0.0,0.0,0.0,0.0 -RecyclingPlant (Phoenix),33.448376,-112.074036,Nail,2,-0.0,0.0,0.0,0.0 -RecyclingPlant (Phoenix),33.448376,-112.074036,Nail,3,-0.0,0.0,0.0,0.0 -RecyclingPlant (Phoenix),33.448376,-112.074036,Nail,4,-0.0,0.0,0.0,0.0 +RecyclingPlant (Phoenix),33.448376,-112.074036,Nail,2,0.0,0.0,0.0,0.0 +RecyclingPlant (Phoenix),33.448376,-112.074036,Nail,3,0.0,0.0,0.0,0.0 +RecyclingPlant (Phoenix),33.448376,-112.074036,Nail,4,0.0,0.0,0.0,0.0 RecyclingPlant (Phoenix),33.448376,-112.074036,Nail,5,0.0,0.0,0.0,0.0 RecyclingPlant (Phoenix),33.448376,-112.074036,Wood,1,0.0,0.0,0.0,0.0 -RecyclingPlant (Phoenix),33.448376,-112.074036,Wood,2,-0.0,0.0,0.0,0.0 -RecyclingPlant (Phoenix),33.448376,-112.074036,Wood,3,-0.0,0.0,0.0,0.0 -RecyclingPlant (Phoenix),33.448376,-112.074036,Wood,4,-0.0,0.0,0.0,0.0 +RecyclingPlant (Phoenix),33.448376,-112.074036,Wood,2,0.0,0.0,0.0,0.0 +RecyclingPlant (Phoenix),33.448376,-112.074036,Wood,3,0.0,0.0,0.0,0.0 +RecyclingPlant (Phoenix),33.448376,-112.074036,Wood,4,0.0,0.0,0.0,0.0 RecyclingPlant (Phoenix),33.448376,-112.074036,Wood,5,0.0,0.0,0.0,0.0 RecyclingPlant (Philadelphia),39.952583,-75.165222,Nail,1,0.0,0.0,0.0,0.0 RecyclingPlant (Philadelphia),39.952583,-75.165222,Nail,2,0.0,0.0,0.0,0.0 @@ -109,12 +109,12 @@ RecyclingPlant (Philadelphia),39.952583,-75.165222,Wood,2,0.0,0.0,0.0,0.0 RecyclingPlant (Philadelphia),39.952583,-75.165222,Wood,3,0.0,0.0,0.0,0.0 RecyclingPlant (Philadelphia),39.952583,-75.165222,Wood,4,0.0,0.0,0.0,0.0 RecyclingPlant (Philadelphia),39.952583,-75.165222,Wood,5,0.0,0.0,0.0,0.0 -RecyclingPlant (San Antonio),29.424122,-98.493629,Nail,1,-0.0,0.0,0.0,0.0 +RecyclingPlant (San Antonio),29.424122,-98.493629,Nail,1,0.0,0.0,0.0,0.0 RecyclingPlant (San Antonio),29.424122,-98.493629,Nail,2,0.0,0.0,0.0,0.0 RecyclingPlant (San Antonio),29.424122,-98.493629,Nail,3,0.0,0.0,0.0,0.0 RecyclingPlant (San Antonio),29.424122,-98.493629,Nail,4,0.0,0.0,0.0,0.0 RecyclingPlant (San Antonio),29.424122,-98.493629,Nail,5,0.0,0.0,0.0,0.0 -RecyclingPlant (San Antonio),29.424122,-98.493629,Wood,1,-0.0,0.0,0.0,0.0 +RecyclingPlant (San Antonio),29.424122,-98.493629,Wood,1,0.0,0.0,0.0,0.0 RecyclingPlant (San Antonio),29.424122,-98.493629,Wood,2,0.0,0.0,0.0,0.0 RecyclingPlant (San Antonio),29.424122,-98.493629,Wood,3,0.0,0.0,0.0,0.0 RecyclingPlant (San Antonio),29.424122,-98.493629,Wood,4,0.0,0.0,0.0,0.0 diff --git a/test/fixtures/boat_example/plants.csv b/test/fixtures/boat_example/plants.csv index 4b29720..c627512 100644 --- a/test/fixtures/boat_example/plants.csv +++ b/test/fixtures/boat_example/plants.csv @@ -1,101 +1,101 @@ -plant,latitude,longitude,initial capacity,current capacity,year,operational?,input amount (tonne),opening cost ($),fixed operating cost ($),variable operating cost ($) -BoatFactory (Chicago),41.881832,-87.623177,0.0,0.0,1,false,-0.0,0.0,0.0,-0.0 -BoatFactory (Chicago),41.881832,-87.623177,0.0,0.0,2,false,-0.0,0.0,0.0,-0.0 -BoatFactory (Chicago),41.881832,-87.623177,0.0,0.0,3,false,0.0,0.0,0.0,0.0 -BoatFactory (Chicago),41.881832,-87.623177,0.0,0.0,4,false,-0.0,0.0,0.0,-0.0 -BoatFactory (Chicago),41.881832,-87.623177,0.0,0.0,5,false,-0.0,0.0,0.0,-0.0 -BoatFactory (New York City),40.712776,-74.005974,0.0,0.0,1,false,-0.0,0.0,0.0,-0.0 -BoatFactory (New York City),40.712776,-74.005974,0.0,0.0,2,false,-0.0,0.0,0.0,-0.0 -BoatFactory (New York City),40.712776,-74.005974,0.0,0.0,3,false,-0.0,0.0,0.0,-0.0 -BoatFactory (New York City),40.712776,-74.005974,0.0,0.0,4,false,-0.0,0.0,0.0,-0.0 -BoatFactory (New York City),40.712776,-74.005974,0.0,0.0,5,false,-0.0,0.0,0.0,-0.0 -BoatFactory (Los Angeles),34.052235,-118.243683,0.0,0.0,1,false,-0.0,0.0,0.0,-0.0 -BoatFactory (Los Angeles),34.052235,-118.243683,0.0,0.0,2,false,-0.0,0.0,0.0,-0.0 -BoatFactory (Los Angeles),34.052235,-118.243683,0.0,0.0,3,false,-0.0,0.0,0.0,-0.0 -BoatFactory (Los Angeles),34.052235,-118.243683,0.0,0.0,4,false,-0.0,0.0,0.0,-0.0 -BoatFactory (Los Angeles),34.052235,-118.243683,0.0,0.0,5,false,-0.0,0.0,0.0,-0.0 -BoatFactory (Houston),29.760427,-95.369804,0.0,0.0,1,false,-0.0,0.0,0.0,-0.0 -BoatFactory (Houston),29.760427,-95.369804,0.0,0.0,2,false,-0.0,0.0,0.0,-0.0 -BoatFactory (Houston),29.760427,-95.369804,0.0,0.0,3,false,-0.0,0.0,0.0,-0.0 -BoatFactory (Houston),29.760427,-95.369804,0.0,0.0,4,false,-0.0,0.0,0.0,-0.0 -BoatFactory (Houston),29.760427,-95.369804,0.0,0.0,5,false,-0.0,0.0,0.0,-0.0 -BoatFactory (Phoenix),33.448376,-112.074036,0.0,0.0,1,false,-0.0,0.0,0.0,-0.0 -BoatFactory (Phoenix),33.448376,-112.074036,0.0,0.0,2,false,-0.0,0.0,0.0,-0.0 -BoatFactory (Phoenix),33.448376,-112.074036,0.0,0.0,3,false,0.0,0.0,0.0,0.0 -BoatFactory (Phoenix),33.448376,-112.074036,0.0,0.0,4,false,-0.0,0.0,0.0,-0.0 -BoatFactory (Phoenix),33.448376,-112.074036,0.0,0.0,5,false,0.0,0.0,0.0,0.0 -BoatFactory (Philadelphia),39.952583,-75.165222,0.0,0.0,1,false,-0.0,0.0,0.0,-0.0 -BoatFactory (Philadelphia),39.952583,-75.165222,0.0,0.0,2,false,-0.0,0.0,0.0,-0.0 -BoatFactory (Philadelphia),39.952583,-75.165222,0.0,0.0,3,false,-0.0,0.0,0.0,-0.0 -BoatFactory (Philadelphia),39.952583,-75.165222,0.0,0.0,4,false,-0.0,0.0,0.0,-0.0 -BoatFactory (Philadelphia),39.952583,-75.165222,0.0,0.0,5,false,-0.0,0.0,0.0,-0.0 -BoatFactory (San Antonio),29.424122,-98.493629,0.0,0.0,1,false,-0.0,0.0,0.0,-0.0 -BoatFactory (San Antonio),29.424122,-98.493629,0.0,0.0,2,false,-0.0,0.0,0.0,-0.0 -BoatFactory (San Antonio),29.424122,-98.493629,0.0,0.0,3,false,0.0,0.0,0.0,0.0 -BoatFactory (San Antonio),29.424122,-98.493629,0.0,0.0,4,false,-0.0,0.0,0.0,-0.0 -BoatFactory (San Antonio),29.424122,-98.493629,0.0,0.0,5,false,-0.0,0.0,0.0,-0.0 -BoatFactory (San Diego),32.715736,-117.161087,0.0,0.0,1,false,-0.0,0.0,0.0,-0.0 -BoatFactory (San Diego),32.715736,-117.161087,0.0,0.0,2,false,-0.0,0.0,0.0,-0.0 -BoatFactory (San Diego),32.715736,-117.161087,0.0,0.0,3,false,-0.0,0.0,0.0,-0.0 -BoatFactory (San Diego),32.715736,-117.161087,0.0,0.0,4,false,-0.0,0.0,0.0,-0.0 -BoatFactory (San Diego),32.715736,-117.161087,0.0,0.0,5,false,-0.0,0.0,0.0,-0.0 -BoatFactory (Dallas),32.776664,-96.796988,0.0,500.0,1,true,63.15789,100000.0,250000.0,315.78947 -BoatFactory (Dallas),32.776664,-96.796988,0.0,500.0,2,true,71.46814,0.0,250000.0,357.34072 -BoatFactory (Dallas),32.776664,-96.796988,0.0,500.0,3,true,75.8857,0.0,250000.0,379.42849 -BoatFactory (Dallas),32.776664,-96.796988,0.0,500.0,4,true,76.90434,0.0,250000.0,384.52168 -BoatFactory (Dallas),32.776664,-96.796988,0.0,500.0,5,true,77.27087,0.0,250000.0,386.35435 -BoatFactory (San Jose),37.338208,-121.886329,0.0,0.0,1,false,-0.0,0.0,0.0,-0.0 -BoatFactory (San Jose),37.338208,-121.886329,0.0,0.0,2,false,-0.0,0.0,0.0,-0.0 -BoatFactory (San Jose),37.338208,-121.886329,0.0,0.0,3,false,-0.0,0.0,0.0,-0.0 -BoatFactory (San Jose),37.338208,-121.886329,0.0,0.0,4,false,-0.0,0.0,0.0,-0.0 -BoatFactory (San Jose),37.338208,-121.886329,0.0,0.0,5,false,-0.0,0.0,0.0,-0.0 -RecyclingPlant (Chicago),41.881832,-87.623177,0.0,0.0,1,false,-0.0,0.0,0.0,-0.0 -RecyclingPlant (Chicago),41.881832,-87.623177,0.0,0.0,2,false,0.0,0.0,0.0,0.0 -RecyclingPlant (Chicago),41.881832,-87.623177,0.0,0.0,3,false,0.0,0.0,0.0,0.0 -RecyclingPlant (Chicago),41.881832,-87.623177,0.0,0.0,4,false,0.0,0.0,0.0,0.0 -RecyclingPlant (Chicago),41.881832,-87.623177,0.0,0.0,5,false,-0.0,0.0,0.0,-0.0 -RecyclingPlant (New York City),40.712776,-74.005974,0.0,0.0,1,false,-0.0,0.0,0.0,-0.0 -RecyclingPlant (New York City),40.712776,-74.005974,0.0,0.0,2,false,-0.0,0.0,0.0,-0.0 -RecyclingPlant (New York City),40.712776,-74.005974,0.0,0.0,3,false,-0.0,0.0,0.0,-0.0 -RecyclingPlant (New York City),40.712776,-74.005974,0.0,0.0,4,false,-0.0,0.0,0.0,-0.0 -RecyclingPlant (New York City),40.712776,-74.005974,0.0,0.0,5,false,-0.0,0.0,0.0,-0.0 -RecyclingPlant (Los Angeles),34.052235,-118.243683,0.0,0.0,1,false,-0.0,0.0,0.0,-0.0 -RecyclingPlant (Los Angeles),34.052235,-118.243683,0.0,0.0,2,false,-0.0,0.0,0.0,-0.0 -RecyclingPlant (Los Angeles),34.052235,-118.243683,0.0,0.0,3,false,-0.0,0.0,0.0,-0.0 -RecyclingPlant (Los Angeles),34.052235,-118.243683,0.0,0.0,4,false,-0.0,0.0,0.0,-0.0 -RecyclingPlant (Los Angeles),34.052235,-118.243683,0.0,0.0,5,false,-0.0,0.0,0.0,-0.0 -RecyclingPlant (Houston),29.760427,-95.369804,0.0,0.0,1,false,-0.0,0.0,0.0,-0.0 -RecyclingPlant (Houston),29.760427,-95.369804,0.0,0.0,2,false,-0.0,0.0,0.0,-0.0 -RecyclingPlant (Houston),29.760427,-95.369804,0.0,0.0,3,false,-0.0,0.0,0.0,-0.0 -RecyclingPlant (Houston),29.760427,-95.369804,0.0,0.0,4,false,-0.0,0.0,0.0,-0.0 -RecyclingPlant (Houston),29.760427,-95.369804,0.0,0.0,5,false,-0.0,0.0,0.0,-0.0 -RecyclingPlant (Phoenix),33.448376,-112.074036,0.0,0.0,1,false,-0.0,0.0,0.0,-0.0 -RecyclingPlant (Phoenix),33.448376,-112.074036,0.0,0.0,2,false,-0.0,0.0,0.0,-0.0 -RecyclingPlant (Phoenix),33.448376,-112.074036,0.0,0.0,3,false,-0.0,0.0,0.0,-0.0 -RecyclingPlant (Phoenix),33.448376,-112.074036,0.0,0.0,4,false,-0.0,0.0,0.0,-0.0 -RecyclingPlant (Phoenix),33.448376,-112.074036,0.0,0.0,5,false,-0.0,0.0,0.0,-0.0 -RecyclingPlant (Philadelphia),39.952583,-75.165222,0.0,0.0,1,false,-0.0,0.0,0.0,-0.0 -RecyclingPlant (Philadelphia),39.952583,-75.165222,0.0,0.0,2,false,0.0,0.0,0.0,0.0 -RecyclingPlant (Philadelphia),39.952583,-75.165222,0.0,0.0,3,false,-0.0,0.0,0.0,-0.0 -RecyclingPlant (Philadelphia),39.952583,-75.165222,0.0,0.0,4,false,0.0,0.0,0.0,0.0 -RecyclingPlant (Philadelphia),39.952583,-75.165222,0.0,0.0,5,false,0.0,0.0,0.0,0.0 -RecyclingPlant (San Antonio),29.424122,-98.493629,0.0,0.0,1,false,-0.0,0.0,0.0,-0.0 -RecyclingPlant (San Antonio),29.424122,-98.493629,0.0,0.0,2,false,0.0,0.0,0.0,0.0 -RecyclingPlant (San Antonio),29.424122,-98.493629,0.0,0.0,3,false,0.0,0.0,0.0,0.0 -RecyclingPlant (San Antonio),29.424122,-98.493629,0.0,0.0,4,false,0.0,0.0,0.0,0.0 -RecyclingPlant (San Antonio),29.424122,-98.493629,0.0,0.0,5,false,0.0,0.0,0.0,0.0 -RecyclingPlant (San Diego),32.715736,-117.161087,0.0,0.0,1,false,-0.0,0.0,0.0,-0.0 -RecyclingPlant (San Diego),32.715736,-117.161087,0.0,0.0,2,false,-0.0,0.0,0.0,-0.0 -RecyclingPlant (San Diego),32.715736,-117.161087,0.0,0.0,3,false,-0.0,0.0,0.0,-0.0 -RecyclingPlant (San Diego),32.715736,-117.161087,0.0,0.0,4,false,-0.0,0.0,0.0,-0.0 -RecyclingPlant (San Diego),32.715736,-117.161087,0.0,0.0,5,false,-0.0,0.0,0.0,-0.0 -RecyclingPlant (Dallas),32.776664,-96.796988,0.0,500.0,1,true,6.31579,500000.0,125000.0,15.78947 -RecyclingPlant (Dallas),32.776664,-96.796988,0.0,500.0,2,true,22.93629,0.0,125000.0,57.34072 -RecyclingPlant (Dallas),32.776664,-96.796988,0.0,500.0,3,true,31.7714,0.0,125000.0,79.42849 -RecyclingPlant (Dallas),32.776664,-96.796988,0.0,500.0,4,true,33.80867,0.0,125000.0,84.52168 -RecyclingPlant (Dallas),32.776664,-96.796988,0.0,500.0,5,true,34.54174,0.0,125000.0,86.35435 -RecyclingPlant (San Jose),37.338208,-121.886329,0.0,0.0,1,false,-0.0,0.0,0.0,-0.0 -RecyclingPlant (San Jose),37.338208,-121.886329,0.0,0.0,2,false,-0.0,0.0,0.0,-0.0 -RecyclingPlant (San Jose),37.338208,-121.886329,0.0,0.0,3,false,-0.0,0.0,0.0,-0.0 -RecyclingPlant (San Jose),37.338208,-121.886329,0.0,0.0,4,false,-0.0,0.0,0.0,-0.0 -RecyclingPlant (San Jose),37.338208,-121.886329,0.0,0.0,5,false,-0.0,0.0,0.0,-0.0 +plant,latitude,longitude,initial capacity,current capacity,year,operational?,input amount (tonne),opening cost ($),fixed operating cost ($),variable operating cost ($),expansion cost ($) +BoatFactory (Chicago),41.881832,-87.623177,0.0,0.0,1,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (Chicago),41.881832,-87.623177,0.0,0.0,2,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (Chicago),41.881832,-87.623177,0.0,0.0,3,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (Chicago),41.881832,-87.623177,0.0,0.0,4,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (Chicago),41.881832,-87.623177,0.0,0.0,5,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (New York City),40.712776,-74.005974,0.0,0.0,1,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (New York City),40.712776,-74.005974,0.0,0.0,2,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (New York City),40.712776,-74.005974,0.0,0.0,3,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (New York City),40.712776,-74.005974,0.0,0.0,4,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (New York City),40.712776,-74.005974,0.0,0.0,5,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (Los Angeles),34.052235,-118.243683,0.0,0.0,1,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (Los Angeles),34.052235,-118.243683,0.0,0.0,2,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (Los Angeles),34.052235,-118.243683,0.0,0.0,3,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (Los Angeles),34.052235,-118.243683,0.0,0.0,4,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (Los Angeles),34.052235,-118.243683,0.0,0.0,5,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (Houston),29.760427,-95.369804,0.0,0.0,1,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (Houston),29.760427,-95.369804,0.0,0.0,2,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (Houston),29.760427,-95.369804,0.0,0.0,3,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (Houston),29.760427,-95.369804,0.0,0.0,4,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (Houston),29.760427,-95.369804,0.0,0.0,5,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (Phoenix),33.448376,-112.074036,0.0,0.0,1,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (Phoenix),33.448376,-112.074036,0.0,0.0,2,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (Phoenix),33.448376,-112.074036,0.0,0.0,3,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (Phoenix),33.448376,-112.074036,0.0,0.0,4,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (Phoenix),33.448376,-112.074036,0.0,0.0,5,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (Philadelphia),39.952583,-75.165222,0.0,0.0,1,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (Philadelphia),39.952583,-75.165222,0.0,0.0,2,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (Philadelphia),39.952583,-75.165222,0.0,0.0,3,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (Philadelphia),39.952583,-75.165222,0.0,0.0,4,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (Philadelphia),39.952583,-75.165222,0.0,0.0,5,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (San Antonio),29.424122,-98.493629,0.0,0.0,1,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (San Antonio),29.424122,-98.493629,0.0,0.0,2,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (San Antonio),29.424122,-98.493629,0.0,0.0,3,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (San Antonio),29.424122,-98.493629,0.0,0.0,4,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (San Antonio),29.424122,-98.493629,0.0,0.0,5,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (San Diego),32.715736,-117.161087,0.0,0.0,1,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (San Diego),32.715736,-117.161087,0.0,0.0,2,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (San Diego),32.715736,-117.161087,0.0,0.0,3,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (San Diego),32.715736,-117.161087,0.0,0.0,4,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (San Diego),32.715736,-117.161087,0.0,0.0,5,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (Dallas),32.776664,-96.796988,0.0,500.0,1,true,63.15789,100000.0,250000.0,315.78947,0.0 +BoatFactory (Dallas),32.776664,-96.796988,0.0,500.0,2,true,71.46814,0.0,250000.0,357.34072,0.0 +BoatFactory (Dallas),32.776664,-96.796988,0.0,500.0,3,true,75.8857,0.0,250000.0,379.42849,0.0 +BoatFactory (Dallas),32.776664,-96.796988,0.0,500.0,4,true,76.90434,0.0,250000.0,384.52168,0.0 +BoatFactory (Dallas),32.776664,-96.796988,0.0,500.0,5,true,77.27087,0.0,250000.0,386.35435,0.0 +BoatFactory (San Jose),37.338208,-121.886329,0.0,0.0,1,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (San Jose),37.338208,-121.886329,0.0,0.0,2,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (San Jose),37.338208,-121.886329,0.0,0.0,3,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (San Jose),37.338208,-121.886329,0.0,0.0,4,false,0.0,0.0,0.0,0.0,0.0 +BoatFactory (San Jose),37.338208,-121.886329,0.0,0.0,5,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (Chicago),41.881832,-87.623177,0.0,0.0,1,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (Chicago),41.881832,-87.623177,0.0,0.0,2,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (Chicago),41.881832,-87.623177,0.0,0.0,3,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (Chicago),41.881832,-87.623177,0.0,0.0,4,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (Chicago),41.881832,-87.623177,0.0,0.0,5,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (New York City),40.712776,-74.005974,0.0,0.0,1,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (New York City),40.712776,-74.005974,0.0,0.0,2,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (New York City),40.712776,-74.005974,0.0,0.0,3,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (New York City),40.712776,-74.005974,0.0,0.0,4,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (New York City),40.712776,-74.005974,0.0,0.0,5,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (Los Angeles),34.052235,-118.243683,0.0,0.0,1,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (Los Angeles),34.052235,-118.243683,0.0,0.0,2,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (Los Angeles),34.052235,-118.243683,0.0,0.0,3,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (Los Angeles),34.052235,-118.243683,0.0,0.0,4,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (Los Angeles),34.052235,-118.243683,0.0,0.0,5,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (Houston),29.760427,-95.369804,0.0,0.0,1,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (Houston),29.760427,-95.369804,0.0,0.0,2,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (Houston),29.760427,-95.369804,0.0,0.0,3,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (Houston),29.760427,-95.369804,0.0,0.0,4,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (Houston),29.760427,-95.369804,0.0,0.0,5,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (Phoenix),33.448376,-112.074036,0.0,0.0,1,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (Phoenix),33.448376,-112.074036,0.0,0.0,2,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (Phoenix),33.448376,-112.074036,0.0,0.0,3,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (Phoenix),33.448376,-112.074036,0.0,0.0,4,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (Phoenix),33.448376,-112.074036,0.0,0.0,5,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (Philadelphia),39.952583,-75.165222,0.0,0.0,1,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (Philadelphia),39.952583,-75.165222,0.0,0.0,2,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (Philadelphia),39.952583,-75.165222,0.0,0.0,3,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (Philadelphia),39.952583,-75.165222,0.0,0.0,4,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (Philadelphia),39.952583,-75.165222,0.0,0.0,5,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (San Antonio),29.424122,-98.493629,0.0,0.0,1,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (San Antonio),29.424122,-98.493629,0.0,0.0,2,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (San Antonio),29.424122,-98.493629,0.0,0.0,3,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (San Antonio),29.424122,-98.493629,0.0,0.0,4,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (San Antonio),29.424122,-98.493629,0.0,0.0,5,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (San Diego),32.715736,-117.161087,0.0,0.0,1,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (San Diego),32.715736,-117.161087,0.0,0.0,2,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (San Diego),32.715736,-117.161087,0.0,0.0,3,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (San Diego),32.715736,-117.161087,0.0,0.0,4,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (San Diego),32.715736,-117.161087,0.0,0.0,5,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (Dallas),32.776664,-96.796988,0.0,500.0,1,true,6.31579,500000.0,125000.0,15.78947,0.0 +RecyclingPlant (Dallas),32.776664,-96.796988,0.0,500.0,2,true,22.93629,0.0,125000.0,57.34072,0.0 +RecyclingPlant (Dallas),32.776664,-96.796988,0.0,500.0,3,true,31.7714,0.0,125000.0,79.42849,0.0 +RecyclingPlant (Dallas),32.776664,-96.796988,0.0,500.0,4,true,33.80867,0.0,125000.0,84.52168,0.0 +RecyclingPlant (Dallas),32.776664,-96.796988,0.0,500.0,5,true,34.54174,0.0,125000.0,86.35435,0.0 +RecyclingPlant (San Jose),37.338208,-121.886329,0.0,0.0,1,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (San Jose),37.338208,-121.886329,0.0,0.0,2,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (San Jose),37.338208,-121.886329,0.0,0.0,3,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (San Jose),37.338208,-121.886329,0.0,0.0,4,false,0.0,0.0,0.0,0.0,0.0 +RecyclingPlant (San Jose),37.338208,-121.886329,0.0,0.0,5,false,0.0,0.0,0.0,0.0,0.0 diff --git a/test/fixtures/simple.json b/test/fixtures/simple.json index dedecf0..57647df 100644 --- a/test/fixtures/simple.json +++ b/test/fixtures/simple.json @@ -153,7 +153,7 @@ "variable operating cost ($/tonne)": 5.0 } ], - "initial capacity (tonne)": 0 + "initial capacity (tonne)": 250 } }, "emissions": { diff --git a/test/src/instance/parse_test.jl b/test/src/instance/parse_test.jl index 1937bc9..692a6e1 100644 --- a/test/src/instance/parse_test.jl +++ b/test/src/instance/parse_test.jl @@ -56,7 +56,7 @@ function instance_parse_test_1() @test l1.disposal_cost == Dict(p3 => [0, 0, 0, 0], p4 => [0.86, 0.86, 0.86, 0.86]) @test l1.disposal_limit == Dict(p3 => [Inf, Inf, Inf, Inf], p4 => [1000.0, 1000.0, 1000.0, 1000.0]) - @test l1.initial_capacity == 0 + @test l1.initial_capacity == 250 @test length(l1.capacities) == 2 c1 = l1.capacities[1] @test c1.size == 100 diff --git a/test/src/model/build_test.jl b/test/src/model/build_test.jl index 5606f2d..49c0849 100644 --- a/test/src/model/build_test.jl +++ b/test/src/model/build_test.jl @@ -11,6 +11,7 @@ function model_build_test() z_input = model[:z_input] z_em_tr = model[:z_em_tr] z_em_plant = model[:z_em_plant] + z_exp = model[:z_exp] x = model[:x] obj = objective_function(model) # print(model) @@ -27,6 +28,8 @@ function model_build_test() @test obj.terms[z_disp["C1", "P2", 1]] == 0.23 @test obj.constant == ( 150 * 4 * 3 # center operating cost + - 300 # initial opening cost + - 150 * 1.75 # initial expansion ) @test obj.terms[z_disp["L1", "P4", 2]] == 0.86 @test obj.terms[x["L1", 1]] == ( @@ -46,6 +49,23 @@ function model_build_test() 300 # fixed operating cost ) + # Test expansion variables exist and have correct initial values + @test z_exp["L1", 0] == 150.0 # initial_capacity (250) - min_capacity (100) + @test haskey(z_exp, ("L1", 1)) + @test haskey(z_exp, ("L1", 2)) + @test haskey(z_exp, ("L1", 3)) + @test haskey(z_exp, ("L1", 4)) + + # Test expansion costs in objective function + # R_expand[1] = (1000 - 300) / (500 - 100) = 1.75 + # R_expand[2] = (1000 - 400) / (500 - 100) = 1.5 + # R_fix_exp[1] = (400 - 300) / (500 - 100) = 0.25 + @test obj.terms[z_exp["L1", 1]] == ( + +1.75 # expansion cost[1] + - 1.5 # expansion cost[2] + + 0.25 # fixed operating cost[1] + ) + # Variables: Transportation emissions @test haskey(z_em_tr, ("CO2", "L1", "C3", "P4", 1)) @test haskey(z_em_tr, ("CH4", "L1", "C3", "P4", 1)) @@ -80,9 +100,13 @@ function model_build_test() @test repr(model[:eq_balance]["L1", "P4", 1]) == "eq_balance[L1,P4,1] : -y[L1,C3,P4,1] + z_prod[L1,P4,1] - z_disp[L1,P4,1] = 0" - # Plants: Capacity limit - @test repr(model[:eq_capacity]["L1", 1]) == - "eq_capacity[L1,1] : -100 x[L1,1] + z_input[L1,1] ≤ 0" + # Plants: Input limit (capacity constraint) + @test repr(model[:eq_input_limit]["L1", 1]) == + "eq_input_limit[L1,1] : -100 x[L1,1] + z_input[L1,1] - z_exp[L1,1] ≤ 0" + + # Plants: Expansion upper bound + @test repr(model[:eq_exp_ub]["L1", 1]) == + "eq_exp_ub[L1,1] : -400 x[L1,1] + z_exp[L1,1] ≤ 0" # Plants: Disposal limit @test repr(model[:eq_disposal_limit]["L1", "P4", 1]) == @@ -92,7 +116,7 @@ function model_build_test() # Plants: Plant remains open @test repr(model[:eq_keep_open]["L1", 4]) == "eq_keep_open[L1,4] : -x[L1,3] + x[L1,4] ≥ 0" - @test repr(model[:eq_keep_open]["L1", 1]) == "eq_keep_open[L1,1] : x[L1,1] ≥ 0" + @test repr(model[:eq_keep_open]["L1", 1]) == "eq_keep_open[L1,1] : x[L1,1] ≥ 1" # Plants: Building period @test ("L1", 1) ∉ keys(model[:eq_building_period]) @@ -137,9 +161,9 @@ function model_build_test() @test repr(model[:eq_emission_tr]["CH4", "L1", "C3", "P4", 1]) == "eq_emission_tr[CH4,L1,C3,P4,1] : -0.333354 y[L1,C3,P4,1] + z_em_tr[CH4,L1,C3,P4,1] = 0" - # Plants: Plant emissions + # Plants: Plant emissions (updated to use z_input) @test repr(model[:eq_emission_plant]["CO2", "L1", 1]) == - "eq_emission_plant[CO2,L1,1] : -0.1 y[C2,L1,P1,1] - 0.1 y[C1,L1,P2,1] + z_em_plant[CO2,L1,1] = 0" + "eq_emission_plant[CO2,L1,1] : -0.1 z_input[L1,1] + z_em_plant[CO2,L1,1] = 0" # Objective function: Emissions penalty costs @test obj.terms[z_em_plant["CO2", "L1", 1]] == 50.0 # CO2 penalty at time 1