Android here sdk premium version 3.18.5
Here sdk is not using weight parameter or I'm using it in a wrong way.
My base route settings:
routePlan.routeOptions.routeType = RouteOptions.Type.FASTEST
routePlan.routeOptions.transportMode = RouteOptions.TransportMode.TRUCK
I checked different combinations of truckLimitedWeight and truckWeightPerAxle parameters without luck. Router still returns routes through the road with a 5t or a 3.5 weight restriction. Is there any other setting that should be set to achive weight restrictions aware truck routing?
Related
Firstly apologies if this has been answered elsewhere.
I am using QuantLib (via Excel) to build a "standard" bond pricing sheet: prices, yields, spline AND matched-maturity ASW.
I can price the bonds, and have successfully built a forecast (Euribor) and discount (EONIA) curve. I can use qlMakeVanillaSwap() to define a spot-start swap by tenor (eg "1y","2Y" etc) and it works fine. However I am struggling to define a "broken date" swap, ie one which starts T+2 and ends on a given date (and so usually has a short stub on the first payment), to match the bond maturity. All the examples I can find have integer year tenors.
I would be grateful if someone could point me to the right method (can be in python, C++ or Excel). Or do I have to go down the route of creating explicit fixed and floating rate schedules for the swaps?
The answer seems to be: Yes, I do have to create explicit fixed and floating rate schedules, using qlSchedule(), but it turns out to be not too onerous. NB. I am pricing a vanilla EUR ABB vs 6m Euribor swap.
As for pricing, it seems the qlMakeVanillaSwap() is doing a few helpful things in one call, but only IF your swap has a whole-period tenor (eg "1y"). I found the answer for what I wanted to do in the example sheet that came with the QuantLibXL download package.
The other thing that qlMakeVanillaSwap() is doing (in addition to creating the schedules) is setting the Pricing Engine (which is used to discount the cashflows). In the longer version you have to (a) set it yourself using qlInstrumentSetPricingEngine() and (b) pass the result of that call to the Trigger parameter of qlVanillaSwapFairRate(), to establish the calculation order.
I am building a recommender system using sagemaker's built-in factorisation machine model.
My desired result is to have a rating matrix where I can look up a predicted score by a user id and an item id.
I understand that there is a predict API provided by the model:
result = fm_predictor.predict(X_test[1000:1010].toarray())
But I am not sure how I can use it to achieve the desired purpose. If I want to know, say, if user#123 is interested in movie#456, how can I use the above API?
Reference:
https://medium.com/#julsimon/building-a-movie-recommender-with-factorization-machines-on-amazon-sagemaker-cedbfc8c93d8
https://www.slideshare.net/AmazonWebServices/building-a-recommender-system-on-aws-aws-summit-sydney-2018 (p.41,43)
Updated:
I think I understand how to use the API now, you have to build another one-hot encoded dataset as input, for example:
X_new = lil_matrix((1, nbFeatures)).astype('float32')
X_new[0, 935] = 1
X_new[0, 1600] = 1
prediction2 = X_new[0].toarray()
result2 = fm_predictor.predict(prediction2)
print(result2)
But it seems it would be quite inefficient to fill out the recommendation matrix this way. What would be the best practice?
I think one could think about 2 scenarios:
1) if you need very low latency, you can fill up the matrix indeed, i.e. compute all recos for all users, and store it in a key/value backend queried by your app. You can definitely predict multiple users at a time, using the one-hot encoded technique above.
2) predict on-demand by invoking the endpoint directly from the app. This is quite simpler, at the cost of a little latency.
Hope this helps.
I have values for postage, pricing and postage service (only if). I have two choices for postage service (express and eco), price depends on a weight, but service depends on a price (fast service for items over £5, eco - under).
Service: if product price(A2)
<5=eco; >5=express
Service price(C2) by weight(B2):
<=1000gr= £2 eco or £3 express
1001-1250gr= £5 eco or £6 express
1251-5000gr=£9 eco or £11 express
Cells A2 and B2 always display a value, need a formula for C2 to display the price of service calculated by weight, but if item over £5 must display express service price if less - eco.
I have tried:
>IF(AND(OR(B2<=1000),A2<5),2,IF(AND(OR(B2>1000,B2<=1250),A2<5),5,IF(AND(OR(B2>1250,B2<=5000),A2<5),9)))
>IF(AND(OR(B2<=1000),A2<5),2)+IF(AND(OR(B2>=1001,B2<=1250),A2<5),5)+IF(AND(OR(B2>2000),A2<5),9)
Didn't start adding A2>5, because nothing works anyway! Tried many more, but no luck.
Would appreciate any help because stuck and ran out of options :(
Thanks!
There are a couple of ways to accomplish this. The preferred method is to build a small cross-reference table for your surcharges and use the VLOOKUP function to return the values.
However, this question was about hard-coded values in a conditional statement, so I will address that with a LOOKUP function and arrayed constants.
The standard formula in C2 is,
=LOOKUP(B2,{0,1001,1251},{2,5,9})+SIGN(A2)*LOOKUP(B2,{0,1001,1251},{1,1,2})
Fill down as necessary.
In the following image, custom number formats were used on columns A and B ([Color9]\Exp\r\e\s\s - [$£-809]#,##0.00;;[Color10]\Eco - [$£-809]#,##0.00; and 0\g\r_)). Weights >5000 in column B trigger a conditional formatting in column C that displays too heavy.
I'm attempting to set up an OpenCart store for a client.
I'm getting the following error on the shipping page.
"Warning: No Shipping options are available. Please contact us for assistance!"
Research suggests that this error happens when there is a mismatch between the weight-class for the store and for the plugin, or something similar.
I've tried every combination of configuration settings that I can think of without result.
I'm not familiar enough with OpenCart to debug this issue. Where do I need to start looking?
Firstly you have to enable the shipping status and the values from admin panel shipping tab.After that you can get it in the front end.
My troubleshooting procedure:
The store weight UOM had been set to ounces.
The Fedex plugin doesn't support ounces as a weight UOM.
Nothing works.
The store weight UOM was changed to LBS.
Nothing works.
The package size was set to FedEx 10 KG Box
The Fedex plugin can't convert from Lbs to KG on the fly.
The package size was changed to "Fedex Box", without a weight class
Some products now working, all shipping estimates are WAY high.
When changing the default UOM for the store, no existing weights are converted in to the new units, although any weights stored without a unit are now read as being in the new unit.
This meant that the fedex system was trying to pull prices for items that "weighed" hundred of ounces (which it should have been able to do, even though those weights were incorrect.)
I updated the weights on all products to be in line with their unit of measure
At this point, the plugin was working for most, but not all, products, with reasonable accuracy.
I changed the plugin settings from List Rate to Account rate.
Now everything works.
To simplify - The fedex shipping plugin in opencart 1.5.6 will only work if:
All the products in the system have their weights stored in the same UOM.
That UOM is either pounds or kilograms (not ounces!)
A geozone is set, and a zip code is supplied(zip codes are important!)
The package size matches the unit of measure for the weight (no mixing kilograms and pounds!)
The product weights are actually correct
The account in question has a rate for a package of the indicated size
Hopefully someone else will find this helpful.
Ive been through this problem as well and I haven't yet fixed it completely.
But in my particular problem, I had a syntax error in the XML retrieved by the Fedex server after the cURL request.
Printing the $response variable I could find some good hints about some of the problems, for example, commas (,) instead of dots (.) to refer to decimal numbers and decimal numbers where it was expecting an integer.
So var_dump($response) could help some people find their specific issues.
I'm in the planning phase of a project and one of the requirements is that the system be able to get the current weather conditions for any point on Earth, given a set of latitude-longitude coordinates.
I signed up for Wunderground.com's Weather API, but immediately realized this wouldn't work. If you enter a set of coordinates that doesn't correspond to a known city, the API returns a "querynotfound" error with the description "No cities match your search query."
Does a service like this exist?
EDIT: To clarify, I might need the current weather conditions for some arbitary point in (say) the Atlantic ocean.
Have you looked at google api?
http://www.google.com/ig/api?weather=,,,40467626,-03609910&hl=es
I think this is what you are looking for Using Google Weather API with Lat and Lon - how to format?
Edited 29th Aug 2012
As mentioned by "azgolfer" as of August 25th, 2012. Google has phased out it's API. Try http://www.wunderground.com/ instead.