Last change
on this file since 27 was 27, checked in by bart, 4 years ago |
- party capabilities now include profile information. Existing parties may need small fix * plot layout shows accepts * VotingEvaluator use group power instead of group size * runsession you can now also select MOPAC-only parties
|
File size:
910 bytes
|
Rev | Line | |
---|
[27] | 1 | package geniusweb.bidspace;
|
---|
| 2 |
|
---|
| 3 | import static org.junit.Assert.assertEquals;
|
---|
| 4 |
|
---|
| 5 | import java.io.IOException;
|
---|
| 6 | import java.nio.file.Files;
|
---|
| 7 | import java.nio.file.Paths;
|
---|
| 8 |
|
---|
| 9 | import org.junit.Test;
|
---|
| 10 |
|
---|
| 11 | import com.fasterxml.jackson.databind.ObjectMapper;
|
---|
| 12 |
|
---|
| 13 | import geniusweb.profile.Profile;
|
---|
| 14 | import geniusweb.profile.utilityspace.LinearAdditiveUtilitySpace;
|
---|
| 15 |
|
---|
| 16 | public class PartialSpaceFromUtilityTest {
|
---|
| 17 | private final static ObjectMapper jackson = new ObjectMapper();
|
---|
| 18 |
|
---|
| 19 | @Test
|
---|
| 20 | public void createPartialSpaceJobs() throws IOException {
|
---|
| 21 | String file1 = new String(Files.readAllBytes(Paths.get("src/test/resources/jobs/jobs1.json")));
|
---|
| 22 | LinearAdditiveUtilitySpace profile = (LinearAdditiveUtilitySpace) jackson.readValue(file1, Profile.class);
|
---|
| 23 | PartialSpaceFromUtility partial = new PartialSpaceFromUtility(profile, 20);
|
---|
| 24 | System.out.println(jackson.writeValueAsString(partial));
|
---|
| 25 | assertEquals(20, partial.getBetter().size());
|
---|
| 26 | }
|
---|
| 27 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.