Optimization newbie
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I have what I believe is a relatively straight forward optimization flow.
I would like to select players that have the highest value (coefficient) relative to their cost. The by player tab illustrates these data points. you can either select a player or not so lower bound is 0, upper bound is 1, and type is binary.
on the constraint tab i have the players listed again with their cost (what we want to minimize) and their position. i have set the positions to select 1 QB, 1 TE, 2 RB and 3 WR. there needs to be a full team, you cant just have 1 QB and no one else for example.
I am not clear where i am going wrong now as i have never used this tool before and am following a guide online. any help would be appreciated.
Solved! Go to Solution.
- Labels:
- Optimization
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey @lliberm1 ,
Here's a couple of things you can fix in your workflow to get the Optimization tool working :
- Your type should be B for binary and not b as it's case sensitive (since it's a binary, no need to define upper and lower boundaries, so lb, ub columns can be omitted)
- You have to exclude the null values that feed in to the Objective input anchor
- The number of records in the A input anchor of the tool should be the same as the number of records that feed into the O input anchor. It appears some records/players appear more than once (I used a Unique tool to figure that, but you know the dataset better)
- In the B Input anchor, the optimisation tool recognizes the equal sign as == and not =
It appears to be working now, but I'm not sure what you are trying to achieve so I didn't mess the configuration more than to overcome those error messages
Hope that helps,
Angelos
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks @AngelosPachis
I leveraged what you provided and updated a few items.
1) i realized that the maximize objective should be selected as we are looking to maximize value not minimize cost as that is already in the constraints.
2) i concatenated name and position to make unique records as some players had the same name but were different people
3) i updated some of where the data is coming from but shouldn't be material to the discussion
my issue now is that i want to limit the positions as its currently optimizing by selecting 2 QBs when i only want 1 max. i thought my constraint of setting QB == 1 would handle that but it doesn't appear to be working. i am not sure if that is because the constraint shows 1 for all the positions where not null?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
The data that you posted is all choppy - perhaps this is an earlier version? I'm only seeing two columns going into the 0 and a whole lot of errors popping up. Is there a version which runs but doesn't give you the results you want?
Off the top of my head I'd say that you should look at the Fantasy Sport League Optimization workflow which is under the help/sample workflows/predictive anlytics menu...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey @lliberm1 ,
Your constraints coming in the B anchor should come in the same order as from the A input anchor. For example, looking at the A input anchor, you have
You should rearrange the values in the B input anchor so they appear in the same order, so on the left hand side of the following image is how things used to be and on the right hand side how you should rearrange them
Output now gives me only one QB
Hope that helps, let me know if that worked for you.
Cheers,
Angelos
