management software
Running a repair shop means managing long-lasting paperwork: insurance claims that stay open for months, payments that arrive late, and many different people involved: customers, insurance companies, external handlers, suppliers. Keeping track of all of it on paper or in a spreadsheet quickly becomes messy, and it's hard to answer simple questions like who still owes us money, and how much? or who do I have to call today?
What PraticheManager does for you
- One friendly place for every claim. Each repair job (pratica) has its own page with the customer, the car, the insurance company, costs, prices, and a timeline of everything that happened.
- Always know who owes what. The system automatically shows how much has been paid and how much is still outstanding - for every claim and in total.
- A phonebook of all contacts. Customers, insurance companies, and suppliers in one address book, linked to their claims and invoices.
- Built-in accounting. Every payment and cost is recorded as a movement, so the books are always up to date and you can see receivables, overdue amounts, and profit at a glance.
- Documents attached to each claim. Photos, invoices, and files can be uploaded and stored with the right pratica.
- A clear history. Every change is logged - you can always see who did what and when, and nothing is lost.
- Reports and exports. Lists and summaries can be filtered, sorted, and exported (e.g. to Excel) for your accountant.
- Your own private setup. PraticheManager can be deployed in an isolated environment - your own server, your own network - so your business data stays entirely under your control.
- Made for teams. Full multi-user support: every staff member gets their own login, with roles and permissions, so everyone sees what they need and nothing more.
In short: PraticheManager replaces the paper files and the big spreadsheet with one simple, friendly tool that follows every claim from the crash to the final payment - and keeps the accounts in order along the way.
Introduction to optimization problems
There are a lot of real-life problems that are very difficult to solve without the help of a well-programmed computer. Many of those problems have a combinatorial essence. Combinatorial means that, to solve the problem, we have to associate one discrete set of elements with another set of elements, whatever they represent. The absolute best solution for many of these non-trivial problems cannot be found in a reasonable amount of time, because the only way to find the best solution is to try all the possible combinations. It is easy to guess that even for apparently simple problems, the size of the space where one has to find the solution grows exponentially.
What is the best path for the postman?
How to find a good solution?
We have to say to the computer in some way what a good solution is for us. Remember that the computer understands only numbers and relations between abstract objects. So we have to define a function of our trial solution that calculates a number. This number is the score of the trial solution. That is: given a trial solution of our very complicated problem, we have to calculate a number that says how much this trial solution is good. The computer then, generating many trial solutions, will find the one with the lowest score.
In the case of the postman, the cost function is very simple: the number of kilometers that he does to deliver all the mail. In general, the cost function can be a very complicated function, with many parameters. The human being that wants to solve the problem with a computer has to tell all the parameters, to teach the computer what it has to do.
In general to solve an optimization problem with a computer we need:
- a model of all our possible solutions
- a function that given a particular trial solution calculates the cost of the solution (a number)
- an algorithm to generate possible solutions
- all the parameters of the function (user dependent)
The referees and the matches problem
This one, I think it is terrible. Good referees have to do difficult matches. You have to pay for every kilometer. You want that all the referees have more or less the same number of matches. You don't want a referee to always see the same team. Referees can travel in pairs. Not all referees can do all the championships. Some referees do not like each other. You don't want matches without a referee. ... There are tons of constraints and minimization tasks.
I wrote a program that does all this for you, and outputs the best result that it found with a simple analysis of the solution, given the constraints.
Riki's FinalRef
The program, written in haskell (hey, Haskell!), consists of two main parts: a solver and a web interface that run on a server. No installation procedure is required. The web interface has a browser interface, and a REST API interface. An example python REST client is provided. Both the browser interface and the REST API provide the same functionality. Inputs and outputs are simple CSV and JSON files. The user can have some fun in creating his own parameters or he can choose between a set of predefined ones. The program takes into account the following facts (more can be added):
- number of refs in a match
- distance in days between matches of the same ref
- equal distribution of the number of matches to the refs
- distance in days between matches with the same team for the same ref
- refs pairs/triplets/... that have preferably matches together
- refs that hate each other
- teams and refs that are not compatible (for whatever reason)
- every ref is allowed to have matches only in a subset of all the championships
- total kilometers (with eventual intermediate meeting point that is calculated)
- good refs have difficult matches
- refs unavailability and availability
- manually entered assignments (those are always satisfied)
- all weird incompatibilities with teams, automatic management of referees that are also players (that are not available when they play),...
- custom limits on specific referees: number of matches, maximum distance,...
- your new custom requirements