From cf38611991db1967a272c5be7a40206b26acda66 Mon Sep 17 00:00:00 2001 From: Chad Baker Date: Tue, 25 Jul 2023 13:18:06 -0600 Subject: [PATCH 01/16] readying for publication on crates.io --- rust/Cargo.toml | 12 ++++++------ rust/fastsim-cli/Cargo.toml | 6 ++++-- rust/fastsim-core/Cargo.toml | 18 ++++++++++++------ .../.gitignore | 0 .../Cargo.toml | 4 ++-- .../src/add_pyo3_api.rs | 0 .../src/approx_eq_derive.rs | 0 .../src/history_vec_derive.rs | 0 .../src/imports.rs | 0 .../src/lib.rs | 0 .../src/utilities.rs | 0 rust/fastsim-py/Cargo.toml | 5 +++-- 12 files changed, 27 insertions(+), 18 deletions(-) rename rust/fastsim-core/{proc-macros => fastsim-proc-macros}/.gitignore (100%) rename rust/fastsim-core/{proc-macros => fastsim-proc-macros}/Cargo.toml (83%) rename rust/fastsim-core/{proc-macros => fastsim-proc-macros}/src/add_pyo3_api.rs (100%) rename rust/fastsim-core/{proc-macros => fastsim-proc-macros}/src/approx_eq_derive.rs (100%) rename rust/fastsim-core/{proc-macros => fastsim-proc-macros}/src/history_vec_derive.rs (100%) rename rust/fastsim-core/{proc-macros => fastsim-proc-macros}/src/imports.rs (100%) rename rust/fastsim-core/{proc-macros => fastsim-proc-macros}/src/lib.rs (100%) rename rust/fastsim-core/{proc-macros => fastsim-proc-macros}/src/utilities.rs (100%) diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 2dd9aa1b..db7f18e1 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -1,16 +1,16 @@ [workspace] members = [ - "fastsim-cli", # command line app + "fastsim-cli", # command line app "fastsim-core", # pure rust core with optional pyo3 feature - "fastsim-py", # python module exposing fastsim-core + "fastsim-py", # python module exposing fastsim-core ] [profile.release] # https://deterministic.space/high-performance-rust.html -opt-level = 3 # Use better optimizations. -lto = "fat" # aggressively optimize inter-crate linking -codegen-units = 1 # optimize connection between modules +opt-level = 3 # Use better optimizations. +lto = "fat" # aggressively optimize inter-crate linking +codegen-units = 1 # optimize connection between modules [workspace.dependencies] anyhow = "1.0.57" @@ -18,4 +18,4 @@ pyo3 = "0.19" pyo3-log = "*" serde = "1.0.143" serde_json = "1.0.83" -serde_yaml = "0.9.22" \ No newline at end of file +serde_yaml = "0.9.22" diff --git a/rust/fastsim-cli/Cargo.toml b/rust/fastsim-cli/Cargo.toml index 6a8f5877..45a63829 100644 --- a/rust/fastsim-cli/Cargo.toml +++ b/rust/fastsim-cli/Cargo.toml @@ -2,13 +2,15 @@ name = "fastsim-cli" version = "0.1.0" edition = "2021" +license_file = "../LICENSE.md" + # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] fastsim-core = { path = "../fastsim-core" } -serde = {workspace = true} -serde_json = {workspace = true} +serde = { workspace = true } +serde_json = { workspace = true } project-root = "0.2.2" clap = { version = "3.2.6", features = ["derive"] } regex = "1" diff --git a/rust/fastsim-core/Cargo.toml b/rust/fastsim-core/Cargo.toml index 3c97bd89..7fb582ad 100644 --- a/rust/fastsim-core/Cargo.toml +++ b/rust/fastsim-core/Cargo.toml @@ -2,27 +2,33 @@ name = "fastsim-core" version = "0.1.0" edition = "2021" +license_file = "../LICENSE.md" [dependencies] -pyo3 = { workspace = true, features = ["extension-module", "anyhow"], optional = true } +pyo3 = { workspace = true, features = [ + "extension-module", + "anyhow", +], optional = true } anyhow = { workspace = true } serde = { workspace = true, features = ["derive"] } -serde_yaml = {workspace = true} -ndarray = { version = "0.15.4", features=["serde"] } +serde_yaml = { workspace = true } +ndarray = { version = "0.15.4", features = ["serde"] } csv = "1.1" -proc-macros = { path = "proc-macros" } +proc-macros = { package = "fastsim-proc-macros", path = "fastsim-proc-macros" } serde_json = "1.0.81" bincode = "1.3.3" log = "0.4.17" polynomial = "0.2.4" argmin = "0.7.0" -argmin-math = { version = "0.2.1", features = ["ndarray_latest-nolinalg-serde"] } +argmin-math = { version = "0.2.1", features = [ + "ndarray_latest-nolinalg-serde", +] } validator = { version = "0.16", features = ["derive"] } lazy_static = "1.4.0" regex = "1.7.1" [package.metadata.docs.rs] -rustdoc-args = [ "--html-in-header", "./src/html/docs-header.html" ] +rustdoc-args = ["--html-in-header", "./src/html/docs-header.html"] [features] pyo3 = ["dep:pyo3"] diff --git a/rust/fastsim-core/proc-macros/.gitignore b/rust/fastsim-core/fastsim-proc-macros/.gitignore similarity index 100% rename from rust/fastsim-core/proc-macros/.gitignore rename to rust/fastsim-core/fastsim-proc-macros/.gitignore diff --git a/rust/fastsim-core/proc-macros/Cargo.toml b/rust/fastsim-core/fastsim-proc-macros/Cargo.toml similarity index 83% rename from rust/fastsim-core/proc-macros/Cargo.toml rename to rust/fastsim-core/fastsim-proc-macros/Cargo.toml index 615d76c9..7ad2c318 100644 --- a/rust/fastsim-core/proc-macros/Cargo.toml +++ b/rust/fastsim-core/fastsim-proc-macros/Cargo.toml @@ -1,7 +1,8 @@ [package] -name = "proc-macros" +name = "fastsim-proc-macros" version = "0.1.0" edition = "2021" +license_file = "../../LICENSE.md" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -14,4 +15,3 @@ syn = { version = "1.0.92", features = ["full"] } [lib] proc-macro = true - diff --git a/rust/fastsim-core/proc-macros/src/add_pyo3_api.rs b/rust/fastsim-core/fastsim-proc-macros/src/add_pyo3_api.rs similarity index 100% rename from rust/fastsim-core/proc-macros/src/add_pyo3_api.rs rename to rust/fastsim-core/fastsim-proc-macros/src/add_pyo3_api.rs diff --git a/rust/fastsim-core/proc-macros/src/approx_eq_derive.rs b/rust/fastsim-core/fastsim-proc-macros/src/approx_eq_derive.rs similarity index 100% rename from rust/fastsim-core/proc-macros/src/approx_eq_derive.rs rename to rust/fastsim-core/fastsim-proc-macros/src/approx_eq_derive.rs diff --git a/rust/fastsim-core/proc-macros/src/history_vec_derive.rs b/rust/fastsim-core/fastsim-proc-macros/src/history_vec_derive.rs similarity index 100% rename from rust/fastsim-core/proc-macros/src/history_vec_derive.rs rename to rust/fastsim-core/fastsim-proc-macros/src/history_vec_derive.rs diff --git a/rust/fastsim-core/proc-macros/src/imports.rs b/rust/fastsim-core/fastsim-proc-macros/src/imports.rs similarity index 100% rename from rust/fastsim-core/proc-macros/src/imports.rs rename to rust/fastsim-core/fastsim-proc-macros/src/imports.rs diff --git a/rust/fastsim-core/proc-macros/src/lib.rs b/rust/fastsim-core/fastsim-proc-macros/src/lib.rs similarity index 100% rename from rust/fastsim-core/proc-macros/src/lib.rs rename to rust/fastsim-core/fastsim-proc-macros/src/lib.rs diff --git a/rust/fastsim-core/proc-macros/src/utilities.rs b/rust/fastsim-core/fastsim-proc-macros/src/utilities.rs similarity index 100% rename from rust/fastsim-core/proc-macros/src/utilities.rs rename to rust/fastsim-core/fastsim-proc-macros/src/utilities.rs diff --git a/rust/fastsim-py/Cargo.toml b/rust/fastsim-py/Cargo.toml index d10d4eef..4a693519 100644 --- a/rust/fastsim-py/Cargo.toml +++ b/rust/fastsim-py/Cargo.toml @@ -2,16 +2,17 @@ name = "fastsim-py" version = "0.1.0" edition = "2021" +license_file = "../LICENSE.md" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] fastsim-core = { path = "../fastsim-core", features = ["pyo3"] } pyo3 = { workspace = true, features = ["extension-module", "anyhow"] } -pyo3-log = { workspace = true} +pyo3-log = { workspace = true } log = "0.4.17" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [lib] name = "fastsimrust" -crate-type = ["cdylib"] \ No newline at end of file +crate-type = ["cdylib"] From 1cd6baf436db35bcd1873877dd9aa206437ec9d4 Mon Sep 17 00:00:00 2001 From: Chad Baker Date: Tue, 25 Jul 2023 14:17:45 -0600 Subject: [PATCH 02/16] added more Cargo fields --- rust/fastsim-cli/Cargo.toml | 6 ++++-- rust/fastsim-core/Cargo.toml | 5 ++++- rust/fastsim-core/fastsim-proc-macros/Cargo.toml | 5 ++++- rust/fastsim-py/Cargo.toml | 5 ++++- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/rust/fastsim-cli/Cargo.toml b/rust/fastsim-cli/Cargo.toml index 45a63829..acfbbbda 100644 --- a/rust/fastsim-cli/Cargo.toml +++ b/rust/fastsim-cli/Cargo.toml @@ -2,8 +2,10 @@ name = "fastsim-cli" version = "0.1.0" edition = "2021" -license_file = "../LICENSE.md" - +license-file = "../../LICENSE.md" +authors = ["NREL/MTES/CIMS/MBAP Group "] +description = "CLI app for FASTSim models for vehicle energy usage simulation" +homepage = "https://www.nrel.gov/transportation/fastsim.html" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/rust/fastsim-core/Cargo.toml b/rust/fastsim-core/Cargo.toml index 7fb582ad..b6cf5131 100644 --- a/rust/fastsim-core/Cargo.toml +++ b/rust/fastsim-core/Cargo.toml @@ -2,7 +2,10 @@ name = "fastsim-core" version = "0.1.0" edition = "2021" -license_file = "../LICENSE.md" +license-file = "../../LICENSE.md" +authors = ["NREL/MTES/CIMS/MBAP Group "] +description = "Core FASTSim models for vehicle energy usage simulation" +homepage = "https://www.nrel.gov/transportation/fastsim.html" [dependencies] pyo3 = { workspace = true, features = [ diff --git a/rust/fastsim-core/fastsim-proc-macros/Cargo.toml b/rust/fastsim-core/fastsim-proc-macros/Cargo.toml index 7ad2c318..148f4de5 100644 --- a/rust/fastsim-core/fastsim-proc-macros/Cargo.toml +++ b/rust/fastsim-core/fastsim-proc-macros/Cargo.toml @@ -1,8 +1,11 @@ [package] +authors = ["NREL/MTES/CIMS/MBAP Group "] name = "fastsim-proc-macros" version = "0.1.0" edition = "2021" -license_file = "../../LICENSE.md" +license-file = "../../../LICENSE.md" +description = "Procedural macros for FASTSim" +homepage = "https://www.nrel.gov/transportation/fastsim.html" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/rust/fastsim-py/Cargo.toml b/rust/fastsim-py/Cargo.toml index 4a693519..2ebb3df4 100644 --- a/rust/fastsim-py/Cargo.toml +++ b/rust/fastsim-py/Cargo.toml @@ -2,7 +2,10 @@ name = "fastsim-py" version = "0.1.0" edition = "2021" -license_file = "../LICENSE.md" +license-file = "../../LICENSE.md" +authors = ["NREL/MTES/CIMS/MBAP Group "] +description = "Python API for FASTSim models for vehicle energy usage simulation" +homepage = "https://www.nrel.gov/transportation/fastsim.html" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html From 86bfdb8880e62543ae12e8122ade8b825623aa6b Mon Sep 17 00:00:00 2001 From: Chad Baker Date: Tue, 25 Jul 2023 14:28:50 -0600 Subject: [PATCH 03/16] added readme and made changes to fix workspace --- rust/Cargo.toml | 7 ++++--- rust/fastsim-core/Cargo.toml | 2 +- rust/fastsim-core/fastsim-proc-macros/Cargo.toml | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/rust/Cargo.toml b/rust/Cargo.toml index db7f18e1..234b4de9 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -1,9 +1,10 @@ [workspace] members = [ - "fastsim-cli", # command line app - "fastsim-core", # pure rust core with optional pyo3 feature - "fastsim-py", # python module exposing fastsim-core + "fastsim-cli", # command line app + "fastsim-core", # pure rust core with optional pyo3 feature + "fastsim-py", # python module exposing fastsim-core + "fastsim-core/fastsim-proc-macros", ] [profile.release] diff --git a/rust/fastsim-core/Cargo.toml b/rust/fastsim-core/Cargo.toml index b6cf5131..d49136d6 100644 --- a/rust/fastsim-core/Cargo.toml +++ b/rust/fastsim-core/Cargo.toml @@ -17,7 +17,7 @@ serde = { workspace = true, features = ["derive"] } serde_yaml = { workspace = true } ndarray = { version = "0.15.4", features = ["serde"] } csv = "1.1" -proc-macros = { package = "fastsim-proc-macros", path = "fastsim-proc-macros" } +proc-macros = { package = "fastsim-proc-macros", version = "0.1.0" } serde_json = "1.0.81" bincode = "1.3.3" log = "0.4.17" diff --git a/rust/fastsim-core/fastsim-proc-macros/Cargo.toml b/rust/fastsim-core/fastsim-proc-macros/Cargo.toml index 148f4de5..1328d88e 100644 --- a/rust/fastsim-core/fastsim-proc-macros/Cargo.toml +++ b/rust/fastsim-core/fastsim-proc-macros/Cargo.toml @@ -4,6 +4,7 @@ name = "fastsim-proc-macros" version = "0.1.0" edition = "2021" license-file = "../../../LICENSE.md" +readme-file = "../../../README.md" description = "Procedural macros for FASTSim" homepage = "https://www.nrel.gov/transportation/fastsim.html" From cd96576c56535fc7beb847290f163bbf558de0b7 Mon Sep 17 00:00:00 2001 From: Chad Baker Date: Tue, 25 Jul 2023 14:30:44 -0600 Subject: [PATCH 04/16] incremented version number to publish minor changes --- rust/fastsim-core/fastsim-proc-macros/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/fastsim-core/fastsim-proc-macros/Cargo.toml b/rust/fastsim-core/fastsim-proc-macros/Cargo.toml index 1328d88e..74e20cef 100644 --- a/rust/fastsim-core/fastsim-proc-macros/Cargo.toml +++ b/rust/fastsim-core/fastsim-proc-macros/Cargo.toml @@ -1,7 +1,7 @@ [package] authors = ["NREL/MTES/CIMS/MBAP Group "] name = "fastsim-proc-macros" -version = "0.1.0" +version = "0.1.1" edition = "2021" license-file = "../../../LICENSE.md" readme-file = "../../../README.md" From 5c6d542a8a804f5d34de73eb0e084b969b2d70bb Mon Sep 17 00:00:00 2001 From: Chad Baker Date: Tue, 25 Jul 2023 14:33:46 -0600 Subject: [PATCH 05/16] fixed bad Cargo.toml field --- rust/fastsim-core/fastsim-proc-macros/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/fastsim-core/fastsim-proc-macros/Cargo.toml b/rust/fastsim-core/fastsim-proc-macros/Cargo.toml index 74e20cef..1c2fa4b9 100644 --- a/rust/fastsim-core/fastsim-proc-macros/Cargo.toml +++ b/rust/fastsim-core/fastsim-proc-macros/Cargo.toml @@ -4,7 +4,7 @@ name = "fastsim-proc-macros" version = "0.1.1" edition = "2021" license-file = "../../../LICENSE.md" -readme-file = "../../../README.md" +readme = "../../../README.md" description = "Procedural macros for FASTSim" homepage = "https://www.nrel.gov/transportation/fastsim.html" From 743ab90148681f8bc264fed805c90dfd2044db27 Mon Sep 17 00:00:00 2001 From: Chad Baker Date: Tue, 25 Jul 2023 14:34:21 -0600 Subject: [PATCH 06/16] incremented version number to allow for republishing with readme --- rust/fastsim-core/fastsim-proc-macros/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/fastsim-core/fastsim-proc-macros/Cargo.toml b/rust/fastsim-core/fastsim-proc-macros/Cargo.toml index 1c2fa4b9..e7ec2c9b 100644 --- a/rust/fastsim-core/fastsim-proc-macros/Cargo.toml +++ b/rust/fastsim-core/fastsim-proc-macros/Cargo.toml @@ -1,7 +1,7 @@ [package] authors = ["NREL/MTES/CIMS/MBAP Group "] name = "fastsim-proc-macros" -version = "0.1.1" +version = "0.1.2" edition = "2021" license-file = "../../../LICENSE.md" readme = "../../../README.md" From 2359cc0220428100efe024c91b2387f4f09e54a7 Mon Sep 17 00:00:00 2001 From: Chad Baker Date: Tue, 25 Jul 2023 14:36:32 -0600 Subject: [PATCH 07/16] added readme --- rust/fastsim-core/Cargo.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rust/fastsim-core/Cargo.toml b/rust/fastsim-core/Cargo.toml index d49136d6..d27390c0 100644 --- a/rust/fastsim-core/Cargo.toml +++ b/rust/fastsim-core/Cargo.toml @@ -6,8 +6,10 @@ license-file = "../../LICENSE.md" authors = ["NREL/MTES/CIMS/MBAP Group "] description = "Core FASTSim models for vehicle energy usage simulation" homepage = "https://www.nrel.gov/transportation/fastsim.html" +readme = "../../README.md" [dependencies] +proc-macros = { package = "fastsim-proc-macros", version = "0.1.2" } pyo3 = { workspace = true, features = [ "extension-module", "anyhow", @@ -17,7 +19,6 @@ serde = { workspace = true, features = ["derive"] } serde_yaml = { workspace = true } ndarray = { version = "0.15.4", features = ["serde"] } csv = "1.1" -proc-macros = { package = "fastsim-proc-macros", version = "0.1.0" } serde_json = "1.0.81" bincode = "1.3.3" log = "0.4.17" From 00a5240fc0b4bedec303736dcb6b9d1e76735796 Mon Sep 17 00:00:00 2001 From: Chad Baker Date: Tue, 25 Jul 2023 14:39:30 -0600 Subject: [PATCH 08/16] added supporting files --- rust/fastsim-core/Cargo.toml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/rust/fastsim-core/Cargo.toml b/rust/fastsim-core/Cargo.toml index d27390c0..5b7317dd 100644 --- a/rust/fastsim-core/Cargo.toml +++ b/rust/fastsim-core/Cargo.toml @@ -31,6 +31,13 @@ validator = { version = "0.16", features = ["derive"] } lazy_static = "1.4.0" regex = "1.7.1" +[package.metadata] +include = [ + "../../python/fastsim/resources/longparams.json", + "../../python/fastsim/resources/cycles/udds.csv", + "../../python/fastsim/resources/cycles/hwfet.csv", +] + [package.metadata.docs.rs] rustdoc-args = ["--html-in-header", "./src/html/docs-header.html"] From c5131a0181a0583d46f67d54b441f61fd1e6a2ea Mon Sep 17 00:00:00 2001 From: Chad Baker Date: Tue, 25 Jul 2023 15:03:50 -0600 Subject: [PATCH 09/16] added repository url --- rust/fastsim-cli/Cargo.toml | 1 + rust/fastsim-core/Cargo.toml | 1 + rust/fastsim-core/fastsim-proc-macros/Cargo.toml | 1 + rust/fastsim-py/Cargo.toml | 1 + 4 files changed, 4 insertions(+) diff --git a/rust/fastsim-cli/Cargo.toml b/rust/fastsim-cli/Cargo.toml index acfbbbda..51effbb6 100644 --- a/rust/fastsim-cli/Cargo.toml +++ b/rust/fastsim-cli/Cargo.toml @@ -6,6 +6,7 @@ license-file = "../../LICENSE.md" authors = ["NREL/MTES/CIMS/MBAP Group "] description = "CLI app for FASTSim models for vehicle energy usage simulation" homepage = "https://www.nrel.gov/transportation/fastsim.html" +repository = "https://github.com/NREL/fastsim" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/rust/fastsim-core/Cargo.toml b/rust/fastsim-core/Cargo.toml index 5b7317dd..a72f52ea 100644 --- a/rust/fastsim-core/Cargo.toml +++ b/rust/fastsim-core/Cargo.toml @@ -7,6 +7,7 @@ authors = ["NREL/MTES/CIMS/MBAP Group "] description = "Core FASTSim models for vehicle energy usage simulation" homepage = "https://www.nrel.gov/transportation/fastsim.html" readme = "../../README.md" +repository = "https://github.com/NREL/fastsim" [dependencies] proc-macros = { package = "fastsim-proc-macros", version = "0.1.2" } diff --git a/rust/fastsim-core/fastsim-proc-macros/Cargo.toml b/rust/fastsim-core/fastsim-proc-macros/Cargo.toml index e7ec2c9b..266608f3 100644 --- a/rust/fastsim-core/fastsim-proc-macros/Cargo.toml +++ b/rust/fastsim-core/fastsim-proc-macros/Cargo.toml @@ -7,6 +7,7 @@ license-file = "../../../LICENSE.md" readme = "../../../README.md" description = "Procedural macros for FASTSim" homepage = "https://www.nrel.gov/transportation/fastsim.html" +repository = "https://github.com/NREL/fastsim" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/rust/fastsim-py/Cargo.toml b/rust/fastsim-py/Cargo.toml index 2ebb3df4..272d58e8 100644 --- a/rust/fastsim-py/Cargo.toml +++ b/rust/fastsim-py/Cargo.toml @@ -6,6 +6,7 @@ license-file = "../../LICENSE.md" authors = ["NREL/MTES/CIMS/MBAP Group "] description = "Python API for FASTSim models for vehicle energy usage simulation" homepage = "https://www.nrel.gov/transportation/fastsim.html" +repository = "https://github.com/NREL/fastsim" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html From dc40cf0178909f84ef311110b6d2918f43b6eaa4 Mon Sep 17 00:00:00 2001 From: Chad Baker Date: Tue, 25 Jul 2023 15:36:46 -0600 Subject: [PATCH 10/16] workaround to allow config files to be in crates.io --- rust/fastsim-cli/src/bin/fastsim-cli.rs | 20 +- rust/fastsim-core/Cargo.toml | 6 +- rust/fastsim-core/build.rs | 62 + rust/fastsim-core/resources/hwfet.csv | 767 +++++++++++ rust/fastsim-core/resources/longparams.json | 1224 +++++++++++++++++ rust/fastsim-core/resources/udds.csv | 1371 +++++++++++++++++++ rust/fastsim-core/src/simdrivelabel.rs | 32 +- 7 files changed, 3443 insertions(+), 39 deletions(-) create mode 100644 rust/fastsim-core/build.rs create mode 100644 rust/fastsim-core/resources/hwfet.csv create mode 100644 rust/fastsim-core/resources/longparams.json create mode 100644 rust/fastsim-core/resources/udds.csv diff --git a/rust/fastsim-cli/src/bin/fastsim-cli.rs b/rust/fastsim-cli/src/bin/fastsim-cli.rs index 0a492604..4dc31237 100644 --- a/rust/fastsim-cli/src/bin/fastsim-cli.rs +++ b/rust/fastsim-cli/src/bin/fastsim-cli.rs @@ -266,14 +266,14 @@ pub fn main() { .unwrap(); #[cfg(not(windows))] - macro_rules! main_separator { + macro_rules! path_separator { () => { "/" }; } #[cfg(windows)] - macro_rules! main_separator { + macro_rules! path_separator { () => { r#"\"# }; @@ -294,21 +294,21 @@ pub fn main() { } else if is_adopt_hd { let hd_cyc_filestring = include_str!(concat!( "..", - main_separator!(), + path_separator!(), "..", - main_separator!(), + path_separator!(), "..", - main_separator!(), + path_separator!(), "..", - main_separator!(), + path_separator!(), "python", - main_separator!(), + path_separator!(), "fastsim", - main_separator!(), + path_separator!(), "resources", - main_separator!(), + path_separator!(), "cycles", - main_separator!(), + path_separator!(), "HHDDTCruiseSmooth.csv" )); let cyc = if adopt_hd_has_cycle { diff --git a/rust/fastsim-core/Cargo.toml b/rust/fastsim-core/Cargo.toml index a72f52ea..d2206d0b 100644 --- a/rust/fastsim-core/Cargo.toml +++ b/rust/fastsim-core/Cargo.toml @@ -34,9 +34,9 @@ regex = "1.7.1" [package.metadata] include = [ - "../../python/fastsim/resources/longparams.json", - "../../python/fastsim/resources/cycles/udds.csv", - "../../python/fastsim/resources/cycles/hwfet.csv", + "resources/longparams.json", + "resources/udds.csv", + "resources/hwfet.csv", ] [package.metadata.docs.rs] diff --git a/rust/fastsim-core/build.rs b/rust/fastsim-core/build.rs new file mode 100644 index 00000000..c2e0e861 --- /dev/null +++ b/rust/fastsim-core/build.rs @@ -0,0 +1,62 @@ +//! Ensures that files that are duplicated in Python resources folder +//! and locally in this crate are identical + +use std::env; +use std::fs; +use std::path::PathBuf; + +fn main() { + let prepath: String = "../../../../python/fastsim/resources".into(); + + let thinger = PathBuf::from(format!( + "{}/../../../../python", + env::current_dir().unwrap().as_os_str().to_str().unwrap() + )) + .canonicalize() + .unwrap(); + assert!(&thinger.exists()); + dbg!(thinger); + + let truth_files = [ + format!( + "{}/{}/longparams.json", + env::current_dir().unwrap().as_os_str().to_str().unwrap(), + prepath + ), + format!( + "{}/{}/udds.csv", + env::current_dir().unwrap().as_os_str().to_str().unwrap(), + prepath + ), + format!( + "{}/{}/hwfet.csv", + env::current_dir().unwrap().as_os_str().to_str().unwrap(), + prepath + ), + ]; + + let compare_files = [ + format!( + "{}/resources/longparams.json", + env::current_dir().unwrap().as_os_str().to_str().unwrap() + ), + format!( + "{}/resources/hwfet.csv", + env::current_dir().unwrap().as_os_str().to_str().unwrap() + ), + format!( + "{}/resources/udds.csv", + env::current_dir().unwrap().as_os_str().to_str().unwrap() + ), + ]; + + for (tf, cf) in truth_files.iter().zip(compare_files) { + let tfc = fs::read_to_string(tf).unwrap_or_else(|_| panic!("{tf} does not exist.")); + + let cfc = fs::read_to_string(cf.clone()).unwrap_or_else(|_| panic!("{cf} does not exist.")); + + if tfc != cfc { + panic!("Reference file {tf} does not match file being compared: {cf}. Copy {tf} to {cf} to fix this.") + } + } +} diff --git a/rust/fastsim-core/resources/hwfet.csv b/rust/fastsim-core/resources/hwfet.csv new file mode 100644 index 00000000..92dd75cd --- /dev/null +++ b/rust/fastsim-core/resources/hwfet.csv @@ -0,0 +1,767 @@ +cycSecs,cycMps,cycGrade,cycRoadType +0,0,0,0 +1,0,0,0 +2,0,0,0 +3,0.894094506,0,0 +4,2.190531539,0,0 +5,3.621082748,0,0 +6,5.051633958,0,0 +7,6.482185167,0,0 +8,7.733917475,0,0 +9,8.762126157,0,0 +10,9.745630113,0,0 +11,10.72913407,0,0 +12,11.53381912,0,0 +13,12.11498055,0,0 +14,12.51732308,0,0 +15,12.96437033,0,0 +16,13.41141759,0,0 +17,13.72435066,0,0 +18,14.08198847,0,0 +19,14.39492154,0,0 +20,14.70785462,0,0 +21,14.97608297,0,0 +22,15.24431132,0,0 +23,15.46783495,0,0 +24,15.60194913,0,0 +25,15.69135858,0,0 +26,15.95958693,0,0 +27,16.04899638,0,0 +28,16.00429165,0,0 +29,15.78076803,0,0 +30,15.60194913,0,0 +31,15.42313022,0,0 +32,15.46783495,0,0 +33,15.5572444,0,0 +34,15.69135858,0,0 +35,15.95958693,0,0 +36,16.13840583,0,0 +37,16.18311055,0,0 +38,16.31722473,0,0 +39,16.40663418,0,0 +40,16.49604363,0,0 +41,16.54074836,0,0 +42,16.54074836,0,0 +43,16.54074836,0,0 +44,16.54074836,0,0 +45,16.54074836,0,0 +46,16.54074836,0,0 +47,16.58545308,0,0 +48,16.67486253,0,0 +49,16.89838616,0,0 +50,17.25602396,0,0 +51,17.56895704,0,0 +52,17.88189012,0,0 +53,18.19482319,0,0 +54,18.50775627,0,0 +55,18.86539407,0,0 +56,19.17832715,0,0 +57,19.4465555,0,0 +58,19.67007913,0,0 +59,19.8041933,0,0 +60,19.89360275,0,0 +61,20.02771693,0,0 +62,20.07242165,0,0 +63,20.11712638,0,0 +64,20.16183111,0,0 +65,20.29594528,0,0 +66,20.43005946,0,0 +67,20.56417363,0,0 +68,20.69828781,0,0 +69,20.78769726,0,0 +70,20.92181144,0,0 +71,20.96651616,0,0 +72,21.01122089,0,0 +73,21.05592561,0,0 +74,21.10063034,0,0 +75,21.14533506,0,0 +76,21.10063034,0,0 +77,21.05592561,0,0 +78,21.01122089,0,0 +79,20.96651616,0,0 +80,20.96651616,0,0 +81,20.96651616,0,0 +82,21.01122089,0,0 +83,21.05592561,0,0 +84,21.05592561,0,0 +85,21.10063034,0,0 +86,21.05592561,0,0 +87,21.01122089,0,0 +88,20.96651616,0,0 +89,20.78769726,0,0 +90,20.69828781,0,0 +91,20.65358308,0,0 +92,20.69828781,0,0 +93,20.78769726,0,0 +94,20.96651616,0,0 +95,21.05592561,0,0 +96,21.19003979,0,0 +97,21.32415396,0,0 +98,21.45826814,0,0 +99,21.54767759,0,0 +100,21.68179177,0,0 +101,21.81590594,0,0 +102,21.95002012,0,0 +103,21.99472484,0,0 +104,21.95002012,0,0 +105,21.95002012,0,0 +106,21.90531539,0,0 +107,21.90531539,0,0 +108,21.95002012,0,0 +109,21.99472484,0,0 +110,22.03942957,0,0 +111,22.08413429,0,0 +112,22.12883902,0,0 +113,22.12883902,0,0 +114,22.12883902,0,0 +115,22.08413429,0,0 +116,21.95002012,0,0 +117,21.86061067,0,0 +118,21.72649649,0,0 +119,21.63708704,0,0 +120,21.50297286,0,0 +121,21.32415396,0,0 +122,21.19003979,0,0 +123,21.14533506,0,0 +124,21.23474451,0,0 +125,21.36885869,0,0 +126,21.41356341,0,0 +127,21.45826814,0,0 +128,21.41356341,0,0 +129,21.41356341,0,0 +130,21.41356341,0,0 +131,21.45826814,0,0 +132,21.45826814,0,0 +133,21.45826814,0,0 +134,21.41356341,0,0 +135,21.14533506,0,0 +136,20.56417363,0,0 +137,19.35714605,0,0 +138,18.41834682,0,0 +139,17.65836649,0,0 +140,17.52425231,0,0 +141,17.43484286,0,0 +142,17.43484286,0,0 +143,17.47954759,0,0 +144,17.65836649,0,0 +145,17.92659484,0,0 +146,18.32893737,0,0 +147,18.77598462,0,0 +148,19.2677366,0,0 +149,19.53596495,0,0 +150,19.71478385,0,0 +151,19.8041933,0,0 +152,19.84889803,0,0 +153,19.93830748,0,0 +154,19.9830122,0,0 +155,20.07242165,0,0 +156,20.20653583,0,0 +157,20.43005946,0,0 +158,20.51946891,0,0 +159,20.69828781,0,0 +160,20.92181144,0,0 +161,20.96651616,0,0 +162,21.01122089,0,0 +163,21.05592561,0,0 +164,21.27944924,0,0 +165,21.41356341,0,0 +166,21.45826814,0,0 +167,21.45826814,0,0 +168,21.41356341,0,0 +169,21.36885869,0,0 +170,21.14533506,0,0 +171,20.87710671,0,0 +172,20.65358308,0,0 +173,20.51946891,0,0 +174,20.43005946,0,0 +175,20.34065001,0,0 +176,20.29594528,0,0 +177,20.25124056,0,0 +178,20.11712638,0,0 +179,19.67007913,0,0 +180,19.2677366,0,0 +181,18.86539407,0,0 +182,18.552461,0,0 +183,18.552461,0,0 +184,18.82068935,0,0 +185,19.17832715,0,0 +186,19.4465555,0,0 +187,19.6253744,0,0 +188,19.49126023,0,0 +189,19.35714605,0,0 +190,19.22303187,0,0 +191,19.2677366,0,0 +192,19.40185078,0,0 +193,19.6253744,0,0 +194,19.8041933,0,0 +195,19.93830748,0,0 +196,20.07242165,0,0 +197,20.02771693,0,0 +198,19.84889803,0,0 +199,19.6253744,0,0 +200,19.40185078,0,0 +201,19.31244133,0,0 +202,19.31244133,0,0 +203,19.2677366,0,0 +204,19.22303187,0,0 +205,19.22303187,0,0 +206,19.2677366,0,0 +207,19.40185078,0,0 +208,19.6253744,0,0 +209,19.67007913,0,0 +210,19.4465555,0,0 +211,19.04421297,0,0 +212,18.552461,0,0 +213,18.19482319,0,0 +214,17.88189012,0,0 +215,17.88189012,0,0 +216,18.01600429,0,0 +217,18.32893737,0,0 +218,18.77598462,0,0 +219,19.0889177,0,0 +220,19.2677366,0,0 +221,19.31244133,0,0 +222,19.40185078,0,0 +223,19.6253744,0,0 +224,19.8041933,0,0 +225,19.9830122,0,0 +226,20.16183111,0,0 +227,20.29594528,0,0 +228,20.47476418,0,0 +229,20.78769726,0,0 +230,20.96651616,0,0 +231,21.10063034,0,0 +232,21.19003979,0,0 +233,21.14533506,0,0 +234,21.14533506,0,0 +235,21.10063034,0,0 +236,21.10063034,0,0 +237,21.10063034,0,0 +238,21.05592561,0,0 +239,21.01122089,0,0 +240,21.01122089,0,0 +241,20.96651616,0,0 +242,20.92181144,0,0 +243,20.96651616,0,0 +244,21.01122089,0,0 +245,21.10063034,0,0 +246,21.23474451,0,0 +247,21.41356341,0,0 +248,21.45826814,0,0 +249,21.45826814,0,0 +250,21.45826814,0,0 +251,21.45826814,0,0 +252,21.45826814,0,0 +253,21.50297286,0,0 +254,21.54767759,0,0 +255,21.54767759,0,0 +256,21.50297286,0,0 +257,21.72649649,0,0 +258,21.86061067,0,0 +259,21.95002012,0,0 +260,21.95002012,0,0 +261,21.95002012,0,0 +262,21.95002012,0,0 +263,21.95002012,0,0 +264,21.90531539,0,0 +265,21.86061067,0,0 +266,21.54767759,0,0 +267,21.32415396,0,0 +268,21.23474451,0,0 +269,21.10063034,0,0 +270,20.87710671,0,0 +271,20.65358308,0,0 +272,20.56417363,0,0 +273,20.47476418,0,0 +274,20.38535473,0,0 +275,20.29594528,0,0 +276,20.20653583,0,0 +277,20.11712638,0,0 +278,19.9830122,0,0 +279,19.89360275,0,0 +280,19.75948858,0,0 +281,19.4465555,0,0 +282,19.13362242,0,0 +283,18.77598462,0,0 +284,17.92659484,0,0 +285,17.25602396,0,0 +286,16.76427198,0,0 +287,16.00429165,0,0 +288,15.51253968,0,0 +289,15.1996066,0,0 +290,14.88667352,0,0 +291,14.52903572,0,0 +292,14.17139792,0,0 +293,13.67964594,0,0 +294,13.23259869,0,0 +295,12.87496088,0,0 +296,12.69614198,0,0 +297,12.78555143,0,0 +298,13.18789396,0,0 +299,14.03728374,0,0 +300,14.93137825,0,0 +301,15.9148822,0,0 +302,16.76427198,0,0 +303,17.47954759,0,0 +304,17.97129957,0,0 +305,18.37364209,0,0 +306,18.68657517,0,0 +307,18.95480352,0,0 +308,19.13362242,0,0 +309,19.35714605,0,0 +310,19.58066968,0,0 +311,19.8041933,0,0 +312,19.9830122,0,0 +313,20.11712638,0,0 +314,20.20653583,0,0 +315,20.29594528,0,0 +316,20.34065001,0,0 +317,20.47476418,0,0 +318,20.56417363,0,0 +319,20.60887836,0,0 +320,20.78769726,0,0 +321,20.92181144,0,0 +322,21.05592561,0,0 +323,21.32415396,0,0 +324,21.59238231,0,0 +325,21.90531539,0,0 +326,22.21824847,0,0 +327,22.48647682,0,0 +328,22.7994099,0,0 +329,23.11234297,0,0 +330,23.42527605,0,0 +331,23.73820913,0,0 +332,24.05114221,0,0 +333,24.36407528,0,0 +334,24.67700836,0,0 +335,24.94523671,0,0 +336,25.21346506,0,0 +337,25.43698869,0,0 +338,25.48169341,0,0 +339,25.52639814,0,0 +340,25.61580759,0,0 +341,25.74992177,0,0 +342,25.83933122,0,0 +343,25.92874067,0,0 +344,25.97344539,0,0 +345,26.10755957,0,0 +346,26.24167374,0,0 +347,26.28637847,0,0 +348,26.3310832,0,0 +349,26.37578792,0,0 +350,26.37578792,0,0 +351,26.3310832,0,0 +352,26.28637847,0,0 +353,26.19696902,0,0 +354,26.10755957,0,0 +355,26.01815012,0,0 +356,25.97344539,0,0 +357,25.92874067,0,0 +358,25.88403594,0,0 +359,25.74992177,0,0 +360,25.66051232,0,0 +361,25.57110287,0,0 +362,25.52639814,0,0 +363,25.48169341,0,0 +364,25.48169341,0,0 +365,25.43698869,0,0 +366,25.43698869,0,0 +367,25.43698869,0,0 +368,25.48169341,0,0 +369,25.48169341,0,0 +370,25.48169341,0,0 +371,25.48169341,0,0 +372,25.48169341,0,0 +373,25.48169341,0,0 +374,25.48169341,0,0 +375,25.48169341,0,0 +376,25.48169341,0,0 +377,25.43698869,0,0 +378,25.39228396,0,0 +379,25.25816979,0,0 +380,25.12405561,0,0 +381,25.03464616,0,0 +382,25.03464616,0,0 +383,25.03464616,0,0 +384,25.07935089,0,0 +385,25.21346506,0,0 +386,25.34757924,0,0 +387,25.43698869,0,0 +388,25.52639814,0,0 +389,25.61580759,0,0 +390,25.66051232,0,0 +391,25.66051232,0,0 +392,25.57110287,0,0 +393,25.48169341,0,0 +394,25.43698869,0,0 +395,25.30287451,0,0 +396,25.16876034,0,0 +397,25.07935089,0,0 +398,25.21346506,0,0 +399,25.34757924,0,0 +400,25.52639814,0,0 +401,25.70521704,0,0 +402,25.83933122,0,0 +403,25.92874067,0,0 +404,25.92874067,0,0 +405,25.92874067,0,0 +406,25.92874067,0,0 +407,25.92874067,0,0 +408,25.92874067,0,0 +409,25.88403594,0,0 +410,25.83933122,0,0 +411,25.79462649,0,0 +412,25.79462649,0,0 +413,25.83933122,0,0 +414,25.88403594,0,0 +415,25.92874067,0,0 +416,25.97344539,0,0 +417,26.10755957,0,0 +418,26.3310832,0,0 +419,26.42049265,0,0 +420,26.55460682,0,0 +421,26.73342572,0,0 +422,26.77813045,0,0 +423,26.77813045,0,0 +424,26.73342572,0,0 +425,26.64401627,0,0 +426,26.55460682,0,0 +427,26.46519737,0,0 +428,26.42049265,0,0 +429,26.37578792,0,0 +430,26.3310832,0,0 +431,26.24167374,0,0 +432,26.19696902,0,0 +433,26.15226429,0,0 +434,26.10755957,0,0 +435,26.10755957,0,0 +436,26.06285484,0,0 +437,26.01815012,0,0 +438,25.97344539,0,0 +439,25.92874067,0,0 +440,25.88403594,0,0 +441,25.88403594,0,0 +442,25.88403594,0,0 +443,25.88403594,0,0 +444,25.88403594,0,0 +445,25.92874067,0,0 +446,25.97344539,0,0 +447,25.97344539,0,0 +448,26.01815012,0,0 +449,26.01815012,0,0 +450,26.01815012,0,0 +451,25.97344539,0,0 +452,25.92874067,0,0 +453,25.92874067,0,0 +454,25.92874067,0,0 +455,25.92874067,0,0 +456,25.92874067,0,0 +457,25.92874067,0,0 +458,25.88403594,0,0 +459,25.88403594,0,0 +460,25.92874067,0,0 +461,25.97344539,0,0 +462,25.97344539,0,0 +463,26.01815012,0,0 +464,26.06285484,0,0 +465,26.06285484,0,0 +466,26.06285484,0,0 +467,26.01815012,0,0 +468,25.97344539,0,0 +469,25.92874067,0,0 +470,25.83933122,0,0 +471,25.70521704,0,0 +472,25.52639814,0,0 +473,25.48169341,0,0 +474,25.30287451,0,0 +475,25.07935089,0,0 +476,25.03464616,0,0 +477,24.94523671,0,0 +478,24.81112254,0,0 +479,24.67700836,0,0 +480,24.63230363,0,0 +481,24.58759891,0,0 +482,24.54289418,0,0 +483,24.54289418,0,0 +484,24.54289418,0,0 +485,24.54289418,0,0 +486,24.54289418,0,0 +487,24.54289418,0,0 +488,24.58759891,0,0 +489,24.58759891,0,0 +490,24.58759891,0,0 +491,24.58759891,0,0 +492,24.58759891,0,0 +493,24.58759891,0,0 +494,24.63230363,0,0 +495,24.63230363,0,0 +496,24.58759891,0,0 +497,24.54289418,0,0 +498,24.54289418,0,0 +499,24.49818946,0,0 +500,24.45348473,0,0 +501,24.40878001,0,0 +502,24.31937056,0,0 +503,24.27466583,0,0 +504,24.27466583,0,0 +505,24.22996111,0,0 +506,24.18525638,0,0 +507,24.18525638,0,0 +508,24.18525638,0,0 +509,24.14055166,0,0 +510,24.14055166,0,0 +511,24.14055166,0,0 +512,24.14055166,0,0 +513,24.14055166,0,0 +514,24.14055166,0,0 +515,24.14055166,0,0 +516,24.14055166,0,0 +517,24.18525638,0,0 +518,24.22996111,0,0 +519,24.36407528,0,0 +520,24.49818946,0,0 +521,24.54289418,0,0 +522,24.58759891,0,0 +523,24.63230363,0,0 +524,24.67700836,0,0 +525,24.67700836,0,0 +526,24.72171309,0,0 +527,24.76641781,0,0 +528,24.81112254,0,0 +529,24.85582726,0,0 +530,24.90053199,0,0 +531,24.94523671,0,0 +532,24.98994144,0,0 +533,25.03464616,0,0 +534,25.03464616,0,0 +535,25.03464616,0,0 +536,25.03464616,0,0 +537,25.03464616,0,0 +538,25.03464616,0,0 +539,25.03464616,0,0 +540,25.03464616,0,0 +541,25.03464616,0,0 +542,25.03464616,0,0 +543,25.03464616,0,0 +544,25.03464616,0,0 +545,25.03464616,0,0 +546,25.03464616,0,0 +547,24.98994144,0,0 +548,24.98994144,0,0 +549,24.98994144,0,0 +550,24.94523671,0,0 +551,24.85582726,0,0 +552,24.76641781,0,0 +553,24.67700836,0,0 +554,24.63230363,0,0 +555,24.58759891,0,0 +556,24.54289418,0,0 +557,24.40878001,0,0 +558,24.31937056,0,0 +559,24.22996111,0,0 +560,24.18525638,0,0 +561,24.05114221,0,0 +562,23.8723233,0,0 +563,23.82761858,0,0 +564,23.73820913,0,0 +565,23.64879968,0,0 +566,23.5146855,0,0 +567,23.42527605,0,0 +568,23.3358666,0,0 +569,23.29116188,0,0 +570,23.24645715,0,0 +571,23.24645715,0,0 +572,23.24645715,0,0 +573,23.24645715,0,0 +574,23.29116188,0,0 +575,23.24645715,0,0 +576,23.24645715,0,0 +577,23.20175243,0,0 +578,23.06763825,0,0 +579,22.9782288,0,0 +580,22.84411462,0,0 +581,22.66529572,0,0 +582,22.48647682,0,0 +583,22.26295319,0,0 +584,22.03942957,0,0 +585,21.77120122,0,0 +586,21.54767759,0,0 +587,21.50297286,0,0 +588,21.45826814,0,0 +589,21.45826814,0,0 +590,21.50297286,0,0 +591,21.63708704,0,0 +592,21.86061067,0,0 +593,21.90531539,0,0 +594,21.95002012,0,0 +595,21.95002012,0,0 +596,21.90531539,0,0 +597,21.90531539,0,0 +598,21.86061067,0,0 +599,21.72649649,0,0 +600,21.59238231,0,0 +601,21.45826814,0,0 +602,21.41356341,0,0 +603,21.36885869,0,0 +604,21.32415396,0,0 +605,21.41356341,0,0 +606,21.59238231,0,0 +607,21.90531539,0,0 +608,21.95002012,0,0 +609,21.90531539,0,0 +610,21.86061067,0,0 +611,21.45826814,0,0 +612,21.05592561,0,0 +613,20.65358308,0,0 +614,20.60887836,0,0 +615,20.60887836,0,0 +616,20.65358308,0,0 +617,20.96651616,0,0 +618,21.36885869,0,0 +619,21.90531539,0,0 +620,22.21824847,0,0 +621,22.620591,0,0 +622,23.02293352,0,0 +623,23.3358666,0,0 +624,23.55939023,0,0 +625,23.6935044,0,0 +626,23.96173276,0,0 +627,24.14055166,0,0 +628,24.18525638,0,0 +629,24.31937056,0,0 +630,24.45348473,0,0 +631,24.63230363,0,0 +632,24.76641781,0,0 +633,24.76641781,0,0 +634,24.58759891,0,0 +635,24.36407528,0,0 +636,23.96173276,0,0 +637,23.46998078,0,0 +638,22.4417721,0,0 +639,21.54767759,0,0 +640,20.78769726,0,0 +641,20.65358308,0,0 +642,20.56417363,0,0 +643,20.56417363,0,0 +644,20.69828781,0,0 +645,20.92181144,0,0 +646,21.23474451,0,0 +647,21.54767759,0,0 +648,21.81590594,0,0 +649,22.12883902,0,0 +650,22.4417721,0,0 +651,22.66529572,0,0 +652,22.84411462,0,0 +653,23.11234297,0,0 +654,23.3358666,0,0 +655,23.46998078,0,0 +656,23.29116188,0,0 +657,23.06763825,0,0 +658,22.84411462,0,0 +659,22.7994099,0,0 +660,22.7994099,0,0 +661,22.84411462,0,0 +662,22.9782288,0,0 +663,23.11234297,0,0 +664,23.24645715,0,0 +665,23.3358666,0,0 +666,23.46998078,0,0 +667,23.60409495,0,0 +668,23.55939023,0,0 +669,23.5146855,0,0 +670,23.38057133,0,0 +671,23.38057133,0,0 +672,23.42527605,0,0 +673,23.46998078,0,0 +674,23.55939023,0,0 +675,23.55939023,0,0 +676,23.42527605,0,0 +677,23.29116188,0,0 +678,23.11234297,0,0 +679,22.84411462,0,0 +680,22.57588627,0,0 +681,22.39706737,0,0 +682,22.26295319,0,0 +683,22.21824847,0,0 +684,22.17354374,0,0 +685,22.12883902,0,0 +686,22.12883902,0,0 +687,22.21824847,0,0 +688,22.35236264,0,0 +689,22.4417721,0,0 +690,22.620591,0,0 +691,22.84411462,0,0 +692,23.06763825,0,0 +693,23.20175243,0,0 +694,23.24645715,0,0 +695,23.29116188,0,0 +696,23.42527605,0,0 +697,23.64879968,0,0 +698,23.82761858,0,0 +699,24.00643748,0,0 +700,24.22996111,0,0 +701,24.36407528,0,0 +702,24.49818946,0,0 +703,24.58759891,0,0 +704,24.81112254,0,0 +705,24.98994144,0,0 +706,25.07935089,0,0 +707,25.16876034,0,0 +708,25.21346506,0,0 +709,25.25816979,0,0 +710,25.34757924,0,0 +711,25.43698869,0,0 +712,25.48169341,0,0 +713,25.61580759,0,0 +714,25.79462649,0,0 +715,26.01815012,0,0 +716,26.28637847,0,0 +717,26.42049265,0,0 +718,26.46519737,0,0 +719,26.42049265,0,0 +720,26.28637847,0,0 +721,26.15226429,0,0 +722,25.97344539,0,0 +723,25.79462649,0,0 +724,25.61580759,0,0 +725,25.52639814,0,0 +726,25.39228396,0,0 +727,25.25816979,0,0 +728,25.12405561,0,0 +729,24.81112254,0,0 +730,24.40878001,0,0 +731,24.18525638,0,0 +732,24.00643748,0,0 +733,23.78291385,0,0 +734,23.64879968,0,0 +735,23.46998078,0,0 +736,23.24645715,0,0 +737,22.93352407,0,0 +738,22.57588627,0,0 +739,22.12883902,0,0 +740,21.68179177,0,0 +741,21.27944924,0,0 +742,20.92181144,0,0 +743,20.38535473,0,0 +744,19.75948858,0,0 +745,18.99950825,0,0 +746,17.52425231,0,0 +747,16.04899638,0,0 +748,14.57374044,0,0 +749,13.09848451,0,0 +750,11.98086638,0,0 +751,10.9526577,0,0 +752,9.611515937,0,0 +753,8.717421431,0,0 +754,7.7786222,0,0 +755,6.750413519,0,0 +756,5.543385936,0,0 +757,4.336358353,0,0 +758,3.12933077,0,0 +759,2.235236264,0,0 +760,1.475255935,0,0 +761,0.894094506,0,0 +762,0.312933077,0,0 +763,0,0,0 +764,0,0,0 +765,0,0,0 diff --git a/rust/fastsim-core/resources/longparams.json b/rust/fastsim-core/resources/longparams.json new file mode 100644 index 00000000..9e725e4e --- /dev/null +++ b/rust/fastsim-core/resources/longparams.json @@ -0,0 +1,1224 @@ +{ + "rechgFreqMiles": [ + 0, + 1, + 3, + 5, + 7, + 9, + 11, + 13, + 15, + 17, + 19, + 21, + 23, + 25, + 27, + 29, + 31, + 33, + 35, + 37, + 39, + 41, + 43, + 45, + 47, + 49, + 51, + 53, + 55, + 57, + 59, + 61, + 63, + 65, + 67, + 69, + 71, + 73, + 75, + 77, + 79, + 81, + 83, + 85, + 87, + 89, + 91, + 93, + 95, + 97, + 99, + 101, + 103, + 105, + 107, + 109, + 111, + 113, + 115, + 117, + 119, + 121, + 123, + 125, + 127, + 129, + 131, + 133, + 135, + 137, + 139, + 141, + 143, + 145, + 147, + 149, + 151, + 153, + 155, + 157, + 159, + 161, + 163, + 165, + 167, + 169, + 171, + 173, + 175, + 177, + 179, + 181, + 183, + 185, + 187, + 189, + 191, + 193, + 195, + 197, + 199, + 201, + 203, + 205, + 207, + 209, + 211, + 213, + 215, + 217, + 219, + 221, + 223, + 225, + 227, + 229, + 231, + 233, + 235, + 237, + 239, + 241, + 243, + 245, + 247, + 249, + 251, + 253, + 255, + 257, + 259, + 261, + 263, + 265, + 267, + 269, + 271, + 273, + 275, + 277, + 279, + 281, + 283, + 285, + 287, + 289, + 291, + 293, + 295, + 297, + 299, + 301, + 303, + 305, + 307, + 309, + 311, + 313, + 315, + 317, + 319, + 321, + 323, + 325, + 327, + 329, + 331, + 333, + 335, + 337, + 339, + 341, + 343, + 345, + 347, + 349, + 351, + 353, + 355, + 357, + 359, + 361, + 363, + 365, + 367, + 369, + 371, + 373, + 375, + 377, + 379, + 381, + 383, + 385, + 387, + 389, + 391, + 393, + 395, + 397, + 399, + 401, + 403, + 405, + 407, + 409, + 411, + 413, + 415, + 417, + 419, + 421, + 423, + 425, + 427, + 429, + 431, + 433, + 435, + 437, + 439, + 441, + 443, + 445, + 447, + 449, + 451, + 453, + 455, + 457, + 459, + 461, + 463, + 465, + 467, + 469, + 471, + 473, + 475, + 477, + 479, + 481, + 483, + 485, + 487, + 489, + 491, + 493, + 495, + 497, + 499, + 501, + 503, + 505, + 507, + 509, + 511, + 513, + 515, + 517, + 519, + 521, + 523, + 525, + 527, + 529, + 531, + 533, + 535, + 537, + 539, + 541, + 543, + 545, + 547, + 549, + 551, + 553, + 555, + 557, + 559, + 561, + 563, + 565, + 567, + 569, + 571, + 573, + 575, + 577, + 579, + 581, + 583, + 585, + 587, + 589, + 591, + 593, + 595, + 597, + 599, + 601, + 603, + 605, + 607, + 609, + 611, + 613, + 615, + 617, + 619, + 621, + 623, + 625, + 627, + 629, + 631, + 633, + 635, + 637, + 639, + 641, + 643, + 645, + 647, + 649, + 651, + 653, + 655, + 657, + 659, + 661, + 663, + 665, + 667, + 669, + 671, + 673, + 675, + 677, + 679, + 681, + 683, + 685, + 687, + 689, + 691, + 693, + 695, + 697, + 699, + 701, + 703, + 705, + 707, + 709, + 711, + 713, + 715, + 717, + 719, + 721, + 723, + 725, + 727, + 729, + 731, + 733, + 735, + 737, + 739, + 741, + 743, + 745, + 747, + 749, + 751, + 753, + 755, + 757, + 759, + 761, + 763, + 765, + 767, + 769, + 771, + 773, + 775, + 777, + 779, + 781, + 783, + 785, + 787, + 789, + 791, + 793, + 795, + 797, + 799, + 801, + 803, + 805, + 807, + 809, + 811, + 813, + 815, + 817, + 819, + 821, + 823, + 825, + 827, + 829, + 831, + 833, + 835, + 837, + 839, + 841, + 843, + 845, + 847, + 849, + 851, + 853, + 855, + 857, + 859, + 861, + 863, + 865, + 867, + 869, + 871, + 873, + 875, + 877, + 879, + 881, + 883, + 885, + 887, + 889, + 891, + 893, + 895, + 897, + 899, + 901, + 903, + 905, + 907, + 909, + 911, + 913, + 915, + 917, + 919, + 921, + 923, + 925, + 927, + 929, + 931, + 933, + 935, + 937, + 939, + 941, + 943, + 945, + 947, + 949, + 951, + 953, + 955, + 957, + 959, + 961, + 963, + 965, + 967, + 969, + 971, + 973, + 975, + 977, + 979, + 981, + 983, + 985, + 987, + 989, + 991, + 993, + 995, + 997, + 999, + 1001, + 1003, + 1005, + 1007, + 1009, + 1011, + 1013, + 1015, + 1017, + 1019, + 1021, + 1023, + 1025, + 1027, + 1029, + 1031, + 1033, + 1035, + 1037, + 1039, + 1041, + 1043, + 1045, + 1047, + 1049, + 1051, + 1053, + 1055, + 1057, + 1059, + 1061, + 1063, + 1065, + 1067, + 1069, + 1071, + 1073, + 1075, + 1077, + 1079, + 1081, + 1083, + 1085, + 1087, + 1089, + 1091, + 1093, + 1095, + 1097, + 1099, + 1101, + 1103, + 1105, + 1107, + 1109, + 1111, + 1113, + 1115, + 1117, + 1119, + 1121, + 1123, + 1125, + 1127, + 1129, + 1131, + 1133, + 1135, + 1137, + 1139, + 1141, + 1143, + 1145, + 1147, + 1149, + 1151, + 1153, + 1155, + 1157, + 1159, + 1161, + 1163, + 1165, + 1167, + 1169, + 1171, + 1173, + 1175, + 1177, + 1179, + 1181, + 1183, + 1185, + 1187, + 1189, + 1191, + 1193, + 1195, + 1197, + 1199, + 1201 + ], + "ufArray": [ + 0.0, + 0.024550000000000002, + 0.07257, + 0.11878, + 0.16268000000000002, + 0.20440000000000003, + 0.24401, + 0.28152, + 0.31698, + 0.35043, + 0.38194, + 0.41188, + 0.43992, + 0.46652, + 0.49148000000000003, + 0.51506, + 0.53737, + 0.55812, + 0.5777100000000001, + 0.5961099999999999, + 0.61347, + 0.62998, + 0.64532, + 0.6598999999999999, + 0.67362, + 0.68662, + 0.6989700000000001, + 0.7104900000000001, + 0.7214100000000001, + 0.73185, + 0.74176, + 0.75126, + 0.76005, + 0.7684799999999999, + 0.77648, + 0.78411, + 0.7914100000000001, + 0.79825, + 0.80476, + 0.81095, + 0.81691, + 0.8226399999999999, + 0.828, + 0.83317, + 0.83808, + 0.8427800000000001, + 0.8473099999999999, + 0.8515999999999999, + 0.85571, + 0.85966, + 0.86348, + 0.8671599999999999, + 0.8706499999999999, + 0.8740300000000001, + 0.87727, + 0.8803799999999999, + 0.8833799999999999, + 0.88625, + 0.8890399999999999, + 0.8917400000000001, + 0.89435, + 0.8969, + 0.89932, + 0.90167, + 0.90396, + 0.90617, + 0.9083199999999999, + 0.91038, + 0.91239, + 0.9143300000000001, + 0.9162, + 0.9179999999999999, + 0.91975, + 0.9214600000000001, + 0.92313, + 0.92475, + 0.92633, + 0.92786, + 0.9293600000000001, + 0.93082, + 0.9322400000000001, + 0.93363, + 0.93498, + 0.93628, + 0.93754, + 0.93878, + 0.93999, + 0.9411499999999999, + 0.94229, + 0.9434, + 0.9445, + 0.94557, + 0.94659, + 0.9476, + 0.9485899999999999, + 0.94955, + 0.9505, + 0.9514199999999999, + 0.95233, + 0.95321, + 0.95408, + 0.95494, + 0.9557599999999999, + 0.9565699999999999, + 0.9573699999999999, + 0.95816, + 0.95892, + 0.95967, + 0.96041, + 0.96114, + 0.96185, + 0.9625499999999999, + 0.9632299999999999, + 0.9639, + 0.9645699999999999, + 0.9652299999999999, + 0.96587, + 0.96649, + 0.9671, + 0.9677, + 0.96829, + 0.96887, + 0.96943, + 0.9699899999999999, + 0.97053, + 0.97107, + 0.9715900000000001, + 0.9720799999999999, + 0.9725499999999999, + 0.9730200000000001, + 0.97348, + 0.97393, + 0.9743600000000001, + 0.97478, + 0.9752, + 0.9756100000000001, + 0.97602, + 0.97642, + 0.97681, + 0.9772, + 0.97758, + 0.97795, + 0.97832, + 0.97869, + 0.9790399999999999, + 0.97939, + 0.97973, + 0.98007, + 0.9804, + 0.9807299999999999, + 0.9810599999999999, + 0.98139, + 0.9817, + 0.982, + 0.98229, + 0.98258, + 0.98287, + 0.9831399999999999, + 0.9834, + 0.98366, + 0.9839199999999999, + 0.98417, + 0.98441, + 0.98465, + 0.98488, + 0.9851099999999999, + 0.98533, + 0.98554, + 0.98575, + 0.98595, + 0.98615, + 0.98634, + 0.98653, + 0.9867100000000001, + 0.9868899999999999, + 0.9870699999999999, + 0.98724, + 0.98741, + 0.9875700000000001, + 0.98773, + 0.98789, + 0.9880500000000001, + 0.9882, + 0.98835, + 0.9884999999999999, + 0.9886400000000001, + 0.98878, + 0.9889199999999999, + 0.98906, + 0.9892, + 0.98934, + 0.9894799999999999, + 0.98961, + 0.9897400000000001, + 0.9898699999999999, + 0.99, + 0.99012, + 0.99024, + 0.9903700000000001, + 0.99048, + 0.9906, + 0.99072, + 0.99083, + 0.9909399999999999, + 0.99105, + 0.99115, + 0.99126, + 0.9913599999999999, + 0.99146, + 0.9915600000000001, + 0.99166, + 0.99176, + 0.9918600000000001, + 0.9919499999999999, + 0.99205, + 0.99214, + 0.99223, + 0.99232, + 0.99241, + 0.99249, + 0.9925799999999999, + 0.9926699999999999, + 0.99275, + 0.9928400000000001, + 0.9929300000000001, + 0.9930100000000001, + 0.99309, + 0.9931699999999999, + 0.9932500000000001, + 0.9933299999999999, + 0.9934099999999999, + 0.99348, + 0.99356, + 0.99363, + 0.99371, + 0.9937900000000001, + 0.99386, + 0.99393, + 0.99401, + 0.99408, + 0.9941500000000001, + 0.99422, + 0.99429, + 0.99436, + 0.99442, + 0.99449, + 0.9945499999999999, + 0.99461, + 0.99468, + 0.9947400000000001, + 0.9948, + 0.9948699999999999, + 0.99493, + 0.9949899999999999, + 0.99504, + 0.9951000000000001, + 0.99516, + 0.99521, + 0.99527, + 0.99533, + 0.9953799999999999, + 0.99544, + 0.9954900000000001, + 0.99555, + 0.9956, + 0.99566, + 0.99571, + 0.99576, + 0.9958100000000001, + 0.99586, + 0.99591, + 0.9959600000000001, + 0.99601, + 0.99606, + 0.99611, + 0.99616, + 0.9962099999999999, + 0.99625, + 0.99629, + 0.99634, + 0.99638, + 0.99642, + 0.9964700000000001, + 0.99651, + 0.99655, + 0.9965900000000001, + 0.99663, + 0.9966700000000001, + 0.9967199999999999, + 0.99676, + 0.9967900000000001, + 0.9968300000000001, + 0.9968699999999999, + 0.9969, + 0.99694, + 0.99698, + 0.99701, + 0.99705, + 0.99709, + 0.99713, + 0.9971599999999999, + 0.9972, + 0.99724, + 0.99727, + 0.9973099999999999, + 0.9973399999999999, + 0.99737, + 0.99741, + 0.99744, + 0.99747, + 0.9975, + 0.99753, + 0.99756, + 0.99759, + 0.99762, + 0.99765, + 0.99768, + 0.99772, + 0.99775, + 0.9977800000000001, + 0.9978100000000001, + 0.9978400000000001, + 0.99787, + 0.9979, + 0.9979300000000001, + 0.99795, + 0.99798, + 0.9980100000000001, + 0.99804, + 0.99807, + 0.9981, + 0.9981300000000001, + 0.99816, + 0.99818, + 0.9982099999999999, + 0.99823, + 0.9982599999999999, + 0.9982800000000001, + 0.99831, + 0.9983299999999999, + 0.99835, + 0.99837, + 0.99839, + 0.9984099999999999, + 0.99843, + 0.99844, + 0.99846, + 0.99848, + 0.9984999999999999, + 0.9985200000000001, + 0.9985299999999999, + 0.99855, + 0.99857, + 0.99859, + 0.9986, + 0.99862, + 0.9986400000000001, + 0.9986499999999999, + 0.9986700000000001, + 0.99869, + 0.9987, + 0.99872, + 0.99874, + 0.99875, + 0.9987699999999999, + 0.99878, + 0.9987999999999999, + 0.99881, + 0.99882, + 0.99884, + 0.99885, + 0.99886, + 0.99887, + 0.9988800000000001, + 0.9989, + 0.9989100000000001, + 0.9989199999999999, + 0.99893, + 0.99895, + 0.99896, + 0.99897, + 0.99898, + 0.99899, + 0.9990000000000001, + 0.99902, + 0.9990300000000001, + 0.9990399999999999, + 0.99905, + 0.9990600000000001, + 0.99907, + 0.99908, + 0.99909, + 0.9991, + 0.99911, + 0.99912, + 0.99913, + 0.9991500000000001, + 0.9991599999999999, + 0.99917, + 0.9991800000000001, + 0.99919, + 0.9992, + 0.99921, + 0.99922, + 0.99922, + 0.9992300000000001, + 0.99924, + 0.99925, + 0.99925, + 0.99926, + 0.9992700000000001, + 0.99928, + 0.99928, + 0.99929, + 0.9993000000000001, + 0.9993000000000001, + 0.9993099999999999, + 0.99932, + 0.99932, + 0.99933, + 0.99933, + 0.99934, + 0.9993500000000001, + 0.9993500000000001, + 0.99936, + 0.99936, + 0.99937, + 0.99938, + 0.99938, + 0.9993899999999999, + 0.9994, + 0.9994, + 0.99941, + 0.99941, + 0.99942, + 0.9994299999999999, + 0.9994299999999999, + 0.99944, + 0.99944, + 0.99945, + 0.99946, + 0.99946, + 0.9994700000000001, + 0.9994799999999999, + 0.9994799999999999, + 0.99949, + 0.99949, + 0.9995, + 0.9995099999999999, + 0.9995099999999999, + 0.99952, + 0.99952, + 0.99953, + 0.99954, + 0.99954, + 0.9995499999999999, + 0.99956, + 0.99956, + 0.99957, + 0.99957, + 0.99958, + 0.99959, + 0.99959, + 0.9995999999999999, + 0.99961, + 0.99961, + 0.9996200000000001, + 0.9996200000000001, + 0.9996299999999999, + 0.99964, + 0.99964, + 0.99965, + 0.99965, + 0.99966, + 0.99967, + 0.99967, + 0.99968, + 0.99968, + 0.99969, + 0.99969, + 0.9997, + 0.9997, + 0.99971, + 0.99971, + 0.9997199999999999, + 0.9997199999999999, + 0.99973, + 0.99973, + 0.99973, + 0.9997400000000001, + 0.9997400000000001, + 0.9997499999999999, + 0.9997499999999999, + 0.99976, + 0.99976, + 0.99976, + 0.99977, + 0.99977, + 0.99977, + 0.9997799999999999, + 0.9997799999999999, + 0.9997799999999999, + 0.99979, + 0.99979, + 0.99979, + 0.99979, + 0.9998, + 0.9998, + 0.9998, + 0.99981, + 0.99981, + 0.99981, + 0.99982, + 0.99982, + 0.99982, + 0.99983, + 0.99983, + 0.99983, + 0.99983, + 0.99984, + 0.99984, + 0.99984, + 0.99985, + 0.99985, + 0.99985, + 0.9998600000000001, + 0.9998600000000001, + 0.9998600000000001, + 0.9998699999999999, + 0.9998699999999999, + 0.9998699999999999, + 0.99988, + 0.99988, + 0.99988, + 0.99988, + 0.9998900000000001, + 0.9998900000000001, + 0.9998900000000001, + 0.9998999999999999, + 0.9998999999999999, + 0.9998999999999999, + 0.99991, + 0.99991, + 0.99991, + 0.99991, + 0.99991, + 0.99992, + 0.99992, + 0.99992, + 0.99992, + 0.99992, + 0.99992, + 0.99992, + 0.99993, + 0.99993, + 0.99993, + 0.99993, + 0.99993, + 0.99993, + 0.99994, + 0.99994, + 0.99994, + 0.99994, + 0.99994, + 0.99994, + 0.99994, + 0.99995, + 0.99995, + 0.99995, + 0.99995, + 0.99995, + 0.99995, + 0.99996, + 0.99996, + 0.99996, + 0.99996, + 0.99996, + 0.99996, + 0.99996, + 0.99997, + 0.99997, + 0.99997, + 0.99997, + 0.99997, + 0.99997, + 0.9999800000000001, + 0.9999800000000001, + 0.9999800000000001, + 0.9999800000000001, + 0.9999800000000001, + 0.9999800000000001, + 0.9999800000000001, + 0.9999899999999999, + 0.9999899999999999, + 0.9999899999999999, + 0.9999899999999999, + 0.9999899999999999, + 0.9999899999999999, + 1.0, + 1.0, + 1.0, + 1.0 + ], + "LD_FE_Adj_Coef": { + "2008": { + "City Intercept": 0.003259, + "City Slope": 1.1805, + "Highway Intercept": 0.001376, + "Highway Slope": 1.3466 + }, + "2017": { + "City Intercept": 0.004091, + "City Slope": 1.1601, + "Highway Intercept": 0.003191, + "Highway Slope": 1.2945 + } + } +} \ No newline at end of file diff --git a/rust/fastsim-core/resources/udds.csv b/rust/fastsim-core/resources/udds.csv new file mode 100644 index 00000000..f187ecbc --- /dev/null +++ b/rust/fastsim-core/resources/udds.csv @@ -0,0 +1,1371 @@ +cycSecs,cycMps,cycGrade,cycRoadType +0,0,0,0 +1,0,0,0 +2,0,0,0 +3,0,0,0 +4,0,0,0 +5,0,0,0 +6,0,0,0 +7,0,0,0 +8,0,0,0 +9,0,0,0 +10,0,0,0 +11,0,0,0 +12,0,0,0 +13,0,0,0 +14,0,0,0 +15,0,0,0 +16,0,0,0 +17,0,0,0 +18,0,0,0 +19,0,0,0 +20,0,0,0 +21,1.341141759,0,0 +22,2.637578792,0,0 +23,3.844606375,0,0 +24,5.141043408,0,0 +25,6.392775716,0,0 +26,7.555098574,0,0 +27,7.733917475,0,0 +28,8.091555277,0,0 +29,9.253878135,0,0 +30,9.700925388,0,0 +31,10.01385846,0,0 +32,10.05856319,0,0 +33,9.879744289,0,0 +34,9.611515937,0,0 +35,9.343287585,0,0 +36,9.119763959,0,0 +37,8.851535607,0,0 +38,7.599803299,0,0 +39,6.661004068,0,0 +40,6.661004068,0,0 +41,6.795118244,0,0 +42,6.92923242,0,0 +43,7.152756046,0,0 +44,7.644508024,0,0 +45,8.53860253,0,0 +46,9.432697036,0,0 +47,10.14797264,0,0 +48,10.23738209,0,0 +49,10.14797264,0,0 +50,10.10326792,0,0 +51,9.522106487,0,0 +52,8.493897805,0,0 +53,7.644508024,0,0 +54,7.063346596,0,0 +55,7.063346596,0,0 +56,7.912736376,0,0 +57,8.851535607,0,0 +58,9.656220663,0,0 +59,10.37149627,0,0 +60,10.81854352,0,0 +61,10.99736242,0,0 +62,11.1314766,0,0 +63,11.17618132,0,0 +64,10.99736242,0,0 +65,10.9526577,0,0 +66,11.04206715,0,0 +67,11.08677187,0,0 +68,11.04206715,0,0 +69,10.99736242,0,0 +70,10.99736242,0,0 +71,11.22088605,0,0 +72,11.44440967,0,0 +73,11.4891144,0,0 +74,11.35500022,0,0 +75,11.1314766,0,0 +76,11.17618132,0,0 +77,11.35500022,0,0 +78,11.62322858,0,0 +79,11.62322858,0,0 +80,11.4891144,0,0 +81,11.6679333,0,0 +82,11.93616165,0,0 +83,12.29379945,0,0 +84,12.78555143,0,0 +85,13.09848451,0,0 +86,13.32200814,0,0 +87,13.45612231,0,0 +88,13.59023649,0,0 +89,13.72435066,0,0 +90,13.72435066,0,0 +91,13.63494121,0,0 +92,13.59023649,0,0 +93,13.54553176,0,0 +94,13.59023649,0,0 +95,13.76905539,0,0 +96,13.59023649,0,0 +97,13.36671286,0,0 +98,13.18789396,0,0 +99,13.32200814,0,0 +100,13.54553176,0,0 +101,13.72435066,0,0 +102,13.81376011,0,0 +103,13.85846484,0,0 +104,13.81376011,0,0 +105,13.59023649,0,0 +106,13.32200814,0,0 +107,13.36671286,0,0 +108,13.50082704,0,0 +109,13.72435066,0,0 +110,13.94787429,0,0 +111,14.21610264,0,0 +112,14.39492154,0,0 +113,14.48433099,0,0 +114,14.39492154,0,0 +115,14.17139792,0,0 +116,12.78555143,0,0 +117,11.3102955,0,0 +118,9.835039564,0,0 +119,8.359783629,0,0 +120,6.884527695,0,0 +121,5.40927176,0,0 +122,3.934015825,0,0 +123,2.458759891,0,0 +124,0.983503956,0,0 +125,0,0,0 +126,0,0,0 +127,0,0,0 +128,0,0,0 +129,0,0,0 +130,0,0,0 +131,0,0,0 +132,0,0,0 +133,0,0,0 +134,0,0,0 +135,0,0,0 +136,0,0,0 +137,0,0,0 +138,0,0,0 +139,0,0,0 +140,0,0,0 +141,0,0,0 +142,0,0,0 +143,0,0,0 +144,0,0,0 +145,0,0,0 +146,0,0,0 +147,0,0,0 +148,0,0,0 +149,0,0,0 +150,0,0,0 +151,0,0,0 +152,0,0,0 +153,0,0,0 +154,0,0,0 +155,0,0,0 +156,0,0,0 +157,0,0,0 +158,0,0,0 +159,0,0,0 +160,0,0,0 +161,0,0,0 +162,0,0,0 +163,0,0,0 +164,1.475255935,0,0 +165,2.950511869,0,0 +166,4.425767804,0,0 +167,5.901023738,0,0 +168,7.376279673,0,0 +169,8.851535607,0,0 +170,9.924449014,0,0 +171,10.86324825,0,0 +172,11.53381912,0,0 +173,11.80204748,0,0 +174,11.4891144,0,0 +175,11.22088605,0,0 +176,11.04206715,0,0 +177,11.17618132,0,0 +178,11.26559077,0,0 +179,11.35500022,0,0 +180,11.53381912,0,0 +181,12.15968528,0,0 +182,11.8467522,0,0 +183,10.72913407,0,0 +184,10.14797264,0,0 +185,8.672716706,0,0 +186,7.912736376,0,0 +187,7.68921275,0,0 +188,8.091555277,0,0 +189,8.315078904,0,0 +190,8.940945058,0,0 +191,9.924449014,0,0 +192,10.9526577,0,0 +193,12.20439,0,0 +194,13.63494121,0,0 +195,14.97608297,0,0 +196,16.18311055,0,0 +197,16.67486253,0,0 +198,17.56895704,0,0 +199,18.10541374,0,0 +200,18.82068935,0,0 +201,19.4465555,0,0 +202,20.16183111,0,0 +203,20.56417363,0,0 +204,20.92181144,0,0 +205,21.23474451,0,0 +206,21.23474451,0,0 +207,21.14533506,0,0 +208,21.10063034,0,0 +209,21.01122089,0,0 +210,21.01122089,0,0 +211,21.01122089,0,0 +212,21.01122089,0,0 +213,21.01122089,0,0 +214,21.10063034,0,0 +215,21.19003979,0,0 +216,21.41356341,0,0 +217,21.68179177,0,0 +218,21.95002012,0,0 +219,22.12883902,0,0 +220,22.35236264,0,0 +221,22.620591,0,0 +222,22.7994099,0,0 +223,23.02293352,0,0 +224,23.3358666,0,0 +225,23.78291385,0,0 +226,24.18525638,0,0 +227,24.40878001,0,0 +228,24.54289418,0,0 +229,24.58759891,0,0 +230,24.54289418,0,0 +231,24.40878001,0,0 +232,24.40878001,0,0 +233,24.49818946,0,0 +234,24.63230363,0,0 +235,24.81112254,0,0 +236,24.90053199,0,0 +237,25.07935089,0,0 +238,25.16876034,0,0 +239,25.30287451,0,0 +240,25.34757924,0,0 +241,25.34757924,0,0 +242,25.25816979,0,0 +243,25.25816979,0,0 +244,25.25816979,0,0 +245,25.25816979,0,0 +246,25.25816979,0,0 +247,25.25816979,0,0 +248,25.21346506,0,0 +249,25.07935089,0,0 +250,24.94523671,0,0 +251,24.63230363,0,0 +252,24.40878001,0,0 +253,24.22996111,0,0 +254,24.14055166,0,0 +255,24.00643748,0,0 +256,23.96173276,0,0 +257,24.09584693,0,0 +258,24.14055166,0,0 +259,24.18525638,0,0 +260,24.18525638,0,0 +261,24.05114221,0,0 +262,23.8723233,0,0 +263,23.6935044,0,0 +264,23.5146855,0,0 +265,23.29116188,0,0 +266,23.42527605,0,0 +267,23.24645715,0,0 +268,23.20175243,0,0 +269,23.11234297,0,0 +270,23.02293352,0,0 +271,23.06763825,0,0 +272,23.1570477,0,0 +273,23.29116188,0,0 +274,23.46998078,0,0 +275,23.6935044,0,0 +276,23.91702803,0,0 +277,24.14055166,0,0 +278,24.54289418,0,0 +279,24.76641781,0,0 +280,24.85582726,0,0 +281,25.03464616,0,0 +282,25.03464616,0,0 +283,24.94523671,0,0 +284,24.67700836,0,0 +285,24.36407528,0,0 +286,23.96173276,0,0 +287,23.46998078,0,0 +288,23.02293352,0,0 +289,23.02293352,0,0 +290,23.02293352,0,0 +291,22.84411462,0,0 +292,22.39706737,0,0 +293,22.35236264,0,0 +294,22.39706737,0,0 +295,22.35236264,0,0 +296,22.17354374,0,0 +297,22.12883902,0,0 +298,22.12883902,0,0 +299,22.12883902,0,0 +300,21.95002012,0,0 +301,21.72649649,0,0 +302,21.50297286,0,0 +303,21.10063034,0,0 +304,20.60887836,0,0 +305,20.11712638,0,0 +306,19.58066968,0,0 +307,19.04421297,0,0 +308,18.552461,0,0 +309,18.01600429,0,0 +310,17.21131924,0,0 +311,16.54074836,0,0 +312,15.7360633,0,0 +313,15.11019715,0,0 +314,14.52903572,0,0 +315,14.08198847,0,0 +316,13.67964594,0,0 +317,13.63494121,0,0 +318,13.41141759,0,0 +319,12.96437033,0,0 +320,12.29379945,0,0 +321,11.08677187,0,0 +322,9.611515937,0,0 +323,8.985649783,0,0 +324,8.53860253,0,0 +325,8.270374179,0,0 +326,7.599803299,0,0 +327,6.92923242,0,0 +328,5.588090661,0,0 +329,4.828110331,0,0 +330,3.576378023,0,0 +331,2.101122089,0,0 +332,0.625866154,0,0 +333,0,0,0 +334,0,0,0 +335,0,0,0 +336,0,0,0 +337,0,0,0 +338,0,0,0 +339,0,0,0 +340,0,0,0 +341,0,0,0 +342,0,0,0 +343,0,0,0 +344,0,0,0 +345,0,0,0 +346,0,0,0 +347,0.447047253,0,0 +348,1.922303187,0,0 +349,3.397559122,0,0 +350,4.872815057,0,0 +351,6.348070991,0,0 +352,7.733917475,0,0 +353,8.940945058,0,0 +354,10.05856319,0,0 +355,10.59501989,0,0 +356,11.26559077,0,0 +357,11.89145693,0,0 +358,12.56202781,0,0 +359,13.41141759,0,0 +360,13.76905539,0,0 +361,14.12669319,0,0 +362,14.35021682,0,0 +363,14.66314989,0,0 +364,15.0207877,0,0 +365,15.42313022,0,0 +366,15.46783495,0,0 +367,15.60194913,0,0 +368,15.5572444,0,0 +369,15.42313022,0,0 +370,15.51253968,0,0 +371,15.87017748,0,0 +372,16.0937011,0,0 +373,16.0937011,0,0 +374,16.0937011,0,0 +375,16.0937011,0,0 +376,16.0937011,0,0 +377,16.0937011,0,0 +378,16.13840583,0,0 +379,16.27252001,0,0 +380,16.31722473,0,0 +381,16.27252001,0,0 +382,16.0937011,0,0 +383,15.69135858,0,0 +384,15.24431132,0,0 +385,14.97608297,0,0 +386,14.03728374,0,0 +387,12.96437033,0,0 +388,11.4891144,0,0 +389,10.28208682,0,0 +390,9.075059234,0,0 +391,7.823326926,0,0 +392,6.482185167,0,0 +393,5.364567035,0,0 +394,3.8893111,0,0 +395,2.414055166,0,0 +396,0.938799231,0,0 +397,0,0,0 +398,0,0,0 +399,0,0,0 +400,0,0,0 +401,0,0,0 +402,0,0,0 +403,1.162322858,0,0 +404,2.637578792,0,0 +405,4.112834727,0,0 +406,5.588090661,0,0 +407,7.063346596,0,0 +408,8.53860253,0,0 +409,10.01385846,0,0 +410,11.17618132,0,0 +411,11.44440967,0,0 +412,12.29379945,0,0 +413,12.96437033,0,0 +414,13.41141759,0,0 +415,13.45612231,0,0 +416,13.41141759,0,0 +417,13.27730341,0,0 +418,13.09848451,0,0 +419,12.87496088,0,0 +420,12.51732308,0,0 +421,11.17618132,0,0 +422,9.700925388,0,0 +423,8.225669453,0,0 +424,6.750413519,0,0 +425,5.275157584,0,0 +426,3.79990165,0,0 +427,2.324645715,0,0 +428,0.84938978,0,0 +429,0,0,0 +430,0,0,0 +431,0,0,0 +432,0,0,0 +433,0,0,0 +434,0,0,0 +435,0,0,0 +436,0,0,0 +437,0,0,0 +438,0,0,0 +439,0,0,0 +440,0,0,0 +441,0,0,0 +442,0,0,0 +443,0,0,0 +444,0,0,0 +445,0,0,0 +446,0,0,0 +447,0,0,0 +448,1.475255935,0,0 +449,2.950511869,0,0 +450,4.425767804,0,0 +451,5.901023738,0,0 +452,7.376279673,0,0 +453,8.851535607,0,0 +454,10.32679154,0,0 +455,11.80204748,0,0 +456,12.42791363,0,0 +457,13.00907506,0,0 +458,14.08198847,0,0 +459,14.75255935,0,0 +460,15.0207877,0,0 +461,15.5572444,0,0 +462,15.69135858,0,0 +463,15.9148822,0,0 +464,16.13840583,0,0 +465,16.0937011,0,0 +466,16.13840583,0,0 +467,16.18311055,0,0 +468,16.0937011,0,0 +469,15.95958693,0,0 +470,16.0937011,0,0 +471,16.0937011,0,0 +472,15.9148822,0,0 +473,15.87017748,0,0 +474,15.82547275,0,0 +475,15.7360633,0,0 +476,15.7360633,0,0 +477,15.7360633,0,0 +478,15.7360633,0,0 +479,15.7360633,0,0 +480,15.7360633,0,0 +481,15.64665385,0,0 +482,15.69135858,0,0 +483,15.7360633,0,0 +484,15.87017748,0,0 +485,15.7360633,0,0 +486,15.64665385,0,0 +487,15.64665385,0,0 +488,15.64665385,0,0 +489,15.5572444,0,0 +490,15.46783495,0,0 +491,15.42313022,0,0 +492,14.97608297,0,0 +493,14.30551209,0,0 +494,13.45612231,0,0 +495,12.51732308,0,0 +496,11.39970495,0,0 +497,10.05856319,0,0 +498,8.851535607,0,0 +499,7.376279673,0,0 +500,5.901023738,0,0 +501,4.604586705,0,0 +502,3.218740221,0,0 +503,1.788189012,0,0 +504,0.447047253,0,0 +505,0,0,0 +506,0,0,0 +507,0,0,0 +508,0,0,0 +509,0,0,0 +510,0,0,0 +511,0.536456703,0,0 +512,1.564665385,0,0 +513,2.458759891,0,0 +514,2.905807144,0,0 +515,3.79990165,0,0 +516,4.291653628,0,0 +517,4.693996155,0,0 +518,5.319862309,0,0 +519,6.258661541,0,0 +520,7.152756046,0,0 +521,7.912736376,0,0 +522,8.493897805,0,0 +523,8.985649783,0,0 +524,9.387992311,0,0 +525,9.835039564,0,0 +526,10.28208682,0,0 +527,10.63972462,0,0 +528,10.9526577,0,0 +529,11.1314766,0,0 +530,11.17618132,0,0 +531,11.17618132,0,0 +532,11.17618132,0,0 +533,11.17618132,0,0 +534,11.17618132,0,0 +535,11.17618132,0,0 +536,11.44440967,0,0 +537,11.53381912,0,0 +538,11.62322858,0,0 +539,11.44440967,0,0 +540,11.26559077,0,0 +541,11.17618132,0,0 +542,11.17618132,0,0 +543,11.17618132,0,0 +544,10.90795297,0,0 +545,10.32679154,0,0 +546,8.851535607,0,0 +547,7.376279673,0,0 +548,5.901023738,0,0 +549,4.425767804,0,0 +550,2.950511869,0,0 +551,1.475255935,0,0 +552,0,0,0 +553,0,0,0 +554,0,0,0 +555,0,0,0 +556,0,0,0 +557,0,0,0 +558,0,0,0 +559,0,0,0 +560,0,0,0 +561,0,0,0 +562,0,0,0 +563,0,0,0 +564,0,0,0 +565,0,0,0 +566,0,0,0 +567,0,0,0 +568,0,0,0 +569,1.475255935,0,0 +570,2.950511869,0,0 +571,4.425767804,0,0 +572,5.811614288,0,0 +573,6.526889892,0,0 +574,7.152756046,0,0 +575,7.599803299,0,0 +576,7.599803299,0,0 +577,7.599803299,0,0 +578,7.823326926,0,0 +579,7.912736376,0,0 +580,7.912736376,0,0 +581,7.823326926,0,0 +582,7.599803299,0,0 +583,7.555098574,0,0 +584,7.420984398,0,0 +585,7.599803299,0,0 +586,7.644508024,0,0 +587,7.599803299,0,0 +588,7.420984398,0,0 +589,7.376279673,0,0 +590,7.376279673,0,0 +591,7.420984398,0,0 +592,7.599803299,0,0 +593,7.868031651,0,0 +594,8.270374179,0,0 +595,8.583307256,0,0 +596,9.030354508,0,0 +597,9.387992311,0,0 +598,9.432697036,0,0 +599,9.477401761,0,0 +600,9.656220663,0,0 +601,9.835039564,0,0 +602,10.01385846,0,0 +603,10.05856319,0,0 +604,10.05856319,0,0 +605,10.05856319,0,0 +606,10.14797264,0,0 +607,10.59501989,0,0 +608,11.22088605,0,0 +609,11.62322858,0,0 +610,11.8467522,0,0 +611,12.07027583,0,0 +612,11.6679333,0,0 +613,10.19267737,0,0 +614,8.717421431,0,0 +615,7.242165497,0,0 +616,5.766909562,0,0 +617,4.291653628,0,0 +618,2.816397693,0,0 +619,1.341141759,0,0 +620,0,0,0 +621,0,0,0 +622,0,0,0 +623,0,0,0 +624,0,0,0 +625,0,0,0 +626,0,0,0 +627,0,0,0 +628,0,0,0 +629,0,0,0 +630,0,0,0 +631,0,0,0 +632,0,0,0 +633,0,0,0 +634,0,0,0 +635,0,0,0 +636,0,0,0 +637,0,0,0 +638,0,0,0 +639,0,0,0 +640,0,0,0 +641,0,0,0 +642,0,0,0 +643,0,0,0 +644,0,0,0 +645,0,0,0 +646,0.894094506,0,0 +647,2.011712638,0,0 +648,3.486968573,0,0 +649,4.55988198,0,0 +650,5.588090661,0,0 +651,6.258661541,0,0 +652,6.839822969,0,0 +653,7.823326926,0,0 +654,8.762126157,0,0 +655,9.387992311,0,0 +656,9.924449014,0,0 +657,10.41620099,0,0 +658,10.9526577,0,0 +659,11.3102955,0,0 +660,11.44440967,0,0 +661,11.62322858,0,0 +662,11.6679333,0,0 +663,11.71263803,0,0 +664,11.71263803,0,0 +665,11.80204748,0,0 +666,11.8467522,0,0 +667,11.8467522,0,0 +668,11.62322858,0,0 +669,11.39970495,0,0 +670,10.55031517,0,0 +671,9.566811212,0,0 +672,8.270374179,0,0 +673,7.331574947,0,0 +674,6.482185167,0,0 +675,5.185748134,0,0 +676,3.8893111,0,0 +677,2.592874067,0,0 +678,1.564665385,0,0 +679,0.894094506,0,0 +680,0,0,0 +681,0,0,0 +682,0,0,0 +683,0,0,0 +684,0,0,0 +685,0,0,0 +686,0,0,0 +687,0,0,0 +688,0,0,0 +689,0,0,0 +690,0,0,0 +691,0,0,0 +692,0,0,0 +693,0,0,0 +694,0.625866154,0,0 +695,1.475255935,0,0 +696,1.967007913,0,0 +697,2.905807144,0,0 +698,4.112834727,0,0 +699,5.051633958,0,0 +700,6.035137914,0,0 +701,6.526889892,0,0 +702,7.331574947,0,0 +703,7.465689123,0,0 +704,7.376279673,0,0 +705,7.376279673,0,0 +706,8.136260003,0,0 +707,8.583307256,0,0 +708,8.985649783,0,0 +709,9.611515937,0,0 +710,10.05856319,0,0 +711,10.05856319,0,0 +712,9.879744289,0,0 +713,10.14797264,0,0 +714,10.41620099,0,0 +715,10.50561044,0,0 +716,10.05856319,0,0 +717,9.656220663,0,0 +718,9.164468684,0,0 +719,8.046850552,0,0 +720,6.705708793,0,0 +721,5.364567035,0,0 +722,4.023425276,0,0 +723,2.771692968,0,0 +724,2.011712638,0,0 +725,1.341141759,0,0 +726,0.938799231,0,0 +727,0.223523626,0,0 +728,0.223523626,0,0 +729,1.430551209,0,0 +730,2.905807144,0,0 +731,4.291653628,0,0 +732,5.588090661,0,0 +733,6.258661541,0,0 +734,7.152756046,0,0 +735,8.046850552,0,0 +736,8.762126157,0,0 +737,9.611515937,0,0 +738,10.32679154,0,0 +739,10.9526577,0,0 +740,11.39970495,0,0 +741,11.8467522,0,0 +742,12.11498055,0,0 +743,12.33850418,0,0 +744,12.47261836,0,0 +745,12.65143726,0,0 +746,12.78555143,0,0 +747,12.78555143,0,0 +748,12.65143726,0,0 +749,12.60673253,0,0 +750,12.51732308,0,0 +751,12.29379945,0,0 +752,11.98086638,0,0 +753,11.39970495,0,0 +754,10.50561044,0,0 +755,9.611515937,0,0 +756,8.493897805,0,0 +757,7.376279673,0,0 +758,6.661004068,0,0 +759,5.588090661,0,0 +760,4.202244177,0,0 +761,2.771692968,0,0 +762,1.341141759,0,0 +763,0.670570879,0,0 +764,0.670570879,0,0 +765,0.223523626,0,0 +766,0,0,0 +767,1.341141759,0,0 +768,2.816397693,0,0 +769,4.291653628,0,0 +770,5.766909562,0,0 +771,7.063346596,0,0 +772,7.823326926,0,0 +773,8.225669453,0,0 +774,8.717421431,0,0 +775,9.253878135,0,0 +776,9.835039564,0,0 +777,10.37149627,0,0 +778,11.17618132,0,0 +779,11.8467522,0,0 +780,12.29379945,0,0 +781,12.51732308,0,0 +782,12.65143726,0,0 +783,12.91966561,0,0 +784,12.91966561,0,0 +785,12.91966561,0,0 +786,12.87496088,0,0 +787,12.74084671,0,0 +788,12.65143726,0,0 +789,12.65143726,0,0 +790,12.65143726,0,0 +791,12.60673253,0,0 +792,12.33850418,0,0 +793,12.29379945,0,0 +794,12.29379945,0,0 +795,12.29379945,0,0 +796,12.29379945,0,0 +797,12.29379945,0,0 +798,12.29379945,0,0 +799,12.33850418,0,0 +800,12.51732308,0,0 +801,12.74084671,0,0 +802,13.41141759,0,0 +803,13.85846484,0,0 +804,14.30551209,0,0 +805,14.75255935,0,0 +806,14.75255935,0,0 +807,15.0207877,0,0 +808,15.1996066,0,0 +809,15.33372077,0,0 +810,15.28901605,0,0 +811,15.1996066,0,0 +812,15.1996066,0,0 +813,15.15490187,0,0 +814,15.0207877,0,0 +815,14.79726407,0,0 +816,14.75255935,0,0 +817,14.52903572,0,0 +818,14.30551209,0,0 +819,14.26080737,0,0 +820,14.12669319,0,0 +821,14.08198847,0,0 +822,13.67964594,0,0 +823,13.41141759,0,0 +824,13.36671286,0,0 +825,13.36671286,0,0 +826,13.36671286,0,0 +827,13.36671286,0,0 +828,13.23259869,0,0 +829,13.18789396,0,0 +830,13.18789396,0,0 +831,13.09848451,0,0 +832,12.91966561,0,0 +833,12.60673253,0,0 +834,12.38320891,0,0 +835,12.07027583,0,0 +836,11.39970495,0,0 +837,10.59501989,0,0 +838,9.835039564,0,0 +839,9.164468684,0,0 +840,8.583307256,0,0 +841,8.583307256,0,0 +842,8.985649783,0,0 +843,9.343287585,0,0 +844,9.566811212,0,0 +845,9.835039564,0,0 +846,10.10326792,0,0 +847,10.37149627,0,0 +848,10.72913407,0,0 +849,11.17618132,0,0 +850,11.62322858,0,0 +851,11.89145693,0,0 +852,11.89145693,0,0 +853,11.98086638,0,0 +854,12.07027583,0,0 +855,12.15968528,0,0 +856,12.42791363,0,0 +857,12.56202781,0,0 +858,12.87496088,0,0 +859,12.91966561,0,0 +860,12.96437033,0,0 +861,13.00907506,0,0 +862,12.96437033,0,0 +863,12.56202781,0,0 +864,12.29379945,0,0 +865,12.07027583,0,0 +866,11.53381912,0,0 +867,11.17618132,0,0 +868,10.9526577,0,0 +869,11.08677187,0,0 +870,11.22088605,0,0 +871,11.39970495,0,0 +872,11.4891144,0,0 +873,11.71263803,0,0 +874,12.0255711,0,0 +875,12.29379945,0,0 +876,12.42791363,0,0 +877,12.69614198,0,0 +878,12.96437033,0,0 +879,13.05377978,0,0 +880,13.00907506,0,0 +881,12.96437033,0,0 +882,12.91966561,0,0 +883,12.74084671,0,0 +884,12.56202781,0,0 +885,12.51732308,0,0 +886,12.51732308,0,0 +887,12.33850418,0,0 +888,12.15968528,0,0 +889,11.89145693,0,0 +890,12.07027583,0,0 +891,12.29379945,0,0 +892,12.42791363,0,0 +893,12.51732308,0,0 +894,12.42791363,0,0 +895,12.51732308,0,0 +896,12.51732308,0,0 +897,12.51732308,0,0 +898,12.38320891,0,0 +899,12.24909473,0,0 +900,12.0255711,0,0 +901,11.89145693,0,0 +902,11.8467522,0,0 +903,11.8467522,0,0 +904,11.8467522,0,0 +905,11.75734275,0,0 +906,11.71263803,0,0 +907,11.71263803,0,0 +908,11.57852385,0,0 +909,11.44440967,0,0 +910,11.44440967,0,0 +911,11.57852385,0,0 +912,11.53381912,0,0 +913,11.39970495,0,0 +914,10.99736242,0,0 +915,10.50561044,0,0 +916,9.924449014,0,0 +917,9.656220663,0,0 +918,9.656220663,0,0 +919,9.700925388,0,0 +920,10.10326792,0,0 +921,10.46090572,0,0 +922,10.72913407,0,0 +923,10.81854352,0,0 +924,10.90795297,0,0 +925,11.1314766,0,0 +926,11.22088605,0,0 +927,11.26559077,0,0 +928,11.3102955,0,0 +929,11.39970495,0,0 +930,11.26559077,0,0 +931,11.17618132,0,0 +932,11.17618132,0,0 +933,11.17618132,0,0 +934,11.04206715,0,0 +935,10.9526577,0,0 +936,10.86324825,0,0 +937,10.86324825,0,0 +938,10.9526577,0,0 +939,11.17618132,0,0 +940,11.17618132,0,0 +941,10.99736242,0,0 +942,10.99736242,0,0 +943,10.77383879,0,0 +944,10.9526577,0,0 +945,11.22088605,0,0 +946,11.44440967,0,0 +947,11.22088605,0,0 +948,10.72913407,0,0 +949,9.835039564,0,0 +950,8.985649783,0,0 +951,7.555098574,0,0 +952,6.079842639,0,0 +953,4.604586705,0,0 +954,3.12933077,0,0 +955,1.654074836,0,0 +956,0.178818901,0,0 +957,0,0,0 +958,0,0,0 +959,0,0,0 +960,0.894094506,0,0 +961,2.36935044,0,0 +962,3.844606375,0,0 +963,5.319862309,0,0 +964,6.795118244,0,0 +965,7.823326926,0,0 +966,8.315078904,0,0 +967,8.940945058,0,0 +968,9.432697036,0,0 +969,9.835039564,0,0 +970,10.28208682,0,0 +971,10.9526577,0,0 +972,11.75734275,0,0 +973,12.29379945,0,0 +974,12.56202781,0,0 +975,12.69614198,0,0 +976,12.74084671,0,0 +977,12.74084671,0,0 +978,12.74084671,0,0 +979,12.38320891,0,0 +980,12.29379945,0,0 +981,12.15968528,0,0 +982,11.98086638,0,0 +983,11.8467522,0,0 +984,11.62322858,0,0 +985,11.4891144,0,0 +986,11.26559077,0,0 +987,10.72913407,0,0 +988,9.835039564,0,0 +989,9.611515937,0,0 +990,9.611515937,0,0 +991,9.745630113,0,0 +992,10.05856319,0,0 +993,10.28208682,0,0 +994,10.19267737,0,0 +995,10.19267737,0,0 +996,10.28208682,0,0 +997,10.14797264,0,0 +998,10.14797264,0,0 +999,10.14797264,0,0 +1000,10.50561044,0,0 +1001,10.72913407,0,0 +1002,10.99736242,0,0 +1003,11.08677187,0,0 +1004,11.22088605,0,0 +1005,11.39970495,0,0 +1006,11.44440967,0,0 +1007,11.39970495,0,0 +1008,11.17618132,0,0 +1009,10.77383879,0,0 +1010,10.59501989,0,0 +1011,10.37149627,0,0 +1012,10.23738209,0,0 +1013,10.05856319,0,0 +1014,9.835039564,0,0 +1015,9.656220663,0,0 +1016,9.164468684,0,0 +1017,7.823326926,0,0 +1018,6.348070991,0,0 +1019,4.872815057,0,0 +1020,3.397559122,0,0 +1021,1.922303187,0,0 +1022,0.447047253,0,0 +1023,0,0,0 +1024,0,0,0 +1025,0,0,0 +1026,0,0,0 +1027,0,0,0 +1028,0,0,0 +1029,0,0,0 +1030,0,0,0 +1031,0,0,0 +1032,0,0,0 +1033,0,0,0 +1034,0,0,0 +1035,0,0,0 +1036,0,0,0 +1037,0,0,0 +1038,0,0,0 +1039,0,0,0 +1040,0,0,0 +1041,0,0,0 +1042,0,0,0 +1043,0,0,0 +1044,0,0,0 +1045,0,0,0 +1046,0,0,0 +1047,0,0,0 +1048,0,0,0 +1049,0,0,0 +1050,0,0,0 +1051,0,0,0 +1052,0,0,0 +1053,0.536456703,0,0 +1054,1.788189012,0,0 +1055,3.263444946,0,0 +1056,4.738700881,0,0 +1057,6.213956815,0,0 +1058,7.599803299,0,0 +1059,8.270374179,0,0 +1060,8.940945058,0,0 +1061,9.745630113,0,0 +1062,10.28208682,0,0 +1063,10.72913407,0,0 +1064,11.08677187,0,0 +1065,11.44440967,0,0 +1066,11.8467522,0,0 +1067,11.98086638,0,0 +1068,12.24909473,0,0 +1069,12.47261836,0,0 +1070,12.65143726,0,0 +1071,12.51732308,0,0 +1072,12.29379945,0,0 +1073,12.07027583,0,0 +1074,12.07027583,0,0 +1075,11.75734275,0,0 +1076,10.9526577,0,0 +1077,10.05856319,0,0 +1078,9.611515937,0,0 +1079,9.20917341,0,0 +1080,8.046850552,0,0 +1081,6.705708793,0,0 +1082,5.498681211,0,0 +1083,4.962224507,0,0 +1084,4.738700881,0,0 +1085,4.470472529,0,0 +1086,4.246948902,0,0 +1087,4.068130001,0,0 +1088,3.8893111,0,0 +1089,3.844606375,0,0 +1090,3.934015825,0,0 +1091,4.023425276,0,0 +1092,3.8893111,0,0 +1093,3.844606375,0,0 +1094,3.576378023,0,0 +1095,3.12933077,0,0 +1096,2.235236264,0,0 +1097,1.877598462,0,0 +1098,1.162322858,0,0 +1099,0.447047253,0,0 +1100,0,0,0 +1101,0.044704725,0,0 +1102,0.268228352,0,0 +1103,0.715275605,0,0 +1104,1.60937011,0,0 +1105,3.084626045,0,0 +1106,4.470472529,0,0 +1107,5.722204837,0,0 +1108,6.258661541,0,0 +1109,6.482185167,0,0 +1110,7.152756046,0,0 +1111,8.091555277,0,0 +1112,8.940945058,0,0 +1113,9.387992311,0,0 +1114,9.477401761,0,0 +1115,9.522106487,0,0 +1116,9.566811212,0,0 +1117,9.700925388,0,0 +1118,10.05856319,0,0 +1119,10.28208682,0,0 +1120,10.63972462,0,0 +1121,10.9526577,0,0 +1122,11.17618132,0,0 +1123,11.1314766,0,0 +1124,11.08677187,0,0 +1125,11.17618132,0,0 +1126,11.35500022,0,0 +1127,11.53381912,0,0 +1128,11.62322858,0,0 +1129,11.80204748,0,0 +1130,11.89145693,0,0 +1131,12.0255711,0,0 +1132,12.07027583,0,0 +1133,12.07027583,0,0 +1134,12.07027583,0,0 +1135,12.0255711,0,0 +1136,11.98086638,0,0 +1137,11.98086638,0,0 +1138,11.8467522,0,0 +1139,11.80204748,0,0 +1140,11.62322858,0,0 +1141,11.39970495,0,0 +1142,10.99736242,0,0 +1143,10.50561044,0,0 +1144,9.611515937,0,0 +1145,8.940945058,0,0 +1146,7.823326926,0,0 +1147,7.152756046,0,0 +1148,6.258661541,0,0 +1149,4.783405606,0,0 +1150,3.308149671,0,0 +1151,1.832893737,0,0 +1152,0.357637802,0,0 +1153,0,0,0 +1154,0,0,0 +1155,0,0,0 +1156,0,0,0 +1157,0,0,0 +1158,0,0,0 +1159,0,0,0 +1160,0,0,0 +1161,0,0,0 +1162,0,0,0 +1163,0,0,0 +1164,0,0,0 +1165,0,0,0 +1166,0,0,0 +1167,0,0,0 +1168,0,0,0 +1169,0.938799231,0,0 +1170,2.414055166,0,0 +1171,3.8893111,0,0 +1172,5.364567035,0,0 +1173,6.839822969,0,0 +1174,8.315078904,0,0 +1175,9.432697036,0,0 +1176,10.28208682,0,0 +1177,10.50561044,0,0 +1178,10.28208682,0,0 +1179,10.05856319,0,0 +1180,8.940945058,0,0 +1181,7.465689123,0,0 +1182,5.990433189,0,0 +1183,4.515177254,0,0 +1184,3.03992132,0,0 +1185,1.564665385,0,0 +1186,0.089409451,0,0 +1187,0,0,0 +1188,0,0,0 +1189,0,0,0 +1190,0,0,0 +1191,0,0,0 +1192,0,0,0 +1193,0,0,0 +1194,0,0,0 +1195,0,0,0 +1196,0,0,0 +1197,0.089409451,0,0 +1198,0.670570879,0,0 +1199,1.564665385,0,0 +1200,2.905807144,0,0 +1201,4.381063078,0,0 +1202,5.364567035,0,0 +1203,5.766909562,0,0 +1204,5.811614288,0,0 +1205,5.632795386,0,0 +1206,5.722204837,0,0 +1207,5.856319013,0,0 +1208,5.856319013,0,0 +1209,6.258661541,0,0 +1210,6.92923242,0,0 +1211,7.599803299,0,0 +1212,8.315078904,0,0 +1213,8.806830882,0,0 +1214,9.387992311,0,0 +1215,9.611515937,0,0 +1216,9.745630113,0,0 +1217,9.745630113,0,0 +1218,9.611515937,0,0 +1219,9.477401761,0,0 +1220,9.611515937,0,0 +1221,9.745630113,0,0 +1222,9.835039564,0,0 +1223,9.790334838,0,0 +1224,9.700925388,0,0 +1225,9.611515937,0,0 +1226,9.611515937,0,0 +1227,9.566811212,0,0 +1228,8.985649783,0,0 +1229,8.717421431,0,0 +1230,8.583307256,0,0 +1231,8.762126157,0,0 +1232,8.851535607,0,0 +1233,8.940945058,0,0 +1234,8.717421431,0,0 +1235,7.823326926,0,0 +1236,6.92923242,0,0 +1237,5.811614288,0,0 +1238,4.470472529,0,0 +1239,3.576378023,0,0 +1240,2.682283517,0,0 +1241,1.788189012,0,0 +1242,1.117618132,0,0 +1243,0.312933077,0,0 +1244,0,0,0 +1245,0,0,0 +1246,0,0,0 +1247,0,0,0 +1248,0,0,0 +1249,0,0,0 +1250,0,0,0 +1251,0,0,0 +1252,0.447047253,0,0 +1253,0.447047253,0,0 +1254,0.447047253,0,0 +1255,0.447047253,0,0 +1256,0.447047253,0,0 +1257,0.715275605,0,0 +1258,1.341141759,0,0 +1259,1.788189012,0,0 +1260,2.235236264,0,0 +1261,2.816397693,0,0 +1262,3.576378023,0,0 +1263,4.470472529,0,0 +1264,4.693996155,0,0 +1265,4.246948902,0,0 +1266,3.79990165,0,0 +1267,3.397559122,0,0 +1268,3.934015825,0,0 +1269,4.917519782,0,0 +1270,6.258661541,0,0 +1271,7.599803299,0,0 +1272,8.717421431,0,0 +1273,9.387992311,0,0 +1274,9.745630113,0,0 +1275,9.924449014,0,0 +1276,10.28208682,0,0 +1277,10.55031517,0,0 +1278,10.77383879,0,0 +1279,10.9526577,0,0 +1280,10.9526577,0,0 +1281,10.72913407,0,0 +1282,10.50561044,0,0 +1283,10.50561044,0,0 +1284,10.50561044,0,0 +1285,10.50561044,0,0 +1286,10.50561044,0,0 +1287,10.50561044,0,0 +1288,10.72913407,0,0 +1289,10.77383879,0,0 +1290,10.9526577,0,0 +1291,11.04206715,0,0 +1292,11.17618132,0,0 +1293,11.35500022,0,0 +1294,11.44440967,0,0 +1295,11.4891144,0,0 +1296,11.62322858,0,0 +1297,11.71263803,0,0 +1298,12.07027583,0,0 +1299,12.42791363,0,0 +1300,12.65143726,0,0 +1301,12.96437033,0,0 +1302,13.00907506,0,0 +1303,12.96437033,0,0 +1304,12.51732308,0,0 +1305,11.04206715,0,0 +1306,9.566811212,0,0 +1307,8.091555277,0,0 +1308,6.616299343,0,0 +1309,5.141043408,0,0 +1310,3.665787474,0,0 +1311,2.190531539,0,0 +1312,0.715275605,0,0 +1313,0,0,0 +1314,0,0,0 +1315,0,0,0 +1316,0,0,0 +1317,0,0,0 +1318,0,0,0 +1319,0,0,0 +1320,0,0,0 +1321,0,0,0 +1322,0,0,0 +1323,0,0,0 +1324,0,0,0 +1325,0,0,0 +1326,0,0,0 +1327,0,0,0 +1328,0,0,0 +1329,0,0,0 +1330,0,0,0 +1331,0,0,0 +1332,0,0,0 +1333,0,0,0 +1334,0,0,0 +1335,0,0,0 +1336,0,0,0 +1337,0,0,0 +1338,0.670570879,0,0 +1339,2.145826814,0,0 +1340,3.621082748,0,0 +1341,5.096338683,0,0 +1342,5.901023738,0,0 +1343,6.750413519,0,0 +1344,7.510393849,0,0 +1345,8.180964728,0,0 +1346,8.717421431,0,0 +1347,9.075059234,0,0 +1348,9.522106487,0,0 +1349,9.790334838,0,0 +1350,9.879744289,0,0 +1351,10.01385846,0,0 +1352,9.835039564,0,0 +1353,9.656220663,0,0 +1354,9.432697036,0,0 +1355,9.164468684,0,0 +1356,8.940945058,0,0 +1357,8.762126157,0,0 +1358,8.270374179,0,0 +1359,7.823326926,0,0 +1360,7.376279673,0,0 +1361,6.92923242,0,0 +1362,6.258661541,0,0 +1363,4.917519782,0,0 +1364,3.576378023,0,0 +1365,2.324645715,0,0 +1366,1.117618132,0,0 +1367,0,0,0 +1368,0,0,0 +1369,0,0,0 diff --git a/rust/fastsim-core/src/simdrivelabel.rs b/rust/fastsim-core/src/simdrivelabel.rs index 934a6ebc..201f6a9c 100644 --- a/rust/fastsim-core/src/simdrivelabel.rs +++ b/rust/fastsim-core/src/simdrivelabel.rs @@ -201,14 +201,14 @@ pub fn get_label_fe( cyc.insert("accel", make_accel_trace()); #[cfg(not(windows))] - macro_rules! main_separator { + macro_rules! path_separator { () => { "/" }; } #[cfg(windows)] - macro_rules! main_separator { + macro_rules! path_separator { () => { r#"\"# }; @@ -216,36 +216,16 @@ pub fn get_label_fe( let udds_filestring = include_str!(concat!( "..", - main_separator!(), - "..", - main_separator!(), - "..", - main_separator!(), - "python", - main_separator!(), - "fastsim", - main_separator!(), + path_separator!(), "resources", - main_separator!(), - "cycles", - main_separator!(), + path_separator!(), "udds.csv" )); let hwy_filestring = include_str!(concat!( "..", - main_separator!(), - "..", - main_separator!(), - "..", - main_separator!(), - "python", - main_separator!(), - "fastsim", - main_separator!(), + path_separator!(), "resources", - main_separator!(), - "cycles", - main_separator!(), + path_separator!(), "hwfet.csv" )); From edad90ea68b84fe2e4a1739b7644d8d2344fd3ab Mon Sep 17 00:00:00 2001 From: Chad Baker Date: Tue, 25 Jul 2023 16:39:45 -0600 Subject: [PATCH 11/16] `cargo publish --dry-run --alow-dirty` works in rust/fastsim-core/ --- rust/fastsim-core/build.rs | 10 +++++----- rust/fastsim-core/src/params.rs | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/rust/fastsim-core/build.rs b/rust/fastsim-core/build.rs index c2e0e861..52eab255 100644 --- a/rust/fastsim-core/build.rs +++ b/rust/fastsim-core/build.rs @@ -9,7 +9,7 @@ fn main() { let prepath: String = "../../../../python/fastsim/resources".into(); let thinger = PathBuf::from(format!( - "{}/../../../../python", + "{}/../../../../python/fastsim/resources/cycles/udds.csv", env::current_dir().unwrap().as_os_str().to_str().unwrap() )) .canonicalize() @@ -24,12 +24,12 @@ fn main() { prepath ), format!( - "{}/{}/udds.csv", + "{}/{}/cycles/udds.csv", env::current_dir().unwrap().as_os_str().to_str().unwrap(), prepath ), format!( - "{}/{}/hwfet.csv", + "{}/{}/cycles/hwfet.csv", env::current_dir().unwrap().as_os_str().to_str().unwrap(), prepath ), @@ -41,11 +41,11 @@ fn main() { env::current_dir().unwrap().as_os_str().to_str().unwrap() ), format!( - "{}/resources/hwfet.csv", + "{}/resources/udds.csv", env::current_dir().unwrap().as_os_str().to_str().unwrap() ), format!( - "{}/resources/udds.csv", + "{}/resources/hwfet.csv", env::current_dir().unwrap().as_os_str().to_str().unwrap() ), ]; diff --git a/rust/fastsim-core/src/params.rs b/rust/fastsim-core/src/params.rs index 7a01f7b0..d56f9c7b 100644 --- a/rust/fastsim-core/src/params.rs +++ b/rust/fastsim-core/src/params.rs @@ -159,8 +159,7 @@ impl SerdeAPI for AdjCoef {} impl Default for RustLongParams { fn default() -> Self { - let long_params_str: &str = - include_str!("../../../python/fastsim/resources/longparams.json"); + let long_params_str: &str = include_str!("../resources/longparams.json"); let long_params: Self = from_str(long_params_str).unwrap(); long_params } From be3304bfa35c2549cef5fd4b74dd8bee238eb2a6 Mon Sep 17 00:00:00 2001 From: Chad Baker Date: Tue, 25 Jul 2023 16:55:53 -0600 Subject: [PATCH 12/16] added path robustness for building and publishing --- rust/fastsim-core/build.rs | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/rust/fastsim-core/build.rs b/rust/fastsim-core/build.rs index 52eab255..cb92c5ba 100644 --- a/rust/fastsim-core/build.rs +++ b/rust/fastsim-core/build.rs @@ -6,16 +6,21 @@ use std::fs; use std::path::PathBuf; fn main() { - let prepath: String = "../../../../python/fastsim/resources".into(); - - let thinger = PathBuf::from(format!( - "{}/../../../../python/fastsim/resources/cycles/udds.csv", - env::current_dir().unwrap().as_os_str().to_str().unwrap() - )) - .canonicalize() - .unwrap(); - assert!(&thinger.exists()); - dbg!(thinger); + // path when running `cargo publish` in fastsim-core/ + let publish_path = "../../../../python/fastsim/resources".to_string(); + // path when building using build_and_test.sh + let build_path = "../../python/fastsim/resources".to_string(); + + let prepath: String = match PathBuf::from(publish_path.clone()).exists() { + true => publish_path, + false => build_path, + }; + + assert!( + PathBuf::from(prepath.clone()).exists(), + "{:?} does not exist.", + PathBuf::from(prepath).canonicalize() + ); let truth_files = [ format!( From 961ec3e401b20dda4ec84bb94867d274ff1437c7 Mon Sep 17 00:00:00 2001 From: Chad Baker Date: Wed, 26 Jul 2023 09:49:31 -0600 Subject: [PATCH 13/16] included build.rs and incremented to 0.1.1 --- rust/fastsim-core/Cargo.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rust/fastsim-core/Cargo.toml b/rust/fastsim-core/Cargo.toml index d2206d0b..0d70e5ca 100644 --- a/rust/fastsim-core/Cargo.toml +++ b/rust/fastsim-core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fastsim-core" -version = "0.1.0" +version = "0.1.1" edition = "2021" license-file = "../../LICENSE.md" authors = ["NREL/MTES/CIMS/MBAP Group "] @@ -37,6 +37,7 @@ include = [ "resources/longparams.json", "resources/udds.csv", "resources/hwfet.csv", + "build.rs", ] [package.metadata.docs.rs] From a8fea2de4598ef53b1450194fe0d1bbb12316ed1 Mon Sep 17 00:00:00 2001 From: Chad Baker Date: Wed, 26 Jul 2023 10:31:28 -0600 Subject: [PATCH 14/16] removed build checks when python resources are not available because this indicates compilation is likely happening with fastsim-core as a dependency --- rust/fastsim-core/build.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/rust/fastsim-core/build.rs b/rust/fastsim-core/build.rs index cb92c5ba..ed6ee294 100644 --- a/rust/fastsim-core/build.rs +++ b/rust/fastsim-core/build.rs @@ -16,11 +16,12 @@ fn main() { false => build_path, }; - assert!( - PathBuf::from(prepath.clone()).exists(), - "{:?} does not exist.", - PathBuf::from(prepath).canonicalize() - ); + if !PathBuf::from(prepath.clone()).exists() { + // no need for further checks since this indicates that it's + // likely that python fastsim is not available and thus + // fastsim-core is likely being compiled as a dependency + return; + } let truth_files = [ format!( From 1f9c96a8308d053cef11926d58c45ef420e53f8a Mon Sep 17 00:00:00 2001 From: Chad Baker Date: Wed, 26 Jul 2023 10:40:41 -0600 Subject: [PATCH 15/16] incremented version to enable cargo publish --- rust/fastsim-core/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/fastsim-core/Cargo.toml b/rust/fastsim-core/Cargo.toml index 0d70e5ca..6cdb054b 100644 --- a/rust/fastsim-core/Cargo.toml +++ b/rust/fastsim-core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fastsim-core" -version = "0.1.1" +version = "0.1.2" edition = "2021" license-file = "../../LICENSE.md" authors = ["NREL/MTES/CIMS/MBAP Group "] From 986b633bc670da1e211d8d6400a58fc0ddaf41af Mon Sep 17 00:00:00 2001 From: Chad Baker Date: Wed, 26 Jul 2023 11:14:39 -0600 Subject: [PATCH 16/16] more flexible version spec --- rust/fastsim-core/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/fastsim-core/Cargo.toml b/rust/fastsim-core/Cargo.toml index 6cdb054b..568a878b 100644 --- a/rust/fastsim-core/Cargo.toml +++ b/rust/fastsim-core/Cargo.toml @@ -10,7 +10,7 @@ readme = "../../README.md" repository = "https://github.com/NREL/fastsim" [dependencies] -proc-macros = { package = "fastsim-proc-macros", version = "0.1.2" } +proc-macros = { package = "fastsim-proc-macros", version = "~0" } pyo3 = { workspace = true, features = [ "extension-module", "anyhow",