Adding Cost Data to OD Cost Matrix - esri

I have a model that I built where I can add a point (Origin) and add another point (Destination). I run the model to get a mileage from the origin to the destination. It works well, but I’d like to add onto it.
Existing Model
I’d like to place a point on the map and the model to find the 5 closest destinations. Once that is done, I’d like for the model to take those mileages and add cost data to it. I know that I’ll need to build the model around OD Cost Matrix. After that I’m kind of lost as to how to calculate the values. I think it would be good to have the interface for the model have a box for Freight Rate, Material Amount, Material Rate, and Material Cost. The reason I think it would be good to have that option is so the user could change those numbers as conditions in the market change.The image below is what I have so far for the model and the interface. User clicks the Feature Point and adds it to the map. Then enters the information into each box in the interface. User hits start or go.
Interface
enter image description here
I've yet to get it to work, and I don't really know what I'm doing.
The goal is to get an output that looks something like this.
Possible Output
Thank you for any help.

Related

allocating category to a comment pandas

My task is to allocate broad and fine category to the text I have in a pandas dataframe.
My df is something like this:
Text
I like this pen
this is the worst light bulb ever
these pants fit me just fine
Desired output:
Text Broad_cat Fine_cat
I like this pen Stationary Pen
this is the worst light bulb ever Electrical light Bulb
these pants fit me just fine Clothing Pants
The text could be from any category, so I cant use a prepared dictionary. These are reviews that I can get from any source. I was hoping that there is an open source python package that can help me with the specific task of categorization of a comment. I already tried YAKE, RAKE, Summa and KeyBERT methods and while each of them are giving me key words, they dont always turn out to be the category. Is this even possible? Any help in this regard is much appreciated.
I presume you have a list of allowed categories?
This a multiclass classification problem.
A fiddly approach is you embed the sentences into some sort of vector space then use a somethign like the softmax function to select the class and then train your model based on training data. This post discusses this.
I think you might be more interested in zero-shot text classification. Hugging face has a pipeline (what of using models for certain tasks) for this with the property candidate_labels. So you should be able to use this with an appropriate model and specify candidate labels... though the underlying model would have support this in some way, but presumably some do. cross-encoder/nli-distilroberta-base appears to support this.
`

Insert skeleton in 3D model programmatically

Background
I'm working on a project where a user gets scanned by a Kinect (v2). The result will be a generated 3D model which is suitable for use in games.
The scanning aspect is going quite well, and I've generated some good user models.
Example:
Note: This is just an early test model. It still needs to be cleaned up, and the stance needs to change to properly read skeletal data.
Problem
The problem I'm currently facing is that I'm unsure how to place skeletal data inside the generated 3D model. I can't seem to find a program that will let me insert the skeleton in the 3D model programmatically. I'd like to do this either via a program that I can control programmatically, or adjust the 3D model file in such a way that skeletal data gets included within the file.
What have I tried
I've been looking around for similar questions on Google and StackOverflow, but they usually refer to either motion capture or skeletal animation. I know Maya has the option to insert skeletons in 3D models, but as far as I could find that is always done by hand. Maybe there is a more technical term for the problem I'm trying to solve, but I don't know it.
I do have a train of thought on how to achieve the skeleton insertion. I imagine it to go like this:
Scan the user and generate a 3D model with Kinect;
1.2. Clean user model, getting rid of any deformations or unnecessary information. Close holes that are left in the clean up process.
Scan user skeletal data using the Kinect.
2.2. Extract the skeleton data.
2.3. Get joint locations and store as xyz-coordinates for 3D space. Store bone length and directions.
Read 3D skeleton data in a program that can create skeletons.
Save the new model with inserted skeleton.
Question
Can anyone recommend (I know, this is perhaps "opinion based") a program to read the skeletal data and insert it in to a 3D model? Is it possible to utilize Maya for this purpose?
Thanks in advance.
Note: I opted to post the question here and not on Graphics Design Stack Exchange (or other Stack Exchange sites) because I feel it's more coding related, and perhaps more useful for people who will search here in the future. Apologies if it's posted on the wrong site.
A tricky part of your question is what you mean by "inserting the skeleton". Typically bone data is very separate from your geometry, and stored in different places in your scene graph (with the bone data being hierarchical in nature).
There are file formats you can export to where you might establish some association between your geometry and skeleton, but that's very format-specific as to how you associate the two together (ex: FBX vs. Collada).
Probably the closest thing to "inserting" or, more appropriately, "attaching" a skeleton to a mesh is skinning. There you compute weight assignments, basically determining how much each bone influences a given vertex in your mesh.
This is a tough part to get right (both programmatically and artistically), and depending on your quality needs, is often a semi-automatic solution at best for the highest quality needs (commercial games, films, etc.) with artists laboring over tweaking the resulting weight assignments and/or skeleton.
There are algorithms that get pretty sophisticated in determining these weight assignments ranging from simple heuristics like just assigning weights based on nearest line distance (very crude, and will often fall apart near tricky areas like the pelvis or shoulder) or ones that actually consider the mesh as a solid volume (using voxels or tetrahedral representations) to try to assign weights. Example: http://blog.wolfire.com/2009/11/volumetric-heat-diffusion-skinning/
However, you might be able to get decent results using an algorithm like delta mush which allows you to get a bit sloppy with weight assignments but still get reasonably smooth deformations.
Now if you want to do this externally, pretty much any 3D animation software will do, including free ones like Blender. However, skinning and character animation in general is something that tends to take quite a bit of artistic skill and a lot of patience, so it's worth noting that it's not quite as easy as it might seem to make characters leap and dance and crouch and run and still look good even when you have a skeleton in advance. That weight association from skeleton to geometry is the toughest part. It's often the result of many hours of artists laboring over the deformations to get them to look right in a wide range of poses.

SSAS IsAggregatable for Currency Dimensions

I have a cube with a Source Currency Dimension and a Billing Currency Dimension. I set both of these to IsAggregatable = False (which seems to be recommended since I don't want an All level to automatically sum up over different currencies!). When the All level is taken away I am left with a single default currency, that I can set if I want.
Problem is the two dimensions now act as a sort of filter to each other. If I want a total of all Billing Amounts by billing currency and drag that dimension on its own onto the grid, the result is filtered to show only the transactions (if any) that also match the default Source Currency. And vica versa. It is only if I drag the other dimension onto the grid that I have the ability to show all the data.
Is there some setting that allows a default member of a dimension to represent all the members? It feels like Not Aggregatable makes sense in the context of that one dimension, but seems to make little sense in the context of other dimensions in terms of seeing all data. Ie I want to see a summary of transactions by Billing Currency - and I DON'T CARE what the source currency was (ie you can consider All of them).
I am quite likely falling into some basic trap here, possibly design related - any clues would be appreciated.
Glenn
Finally found a reference to an article that describes this situation EXACTLY, and an interesting approach to resolving it. The main thing for me was recognition that the situation is real and not an issue with my design.
Issue described and resolved here

Creating a program that takes GPS data and displays the current location on a geo-referenced image

My name is John and I am a grad student at the University of Florida. As part of my research one of my tasks is to create a piece of software that is to display a map of the surrounding area, which shows the current location (from a GPS), and to implement a shapefile (as a boundary outline). I am not able to really get enough information to get on the right track on how to do this, and would appreciate any assistance!
The project involves a large-scale robot that will be operated by tele-communication in rough terrain. So this mapping and gps software will need to be entirely offline, but the location in use will be known. It is very preferred to find a cost effective means to doing this process (maybe even a simple API that could do the simple task, dll libraries, or active x.
My initial guess is to use a geo-referenced image (that I would get the lat and long of and know the boundaries of that image). Then from a GPS I then would treat the image as an XY plot somehow and that would provide the current position. Obviously even this step can be a challenge depending on what kind of image, map, kml file, etc that I can find and use.
So I would appreciate any advice, suggestions, or comments.
Suggest you online reference source code, and then modify their own, this project is currently on the Internet, you can through search engines to find. Good luck!

How can I distribute a number of values Normally in Excel VBA

Sorry I know the question isnt as specific as it could be. I am currently working on a replenishment forecasting system for a clothing company (dont ask why it's in VBA). The module I am currently working on is distribution forecasts down to a size level. The idea is that the planners can forecast the number to sell, then can specify a ratio between the sizes.
In order to make the interface a bit nicer I was going to give them 4 options; Assess trend, manual entry, Poisson and Normal. The last two is where I am having an issue. Given a mean and SD I'd like to drop in a ratio (preferably as %s) between the different sizes. The number of the sizes can vary from 1 to ~30 so its going to need to be a calculation.
If anyone could point me towards a method I'd be etenaly greatfull - likewise if you have suggestions for a better method.
Cheers
For the sake of anyone searching this, whilst only a temporary solution I used probability mass functions to get ratios this allowed the user to modify the mean and SD and thus skew the curve as they wished. I could then use the ratios for my calculations. Poisson also worked with this method but turned out to be a slightly stupid idea in terms of choice.