Drools Vehicle routing planner but with a little difference - drools-planner

I am doing a vehicle routing that is has the following parameters:
Vehicle must visit the same place twice. Earlier is to setup later is to collect.
Both times are already per-determined in the database with lat and lng coordinates.
A vehicle cannot be in 2 different location at a given time
How do i go about using drools planner to do this? Thanks

Copy-paste the VehicleRoutingExample
Rename VrpCustomer to VrpVisit
Add a property visitType on VrpVisit. It's a enum of SETUP and COLLECT
Create 2 VrpVisit visits per customer, one of each type
Maybe you 'll also need to add a constraint that the 2 visits of the same customer need to be visited by the same vehicle. Maybe even the order matters (SETUP before COLLECT)

Related

IBM Maximo: Start Center and Multiple Tables

I am trying to help a colleague out. I created a query in IBM Maximo 7.6, it is in the work orders table but I added a sub query that pulls from the workflow table and filters for anything in Work Flow.
My question is: On the start center, is there anyway to modify the results set so that we can pull fields from work order and work flow? I have work number, status, and vehicle. Basically, is it possible to bring in what inbox the work order is in, on the results set, in graphical form. So, put together a bar graph based on the inbox?
Any direction would be great, thank you!
First, you need to make sure there is a Relationship on the WORKORDER object in Database Configuration that will find the workflow record you want to see info from for a given work order. Once you've done that, these instructions show you, step by step, how to create Report Object Structure (ROS) (an Object Structure "Consumed By" Reporting), how to grant access to the ROS, and then how to use the ROS in a Result Set portlet to access data in related objects.

Add a field to a query where the data comes from a subform

I need to filter a a table with parameters that are calculated on a non related table, but to do this in Access web I need to add the [Project_Id] to the task list.
To clarify further, the user answers some questions regarding the details of a project, which in turn will calculate in the background a group of parameters that are needed to sort a task list.
The problem is the task list is generic and not related to a project so before I can use the project related filter parameters I need to assign a project id to the task list or there is no relationship and no way of knowing what project parameters to use.
I tried to do this with a query but being a Web database I am unable to select the data from the form control.
Hopefully someone can help me find a solution, because I have exhausted Google and my own knowledge on the subject. One last thing I am unable to use code thanks to security issues.
In case anyone is interested I found away to assign the project id to the task list using data macros.
The data macro is assigned to a table that is related to the project and when updated edits the tasks list to add the current project id for each record in the table.
I still have some issues to work around, but in general it does what I need.

magento Enable 'free shipping' only when certain discount code used

we have a discount code set-up for friends. When they use it they get 10% off. In reality many friends logically live nearby and hence ask me: why cant I also pickup the items this weekend? We do however in general not support pickup.
What we would like is the following. When the "friend discount code" is used - only known to friends - the option 'free shipping/pickup' should become available. Only in this case. (ad. We dont want to offer free shipping persé. Some friends do live far away and get it per post, but we want them to have the option to choose)
Any tips or ideas on how this could be accomplished?
[UPDATE]
I am thinking 2 solutions.
Create a second discount code that enables free shipping (and you also only tell your friends to use when they want to pickup)
Little more difficult - but does what we want: Edit files in /public_html/app/design/frontend/base/default/template/checkout/onepage/shipping_method
(are these the right ones?)
a. in loop addding shipping methods add free shipping
b. but only if variable get couponcode is value XYZ
Create a customer group for special customers
Assign those special customers to this group
Create a shopping cart price rules for %10 discount
Select the customer group that we created above from "customer groups" section
Apply necessary settings for the rule ( coupon code etc.. )
also, take the following references :
What are Shopping Cart Price Rules and how do I use them?
How to Setup Simple Customer Specific Discount Pricing
The easiest way is to
create a website on your store for friends only.
Forbid guest buy there.
Forbid open registration.
(you can forbid browsing without login)
Configure settings for website, you need.

SSAS Dynamic Dimension Security based on another dimension attribute

In my project I have to apply security based on a dimension attribute.
I think the best way to explain my scenario is with an example, if you need more info please request me and I'll love to told you if it will help me find a solution.
I have some main dimension, the dimcustomer, dimseller, fact, data and geographic.
The fact table are related with dimseller ids, the dimcustomer is related to the dimseller based on one dimseller specific attribute(CNPJ)(another dimensions that i didnt described are related the same way).
So my goal is to apply a role security based on the dimseller CNPJ, so then when the user related with that seller trys to browse data he will be allowed to view only the data that are related to his seller CNPJ.
Table example:
DIM Seller: DIM Customer FactTable
id name cnpj id name dimseller.cnpj dimseller.id dimcustomerid measure
1 ME 1234 1 guest1 1234 1 1 50,00
2 you 5678 2 guest2 5678 2 2 100,00
So if i login as ME i will be able to se that i have the customer guest1 with one sold product that was sold by 50 bucks.
Got my point?
What is the best way of doing it?
For now I'm considering the following guide: Claim Authentication with dynamic dimension security, but at that way I should define it attribute by attribute.
Is there a way that i can define this security need? I can easy filter the data using sql statements, but i have no ideia how i can apply this kind of security in the ssas.
Thank you guys anyway!
To apply security within a dimension, you need to use roles. For each roles, you can then specify which element in the cubes/dimensions that are available to that role. So, what you got to do is to create a role by CNPJ that will be able to view only their CNPJ.

Drupal Views display newest content per taxonomy limit to one node

I want to create a view where all 5 of my taxonomy terms are displayed and it then displays the latest node published but this is limited by 1. For Example:
Tax Term 1
Latest node published
Tax Term 2
Latest node published
etc etc
Currently I'm grouping by taxonomy term so it's displaying all nodes published then sorted by published date desc. I can't quite figure out how to limit the nodes to only show one item per taxonomy term.
Any help would be greatly appreciated.
This is possible with Views 3. I've tested this on D7, but should work on D6 also.
Add a new view of type - Taxonomy terms
Add relationship - Taxonomy term: Representative node
Other - Use aggregation: Yes
Add field - Content: Title. Change Aggregation settings to Group results together
It's not great if you have a lot of nodes, but I've done this in other cases by using a filter for "Promoted to front page" - then you simple make sure you only promote one node at a time.
I'd suggest to use a combination of panels ans views.
First, create a (or use the default) view for nodes which takes a taxonomy term as argument. Second, create a panels page containing five regions. Each region is to be filled with a view (in fact it's going to be the same view from step one, but with different arguments). Within panels ui you can restrict the number of shown entries of each view, set this value to one to have only one article be shown per term.
Panels: http://drupal.org/project/panels
Views: http://drupal.org/project/views
I'd recommend checking out the Views Group By module.
http://drupal.org/node/389230
The tutorial listed above actually describes almost exactly what you are trying to do.

Resources