<feed xmlns='http://www.w3.org/2005/Atom'>
<title>chouette-core/spec/lib, branch 6097-cache-route-WayCosts</title>
<subtitle>Chouette manage transport static data</subtitle>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/'/>
<entry>
<title>WayCost: Add `#cache_key` method</title>
<updated>2018-04-16T14:21:04+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-04-16T10:58:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=7a9a08325db222b11d22a7e72458e8d66875c42a'/>
<id>7a9a08325db222b11d22a7e72458e8d66875c42a</id>
<content type='text'>
Provides a uniform Rails cache key for all `WayCost`s using their `id`.
Since the `id` field is option, raise an error if the `WayCost` doesn't
have one.

Refs #6097
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Provides a uniform Rails cache key for all `WayCost`s using their `id`.
Since the `id` field is option, raise an error if the `WayCost` doesn't
have one.

Refs #6097
</pre>
</div>
</content>
</entry>
<entry>
<title>WayCostsFromRouteCostsPopulator: Handle missing route costs</title>
<updated>2018-04-16T14:21:04+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-04-16T10:15:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=ae3933586653c00ea92d788380fc81d3586e4d42'/>
<id>ae3933586653c00ea92d788380fc81d3586e4d42</id>
<content type='text'>
If a `Route#cost` is missing the method shouldn't fail. Instead, it
should just pass the `WayCost` along without distance &amp; time cost
values. This way we end up with a list of all `WayCost`s for all stop
areas, even the new ones that haven't been run through the TomTom
calculator yet.

Refs #6097
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If a `Route#cost` is missing the method shouldn't fail. Instead, it
should just pass the `WayCost` along without distance &amp; time cost
values. This way we end up with a list of all `WayCost`s for all stop
areas, even the new ones that haven't been run through the TomTom
calculator yet.

Refs #6097
</pre>
</div>
</content>
</entry>
<entry>
<title>Add `WayCostsFromRouteCostsPopulator`</title>
<updated>2018-04-16T14:21:04+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-04-16T10:04:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=fc1c4b7ca5b9e2886413ddd24d5cba90ea7dd804'/>
<id>fc1c4b7ca5b9e2886413ddd24d5cba90ea7dd804</id>
<content type='text'>
Gives us a way to take `Route#costs` and `WayCost`s created by
`StopAreasToWayCostsConverter` and merge the data together to obtain
complete `WayCost`s including distance and time values.

This will allow us to more easily interact with the Rails cache for
caching `WayCost`s.

Refs #6097
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Gives us a way to take `Route#costs` and `WayCost`s created by
`StopAreasToWayCostsConverter` and merge the data together to obtain
complete `WayCost`s including distance and time values.

This will allow us to more easily interact with the Rails cache for
caching `WayCost`s.

Refs #6097
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #438 from af83/6368-gtfs-import</title>
<updated>2018-04-10T15:30:55+00:00</updated>
<author>
<name>Luc Donnet</name>
</author>
<published>2018-04-10T15:30:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=537a5078657ead0b89aa5220c05dfbc01ae94dca'/>
<id>537a5078657ead0b89aa5220c05dfbc01ae94dca</id>
<content type='text'>
GTFS import (first step)</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
GTFS import (first step)</pre>
</div>
</content>
</entry>
<entry>
<title>RouteWayCostUnitConverter: Snap values between 0–1 to 1</title>
<updated>2018-04-05T13:37:42+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-04-05T13:37:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=bfb194c5294c583dbf0bc0bef78b67d64a3a4f4c'/>
<id>bfb194c5294c583dbf0bc0bef78b67d64a3a4f4c</id>
<content type='text'>
We use integer values for distance (kilometres) and time (minutes). If
the values aren't very big, like bus stops inside a city for example,
the integer conversion will put distance and time at `0`, which isn't
correct.

To continue to use our chosen measurement units while still displaying
something that makes sense to users, snap any values &gt;0 and &lt;=1 to `1`.

Refs #6404
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We use integer values for distance (kilometres) and time (minutes). If
the values aren't very big, like bus stops inside a city for example,
the integer conversion will put distance and time at `0`, which isn't
correct.

To continue to use our chosen measurement units while still displaying
something that makes sense to users, snap any values &gt;0 and &lt;=1 to `1`.

Refs #6404
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #413 from af83/6222-route-way-costs--use-TomTom-matrix-API-instead-of-batch</title>
<updated>2018-04-04T08:03:40+00:00</updated>
<author>
<name>Alban Peignier</name>
</author>
<published>2018-04-04T08:03:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=ecf0dd6406576f8a63ee056fab73b05171c3e767'/>
<id>ecf0dd6406576f8a63ee056fab73b05171c3e767</id>
<content type='text'>
Route way costs  use tom tom matrix api instead of batch. Refs #6222</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Route way costs  use tom tom matrix api instead of batch. Refs #6222</pre>
</div>
</content>
</entry>
<entry>
<title>Add GTFS::Time and use it to compute day offset for VehicleJourneys. Refs #6368</title>
<updated>2018-04-03T12:58:47+00:00</updated>
<author>
<name>Alban Peignier</name>
</author>
<published>2018-04-03T12:58:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=b7d4892741f5b98a45a6a7660e6f174106b02dd7'/>
<id>b7d4892741f5b98a45a6a7660e6f174106b02dd7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #360 from af83/new-uniqueness-validation-for-ccblocks</title>
<updated>2018-03-30T16:30:46+00:00</updated>
<author>
<name>Luc Donnet</name>
</author>
<published>2018-03-30T16:30:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=48b92a8446d715d5e69fb235d811929fa3f19c07'/>
<id>48b92a8446d715d5e69fb235d811929fa3f19c07</id>
<content type='text'>
New uniqueness validation for ccblocks</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
New uniqueness validation for ccblocks</pre>
</div>
</content>
</entry>
<entry>
<title>TomTom::Matrix: Serialize `BigDecimal` as float</title>
<updated>2018-03-27T14:46:18+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-03-27T13:24:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=c17665c0cc064c8a14af812dedd645977d110388'/>
<id>c17665c0cc064c8a14af812dedd645977d110388</id>
<content type='text'>
Rails serialises `BigDecimal`s as JSON strings to prevent loss of
precision. The `latitude` and `longitude` columns in `StopArea` are
stored as `BigDecimal`s. The trouble is that TomTom's API requires the
latitude &amp; longitude values to be JSON floats, not strings.

Make a new JSON serialiser that converts the `BigDecimal` coordinates to
float to allow the values to be correctly interpreted by the API.

Refs #6222
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rails serialises `BigDecimal`s as JSON strings to prevent loss of
precision. The `latitude` and `longitude` columns in `StopArea` are
stored as `BigDecimal`s. The trouble is that TomTom's API requires the
latitude &amp; longitude values to be JSON floats, not strings.

Make a new JSON serialiser that converts the `BigDecimal` coordinates to
float to allow the values to be correctly interpreted by the API.

Refs #6222
</pre>
</div>
</content>
</entry>
<entry>
<title>TomTom::Matrix#points_from_way_costs: Use array instead of set</title>
<updated>2018-03-27T14:46:18+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-03-26T13:52:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=ebd46f068fbf11ea8793e9f7982b3a5291e21398'/>
<id>ebd46f068fbf11ea8793e9f7982b3a5291e21398</id>
<content type='text'>
Using a set ended up not working out. I needed to be able to index into
the list in `#extract_costs_to_way_costs!`, and sets aren't indexable.
This is because they're supposed to be unordered, though modern Ruby
implements `Set` with `Hash` under the hood, which is ordered in Ruby.

I like the idea of having a data structure that automatically eliminates
duplicates, but it wasn't meant to be, because for the extraction to
`WayCost`s, I need an ordered list. Rather than create a new
`OrderedSet` type, I just went the simple route and used an Array,
eliminating the duplicates manually because I know when duplicates are
supposed to occur due to the nature of the data set.

Remove the `#eql?` and `#hash` methods from `TomTom::Matrix::Point`.
Because we're not longer using `Set`, these methods don't need to be
implemented.

Refs #6222
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Using a set ended up not working out. I needed to be able to index into
the list in `#extract_costs_to_way_costs!`, and sets aren't indexable.
This is because they're supposed to be unordered, though modern Ruby
implements `Set` with `Hash` under the hood, which is ordered in Ruby.

I like the idea of having a data structure that automatically eliminates
duplicates, but it wasn't meant to be, because for the extraction to
`WayCost`s, I need an ordered list. Rather than create a new
`OrderedSet` type, I just went the simple route and used an Array,
eliminating the duplicates manually because I know when duplicates are
supposed to occur due to the nature of the data set.

Remove the `#eql?` and `#hash` methods from `TomTom::Matrix::Point`.
Because we're not longer using `Set`, these methods don't need to be
implemented.

Refs #6222
</pre>
</div>
</content>
</entry>
</feed>
