Create slider to divide a variable over turtles - slider

I am modelling the willingness for industries at a port to invest in Carbon Capture and Storage (CCS) technology with a given subsidy. I have two different breeds, the port and industries. I have 15M EUR of subsidy each year available. Is there a way to divide this subsidy over the agents with a slider so that I can change the dispatch each year? Thanks for any help!
Max

Related

delivery frequency in AnyLogic using GIS

Can someone explain how to implement different delivery frequency in AnyLogic using GIS Route optimisation? We are currently having problems getting the vehicles to run at the specified frequency.
For example:
Customer A: 4 times a day
Customer B: 8 times a day
Thank you and best regards

tour start as an additional planning variable in Optaplanner VRPTW - a good idea?

Hi and happy new year to all Optaplanner users,
we have a requirement to plan tours. These tours contain chained and time-windowed activities (deliveries) executed by a weekly changing number of trucks.
The start time of a single tour can vary and is dependent on several conditions (i.e. the goods to be delivered must be produced, before the tour can start; only a limited number of trucks can be served at the plants gates at the same time; truck must be back before starting a new tour). Means: also the order of tours can vary and time gaps between the tours of a truck can occur.
My design plan is, to annotate TourStartTime as a second planning variable in Optaplanners VRPTW-example and to assign TourStartTime to 2-hours time grains (planning horizon is 1 week and tours normally do not start during night times; so the mentioned time grains reflect a simplified calendar for possible tour starts).
The number of available trucks (from external logistic companies) can vary from week to week. Regarding this I wanted to plan with a 'unlimited' number of trucks. But the number of trucks per logistic company, that can be actually assigned with deliveries, should be controlled by a constraint (i.e. 'trucks_to_be_used_in_parallel').
Can anybody tell me, if this is a feasable design approach, or where do I have to avoid traps (ca. 1000 deliveries/week, 40-80 trucks per day) ?
Thank you
Michael
A second planning variable is possible (and might be even the best design depending on your requirements), but it will blow up the search space and maybe even custom course grained moves might become needed to get great results.
Instead, I 'd first investigate if the Truck's TourStartTime can be made a shadow variable. For example, give all trucks a unique priority number. Then make a Truck's TourStartTime a shadow variable: the soonest time a truck can leave. If there are only 3 lanes and 4 trucks want to leave, the 3 trucks with the highest priority number leave first (so get the original TourStartTime, the 4th truck gets a later one).

Data Model to represent Flat and Variable rate

I am designing a database for an app to sell parking spot use. Customer can order n number of uses of parking spot uses or pay a flat rate and use it for monthly/weekly or yearly. They can do mix of those also. Like they can buy 9 parking spot uses and later decide they will pay for the whole month - in which case their charges are kind of pro-rated.
For this, I have a Customer table, an Order Table and then an order type table. However, I am having a slightly hard time with the order-type table.
Can some one please shed light on how to model the rate and get available spot-uses for a customer?

Payroll, OpenERP 7, U.S. payroll taxes

I have searched and searched but to no avail... has anybody created a payroll module for a U.S. based company? It seems that most of what I've seen is that companies are using payroll companies to process their payroll, but I haven't found anybody using OpenERP 7 for hourly employees with the U.S. tax system (it's not a flat tax rate).
It seems like what I may have to do, is create tax table in PostgresQL for federal, state, and local taxes, then reference those tables in the deduction calculation. I read one article on using the vendors/ or suppliers module and implementing a tax structure from that, but then again, those are still flat rates. I have to believe someone else has done this for the U.S. payroll system, and probably done it better than I could as I am fairly new to OpenERP.
I am in the process of doing something similar for LedgerSMB. The thing is that doing this on an open source model is extremely painful business-model-wise. I am working on solutions to that part but that's outside the scope of your question.
In general many US taxes are set up in marginal rates with certain minimums and maximums. For example income tax withholding is a set of marginal rates within tax brackets. Same with FICA and FUMA, but FICA taxes are capped at a certain level, so a simple tax table with rates, minimums, maximums, etc. and then a way of handling deductions to determine the correct line may be sufficient.
But users of most open source ERP's use third party services for payroll.
I have worked in an ERP. How we did is just calculate the FIT in yearly for all the employee and subtract the withholding amount with multiples.
FIT => Taxable Wages Yearly - (No.of withholding(Exemption))
Do the process as per the revision based on single or married only for annually. No need to update all the tables.
Then,
Divided it based on the frequency from the employee table information
EX:
for monthly : FIT/12
for daily : FIT/365
For SIT you have to use based on the document in the state usine case function.

Field values that vary over time and querying them

Imagine you have a website which lists available hotel rooms and their prices.
The hotel owners set a price per day for each room - it only needs to be as complicated as "Jan 1st costs $100" not "Jan 1st 1999 costs $50, Jan 1st 2000 costs $100".
The granularity is limited to day-rate.
What would be the most efficient (in terms of load when querying for rooms) way to represent this in a database?
For each room, have a separate table holding a date field and a price field? ie 365 entries per room.
I see ways to solve this, but the problem becomes slightly more complicated when for example a user wishes to do a query such as "7 days in august with a budget of $500". This is a feature I would dearly like to implement.
The UI will allow owners to set room prices as blocks of time rather than individual day rates - eg if a room price was $50 for jan-jun and $100 for jul-dec then that is two price blocks. Obviously if needs be that could be translated into 365 date type fields, but a solution using two daterange type fields instead would be preferable.
Any pointers as to where I could learn techniques for this would be greatly appreciated. I have searched google and found information on Calendar Tables, but any additional tips or info would be appreciated.
Historically I have used MySQL, but anything would be considered.
In the terminology of Ralph Kimball, this is called a slowly changing dimension.
I would suggest that you look at one of this books. The latest edition of "The Data Warehouse Toolkit" should cover this topic quite well.