Skip to content

Latest commit

 

History

History
149 lines (108 loc) · 11.6 KB

idea.adoc

File metadata and controls

149 lines (108 loc) · 11.6 KB

Idea 💡

This file documents future improvements to the application.
Until they are integrated, it stays here. Once integrated, the content is cut in order to be put in the right section of the documentation

To consider

  • Better null management.

  • Use Optional

Packages

apartment

apartment.xml

The apartment.json package has been completed.
It would be interesting to do the same for aparment.xml : Make the same class names (xmlConverter) with the same public methods (xmlToApartments, apartmentsToXml …​) to simplify the use of XML

valuefunction

  • Offer a feature that allows the user to say whether the list of apartments offered suits him or not. If not, ask him a series of questions to change the different weights and improve the end result.

  • Reflect on the use of inheritance

Add distance criterion
  • The tenant will be able to add as many places of interest as he wants thanks to a button on the interface and put them in a set that will be stocked in Profil. After that, it will be integrated into the calculation of the ApartementValueFunction. By default, the user’s only interest place is the center of Paris. In the package documentation, we added the DistanceValueFunction explanation and how we would integrate it in the AVF’s calculation.

  • To add the distance criteria in the ApartmentValueFunction, we should proceed as follows :

    • A criterion distance of type IS_LATLNG_DECREASE must be added in the Criterion enum class of the ValueFunction package.

    • Add ‘IS_LATLNG_DECREASE` in the ValueFunctionType class because DVF implements PartialValueFunction<LatLng> and a method to check the domain LatLng.

    • To be able to use the DistanceValueFunction class, we will add a variable of type PartialValueFunction<LatLng> in the AVF class.

    • Add the subjective value of the DISTANCE criterion in the calculation of the subjective value of the apartment made in the Builder of the getSubjectiveValue method.

    • Add in the class Apartment a method getAdressLatLng that returns the coordinates of the apartment location. We propose the following approach which still requires some thought : The method getAdressLatLng will use the Localizer class (already implemented in the project) that allows use to obtain the coordinates of an apartment knowing its adress.

    • After these changes, the unit tests fail because the calculations are based on 10 criteria. Therefore, the calculations must be modified to take into account the new criteria. We should modify the default weight : incream from 0.1 to 1/(number of criterion) for each criterion and change the method adaptWeight in the AVF. Unfortunately, the unit tests can fail because of the API that give the distance in real time and depends on the current traffic circumstances.

valuefunction.profile
  • Implement new questions in Profile, it might be useful to go through a QuestionManager

    Examples of questions to implement:

    • Would you pay X euros more for having Y bedrooms?

    • Would you pay X euros more for having a terrace?

  • Imagine new profiles, including a personalized profile for people who do not fit into any of the three profiles offered. Once this is well implemented, we can imagine a profile backup system so that users can find their lists of apartments.

  • Be able to save and import your profile with JSON and XML

GUI

  • Implemented a notion of session → do not have to start from 0 to start a new search

  • Create a main menu to navigate between the different functionalities of the application

Main classes

SpiderPlot

One interesting improvement is a spiderplot visualisation to compare 2 selected apartments.

The SpiderPlot class will be located in the Plot package.

Some diagrams are related to it : plot package and Interaction between user and the spiderplot.

Creating the spiderplot remains on the JFreeChart library. It allows to create a spiderplot by taking a CategoryDataset in entrance.

We thought of the following functions (taking into account the teacher’s remarks):

  • toCategoryDataset : take 2 apartments and a valuefunction in entrance and convert them into a CategoryDataset.

  • createChart : take the CategoryDataset and create the SpiderPlot chart.

  • createImgChart : return a RenderedImage of the SpiderPlot.

  • saveImgChart : save the RenderedImage into a specified Path in a SVG format (use Apache Batik for saving in SVG)

Then, the spiderplot need to be integrate into the LayoutApartmentGUI by :

  • Creating a button on the interface : by selecting 2 apartments in the list, tenant could push the button to compare these 2 apartments.

  • Displaying the spiderplot on the same interface (at the bottom right for example).

AskOpinionForUtility

The AskOpinionForUtility interface is no really connected to the rest of the application. In fact, while running ProfileGUI you display the AskOpinionForUtility GUI but the adaptation of the value function is not implemented. You have to take into account the tenant’s responses in the value function calculation. For the moment, all questions are in French and unwell worded. One objective could be translating these sentences and reformulating them to precisely guide the user.

LayoutApartmentGUI

The field which displays details is too small to read them completely. A first improvement could be to enlarge them.

We could also add more details such as the number of bathrooms or if the apartment has Wi-Fi or television. In fact, we could add all the information we have on the apartment.

CreateApartmentGUI

In order to improve and make this window match with our ambitions, we might add or modify the following fields (non-exhaustive list):

  • Improve the « design » of some error messages. Actually, some of them are cut and we can only see the beginning of the displayed message.

  • Add options. For example, we can add a field which indicates if the apartment is furnished or not or if the animals are allowed in the building.

Others (given by oliviercailloux)

  • The Histograms picture should be exported as a RenderedImage like the SpiderPlot class. See more details above in the SpiderPlot section.

  • DistanceValueFunction must depends on a service that compute distances. For now DistanceValueFunction use an API key to compute the distance between an apartment and the tenant’s interest locations.

  • Take charge distant unit testing with JARiS.

  • Find a way to store the user’s interest places and how to question him about it.

  • Adapting the ApartmentValueFunction by asking differently the questions (for example : What do you prefer between an apartment of size x at y € and an apartment of size x' at y' € ?) and adapting the shape of the valuefunction depending on the tenant’s answer.

  • The question selected to improve the ApartmentValueFunction should depend on the Tenant’s answers to the questions previously proposed. Suggestion : Store the answers and give access to the answers to the GUI.

  • AskOpinionForUtility takes care of display and choice of questions. It’s better to separate these 2 aspect and name them as AskerGUI or QuestionChooser depending on the aspect.

  • Create an Orchestrator class that manage the GUI interfaces. It allows to activate or desactivate the GUI components.

  • Remanufacture DistanceSubway, which mixes two features (address and contact request) and duplicates the creation of the request object. Integrate Localizer into this reflection. For example, you would need a localize(String) method: LatLng instead of getGeometryLocation.

  • Cleaner reading of the Google API key via a file or an environment variable in KeyManager (see plaquette-MIDO-json)

  • Be able to visualize in a GUI the apartments from the JSON file

  • Generate graphs and statistics of available apartments (average surface, median, number of apartments per surface, …​)

  • Ability to save and read user value function parameters in a JSON file

  • Reflect on the treatment of the value "distance from popular places": the user must be able to specify these places; the calculation must be specified …​ (Consider a TimedApartment which also contains a "time" value, depending on the user’s location.)

  • Display of the comparison of two apartments from the user’s point of view: partial values ​​and total value (allowing him to understand why an apartment has a lower value)

  • Visualize the value function of the user: on a criterion, graph of the partial value function on this criterion

  • The PartialValueFunction interface should not extend Function. Simplify the creators of PartialValueFunction using lambda expressions.

  • Think about a pleasant and useful display of different apartments of great value for the user, in order to allow him to explore interesting alternatives

  • Allow the user to modify their value function and see the result at the same time on the relative value of two apartments

  • Investigate the possibility and propose a way to merge (parts of) this project with decision-uta-method, which offers a generic way of dealing with a decision problem with criteria and alternatives (alternatives are the objects among which the user wants to choose, for example apartments, cars…)

  • Use this project to find a value function that suits the user, given apartment comparisons

  • Web server that returns (or displays) the value function of the user, stored in its own directory

  • Generalize other parts of this project so that they run on a server

  • Alerts: the user indicates how useful he is to be alerted when an interesting new advertisement appears.

  • Extracting ads from pap

  • The user can indicate by seeing the list of announcements that he prefers one announcement over another, while it is classified under the second. The system then allows him to correct its usefulness so that the classification in question is restored.

  • Reading and writing an apartment in and from an XML file, in xmcda-modular format. See example.

    • Reading and writing of a PartialValueFunction in xmcda-modular format.

    • Reading and writing of an ApartmentValueFunction in xmcda-modular format.

  • GUI which shows the user all the apartments available in a directory given as a parameter, sorted by user utility (provided in a file in the same directory). The user can click on an apartment and see its description.

Don’t consider

  • Q-learning (like Tinder) : Too complicated

  • Reinforcement learning : Too compicated